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

Segfault on 0.^methods(:all).sort #4309

Closed
p6rt opened this issue Jun 9, 2015 · 7 comments
Closed

Segfault on 0.^methods(:all).sort #4309

p6rt opened this issue Jun 9, 2015 · 7 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Jun 9, 2015

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

Searchable as RT125365$

@p6rt
Copy link
Author

p6rt commented Jun 9, 2015

From perl6@6dof.xyz

How to reproduce​:

  perl6 -e '0.^methods(​:all).sort'

Unexpected output​:

  Code object coerced to string (please use .gist or .perl to do that) in any p6sort at src/vm/moar/Perl6/Ops.nqp​:349
  [...]
  Code object coerced to string (please use .gist or .perl to do that) in any p6sort at src/vm/moar/Perl6/Ops.nqp​:349
  ~/.rakudobrew/bin/perl6​: line 2​: 8571 Segmentation fault ~/.rakudobrew/bin/../moar-nom/install/bin/perl6 "$@​"

@p6rt
Copy link
Author

p6rt commented Jun 9, 2015

From @jonathanstowe

gdb says​:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7952fb7 in push ()
  from /home/jonathan/.rakudobrew/moar-nom/install/lib/libmoar.so

and valgrind says​:

==16279== Invalid write of size 8
==16279== at 0x4FB4FB7​: push (in /home/jonathan/.rakudobrew/moar-nom/install/lib/libmoar.so)
==16279== by 0x4FAF9A5​: MVM_repr_push_o (in /home/jonathan/.rakudobrew/moar-nom/install/lib/libmoar.so)
==16279== by 0x4F6C739​: MVM_args_slurpy_positional (in /home/jonathan/.rakudobrew/moar-nom/install/lib/libmoar.so)
==16279== by 0x4F7CCB1​: MVM_interp_run (in /home/jonathan/.rakudobrew/moar-nom/install/lib/libmoar.so)
==16279== by 0x501B63D​: MVM_vm_run_file (in /home/jonathan/.rakudobrew/moar-nom/install/lib/libmoar.so)
==16279== by 0x400FDE​: main (in /home/jonathan/.rakudobrew/moar-nom/install/bin/moar)
==16279== Address 0x0 is not stack'd, malloc'd or (recently) free'd
==16279==
==16279==
==16279== Process terminating with default action of signal 11 (SIGSEGV)
==16279== Access not within mapped region at address 0x0
==16279== at 0x4FB4FB7​: push (in /home/jonathan/.rakudobrew/moar-nom/install/lib/libmoar.so)
==16279== by 0x4FAF9A5​: MVM_repr_push_o (in /home/jonathan/.rakudobrew/moar-nom/install/lib/libmoar.so)
==16279== by 0x4F6C739​: MVM_args_slurpy_positional (in /home/jonathan/.rakudobrew/moar-nom/install/lib/libmoar.so)
==16279== by 0x4F7CCB1​: MVM_interp_run (in /home/jonathan/.rakudobrew/moar-nom/install/lib/libmoar.so)
==16279== by 0x501B63D​: MVM_vm_run_file (in /home/jonathan/.rakudobrew/moar-nom/install/lib/libmoar.so)
==16279== by 0x400FDE​: main (in /home/jonathan/.rakudobrew/moar-nom/install/bin/moar)
==16279== If you believe this happened as a result of a stack
==16279== overflow in your program's main thread (unlikely but
==16279== possible), you can try to increase the size of the
==16279== main thread stack using the --main-stacksize= flag.
==16279== The main thread stack size used in this run was 8388608.
==16279==
==16279== HEAP SUMMARY​:
==16279== in use at exit​: 49,610,196 bytes in 148,006 blocks
==16279== total heap usage​: 431,325 allocs, 283,319 frees, 197,324,716 bytes allocated
==16279==
==16279== LEAK SUMMARY​:
==16279== definitely lost​: 42,434 bytes in 865 blocks
==16279== indirectly lost​: 21,836 bytes in 762 blocks
==16279== possibly lost​: 171,752 bytes in 3,070 blocks
==16279== still reachable​: 49,374,174 bytes in 143,309 blocks
==16279== suppressed​: 0 bytes in 0 blocks
==16279== Rerun with --leak-check=full to see details of leaked memory
==16279==
==16279== For counts of detected and suppressed errors, rerun with​: -v
==16279== ERROR SUMMARY​: 1 errors from 1 contexts (suppressed​: 0 from 0)
/home/jonathan/.rakudobrew/bin/../moar-nom/install/bin/perl6-valgrind-m​: line 11​: 16279 Segmentation fault (core dumped) valgrind /home/jonathan/.rakudobrew/moar-nom/install/bin/moar --execname="$0" --libpath="/home/jonathan/.rakudobrew/moar-nom/install/share/nqp/lib" --libpath="/home/jonathan/.rakudobrew/moar-nom/install/share/perl6/lib" --libpath="/home/jonathan/.rakudobrew/moar-nom/install/share/perl6/runtime" /home/jonathan/.rakudobrew/moar-nom/install/share/perl6/runtime/perl6.moarvm "$@​"

