New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.dir
returns corrupted IO::Path
s under concurrent load
#5742
Comments
From @smlsCalling `.dir` concurrently from multiple threads, results in some of Golfed test script that pretty reliably demonstrates the bug: The corruption presents itself in the fact that the .Str method on Str: /tmp/concurrent_dir_bug/sss The script almost always fails with an output like this (not always Type check failed in binding; expected Str but got Mu (Mu) And *one* time I got the following instead: [1] 24237 segmentation fault (core dumped) ~/dev/test.p6 (It's possible that the latter two failure modes are just general |
From @smlsForgot to state the Rakudo version, sorry: Btw, here's a simpler test-case that almost always exhibits the *second* failure mode: ➜ await do for ^20 { start dir("/").eager } |
From @lizmatThis appears to be a MoarVM specific issue: I can’t get this script to fail on the JVM backend. The applicable code appears to be MVM_dir_read in src/io/dirops.c . Which appears to take a thread context. On non-Win32 systems, it appears to be using readdir_r() . For which I found a rather recent: So it would appear we need to replace readdir_r by readdir?
|
The RT System itself - Status changed from 'new' to 'open' |
From @smlsBoth the demo script (from the top post) and the one-line test case (2nd post) now pass without error! Bisectable identifies a commit from last week as the fix: https://gist.github.com/97d96022fdfed416e67ecadf5b2b9353 Is there a way to write a spectest for a probabilistic bug like this? |
From @AlexDanielIt is more or less reliable actually. I think writing a stresstest will do.
|
From @zoffixznetTests in Raku/roast@bcaaad4d42 |
From @zoffixznetOn Thu, 12 Oct 2017 17:17:54 -0700, cpan@zoffix.com wrote:
|
@zoffixznet - Status changed from 'open' to 'resolved' |
From @zoffixznetOn Thu, 12 Oct 2017 17:17:54 -0700, cpan@zoffix.com wrote:
|
Migrated from rt.perl.org#129845 (status was 'resolved')
Searchable as RT129845$
The text was updated successfully, but these errors were encountered: