cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: ftp testserver hung

From: Guenter Knauf <eflash_at_gmx.net>
Date: Mon, 25 Jun 2007 15:27:26 +0200

Hi,
> I would say that what's interesting here is also that you try to note
> which
> servers this actually had to kill since it'll be useful as feedback to
> know
> what parts we should fix to kill the servers "properly".
if you look at recdent autobuild logs there some interesting (I've applied the patch there):
testcurl: trying to kill tests/.socks.pid process
testcurl: trying to kill tests/.tftpd.pid process

but when I look at the process list I see:
24327 ? S 0:00 perl ./curl/tests/testcurl.pl
24328 ? S 0:00 mail -s autobuild curl-autocompile_at_haxx.se
19319 ? S 0:03 server/sws --pidfile .http.pid 8990 ../../curl/tests
22393 ? S 0:00 perl -I../../curl/tests ../../curl/tests/ftpserver.pl --pidfile .ftp.pid -s ../../curl/tests --port 8992
23164 ? S 0:00 server/sws --pidfile .http6.pid --ipv6 8994 ../../curl/tests

which was the reason I thought that the ftpserver was the culprit....

> Also note that perl has a kill function, no need to use system() for that.
> And isn't the '<' letter in the kill line just wrong ?
thanks! Didnt recall that, now I've changed the patch:

--- testcurl.pl.orig 2007-04-01 15:59:50.000000000 +0200
+++ testcurl.pl 2007-06-25 15:16:52.000000000 +0200
@@ -200,6 +200,15 @@
 sub mydie($){
     my $text=$_[0];
     logit "$text";
+ # check if we have test servers hanging around...
+ while (<tests/.*.pid>) {
+ open(I, $_) or die "Couldn't open $_: $!";
+ $process = <I>;
+ chomp($process);
+ close(I) or die "Couldn't close $_: $!";
+ logit "trying to kill $_ process ($process)";
+ kill 1, $process;
+ }
     chdir $pwd; # cd back to the original root dir
 
     if ($pwd && $build) {

is 'kill 1' ok, or better 'kill 6' ?? I guess 1 stands for SIGABORT, and 6 for SIGTERM, or?

> [from your second mail]

> Isn't that just the sockets being in WAIT_CLOSE for a while?
if so the 'a while' lasts at least two hours, and the next test runs into it.....

will now reboot the box, and then we see probably more next hung....

Guen.
Received on 2007-06-25