No such thing as a small change | |
PerlMonks |
AnyEvent::ForkManager fails tests on Cygwinby choroba (Cardinal) |
on Apr 30, 2015 at 11:35 UTC ( [id://1125265]=perlquestion: print w/replies, xml ) | Need Help?? |
choroba has asked for the wisdom of the Perl Monks concerning the following question:
Hi fellow Monks,
I tried to install AnyEvent::ForkManager on Cygwin. Both its main dependencies, AnyEvent and Parallel::ForkManager, installed without problems, but the module itself hung right after the first test in 001_basic.t:
I sprinkled the code with tracing warns to discover where exactly the code gets stuck. The following line never finished:
At first, I though that's manager_pid that doesn't return, but after replacing the line with
it became obvious it's the isnt line that causes the issue. I delved more deeply and found out it comes from Test::SharedFork. It uses flock to lock a file that shares the information between forks. The Store::Locker is constructed with the following:
The code stops on the flock line and stays there forever (on Linux, it works correctly). I wanted to know more, so I prepended the following to the line:
Not only was I able to see the structure, but all the tests passed. "A race condition," though I and replaced the line with
Result: PASS. When lowering the value, the tests sometimes hung again. The questions
Thanks. The issue lives outside of PM at github, too.
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
Back to
Seekers of Perl Wisdom
|
|