DRb mixing up function return values between PIDs after fork()
The precise details are in the attached test case, but the basic version goes as such: Child pid 1 calls method_a() but gets the return value of method_b() that was called from child pid 2. This only happens if the parent process makes any remote DRb calls before the fork.
This issue showed up for me in 1.9.1 as well as 1.8.7 on x86, but not in x86_64.
Updated by mame (Yusuke Endoh) almost 9 years ago
- Status changed from Open to Assigned
- Assignee set to seki (Masatoshi Seki)
Sorry for late response, but I cannot reproduce on both 1.8.7-p249
I assign this issue to Masatoshi Seki, the maintainer for drb.
Seki-san, could you check this issue?
Yusuke Endoh email@example.com
Updated by rhythmx (Sean Bradly) over 8 years ago
I just verified that this shows up for me in Ruby 1.8.7-p249 as well as 1.9.1-p378. It does seem to reproduce a lot more readily in 1.8, however.
Note that you must run the test script with at least one argument (the arg can be anything) to trigger the problem. With 0 arguments it skips the bug to show the known good case.
(o.0) xi:~/code $ rvm list
ruby-1.8.6-p383 [ i386 ] ruby-1.8.7-p174 [ i386 ] ruby-1.8.7-p249 [ i386 ]
=> ruby-1.9.1-p378 [ i386 ]
(o.0) xi:~/code $ ruby ~/Downloads/drb_test_case.rb FAIL
A BAD RESULT ("BBBB")
a exitinga exiting