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: [email protected]
Reporter: [email protected]
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.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"