Date: Thu, 04 Oct 2018 05:45:14 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 231933] bc hanging and leaving zombie of dc when being called by process with SIGCHLD blocked Message-ID: <bug-231933-227@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D231933 Bug ID: 231933 Summary: bc hanging and leaving zombie of dc when being called by process with SIGCHLD blocked Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: vladimirv@ixsystems.com Created attachment 197768 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D197768&action= =3Dedit Patch that fixes described issue In our system (http://www.freenas.org/) uwsgi application server calls a py= thon program that calls a shell script that calls a shell script that calls bc a= nd it hangs leaving us with hanging process tree like this: ``` 3135 |-- /usr/local/bin/uwsgi <...long text cut> 4435 | `-- /usr/local/bin/uwsgi <...long text cut> 8952 | |-- /bin/sh /usr/sbin/service smartd-daemon status 9087 | | `-- /bin/sh /usr/sbin/service smartd-daemon status 9088 | | `-- /bin/sh /usr/sbin/service smartd-daemon status 9090 | | `-- /usr/bin/bc 9091 | | `-- <defunct> ``` This happens because bc relies on SIGCHLD to determine that dc has complete= d, wait for it and exit on it's own. SIGCHLD is blocked by uwsgi and this bloc= king is inherited by each it's subprocess. Our shell scripts are rather complica= ted and call a lot of other programs and bc was the only one that has this issu= e, so, despite no specification defines who should clear process signal mask, caller or callee, I think this should be fixed with simple patch attached. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-231933-227>