#system() hangs, child is defunct

T

Tor Erik Linnerud

Hi all,

I am trying to track down the source of an intermittent and tricky
problem. The ruby version is 1.8.6 patchlevel 287. The OS is virtualized
Gentoo, using the free Express image provided by Engine Yard, so the
system should be reasonably sane.

The problem is that a rake task hangs indefinitely. Attaching gdb to the
ruby process, and getting a backtrace, I can see that it is hanging on a
#system() call. The system call is used to invoke another Ruby process,
but that Ruby child process has completed as expected, and is listed as
<defunct>.

If I understand correctly, this means that the parent Ruby process has
failed to acknowledge that the child has exited. Could this be caused by
errors in the parent's Ruby code?

If anyone is familiar, the offending call takes place in
rspec-1.2.8/lib/spec/rake/spectask.rb:176

Unfortunately, the issue is intermittent (it only hangs in some 20-30%
of cases) and I have no idea of how to narrow it down any further. Any
advice on how to proceed?

best regards,
Tor Erik
 
R

Roger Pack

Unfortunately, the issue is intermittent (it only hangs in some 20-30%
of cases) and I have no idea of how to narrow it down any further. Any
advice on how to proceed?

Try 1.8.7 or 1.8.x SVN trunk?
-r
 
T

Tor Erik Linnerud

The thing is that this is a test setup, so we want to keep it just like
production. I tried running the VM under VirtualBox instead of VMware
Server, which seemed to make the problem go away for now. I would still
like to know what was going on though.
 
R

Roger Pack

Tor said:
The thing is that this is a test setup, so we want to keep it just like
production. I tried running the VM under VirtualBox instead of VMware
Server, which seemed to make the problem go away for now. I would still
like to know what was going on though.

Looks like your next step might be to try and trudge through the code
for #system
or switch ruby versions, perhaps--1.9 seems more stable for me than
others.
-r
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,077
Latest member
SangMoor21

Latest Threads

Top