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=231933 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=197768&action=edit Patch that fixes described issue In our system (http://www.freenas.org/) uwsgi application server calls a python program that calls a shell script that calls a shell script that calls bc and 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 completed, wait for it and exit on it's own. SIGCHLD is blocked by uwsgi and this blocking is inherited by each it's subprocess. Our shell scripts are rather complicated and call a lot of other programs and bc was the only one that has this issue, so, despite no specification defines who should clear process signal mask, caller or callee, I think this should be fixed with simple patch attached. -- 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>
