[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
Fri Mar 8 07:03:31 CET 2024


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

Victor Grousset/tuxayo <victor at tuxayo.net> changed:

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

--- Comment #15 from Victor Grousset/tuxayo <victor at tuxayo.net> ---
Created attachment 162941
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=162941&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.

Signed-off-by: Emily Lamancusa <emily.lamancusa at montgomerycountymd.gov>
Signed-off-by: Victor Grousset/tuxayo <victor at tuxayo.net>
  Used Asymar's test plan from comment 12. (based on record import)

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


More information about the Koha-bugs mailing list