This is the mail archive of the
cygwin
mailing list for the Cygwin project.
troubles with forking program (not the usual probs though...)
- From: Markus Hoenicka <markus dot hoenicka at mhoenicka dot de>
- To: cygwin at cygwin dot com
- Date: Tue, 15 Nov 2011 19:38:30 +0100
- Subject: troubles with forking program (not the usual probs though...)
Hi all,
I've managed to screw up a forking program (refdbd, from
http://refdb.sourceforge.net) in an attempt to install R which I need
at work. This does not look like the widely reported fork failures as
I do not get any diagnostic output - things just don't work as
expected anymore. setup ran uneventfully, except that it failed to
upgrade libatk the first time as it was probably in use, so I ran
setup a second time after closing all programs. I've appended the log
of both runs just in case.
refdbd had been working happily for years until an hour ago. I ran
setup.exe to install R from cygwinports, following the well-known
instructions, and accepted any updates that setup would suggest. Now
there are a few seemingly unrelated ways that refdbd fails after the
upgrade, therefore I have to apologize for the amount of information
that follows. But maybe it rings a bell somewhere.
refdbd is a forking server and responds to queries sent from clients
(e.g. refdbc). refdbd is usually started in "daemon mode", i.e. it
detaches from its console. After I started it like this after the
update, I got the following:
$ ./refdbd
$ refdbc -C whichdb
could not establish server connection
That is, there were no error messages (and no errors in refdbd's log
file either) but the client couldn't talk to the server. Now I wanted
to kill refdbd again:
$ ps ax
PID PPID PGID WINPID TTY UID STIME COMMAND
2296 1 2296 2296 ? 45021 18:50:55 /usr/bin/mintty
I 3112 2296 3112 3640 0 45021 18:50:55 /usr/bin/bash
2968 1 2968 2968 ? 45021 18:51:00 /usr/bin/mintty
2964 2968 2964 3692 1 45021 18:51:00 /usr/bin/bash
4036 1 4036 4036 ? 45021 18:52:09
/home/markus.hoenicka/prog/refdb/refdb/src/refdbd
560 2964 560 600 1 45021 18:52:11 /usr/bin/ps
$ kill 4036
-bash: kill: (4036) - No such process
Otoh I can kill other processes, e.g. some less process, without problems.
I killed the refdbd process from Windows task manager. Then I
restarted refdbd, this time having it run in the foreground:
$ ./refdbd -s
I was now able to talk to the server from a different console:
$ refdbc -C whichdb
[...]
999:1
As mentioned previously, refdbd is a forking server which forks one
child per client request. The child is supposed to exit when done, and
it did so for years until an hour ago. Now I see this:
$ ps ax
PID PPID PGID WINPID TTY UID STIME COMMAND
2296 1 2296 2296 ? 45021 18:50:55 /usr/bin/mintty
3112 2296 3112 3640 0 45021 18:50:55 /usr/bin/bash
2968 1 2968 2968 ? 45021 18:51:00 /usr/bin/mintty
2964 2968 2964 3692 1 45021 18:51:00 /usr/bin/bash
3852 3112 3852 3592 0 45021 18:53:27
/home/markus.hoenicka/prog/refdb/refdb/src/refdbd
3132 3852 3852 3132 0 45021 18:53:46
/home/markus.hoenicka/prog/refdb/refdb/src/refdbd
3404 2964 3404 2928 1 45021 18:53:58 /usr/bin/ps
That is, the child is still around. Any subsequent client calls create
more of these zombies. Again, kill(1) maintains that these processes
do not exist.
So, to sum it up: (1) detaching refdbd from the console fails (2)
killing the process fails although it shows up in ps (3) child
processes do not terminate but pile up.
I've rebooted the box, ran rebaseall to exclude simple glitches, and I
even rebuilt refdbd from the sources but the problem persists.
Any clues? cygcheck output is attached too.
regards,
Markus
--
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38
Attachment:
cygcheck_output.txt
Description: cygcheck_output.txt
Attachment:
updated_packages.txt
Description: updated_packages.txt
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple