-
Notifications
You must be signed in to change notification settings - Fork 561
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
Bus error with (unshared) dir handles and threads #10644
Comments
From @cpansproutI was wondering whether readdir is thread-safe, so I wrote this script: #!perl -l chdir '/tmp'; use threads; opendir dir, "."; $thr->kill(KILL) if $ARGV[0]; Pass an argument to it to start the other thread. What surprised me was that the output is all correct (. .. a b c ... v w x), but then there is a bus error. My patch for 75154 (cloning dir handles) doesn’t fix it, so this is a separate bug. Flags: Site configuration information for perl 5.13.4: Configured by sprout at Mon Sep 13 22:18:01 PDT 2010. Summary of my perl5 (revision 5 version 13 subversion 4 patch v5.13.4-224-g25222ff) configuration: Locally applied patches: @INC for perl 5.13.4: Environment for perl 5.13.4: |
From @jkeenanOn Mon, 20 Sep 2010 01:23:36 GMT, sprout wrote:
What I got running the program today on a threaded perl near HEAD on blead: ##### -- |
From @jkeenanSummary of my perl5 (revision 5 version 25 subversion 9) configuration: Characteristics of this binary (from libperl): |
The RT System itself - Status changed from 'new' to 'open' |
From @LeontOn Sat, Jan 7, 2017 at 4:32 PM, James E Keenan via RT <
Also tried it, not seeing anything suggesting that the bug is still present. Leon |
From @jkeenanOn Sun, 08 Jan 2017 12:53:28 GMT, LeonT wrote:
I built threaded perls at v5.10.1 and v5.14.4 and got the same results. I'm taking this ticket for the purpose of closing it within 7 days unless Father C wants to follow up. Thank you very much. -- |
From @cpansproutOn Jan 8, 2017, at 9:48 AM, "James E Keenan via RT" <perlbug-followup@perl.org> wrote:
Does anyone have time to do a bisect, to see when it was fixed? If it was fixed inadvertently, it might be worth adding a test. |
From @jkeenanOn Sun, 08 Jan 2017 18:54:03 GMT, sprout wrote:
It's not clear what the problem was in the first place. You stated that there was a "bus error" but didn't present any output. Moreover, the 'perl -V' in your original post was from a non-threaded perl. But this problem deals with threads. So it's not clear what the bisection test would be -- at least not to me. In addition, the program now dies due to a signal rather than, presumably, crashing with a bus error. I'm not sure how we'd invoke the bisect runner to distinguish between those two cases, as both would likely be covered by this: ##### Suggestions? Thank you very much. |
From @LeontOn Sun, Jan 8, 2017 at 8:37 PM, James E Keenan via RT <
That is correct behavior that can be resolved by adding a handler for that Leon |
From @dur-randirOn Sun, 08 Jan 2017 11:37:23 -0800, jkeenan wrote:
I'm able to reproduce segfault with the original script on 5.12.5, but not on 5.14.4. Unfortunately, I can't bisect 5.14 branch on this machine, so just those rough estimates. |
From @hvdsOn Sun, 08 Jan 2017 11:37:23 -0800, jkeenan wrote:
I'd suggest locally hacking bisect-runner.pl - look at run_report_and_exit() where it uses $options{crash} to modify behaviour, then hack it once to show what $ret is in the signal case, then a second time to set $ret to zero if you see that value (to treat that as a passing case). Hugo |
From @jkeenanOn Sun, 08 Jan 2017 20:06:42 GMT, LeonT wrote:
With valuable assistance and code review from Jerry Hedden, I have pushed an additional test file under dist/threads that will capture any future regressions in this area. I adapted Father C's original code sample to run both cases -- without and with command-line argument -- in one program. Running that on threaded perls built at perl-5.12.5 and perl-5.14.4 re-confirmed the range; running with a command-line argument at 5.12.5 caused the program to hang indefinitely, but running with an argument at 5.14.4 threw the previously reported exception. With Jerry's help I added a die handler, then I converted this into an additional test file. Jerry reviewed this and I also got several PASSes on a smoke-me branch. Pushed to blead in commit afa4768. Marking ticket Resolved. Thank you very much. -- |
@jkeenan - Status changed from 'open' to 'resolved' |
From @cpansproutOn Jan 13, 2017, at 10:22 AM, "James E Keenan via RT" <perlbug-followup@perl.org> wrote:
Thank you for your work in resolving this. |
Migrated from rt.perl.org#77934 (status was 'resolved')
Searchable as RT77934$
The text was updated successfully, but these errors were encountered: