Skip Menu |
Report information
Id: 123968
Status: new
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: moritz <moritz.lenz+perl [at] gmail.com>
Cc:
AdminCc:

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)



To: rakudobug [...] perl.org
Subject: Rakudo on MoarVM segfaults on simple IO::Socket::Async echo server
From: Moritz Lenz <moritz.lenz [...] noris.de>
Date: Mon, 02 Mar 2015 21:53:59 +0100
Download (untitled) / with headers
text/plain 3.1k
THe fllowing program: use v6; my $connections = IO::Socket::Async.listen( 'localhost', 3333, ); $connections.tap(-> $conn { say "Incoming connection"; $conn.bytes_supply.tap( -> $buf { say $buf.decode; await $conn.write($buf) }, :done({ $conn.close }) ) }, ); $connections.wait; segfaults reliables when I execute it with perl6 version 2015.02-152-ge7a666c built on MoarVM version 2015.02-17-g86d0c68 as soon as I feed it some input: $ echo "foo" | nc localhost 3333 Running under gdb produces this backtrace: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7ffff33c5700 (LWP 15427)] 0x00007ffff79fc2e1 in uv_write2 () from /home/moritz/p6/rakudo/install/lib/libmoar.so (gdb) bt #0 0x00007ffff79fc2e1 in uv_write2 () from /home/moritz/p6/rakudo/install/lib/libmoar.so #1 0x00007ffff79a10f2 in write_setup () from /home/moritz/p6/rakudo/install/lib/libmoar.so #2 0x00007ffff7999da0 in idle_handler () from /home/moritz/p6/rakudo/install/lib/libmoar.so #3 0x00007ffff79f8b1a in uv.run_idle () from /home/moritz/p6/rakudo/install/lib/libmoar.so #4 0x00007ffff79f51ec in uv_run () from /home/moritz/p6/rakudo/install/lib/libmoar.so #5 0x00007ffff7999d34 in enter_loop () from /home/moritz/p6/rakudo/install/lib/libmoar.so #6 0x00007ffff7986256 in thread_initial_invoke () from /home/moritz/p6/rakudo/install/lib/libmoar.so #7 0x00007ffff7969b6d in MVM_interp_run () from /home/moritz/p6/rakudo/install/lib/libmoar.so #8 0x00007ffff79862ae in start_thread () from /home/moritz/p6/rakudo/install/lib/libmoar.so #9 0x00007ffff79fcd87 in uv.thread_start () from /home/moritz/p6/rakudo/install/lib/libmoar.so #10 0x00007ffff6f69182 in start_thread (arg=0x7ffff33c5700) at pthread_create.c:312 #11 0x00007ffff757f47d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111 Running it under gdb prevents the segfault on the first connection, and on the second, produces this: ==15474== Thread 3: ==15474== Invalid read of size 4 ==15474== at 0x4FE92E1: uv_write2 (in /home/moritz/p6/rakudo/install/lib/libmoar.so) ==15474== by 0x4F8E0F1: write_setup (in /home/moritz/p6/rakudo/install/lib/libmoar.so) ==15474== by 0x4F86D9F: idle_handler (in /home/moritz/p6/rakudo/install/lib/libmoar.so) ==15474== by 0x4FE5B19: uv__run_idle (in /home/moritz/p6/rakudo/install/lib/libmoar.so) ==15474== by 0x4FE21EB: uv_run (in /home/moritz/p6/rakudo/install/lib/libmoar.so) ==15474== by 0x4F86D33: enter_loop (in /home/moritz/p6/rakudo/install/lib/libmoar.so) ==15474== by 0x4F73255: thread_initial_invoke (in /home/moritz/p6/rakudo/install/lib/libmoar.so) ==15474== by 0x4F56B6C: MVM_interp_run (in /home/moritz/p6/rakudo/install/lib/libmoar.so) ==15474== by 0x4F732AD: start_thread (in /home/moritz/p6/rakudo/install/lib/libmoar.so) ==15474== by 0x4FE9D86: uv__thread_start (in /home/moritz/p6/rakudo/install/lib/libmoar.so) ==15474== by 0x5A9A181: start_thread (pthread_create.c:312) ==15474== by 0x54C147C: clone (clone.S:111) ==15474== Address 0xb8 is not stack'd, malloc'd or (recently) free'd before producing a segfault with the same stacktrace as gdb.
Download smime.p7s
application/x-pkcs7-signature 6.1k

Message body not shown because it is not plain text.



This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org