Bugzilla – Attachment 151993 Details for
Bug 33898
background_jobs_worker.pl may leave defunct children processes for extended periods of time
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33898: background_jobs_worker.pl may leave defunct children processes for extended periods of time
Bug-33898-backgroundjobsworkerpl-may-leave-defunct.patch (text/plain), 1.59 KB, created by
Kyle M Hall (khall)
on 2023-06-05 14:39:27 UTC
(
hide
)
Description:
Bug 33898: background_jobs_worker.pl may leave defunct children processes for extended periods of time
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2023-06-05 14:39:27 UTC
Size:
1.59 KB
patch
obsolete
>From ae22fd1f9f486ec146248345e64616f1f1be35b1 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Mon, 5 Jun 2023 10:34:46 -0400 >Subject: [PATCH] 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. >--- > misc/workers/background_jobs_worker.pl | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/misc/workers/background_jobs_worker.pl b/misc/workers/background_jobs_worker.pl >index c54610458f..65ec0a2ab9 100755 >--- a/misc/workers/background_jobs_worker.pl >+++ b/misc/workers/background_jobs_worker.pl >@@ -157,6 +157,7 @@ while (1) { > > } > sleep 10; >+ $pm->reap_finished_children(); > } > } > $conn->disconnect; >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 33898
:
151993
|
151994
|
151997
|
153194
|
162941
|
162942
|
162943
|
162944
|
162953
|
162954
|
163056
|
163057