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
strange behaviour when forking lots of times #3882
Comments
From dpc29@cam.ac.uk$ perl -we 'fork || print for split //, "a" x 10' when I run that on my computer, I get strange output. Instead of aa1aaaaa1aaa1aaaaa1aaa1aaaa1aaa1aaaaaa1aaaaa1aa1aaaaaa1a etc.. I suspect this is due to a failing malloc() or something, but $ perl -we 'for || print "a" for 1..10' It also affects different computers differently; the "x 10" needs to I believe this could be due to a bug in Perl; I have posted about it on Perl Info
|
From @jkeenanOn Sat Apr 21 01:36:46 2001, dpc29@cam.ac.uk wrote:
It also affects different computers differently; the "x 10" needs to
I have recently confirmed that this behavior still exists. It taught me Jim Keenan |
From @arcJames E Keenan via RT <perlbug-followup@perl.org> wrote:
A hypothesis: this is being run with an RLIMIT_NPROC in place (aka $ ulimit -u So when we can have just over 2**8 processes, and we try to start $ perl -MErrno=EAGAIN -we '(fork // print 0 + ($! == EAGAIN)) || print But if we then reduce the ulimit again, we see more errors: $ ulimit -u 128 If I'm right about this, I don't think there's a bug here. -- |
From @ikegamiOn Wed, Nov 23, 2011 at 5:46 AM, Aaron Crane <perl@aaroncrane.co.uk> wrote:
I'm not clear on why fork failing would cause $_ to be changed from 'a' to Your code is actually significantly different as the ones output by your |
From Eirik-Berg.Hanssen@allverden.noOn Wed, Nov 23, 2011 at 8:12 PM, Eric Brine <ikegami@adaelis.com> wrote:
Me neither, but it does. Or rather, evaluating the fork in a boolean eirik@bluebird[20:22:14] eirik@bluebird[20:22:38]~/tmp$ Funny? :) Eirik |
From sidhekin@allverden.noOn Wed, Nov 23, 2011 at 8:24 PM, Eirik Berg Hanssen <
... err, no, let's try again ... fork failing causes $_ to be changed
Ayup. Eirik |
From @ikegamiOn Wed, Nov 23, 2011 at 2:27 PM, The Sidhekin <sidhekin@allverden.no> wrote:
That's gotta be a bug. What's really funny is changing from print to Devel::Peek's Dump($_) only Is $_ being changed, or is it stack corruption? |
From @arcEric Brine <ikegami@adaelis.com> wrote:
Uh, yes. Sorry, don't know what I was thinking there. -- |
Migrated from rt.perl.org#6847 (status was 'open')
Searchable as RT6847$
The text was updated successfully, but these errors were encountered: