{"action":"created","issue":{"url":"https://api.github.com/repos/racket/racket/issues/1281","repository_url":"https://api.github.com/repos/racket/racket","labels_url":"https://api.github.com/repos/racket/racket/issues/1281/labels{/name}","comments_url":"https://api.github.com/repos/racket/racket/issues/1281/comments","events_url":"https://api.github.com/repos/racket/racket/issues/1281/events","html_url":"https://github.com/racket/racket/issues/1281","id":141026182,"number":1281,"title":"Segfault in future continuation capture","user":{"login":"samth","id":244723,"avatar_url":"https://avatars.githubusercontent.com/u/244723?v=3","gravatar_id":"","url":"https://api.github.com/users/samth","html_url":"https://github.com/samth","followers_url":"https://api.github.com/users/samth/followers","following_url":"https://api.github.com/users/samth/following{/other_user}","gists_url":"https://api.github.com/users/samth/gists{/gist_id}","starred_url":"https://api.github.com/users/samth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samth/subscriptions","organizations_url":"https://api.github.com/users/samth/orgs","repos_url":"https://api.github.com/users/samth/repos","events_url":"https://api.github.com/users/samth/events{/privacy}","received_events_url":"https://api.github.com/users/samth/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"mflatt","id":295034,"avatar_url":"https://avatars.githubusercontent.com/u/295034?v=3","gravatar_id":"","url":"https://api.github.com/users/mflatt","html_url":"https://github.com/mflatt","followers_url":"https://api.github.com/users/mflatt/followers","following_url":"https://api.github.com/users/mflatt/following{/other_user}","gists_url":"https://api.github.com/users/mflatt/gists{/gist_id}","starred_url":"https://api.github.com/users/mflatt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mflatt/subscriptions","organizations_url":"https://api.github.com/users/mflatt/orgs","repos_url":"https://api.github.com/users/mflatt/repos","events_url":"https://api.github.com/users/mflatt/events{/privacy}","received_events_url":"https://api.github.com/users/mflatt/received_events","type":"User","site_admin":false},"milestone":null,"comments":14,"created_at":"2016-03-15T16:24:48Z","updated_at":"2016-04-17T14:30:21Z","closed_at":"2016-04-17T14:30:21Z","body":"So far, all I know is that this happens in the TR integration tests: `racket typed-racket-test/main --int`.\r\n\r\nHere's the stack trace:\r\n\r\n```\r\n#0  0x0000000070000002 in ?? ()\r\n#1  0x00007f16a3fff546 in _raw_syscall () at /home/samth/tmp/rr/src/preload/raw_syscall.S:120\r\n#2  0x00007f16a3ffd005 in traced_raw_syscall (call=call@entry=0x7f16773506e0)\r\n    at /home/samth/tmp/rr/src/preload/preload.c:295\r\n#3  0x00007f16a3ffdcd8 in syscall_hook_internal (call=0x7f16773506e0)\r\n    at /home/samth/tmp/rr/src/preload/preload.c:2126\r\n#4  syscall_hook (call=0x7f16773506e0) at /home/samth/tmp/rr/src/preload/preload.c:2134\r\n#5  0x00007f16a3fff57a in _syscall_hook_trampoline ()\r\n    at /home/samth/tmp/rr/src/preload/syscall_hook.S:216\r\n#6  0x00007f16a3fff597 in _syscall_hook_trampoline_48_3d_00_f0_ff_ff ()\r\n    at /home/samth/tmp/rr/src/preload/syscall_hook.S:273\r\n#7  0x00007f16a4000724 in _stub_buffer () at /home/samth/tmp/rr/src/preload/syscall_hook.S:359\r\n#8  0x00007f16a333dccc in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56\r\n#9  0x00007f16a33410d8 in __GI_abort () at abort.c:89\r\n#10 0x00000000006fce5b in fault_handler (sn=21007, si=<optimized out>, ctx=0x6)\r\n    at ../../../racket/gc2/sighand.c:99\r\n#11 <signal handler called>\r\n#12 0x0000000000481a1b in scheme_capture_lightweight_continuation (p=<optimized out>, \r\n    p_lwc=0x7f1644000930, storage=0x7f1677350fd0) at ../../../racket/gc2/../src/fun.c:8966\r\n#13 0x000000000048addd in capture_future_continuation (fs=0x7f169001cc90, ft=<optimized out>, \r\n    storage=0x7f1677350fd0, need_lock=0, for_overflow=0) at ../../../racket/gc2/../src/future.c:2521\r\n#14 0x000000000048d74a in future_do_runtimecall (fts=0x7f16904a40a0, func=0x0, is_atomic=1, \r\n    can_suspend=1, for_overflow=0) at ../../../racket/gc2/../src/future.c:2850\r\n#15 0x000000000048e041 in scheme_rtcall_on_demand (argv=<optimized out>)\r\n    at ../../../racket/gc2/../src/future.c:3024\r\n#16 0x00007f16a443e0fb in ?? ()\r\n#17 0x0000000000000000 in ?? ()\r\n```\r\n\r\nHere's where the crash seems to be with some info about the local variables.\r\n\r\n```\r\n(rr) frame 12\r\n#12 0x0000000000481a1b in scheme_capture_lightweight_continuation (p=<optimized out>, \r\n    p_lwc=0x7f1644000930, storage=0x7f1677350fd0) at ../../../racket/gc2/../src/fun.c:8966\r\n8966      memcpy(lwc, p_lwc, sizeof(Scheme_Current_LWC));\r\n(rr) list\r\n8961      storage[0] = lw;\r\n8962\r\n8963      lwc = (Scheme_Current_LWC *)scheme_malloc_atomic(sizeof(Scheme_Current_LWC));\r\n8964      if (!lwc) return NULL;\r\n8965\r\n8966      memcpy(lwc, p_lwc, sizeof(Scheme_Current_LWC));\r\n8967\r\n8968      lw = (Scheme_Lightweight_Continuation *)storage[0];\r\n8969      lw->saved_lwc = lwc;\r\n8970\r\n(rr) p lwc\r\n$1 = (Scheme_Current_LWC *) 0x7f16726740c8\r\n(rr) p p_lwc \r\n$2 = (Scheme_Current_LWC *) 0x7f1644000930\r\n(rr) p *p_lwc \r\n$3 = {runstack_start = 0x7f167403beb0, cont_mark_stack_start = 0, cont_mark_pos_start = 1, \r\n  stack_start = 0x7f16773510f8, runstack_end = 0x7f167403be60, runstack_base_end = 0x7f167403be88, \r\n  cont_mark_stack_end = 0, cont_mark_pos_end = 1, frame_end = 0x7f1677351090, \r\n  stack_end = 0x7f1677351050, original_dest = 0x7f16a443e101, saved_v1 = 0x7f16a443e0a3, \r\n  saved_save_fp = -1.5, saved_save_extfp = 0}\r\n(rr) p *lwc \r\n$4 = {runstack_start = 0x0, cont_mark_stack_start = 0, cont_mark_pos_start = 0, stack_start = 0x0, \r\n  runstack_end = 0x0, runstack_base_end = 0x0, cont_mark_stack_end = 0, cont_mark_pos_end = 0, \r\n  frame_end = 0x0, stack_end = 0x0, original_dest = 0x0, saved_v1 = 0x0, saved_save_fp = 0, \r\n  saved_save_extfp = 0}\r\n```"},"comment":{"url":"https://api.github.com/repos/racket/racket/issues/comments/211028850","html_url":"https://github.com/racket/racket/issues/1281#issuecomment-211028850","issue_url":"https://api.github.com/repos/racket/racket/issues/1281","id":211028850,"user":{"login":"mflatt","id":295034,"avatar_url":"https://avatars.githubusercontent.com/u/295034?v=3","gravatar_id":"","url":"https://api.github.com/users/mflatt","html_url":"https://github.com/mflatt","followers_url":"https://api.github.com/users/mflatt/followers","following_url":"https://api.github.com/users/mflatt/following{/other_user}","gists_url":"https://api.github.com/users/mflatt/gists{/gist_id}","starred_url":"https://api.github.com/users/mflatt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mflatt/subscriptions","organizations_url":"https://api.github.com/users/mflatt/orgs","repos_url":"https://api.github.com/users/mflatt/repos","events_url":"https://api.github.com/users/mflatt/events{/privacy}","received_events_url":"https://api.github.com/users/mflatt/received_events","type":"User","site_admin":false},"created_at":"2016-04-17T14:30:21Z","updated_at":"2016-04-17T14:30:21Z","body":"Fixed by f7182e7a5cbf75954f713c7e447c75eeb935b4dc"}}