1 similar comment
@p6rt
Copy link
Author

p6rt commented Jun 9, 2015

From @jonathanstowe

gdb says​:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7952fb7 in push ()
  from /home/jonathan/.rakudobrew/moar-nom/install/lib/libmoar.so

and valgrind says​:

==16279== Invalid write of size 8
==16279== at 0x4FB4FB7​: push (in /home/jonathan/.rakudobrew/moar-nom/install/lib/libmoar.so)
==16279== by 0x4FAF9A5​: MVM_repr_push_o (in /home/jonathan/.rakudobrew/moar-nom/install/lib/libmoar.so)
==16279== by 0x4F6C739​: MVM_args_slurpy_positional (in /home/jonathan/.rakudobrew/moar-nom/install/lib/libmoar.so)
==16279== by 0x4F7CCB1​: MVM_interp_run (in /home/jonathan/.rakudobrew/moar-nom/install/lib/libmoar.so)
==16279== by 0x501B63D​: MVM_vm_run_file (in /home/jonathan/.rakudobrew/moar-nom/install/lib/libmoar.so)
==16279== by 0x400FDE​: main (in /home/jonathan/.rakudobrew/moar-nom/install/bin/moar)
==16279== Address 0x0 is not stack'd, malloc'd or (recently) free'd
==16279==
==16279==
==16279== Process terminating with default action of signal 11 (SIGSEGV)
==16279== Access not within mapped region at address 0x0
==16279== at 0x4FB4FB7​: push (in /home/jonathan/.rakudobrew/moar-nom/install/lib/libmoar.so)
==16279== by 0x4FAF9A5​: MVM_repr_push_o (in /home/jonathan/.rakudobrew/moar-nom/install/lib/libmoar.so)
==16279== by 0x4F6C739​: MVM_args_slurpy_positional (in /home/jonathan/.rakudobrew/moar-nom/install/lib/libmoar.so)
==16279== by 0x4F7CCB1​: MVM_interp_run (in /home/jonathan/.rakudobrew/moar-nom/install/lib/libmoar.so)
==16279== by 0x501B63D​: MVM_vm_run_file (in /home/jonathan/.rakudobrew/moar-nom/install/lib/libmoar.so)
==16279== by 0x400FDE​: main (in /home/jonathan/.rakudobrew/moar-nom/install/bin/moar)
==16279== If you believe this happened as a result of a stack
==16279== overflow in your program's main thread (unlikely but
==16279== possible), you can try to increase the size of the
==16279== main thread stack using the --main-stacksize= flag.
==16279== The main thread stack size used in this run was 8388608.
==16279==
==16279== HEAP SUMMARY​:
==16279== in use at exit​: 49,610,196 bytes in 148,006 blocks
==16279== total heap usage​: 431,325 allocs, 283,319 frees, 197,324,716 bytes allocated
==16279==
==16279== LEAK SUMMARY​:
==16279== definitely lost​: 42,434 bytes in 865 blocks
==16279== indirectly lost​: 21,836 bytes in 762 blocks
==16279== possibly lost​: 171,752 bytes in 3,070 blocks
==16279== still reachable​: 49,374,174 bytes in 143,309 blocks
==16279== suppressed​: 0 bytes in 0 blocks
==16279== Rerun with --leak-check=full to see details of leaked memory
==16279==
==16279== For counts of detected and suppressed errors, rerun with​: -v
==16279== ERROR SUMMARY​: 1 errors from 1 contexts (suppressed​: 0 from 0)
/home/jonathan/.rakudobrew/bin/../moar-nom/install/bin/perl6-valgrind-m​: line 11​: 16279 Segmentation fault (core dumped) valgrind /home/jonathan/.rakudobrew/moar-nom/install/bin/moar --execname="$0" --libpath="/home/jonathan/.rakudobrew/moar-nom/install/share/nqp/lib" --libpath="/home/jonathan/.rakudobrew/moar-nom/install/share/perl6/lib" --libpath="/home/jonathan/.rakudobrew/moar-nom/install/share/perl6/runtime" /home/jonathan/.rakudobrew/moar-nom/install/share/perl6/runtime/perl6.moarvm "$@​"

@p6rt
Copy link
Author

p6rt commented Jun 9, 2015

From @lizmat

This appears to have been fixed with 2aad0b20ac943e5513750 and the underlying MoarVM changes.

