macfanctld keeps stderr open when daemonizing
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
macfanctld |
New
|
Undecided
|
Unassigned |
Bug Description
When installing the package 'macfanctld' it automatically starts the daemon (/usr/sbin/
However, the daemon child process inherits stderr and doesn't close it. As a result, any package which forks a child apt process and passes pipes for stdout/stderr will wait indefinitely for them to be closed.
I cam across this problem using ansible:
~~~
- hosts: localhost
tasks:
- apt: pkg=macfanctld state=absent purge=yes
- apt: pkg=macfanctld state=present
~~~
This consistently hangs at the second operation. At this point, ps shows:
~~~
root 11471 0.0 0.0 64956 2112 pts/1 S+ 13:16 0:00 sudo ansible-playbook tmp.yml
root 11472 2.1 0.1 85664 17160 pts/1 S+ 13:16 0:00 /usr/bin/python /usr/bin/
root 11751 0.0 0.0 4444 648 pts/1 S+ 13:16 0:00 /bin/sh -c /usr/bin/python /home/nsrc/
root 11752 9.7 0.4 120508 71432 pts/1 S+ 13:16 0:00 /usr/bin/python /home/nsrc/
root 11756 13.2 0.0 0 0 pts/1 Z+ 13:16 0:00 [apt-get] <defunct>
root 12000 0.5 0.0 4616 788 ? Ss 13:16 0:00 /usr/sbin/
~~~
Notice that apt-get process has completed, but the parent process is still waiting for it to close its stdout or stderr.
If you manually kill the macfanctld process, the ansible process completes successfully.
You can demonstrate this even more directly like this:
~~~
# ( service macfanctld start 2>&1 ) | cat
* Starting Apple MacBook (Pro) fan control daemon macfanctld
...done.
<< hangs at this point >>
~~~
Again, killing macfanctld from another terminal allows the command to complete.
ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: macfanctld 0.6+repack1-1
ProcVersionSign
Uname: Linux 3.13.0-30-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.2
Architecture: amd64
Date: Wed Jul 16 13:55:04 2014
Dependencies:
gcc-4.9-base 4.9-20140406-
libc6 2.19-0ubuntu6
libgcc1 1:4.9-20140406-
multiarch-support 2.19-0ubuntu6
InstallationDate: Installed on 2014-07-16 (0 days ago)
InstallationMedia: Ubuntu-Server 14.04 LTS "Trusty Tahr" - Release amd64 (20140416.2)
ProcEnviron:
LANGUAGE=en_GB:en
TERM=xterm
PATH=(custom, no user)
LANG=en_GB.UTF-8
SHELL=/bin/bash
SourcePackage: macfanctld
UpgradeStatus: No upgrade log present (probably fresh install)
Bugs are tracked in the project this package comes from (via a Debian repack). However they aren't fixed anyway since the project currently hasn't a developer any more.