[Koha-bugs] [Bug 33898] background_jobs_worker.pl may leave defunct children processes for extended periods of time

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Jun 5 16:54:37 CEST 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33898

Kyle M Hall <kyle at bywatersolutions.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #151994|0                           |1
        is obsolete|                            |

--- Comment #3 from Kyle M Hall <kyle at bywatersolutions.com> ---
Created attachment 151997
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=151997&action=edit
Bug 33898: background_jobs_worker.pl may leave defunct children processes for
extended periods of time

It appears that the background jobs worker can leave defunct processes for
periods of time. Though it is mostly harmless, it would be nice if that did not
happen. Children are reaped automatically when start or wait_all_children are
called. We only call start when a new job is found, and wait_all_children after
exiting our while loop. The solution is to simply call reap_all_children after
we sleep. This is a non-blocking call that will clean up those defunct
processes.

Test Plan:
1) Disable Rabbit
2) Set background_jobs_worker/max_processes to something like 5
3) Restart all the things!
4) Run a bunch of elastic index updates
5) Verify you have defunct processes
6) Apply this patch
7) Run more elastic index updates
8) Defunct processes should disappear every 10 seconds or so!

If you do not see defunct processes, the test plan is to simply verify
everything continues to work as expected.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list