kern/87658: IO::AIO test suite loops infinitely on 5.4-RELEASE-p5

Peter Edwards peter.edwards at
Wed Nov 23 18:50:37 GMT 2005

The following reply was made to PR kern/87658; it has been noted by GNATS.

From: Peter Edwards <peter.edwards at>
To: bug-followup at,  niallm at
Subject: Re: kern/87658: IO::AIO test suite loops infinitely on 5.4-RELEASE-p5
Date: Wed, 23 Nov 2005 18:48:48 +0000

 There are two distinct problems here, one which causes a crash on 5.x, 
 the other causing problems for 6.x
 First off, perl on 5.x is not linked with -lpthread, as a result, the 
 threading library is in something of a muddle when it loads dynamic 
 modules that need thread support. You can hack your way out of this with
 env LD_PRELOAD=/usr/lib/ perl <blah>
 The second problem is that the AIO implementation creates IO stacks with 
 tiny threads (8K), but has two local functions with 4K on-stack buffers 
 ("readahead", and "sendfile_") which GCC appears to helpfully inline 
 into "aio_proc", allocating more than 8K of stack space up front. This 
 is easy enough to fix:
 --- AIO.xs.orig Wed Nov 23 18:17:53 2005
 +++ AIO.xs      Mon Nov 21 20:51:47 2005
 @@ -36,7 +36,7 @@
  #if __ia64
  # define STACKSIZE 65536
 -# define STACKSIZE  8192
 +# define STACKSIZE  16384
  enum {
 I'd have thought there was enough info available to the compiler to 
 re-use the same 4K of stack for both inlined functions, rather than 
 allocating separate space for each, but I'm not a compiler expert. At 
 best, it seems like a POLA violation, but it looks more like a bug to 
 me: The compiler on FreeBSD 5.x doesn't seem to do it...
 This e-mail is business-confidential and may be privileged. If you are not
 the intended recipient, please notify us immediately and delete it. If the
 email does not relate to Vordel's business then it is neither from nor
 authorized by Vordel. Thank you.

More information about the freebsd-bugs mailing list