f_identify_cycle doesn't unlock mutex on Pike errors
Imported from https://youtrack.roxen.com/issue/PIKE-106
Reported by Martin Karlgren marty@roxen.com
f_identify_cycle may lock up the memory counting subsystem if something throws a Pike error. It should catch errors and call stop_mc()
if an error is caught.
In the below backtrace, which is the last one before all threads locked up (supposedly blocked on the mutex in f_count_memory
), it seems a ==
lfun (called by low_mapping_insert?) threw an error.
base_server/roxenloader.pike (ba0b2444):251: unknown function(RequestID())
-:1: __builtin.identify_cycle(RoxenModule(EP/insite_editor#0)->__lambda_68129_4_line_867)
base_server/roxen.pike (bfa473be):6427: roxen()->__lambda_66524_9_line_6414(@0=RoxenModule(EP/insite_editor#0)->__lambda_68129_4_line_867)
protocols/http.pike (231cb622):3995: RequestID()->__INIT()
protocols/http.pike (231cb622):3862: RequestID(/actions/poll?timeout=-1&interval=0&tag=919&rep_session_id=24976743-AEC7-45F6-AF6B-A1CD8DD81B60&rep_session_ttl=180&rnd=1526404283761)->clone_me()
packages/print/pike-modules/REP.pmod/ClientSession.pike (b070dcd2):1000: Subscription("35DEBFCF-4F5C-4E1E-9A43-5B4D56118AA0", "get-story-item")->low_call_cb(REP.SIVersion(3437224, SI 1249784))
packages/print/pike-modules/REP.pmod/Notification.pmod/Client.pmod (123df0e8):112: Client.NotificationQueue(1008)->notification_thread()```