Liz

On 09 Jun 2015, at 01​:44, Jonathan Stowe via RT <bugs-comment@​bugs6.perl.org> wrote​:

gdb says​:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7952fb7 in push ()
from /home/jonathan/.rakudobrew/moar-nom/install/lib/libmoar.so

and valgrind says​:

==16279== Invalid write of size 8
==16279== at 0x4FB4FB7​: push (in /home/jonathan/.rakudobrew/moar-nom/install/lib/libmoar.so)
==16279== by 0x4FAF9A5​: MVM_repr_push_o (in /home/jonathan/.rakudobrew/moar-nom/install/lib/libmoar.so)
==16279== by 0x4F6C739​: MVM_args_slurpy_positional (in /home/jonathan/.rakudobrew/moar-nom/install/lib/libmoar.so)
==16279== by 0x4F7CCB1​: MVM_interp_run (in /home/jonathan/.rakudobrew/moar-nom/install/lib/libmoar.so)
==16279== by 0x501B63D​: MVM_vm_run_file (in /home/jonathan/.rakudobrew/moar-nom/install/lib/libmoar.so)
==16279== by 0x400FDE​: main (in /home/jonathan/.rakudobrew/moar-nom/install/bin/moar)
==16279== Address 0x0 is not stack'd, malloc'd or (recently) free'd
==16279==
==16279==
==16279== Process terminating with default action of signal 11 (SIGSEGV)
==16279== Access not within mapped region at address 0x0
==16279== at 0x4FB4FB7​: push (in /home/jonathan/.rakudobrew/moar-nom/install/lib/libmoar.so)
==16279== by 0x4FAF9A5​: MVM_repr_push_o (in /home/jonathan/.rakudobrew/moar-nom/install/lib/libmoar.so)
==16279== by 0x4F6C739​: MVM_args_slurpy_positional (in /home/jonathan/.rakudobrew/moar-nom/install/lib/libmoar.so)
==16279== by 0x4F7CCB1​: MVM_interp_run (in /home/jonathan/.rakudobrew/moar-nom/install/lib/libmoar.so)
==16279== by 0x501B63D​: MVM_vm_run_file (in /home/jonathan/.rakudobrew/moar-nom/install/lib/libmoar.so)
==16279== by 0x400FDE​: main (in /home/jonathan/.rakudobrew/moar-nom/install/bin/moar)
==16279== If you believe this happened as a result of a stack
==16279== overflow in your program's main thread (unlikely but
==16279== possible), you can try to increase the size of the
==16279== main thread stack using the --main-stacksize= flag.
==16279== The main thread stack size used in this run was 8388608.
==16279==
==16279== HEAP SUMMARY​:
==16279== in use at exit​: 49,610,196 bytes in 148,006 blocks
==16279== total heap usage​: 431,325 allocs, 283,319 frees, 197,324,716 bytes allocated
==16279==
==16279== LEAK SUMMARY​:
==16279== definitely lost​: 42,434 bytes in 865 blocks
==16279== indirectly lost​: 21,836 bytes in 762 blocks
==16279== possibly lost​: 171,752 bytes in 3,070 blocks
==16279== still reachable​: 49,374,174 bytes in 143,309 blocks
==16279== suppressed​: 0 bytes in 0 blocks
==16279== Rerun with --leak-check=full to see details of leaked memory
==16279==
==16279== For counts of detected and suppressed errors, rerun with​: -v
==16279== ERROR SUMMARY​: 1 errors from 1 contexts (suppressed​: 0 from 0)
/home/jonathan/.rakudobrew/bin/../moar-nom/install/bin/perl6-valgrind-m​: line 11​: 16279 Segmentation fault (core dumped) valgrind /home/jonathan/.rakudobrew/moar-nom/install/bin/moar --execname="$0" --libpath="/home/jonathan/.rakudobrew/moar-nom/install/share/nqp/lib" --libpath="/home/jonathan/.rakudobrew/moar-nom/install/share/perl6/lib" --libpath="/home/jonathan/.rakudobrew/moar-nom/install/share/perl6/runtime" /home/jonathan/.rakudobrew/moar-nom/install/share/perl6/runtime/perl6.moarvm "$@​"

@p6rt
Copy link
Author

p6rt commented Jun 19, 2015

From @jnthn

On Tue Jun 09 07​:42​:33 2015, elizabeth wrote​:

This appears to have been fixed with 2aad0b20ac943e5513750 and the
underlying MoarVM changes.

Added test coverage in integration/weird-errors.t.

@p6rt
Copy link
Author

p6rt commented Jun 19, 2015

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

@p6rt p6rt closed this as completed Jun 19, 2015
@p6rt
Copy link
Author

p6rt commented Jun 19, 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