Perl services can crash with a "Use of freed value in iteration" error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenSRF |
Confirmed
|
Medium
|
Unassigned |
Bug Description
Perl app listeners can occasionally throw the following exception:
server: died with error Use of freed value in iteration at /usr/lib/
When this happens, the listener will kill its drones and attempt to reset itself (though the reset doesn't work for other reasons that I'll document in a separate bug).
We have seen this in servers running Perl 5.24.2 and 5.28.1; it may well affect other versions of Perl.
The cause appears to be an interaction between how OpenSRF:
This bug appears to be very sensitive to changes in Perl's garbage collector and how it manages reference counts to stack variables. This may explain why this bug may have been hiding for a long time.
OpenSRF 3.1+
Changed in opensrf: | |
importance: | Undecided → Medium |
milestone: | none → 3.2.3 |
Changed in opensrf: | |
status: | New → Confirmed |
Changed in opensrf: | |
milestone: | 3.2.3 → 3.2.4 |
Changed in opensrf: | |
milestone: | 3.2.4 → 3.2.5 |
A patch is available at the tip of
working/ user/gmcharlt/ lp1953044_ fix_freed_ value_error / https:/ /git.evergreen- ils.org/ ?p=working/ OpenSRF. git;a=shortlog; h=refs/ heads/user/ gmcharlt/ lp1953044_ fix_freed_ value_error
If anybody can come up with a more deterministic reproduction plan, that would be excellent.