Bug#584344: speedy-cgi-perl: FTBFS: tests failed

2010-08-23 Thread Lucas Nussbaum
On 20/08/10 at 19:41 +0300, Niko Tyni wrote:
 found 584344 2.22-12
 thanks
 
 On Wed, Aug 18, 2010 at 11:21:13PM +0300, Niko Tyni wrote:
  On Sun, Aug 15, 2010 at 09:45:42PM +0300, Niko Tyni wrote:
On Thu, Jun 03, 2010 at 12:01:36PM +0200, Lucas Nussbaum wrote:
 Source: speedy-cgi-perl
 Version: 2.22-11
 Severity: serious
 Tags: squeeze sid
 User: debian...@lists.debian.org
 Usertags: qa-ftbfs-20100602 qa-ftbfs

 Justification: FTBFS on amd64
  Test Summary Report
  ---
  t/detach.t  (Wstat: 0 Tests: 2 Failed: 1)
Failed test:  2
  
   My best guess is that it's somehow related to bigger pipe buffers on
   systems with more memory than mine or something like that, but I can't
   see the problem in the code no matter how much I glare at it.
  
  Close enough, the thing that matters here is the socket write buffer size.
 
  I suppose the most correct thing to do here would be to check the size
  of the socket write buffer with SO_SNDBUF (see socket(7)) and set the
  data and frontend buffer size accordingly. However, I think I'll take
  the lazy route at least for squeeze and use my earlier patch that just
  hardcodes bigger numbers.
 
 It turns out that this made the first test in detach.t fail on smaller
 (?) systems, at least armel and mipsel. I've therefore implemented a
 better fix that adjusts the test according to the socket write buffer
 size.
 
 I'm attaching the new patch and reopening the bug.
 
 Lucas, could you please set me up for access to a test system again
 so that I could confirm that this works there too?

Yes, when would be a good time for you?

L.



-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#584344: speedy-cgi-perl: FTBFS: tests failed

2010-08-20 Thread Niko Tyni
found 584344 2.22-12
thanks

On Wed, Aug 18, 2010 at 11:21:13PM +0300, Niko Tyni wrote:
 On Sun, Aug 15, 2010 at 09:45:42PM +0300, Niko Tyni wrote:
   On Thu, Jun 03, 2010 at 12:01:36PM +0200, Lucas Nussbaum wrote:
Source: speedy-cgi-perl
Version: 2.22-11
Severity: serious
Tags: squeeze sid
User: debian...@lists.debian.org
Usertags: qa-ftbfs-20100602 qa-ftbfs
   
Justification: FTBFS on amd64
 Test Summary Report
 ---
 t/detach.t  (Wstat: 0 Tests: 2 Failed: 1)
   Failed test:  2
 
  My best guess is that it's somehow related to bigger pipe buffers on
  systems with more memory than mine or something like that, but I can't
  see the problem in the code no matter how much I glare at it.
 
 Close enough, the thing that matters here is the socket write buffer size.

 I suppose the most correct thing to do here would be to check the size
 of the socket write buffer with SO_SNDBUF (see socket(7)) and set the
 data and frontend buffer size accordingly. However, I think I'll take
 the lazy route at least for squeeze and use my earlier patch that just
 hardcodes bigger numbers.

It turns out that this made the first test in detach.t fail on smaller
(?) systems, at least armel and mipsel. I've therefore implemented a
better fix that adjusts the test according to the socket write buffer
size.

I'm attaching the new patch and reopening the bug.

