Hello.

I'm having trouble with a new setup on a RedHat Entreprise Linux 4 box.
The problem is that whenever there is perl code that fork to execute
something, the apache child hang.

The problem occur with a specific function is called. But the weird part
is that the hang don't occur when that function is called; it happened
later, when a call to an external program is made, like:

 my ($x, $y) = MyFunc();
# anything else
 $h = qx( /bin/hostname );
# hanged here.

When it hang, it will show up is ps like this:
$ ps axf
[....]
10002 ?        Ss     0:00 /usr/local/apache_backend-1.3.33/bin/httpd
10003 ?        S      0:00  \_ usr/local/apache_backend-1.3.33/bin/httpd
10004 ?        S      0:00  \_ usr/local/apache_backend-1.3.33/bin/httpd
10042 ?        S      0:00      \_ [hostname]

If I strace the apache child, all I see is that the process is reading
something, but hanged there.
[...]
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0xb7ff7708) = 10009
close(10)                               = 0
close(8)                                = 0
read(9,

If I strace the hostname process, the process is released: the request
continue, the output is sent, and the apache child is released.


I've tried to isolate what it the function could cause or favorise the
hang: the function is used to setup a session using Apache::Session on
an NFS shared directory.

I've added some "return ({}, {});" here and there in the function to
find a specific place. But the spot I've found is pretty weird... It is
completely at the end of the function.

        return ($zzz, $xxx) ; #  with fake data; will work
        return ($session, $params_cookie); # real data, will not work


So, if a add a return with empty hash-ref, or fake value hashref, it is
ok. But if I return the actual hashref, it will then hang later.

This is running on Apache 1.3.33, mod_perl 1.29, on a dual-processor
machine. Perl is 5.8.5, as shipped from RedHat. Apache and mod_perl is
compiled, with mod_perl as a compiled-in module. The same code is
running on 3 RHEL 3 without problems; it's only with RHEL4 that it does
not work, with everything compiled the same way.

Anyone have an idea what else I can test and/or try?


-- 
Benoit Caron
Administrateur système
Canoe inc.
----
I read the FM, and it didn't work.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to