Poor web serving performance

Jay Buffington jaybuffington at gmail.com
Fri Jan 26 00:57:01 UTC 2007


> That's kinda difficult to fathom (Redhat's poor thread support)
> considering that Ulrich Drepper/Ingo Molnar of NPTL fame work for Redhat.
> Can he point to any bugzilla reports which detail more of this ?

I dug up that email thread where I emailed the Linux::AIO author about
the same test failures that Cal is experiencing.  Two big differences
between my problem and Cal's is that I was using a very old RHEL
version (2.1) and my failures were for IO::AIO, not Linux::AIO.

Here's the gist of our exchange that we had Nov. 2005.  My comments
are prefaced with a >, his are not:

> [jay at lassen IO-AIO-1.61]$ make test
> PERL_DL_NONLAZY=1 /usr/local/bin/perl "-MExtUtils::Command::MM" "-e"
> "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
> t/00_load.......ok
> t/01_stat.......ok
> t/02_read.......ok
> t/03_errors.....# Failed test 1 in t/03_errors.t at line 22
> #  t/03_errors.t line 22 is:     ok((!defined $_[0]) && $! == ENOENT);
> t/03_errors.....ok 3/13# Failed test 6 in t/03_errors.t at line 40
> #  t/03_errors.t line 40 is:     ok($! == ENOENT);
> t/03_errors.....ok 8/13# Failed test 9 in t/03_errors.t at line 49
> #  t/03_errors.t line 49 is:     ok($! == EBADF);
> t/03_errors.....FAILED tests 1, 6, 9
>         Failed 3/13 tests, 76.92% okay
> t/04_fork.......ok 2/8
>
> And it stops (never gets to 3/8).   I went ahead and killed it and did
> make install.  Everything seemed to work, but now I've been

Well, RHEL has always had severly broken threads support, which manifests
itself in various problems, but I haven't see these symptoms.

> [jay at lassen IO-AIO-1.61]$ cat /etc/redhat-release
> Red Hat Enterprise Linux WS release 2.1 (Tampa)

I just noticed the version. The rhel release you are using is
*extremely* old (four years!), and *completely* unusable with regards
to threads.

> [jay at lassen apache]$ perl -V
> *snip*
> edt 2003 i686 unknown '
>     config_args='-de'
>     hint=recommended, useposix=true, d_sigaction=define
>     usethreads=undef use5005threads=undef useithreads=undef

It is likely that your platform requires a threaded perl (which I cannot
recommend, and is not necesary with newer threading libraries).

> snippet from gdb of running test:
> 0x400b3ca5 in sigsuspend () from /lib/libc.so.6
> (gdb) bt
> #0  0x400b3ca5 in sigsuspend () from /lib/libc.so.6
> #1  0x40217c09 in pthread_setconcurrency () from /lib/libpthread.so.0
> #2  0x40213dcc in pthread_cond_wait () from /lib/libpthread.so.0

Very much looks like a threading bug.


More information about the perlbal mailing list