Lucas, could you please set me up for access to a test system again
so that I could confirm that this works there too?
-- 
Niko Tyni   nt...@debian.org
Author: Niko Tyni nt...@debian.org
Description: fix the detach test on systems with a large socket buffer size (#584344)
--- speedy-cgi-perl.orig/speedy/t/detach.t
+++ speedy-cgi-perl/speedy/t/detach.t
@@ -6,9 +6,22 @@
 
 use strict;
 use IO::File;
+use Socket;
 
 my $smbuf	=   8 * 1024;
-my $lgbuf	= 512 * 1024;
+my $lgbuf;
+
+# find out the size of the socket write buffer
+# see http://bugs.debian.org/584344
+my $s;
+if (socket($s, AF_UNIX, SOCK_STREAM, 0) 
+(my $packed_size = getsockopt($s, SOL_SOCKET, SO_SNDBUF))) {
+$lgbuf = $smbuf + 2 * unpack(I, $packed_size);
+} else {
+warn(socket() or getsockopt() failed: $!);
+}
+
+$lgbuf = 512 * 1024 if $lgbuf  512 * 1024;
 my $scr		= 't/scripts/detach';
 
 use vars qw(@open_files @pids %children);
@@ -23,7 +36,7 @@
 $| = 1; print ; $| = 0;
 my $child;
 if (($child = open($fh, -|)) == 0) {
-	open(F, $ENV{SPEEDY} -- -B$sz $scr |);
+	open(F, $ENV{SPEEDY} -- -B$sz $scr $lgbuf |);
 	print scalar F;
 	close(STDOUT);
 	sleep 60;	# Simulate slow drain of output
--- speedy-cgi-perl.orig/speedy/t/scripts/detach
+++ speedy-cgi-perl/speedy/t/scripts/detach
@@ -1,3 +1,6 @@
 $| = 1;
+# the data should not fit in the socket write buffer
+# see http://bugs.debian.org/584344
+my $size = shift || (512 * 1024);
 print $$\n;
-print 'x' x (500*1024);
+print 'x' x int(500 / 512 * $size);


Processed: Re: Bug#584344: speedy-cgi-perl: FTBFS: tests failed

2010-08-20 Thread Debian Bug Tracking System
Processing commands for cont...@bugs.debian.org:

 found 584344 2.22-12
Bug #584344 {Done: Niko Tyni nt...@debian.org} [src:speedy-cgi-perl] 
speedy-cgi-perl: FTBFS: test failure on systems with a large socket write 
buffer size
Bug Marked as found in versions speedy-cgi-perl/2.22-12; no longer marked as 
fixed in versions speedy-cgi-perl/2.22-12 and reopened.
 thanks
Stopping processing here.

Please contact me if you need assistance.
-- 
584344: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=584344
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems


-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#584344: speedy-cgi-perl: FTBFS: tests failed

2010-08-18 Thread Niko Tyni
retitle 584344 speedy-cgi-perl: FTBFS: test failure on systems with a large 
socket write buffer size
tag 584344 patch
thanks

On Sun, Aug 15, 2010 at 09:45:42PM +0300, Niko Tyni wrote:
  On Thu, Jun 03, 2010 at 12:01:36PM +0200, Lucas Nussbaum wrote:
   Source: speedy-cgi-perl
   Version: 2.22-11
   Severity: serious
   Tags: squeeze sid
   User: debian...@lists.debian.org
   Usertags: qa-ftbfs-20100602 qa-ftbfs
  
   Justification: FTBFS on amd64
Test Summary Report
---
t/detach.t  (Wstat: 0 Tests: 2 Failed: 1)
  Failed test:  2

 My best guess is that it's somehow related to bigger pipe buffers on
 systems with more memory than mine or something like that, but I can't
 see the problem in the code no matter how much I glare at it.

Close enough, the thing that matters here is the socket write buffer size.
The pipe buffers are always 64 kilobytes on Linux, that's hardcoded in
the kernel source.

The above test failure can be reproduced by setting the sysctl
net.core.wmem_default to 47 or so. (The default value on my system
is 124928, and it most probably varies between systems depending on
their available memory.)

The first test in detach.t is basically checking that the persistent
speedy backend can serve new requests after it's all done with the
previous one, even if the frontend is still busy buffering the data to
the client.

The second test makes the buffer inside the frontend very small. When
the client reads data in slowly, the backend will block on writes and
doesn't get freed to handle a new request.

However, when net.core.wmem_default is high enough, the data from the
backend to the frontend will be buffered in the kernel and the backend
can finish. This makes the second test fail.

Increasing the amount of data sent from the backend fixes this when it
becomes too much to fit in the kernel socket write buffer. The size of
the 'large' buffer in detach.t also needs to be increased because the
first test requires that all the data fit in it.

I suppose the most correct thing to do here would be to check the size
of the socket write buffer with SO_SNDBUF (see socket(7)) and set the
data and frontend buffer size accordingly. However, I think I'll take
the lazy route at least for squeeze and use my earlier patch that just
hardcodes bigger numbers.

Will revisit this decision in the future if necessary.
-- 
Niko Tyni   nt...@debian.org



-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Processed: Re: Bug#584344: speedy-cgi-perl: FTBFS: tests failed

2010-08-18 Thread Debian Bug Tracking System
Processing commands for cont...@bugs.debian.org:

 retitle 584344 speedy-cgi-perl: FTBFS: test failure on systems with a large 
 socket write buffer size
Bug #584344 [src:speedy-cgi-perl] speedy-cgi-perl: FTBFS: tests failed
Changed Bug title to 'speedy-cgi-perl: FTBFS: test failure on systems with a 
large socket write buffer size' from 'speedy-cgi-perl: FTBFS: tests failed'
 tag 584344 patch
Bug #584344 [src:speedy-cgi-perl] speedy-cgi-perl: FTBFS: test failure on 
systems with a large socket write buffer size
Added tag(s) patch.
 thanks
Stopping processing here.

Please contact me if you need assistance.
-- 
584344: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=584344
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems


-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#584344: speedy-cgi-perl: FTBFS: tests failed

2010-08-15 Thread Niko Tyni
On Thu, Aug 05, 2010 at 10:25:24PM +0300, Niko Tyni wrote:
 On Thu, Jun 03, 2010 at 12:01:36PM +0200, Lucas Nussbaum wrote:
  Source: speedy-cgi-perl
  Version: 2.22-11
  Severity: serious
  Tags: squeeze sid
  User: debian...@lists.debian.org
  Usertags: qa-ftbfs-20100602 qa-ftbfs
 
  Justification: FTBFS on amd64
   Test Summary Report
   ---
   t/detach.t  (Wstat: 0 Tests: 2 Failed: 1)
 Failed test:  2

 However, detach.t has failed every time for Lucas so that one is
 definitely a deterministic bug somewhere.

This keeps happening every time for Lucas, but never for me.

My best guess is that it's somehow related to bigger pipe buffers on
systems with more memory than mine or something like that, but I can't
see the problem in the code no matter how much I glare at it.

Possibly just growing the buffers in speedy/t/detach.t would help,
but it would be nice to actually understand why.

Lucas, would it be possible to give me access to a system where the
build fails?
-- 
Niko Tyni   nt...@debian.org


signature.asc
Description: Digital signature


Bug#584344: speedy-cgi-perl: FTBFS: tests failed

2010-08-15 Thread Lucas Nussbaum
On 15/08/10 at 21:45 +0300, Niko Tyni wrote:
 On Thu, Aug 05, 2010 at 10:25:24PM +0300, Niko Tyni wrote:
  On Thu, Jun 03, 2010 at 12:01:36PM +0200, Lucas Nussbaum wrote:
   Source: speedy-cgi-perl
   Version: 2.22-11
   Severity: serious
   Tags: squeeze sid
   User: debian...@lists.debian.org
   Usertags: qa-ftbfs-20100602 qa-ftbfs
  
   Justification: FTBFS on amd64
Test Summary Report
---
t/detach.t  (Wstat: 0 Tests: 2 Failed: 1)
  Failed test:  2
 
  However, detach.t has failed every time for Lucas so that one is
  definitely a deterministic bug somewhere.
 
 This keeps happening every time for Lucas, but never for me.
 
 My best guess is that it's somehow related to bigger pipe buffers on
 systems with more memory than mine or something like that, but I can't
 see the problem in the code no matter how much I glare at it.
 
 Possibly just growing the buffers in speedy/t/detach.t would help,
 but it would be nice to actually understand why.
 
 Lucas, would it be possible to give me access to a system where the
 build fails?

(credentials sent in a private mail)

Lucas


signature.asc
Description: Digital signature


Bug#584344: speedy-cgi-perl: FTBFS: tests failed

2010-08-15 Thread Niko Tyni
tag 584344 - unreproducible
thanks

On Sun, Aug 15, 2010 at 09:05:21PM +0200, Lucas Nussbaum wrote:
 On 15/08/10 at 21:45 +0300, Niko Tyni wrote:

  My best guess is that it's somehow related to bigger pipe buffers on
  systems with more memory than mine or something like that, but I can't
  see the problem in the code no matter how much I glare at it.
  
  Possibly just growing the buffers in speedy/t/detach.t would help,
  but it would be nice to actually understand why.

This would seem to be the case. The attached patch makes it work again.

I doubt there's anything wrong with the actual code, only with the test
assumptions of what makes a buffer 'large'.

The system where this is reproducible has 16 GB RAM and 300 GB swap,
which is quite a bit more than anywhere else where I tried this.

I've now got strace output to compare, and I'll try to gain a better
understanding of the problem before uploading a fixed package. 

 (credentials sent in a private mail)

Thanks! I'm done for now, will ask again if I need another go.
-- 
Niko Tyni   nt...@debian.org
diff --git a/speedy/t/detach.t b/speedy/t/detach.t
index 3154919..8427347 100644
--- a/speedy/t/detach.t
+++ b/speedy/t/detach.t
@@ -8,7 +8,7 @@ use strict;
 use IO::File;
 
 my $smbuf	=   8 * 1024;
-my $lgbuf	= 512 * 1024;
+my $lgbuf	= 51200 * 1024;
 my $scr		= 't/scripts/detach';
 
 use vars qw(@open_files @pids %children);
diff --git a/speedy/t/scripts/detach b/speedy/t/scripts/detach
index 57d1029..72f35f8 100644
--- a/speedy/t/scripts/detach
+++ b/speedy/t/scripts/detach
@@ -1,3 +1,3 @@
 $| = 1;
 print $$\n;
-print 'x' x (500*1024);
+print 'x' x (5*1024);


Processed: Re: Bug#584344: speedy-cgi-perl: FTBFS: tests failed

2010-08-15 Thread Debian Bug Tracking System
Processing commands for cont...@bugs.debian.org:

 tag 584344 - unreproducible
Bug #584344 [src:speedy-cgi-perl] speedy-cgi-perl: FTBFS: tests failed
Removed tag(s) unreproducible.
 thanks
Stopping processing here.

Please contact me if you need assistance.
-- 
584344: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=584344
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems


-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#584344: speedy-cgi-perl: FTBFS: tests failed

2010-08-05 Thread Niko Tyni
On Thu, Jun 03, 2010 at 12:01:36PM +0200, Lucas Nussbaum wrote:
 Source: speedy-cgi-perl
 Version: 2.22-11
 Severity: serious
 Tags: squeeze sid
 User: debian...@lists.debian.org
 Usertags: qa-ftbfs-20100602 qa-ftbfs

 Justification: FTBFS on amd64
  Test Summary Report
  ---
  t/detach.t  (Wstat: 0 Tests: 2 Failed: 1)
Failed test:  2
  t/group.t   (Wstat: 0 Tests: 6 Failed: 6)
Failed tests:  1-6

I can't reproduce either of these myself, and group.t hasn't failed
again in the later attempts whose logs are available at

 http://people.debian.org/~lucas/logs/2010/

However, detach.t has failed every time for Lucas so that one is
definitely a deterministic bug somewhere.

Will look into this.
-- 
Niko Tyni   nt...@debian.org



-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#584344: speedy-cgi-perl: FTBFS: tests failed

2010-06-03 Thread Lucas Nussbaum
Source: speedy-cgi-perl
Version: 2.22-11
Severity: serious
Tags: squeeze sid
User: debian...@lists.debian.org
Usertags: qa-ftbfs-20100602 qa-ftbfs
Justification: FTBFS on amd64

Hi,

During a rebuild of all packages in sid, your package failed to build on
amd64.

Relevant part:
 make[1]: Entering directory 
 `/build/user-speedy-cgi-perl_2.22-11-amd64-9n4BE6/speedy-cgi-perl-2.22/speedy'
 PERL_DL_NONLAZY=1 
 SPEEDY=/build/user-speedy-cgi-perl_2.22-11-amd64-9n4BE6/speedy-cgi-perl-2.22/speedy/speedy
  
 SPEEDY_BACKENDPROG=/build/user-speedy-cgi-perl_2.22-11-amd64-9n4BE6/speedy-cgi-perl-2.22/speedy_backend/speedy_backend
  
 SPEEDY_MODULE=/build/user-speedy-cgi-perl_2.22-11-amd64-9n4BE6/speedy-cgi-perl-2.22//
  SPEEDY_TIMEOUT=300 /usr/bin/perl -MExtUtils::Command::MM -e 
 test_harness(0, '../blib/lib', '../blib/arch') t/*.t
 t/alarm.t . ok
 t/argv.t .. ok
 t/basic1.t  ok
 t/basic2.t  ok
 t/be_memleak.t  ok
 t/begin_block.t ... ok
 t/begin_dup.t . ok
 t/cgi_reset.t . ok
 t/chdir.t . ok
 t/detach.t  
 Failed 1/2 subtests 
 t/eagain.t  ok
 t/exit.t .. ok
 speedy_backend[11669]: t/scripts/group1: No such file or directory
 speedy_backend[11671]: t/scripts/group2: No such file or directory
 speedy_backend[11673]: t/scripts/group1: No such file or directory
 speedy_backend[11675]: t/scripts/group2: No such file or directory
 speedy_backend[11677]: t/scripts/group1: No such file or directory
 speedy_backend[11679]: t/scripts/group2: No such file or directory
 speedy_backend[11681]: t/scripts/group3: No such file or directory
 speedy_backend[11683]: t/scripts/group3: No such file or directory
 speedy_backend[11685]: t/scripts/group3: No such file or directory
 speedy_backend[11691]: t/scripts/group1: No such file or directory
 t/group.t . 
 Failed 6/6 subtests 
 t/hold_stdio.t  ok
 t/initial_eof.t ... ok
 t/killfe.t  ok
 t/maxbackend.t  ok
 t/maxruns.t ... ok
 t/misc.t .. ok
 t/mungefds.t .. ok
 t/register_cleanup.t .. ok
 t/setopt.t  ok
 t/sh_bang.t ... ok
 t/shutdown.t .. ok
 t/signal.t  ok
 t/stdin.t . ok
 t/stdio.t . ok
 t/stdio2.t  ok
 t/stdio_close.t ... ok
 t/thread.t  ok
 t/timeout.t ... ok
 t/touch.t . ok
 Failed 2/33 test programs. 7/73 subtests failed.
 t/wrongfd.t ... ok
 
 Test Summary Report
 ---
 t/detach.t  (Wstat: 0 Tests: 2 Failed: 1)
   Failed test:  2
 t/group.t   (Wstat: 0 Tests: 6 Failed: 6)
   Failed tests:  1-6
 Files=33, Tests=73, 130 wallclock secs ( 0.11 usr  0.05 sys +  0.73 cusr  
 2.27 csys =  3.16 CPU)
 Result: FAIL
 make[1]: *** [test_dynamic] Error 255

The full build log is available from:
   
http://people.debian.org/~lucas/logs/2010/06/02/speedy-cgi-perl_2.22-11_lsid64.buildlog

A list of current common problems and possible solutions is available at 
http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute!

About the archive rebuild: The rebuild was done on about 50 AMD64 nodes
of the Grid'5000 platform, using a clean chroot.  Internet was not
accessible from the build systems.

-- 
| Lucas Nussbaum
| lu...@lucas-nussbaum.net   http://www.lucas-nussbaum.net/ |
| jabber: lu...@nussbaum.fr GPG: 1024D/023B3F4F |



-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org