On 05/19/2011 11:22 AM, Jonathan Nieder wrote: > Oh, dear. See <http://bugs.debian.org/607243> for context.
sigh. sorry to be the bearer of bad tidings. > No, I don't think that could be it --- the gitlog user is used by the > supervising process and not git-daemon itself. when a connection is made to git-daemon, it forks and hands the connection to the child process; the child process retains a connection to svlogd (run as gitlog) via stdout/stdin (this relationship was established by runsv). When the git-daemon service is removed, it terminates the parent process and orphans any outstanding children. the children remain alive, though. I suspect that svlogd stays alive until its stdin gets closed by all processes. Since the orphaned child retains its link, svlogd does not close. > Is this reproducible? yep. In terminal A (as root) do: apt-get install git-daemon-run In terminal B (non-priv user is fine) do: nc localhost git (and leave the connection open -- this simulates an outstanding git client that just hasn't managed to make any requests yet). Back in terminal A (as root) do: apt-get purge git-daemon-run You should see the same error. dpkg --purge git-daemon-run fails with the same error. If you terminate the nc connection, then dpkg --purge git-daemon-run completes successfully. You can also observe the svlogd instance going away when the nc connection terminates. > Does running "dpkg --remove" separately from > "dpkg --purge" work around it? Nope, it doesn't. > Could you add "set -x" to the top of > /var/lib/dpkg/info/git-daemon-run.postrm and send the resulting output > (well, one has to start somewhere)? sure, here you go (though i think the above analysis is hopefully more helpful): 0 pip:~# dpkg --purge git-daemon-run (Reading database ... 229974 files and directories currently installed.) Removing git-daemon-run ... Purging configuration files for git-daemon-run ... + test purge = purge + sv force-shutdown /etc/sv/git-daemon warning: /etc/sv/git-daemon: unable to open supervise/ok: file does not exist + : + rm -rf /etc/sv/git-daemon/supervise /etc/sv/git-daemon/log/supervise + rm -rf /var/lib/supervise/git-daemon /var/lib/supervise/git-daemon.log + for i in ''\''@*'\''' current config lock state + rm -f '/var/log/git-daemon/@*' + for i in ''\''@*'\''' current config lock state + rm -f /var/log/git-daemon/current + for i in ''\''@*'\''' current config lock state + rm -f /var/log/git-daemon/config + for i in ''\''@*'\''' current config lock state + rm -f /var/log/git-daemon/lock + for i in ''\''@*'\''' current config lock state + rm -f /var/log/git-daemon/state + rmdir /var/log/git-daemon rmdir: failed to remove `/var/log/git-daemon': No such file or directory + : + getent passwd gitlog + deluser --version + exec deluser -f gitlog Removing user `gitlog' ... Warning: group `nogroup' has no more members. userdel: user gitlog is currently logged in /usr/sbin/deluser: `/usr/sbin/userdel gitlog' returned error code 8. Exiting. dpkg: error processing git-daemon-run (--purge): subprocess installed post-removal script returned error exit status 1 Errors were encountered while processing: git-daemon-run 1 pip:~# Regards, --dkg
signature.asc
Description: OpenPGP digital signature