Menu

#228 run-external-process.mason crash bug

open
Mason GUI (81)
7
2004-10-04
2004-10-04
No

Brandon King <kingb@caltech.edu> writes:
>> Hi All,
>> Every now and then when I submit a web form like
mba-load.html, I
>> get the following error... I'm sure what I'm
doing that triggers
>> it, but it happens fairly often. Any one know
what's going on?
[snip]
>> *code stack:*
/usr/local/share/perl/5.8.4/Bio/Genex/HTMLUtils.pm:750
>> /var/www/genex/mason/comps/run-external-process.mason:57

It is a fork problem with mod_perl. I centralized all
code that needs
to run external processes - using system() or backticks
(`` or
qx//). mod_perl is a pretty complicated thing and when
you fork it you have to do a lot of hanky panky -
closing file descriptors, etc., etc.

One of the things that you have to do is tell the
parent process not
to hang around and wait for it's kids to finish -
normally, Unix
processes do this to avoid getting zombies.

I thought my code was finally working - I copied all
the pieces that
were in the mod_perl HOWTO after google found the
problem for me. I'll dig into this ASAP.

Cheers,
jas.

Discussion


Log in to post a comment.