Skip to content
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

Signal 11 doing multi-threaded large for loops in r-m #3690

Closed
p6rt opened this issue Feb 19, 2015 · 8 comments
Closed

Signal 11 doing multi-threaded large for loops in r-m #3690

p6rt opened this issue Feb 19, 2015 · 8 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Feb 19, 2015

Migrated from rt.perl.org#123883 (status was 'resolved')

Searchable as RT123883$

@p6rt
Copy link
Author

p6rt commented Feb 19, 2015

From @japhb

Rakudo-Moar from last month, running on recent-ish Ubuntu derivative​:

$ perl6 -v
This is perl6 version 2015.01-5-g912a7fa built on MoarVM version
2015.01-5-ga29eaa9

$ /usr/bin/time -v perl6 -e 'await do for ^8 { start { my $i; for ^100_000
{ $i++; }; say $i } }'
Command terminated by signal 11
  Command being timed​: "perl6 -e await do for ^8 { start { my $i; for
^100_000 { $i++; }; say $i } }"
  User time (seconds)​: 0.67
  System time (seconds)​: 0.04
  Percent of CPU this job got​: 155%
  Elapsed (wall clock) time (h​:mm​:ss or m​:ss)​: 0​:00.46
  Average shared text size (kbytes)​: 0
  Average unshared data size (kbytes)​: 0
  Average stack size (kbytes)​: 0
  Average total size (kbytes)​: 0
  Maximum resident set size (kbytes)​: 121296
  Average resident set size (kbytes)​: 0
  Major (requiring I/O) page faults​: 0
  Minor (reclaiming a frame) page faults​: 26288
  Voluntary context switches​: 65
  Involuntary context switches​: 124
  Swaps​: 0
  File system inputs​: 0
  File system outputs​: 0
  Socket messages sent​: 0
  Socket messages received​: 0
  Signals delivered​: 0
  Page size (bytes)​: 4096
  Exit status​: 0

But succeeds with smaller N​:

$ /usr/bin/time -v perl6 -e 'await do for ^8 { start { my $i; for ^10_000 {
$i++; }; say $i } }'
10000
10000
10000
10000
10000
10000
10000
10000
  Command being timed​: "perl6 -e await do for ^8 { start { my $i; for
^10_000 { $i++; }; say $i } }"
  User time (seconds)​: 0.35
  System time (seconds)​: 0.04
  Percent of CPU this job got​: 138%
  Elapsed (wall clock) time (h​:mm​:ss or m​:ss)​: 0​:00.28
  Average shared text size (kbytes)​: 0
  Average unshared data size (kbytes)​: 0
  Average stack size (kbytes)​: 0
  Average total size (kbytes)​: 0
  Maximum resident set size (kbytes)​: 111360
  Average resident set size (kbytes)​: 0
  Major (requiring I/O) page faults​: 0
  Minor (reclaiming a frame) page faults​: 24967
  Voluntary context switches​: 59
  Involuntary context switches​: 69
  Swaps​: 0
  File system inputs​: 0
  File system outputs​: 0
  Socket messages sent​: 0
  Socket messages received​: 0
  Signals delivered​: 0
  Page size (bytes)​: 4096
  Exit status​: 0

@p6rt
Copy link
Author

p6rt commented Feb 23, 2015

From olivier.duclos@gmail.com

The provided example runs fine on perl6 version 2015.02-35-gbb3a3df built on MoarVM version 2015.02-6-gb1640b8o

I am also on Ubuntu 14.04.

perl6 -e 'await do for ^8 { start { my $i; for ^100_000 { $i++; }; say $i } }'
100000
100000
100000
100000
100000
100000
100000
100000
  Command being timed​: "perl6 -e await do for ^8 { start { my $i; for ^100_000 { $i++; }; say $i } }"
  User time (seconds)​: 1.27
  System time (seconds)​: 0.03
  Percent of CPU this job got​: 256%
  Elapsed (wall clock) time (h​:mm​:ss or m​:ss)​: 0​:00.51
  Average shared text size (kbytes)​: 0
  Average unshared data size (kbytes)​: 0
  Average stack size (kbytes)​: 0
  Average total size (kbytes)​: 0
  Maximum resident set size (kbytes)​: 160084
  Average resident set size (kbytes)​: 0
  Major (requiring I/O) page faults​: 0
  Minor (reclaiming a frame) page faults​: 31435
  Voluntary context switches​: 153
  Involuntary context switches​: 319
  Swaps​: 0
  File system inputs​: 0
  File system outputs​: 0
  Socket messages sent​: 0
  Socket messages received​: 0
  Signals delivered​: 0
  Page size (bytes)​: 4096
  Exit status​: 0

@p6rt
Copy link
Author

p6rt commented Feb 23, 2015

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Feb 26, 2015

From @usev6

japhb++ pointed out on #perl6 (http://irclog.perlgeek.de/perl6/2015-02-23#i_10163527) that "the bar for segfault has risen​: Like the person who replied to my bug, 100_000 now seems to work, but 1_000_000 segfaults again."

I can confirm this with a recent perl6-m on Debian 7 and FreeBSD 10.1.

freebsd$ perl6-m --version
This is perl6 version 2015.02-53-g3607d7b built on MoarVM version 2015.02-6-gb1640b8

freebsd$ /usr/bin/time perl6-m -e 'await do for ^8 { start { my $i; for ^100_000 { $i++; }; say $i } }'
100000
100000
100000
100000
100000
100000
100000
100000
  1.13 real 1.99 user 0.05 sys

freebsd$ /usr/bin/time perl6-m -e 'await do for ^8 { start { my $i; for ^1_000_000 { $i++; }; say $i } }'
time​: command terminated abnormally
  132.11 real 13.26 user 4.49 sys
Bus error

@p6rt
Copy link
Author

p6rt commented May 4, 2015

From @jnthn

On Thu Feb 26 11​:28​:19 2015, bartolin@​gmx.de wrote​:

japhb++ pointed out on #perl6 (http://irclog.perlgeek.de/perl6/2015-
02-23#i_10163527) that "the bar for segfault has risen​: Like the
person who replied to my bug, 100_000 now seems to work, but 1_000_000
segfaults again."

I can confirm this with a recent perl6-m on Debian 7 and FreeBSD 10.1.

freebsd$ perl6-m --version
This is perl6 version 2015.02-53-g3607d7b built on MoarVM version
2015.02-6-gb1640b8

freebsd$ /usr/bin/time perl6-m -e 'await do for ^8 { start { my $i;
for ^100_000 { $i++; }; say $i } }'
100000
100000
100000
100000
100000
100000
100000
100000
1.13 real 1.99 user 0.05 sys

freebsd$ /usr/bin/time perl6-m -e 'await do for ^8 { start { my $i;
for ^1_000_000 { $i++; }; say $i } }'
time​: command terminated abnormally
132.11 real 13.26 user 4.49 sys
Bus error

There was an ABA bug in some freelist handling in MoarVM, which led to memory corruption. Fixed, and added this as a stress test in S17-promise/stress.t.

@p6rt
Copy link
Author

p6rt commented May 4, 2015

@jnthn - Status changed from 'open' to 'deleted'

@p6rt
Copy link
Author

p6rt commented May 4, 2015

@jnthn - Status changed from 'deleted' to 'open'

@p6rt p6rt closed this as completed May 4, 2015
@p6rt
Copy link
Author

p6rt commented May 4, 2015

@jnthn - Status changed from 'open' to 'resolved'

@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant