Support Requests: Browse | Submit New | Admin

[#12537] Potential bug: Weird deadlock problem when using Slave (but no problems when using DRB directly)

Date:
2007-07-24 11:43
Priority:
3
Submitted By:
Nobody
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
Potential bug: Weird deadlock problem when using Slave (but no problems when using DRB directly)

Detailed description
Original program idea:

Write a ruby program that checks the integrity of all my FLAC music files, and that makes use of my MacBooks Core Duo
CPU. Since Ruby doesn't support native threads, I decided to use the Slave library.

Problem:
I start 3 Slave servers:
worker1 and worker2 both query the filename server to get the next filename to process.

On Mac OS 10.4.10, ruby 1.8.6 (Locomotive or MacPorts, same problem) the second worker server process never starts,
it seems to sleep forver, and I don't see my programming mistake.

The same problem occurs on Ubuntu Feisty.

However: IF you start the 2nd worker after the first worker completed its work, it runs without problem.

And: If you disable the call to the filename server, both workers run  in parallel, too, without deadlocking. So the
problem has something to do with both workers trying to access the same filename server.

Any ideas?

Note:
When implementing the same logic using drb directly (3 executable scripts that start the respective drb servers manually,
using Unix domin socktes), everything works perfectly.

So the problem could be caused by the way Slave initialized DRB? Or am I making a mistake?

Add A Comment: Notepad

Please login


Followup

No Followups Have Been Posted

Attached Files:

Name Description Download
SlaveDrbDeadlock.rb ruby script reproducing the error with additional comments. Download

Changes:

Field Old Value Date By
File Added2272: SlaveDrbDeadlock.rb2007-07-24 11:43None