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

Threading crash #221

Closed
waywardmonkeys opened this issue May 22, 2012 · 4 comments
Closed

Threading crash #221

waywardmonkeys opened this issue May 22, 2012 · 4 comments

Comments

@waywardmonkeys
Copy link
Member

When using the current master and running Koala, after serving a request, you get a crash due to NLX stuff.

Using the nlx trace logging:

[nlx] BUG: unwind reached top
[nlx] BUG: previous uwp is null
[nlx] step: unwinding to 0x0
[nlx] BUG: previous uwp is null

And the stack in gdb:

0x00135849 in nlx_step (ultimate_destination=0xb8fb80) at /Users/bruce/Development/opendylan/sources/dfmc/c-run-time/run-time.c:4112
4112        teb->uwp_frame->ultimate_destination = ultimate_destination;
(gdb) bt
#0  0x00135849 in nlx_step (ultimate_destination=0xb8fb80) at /Users/bruce/Development/opendylan/sources/dfmc/c-run-time/run-time.c:4112
#1  0x00135959 in CONTINUE_UNWIND () at /Users/bruce/Development/opendylan/sources/dfmc/c-run-time/run-time.c:4153
#2  0x0002795a in Krespond_top_levelYhttpiVkoalaI (client_=0xc34c48) at server.c:8026
#3  0x0002724a in Kdo_respondF226I () at server.c:7842
#4  0x00203bb4 in Kanonymous_of_trampoline_functionF66I () at /Users/bruce/Development/dylan/http/_build/build/koala/../base64/../common-dylan/../dylan/thread.c:1478
#5  0x00247fff in trampoline (arg=0xc4f4e0) at posix-threads.c:376
#6  0x0097b657 in GC_inner_start_routine ()
#7  0x00975a7e in GC_call_with_stack_base ()
#8  0x0097b6a2 in GC_start_routine ()
#9  0x93fdd259 in _pthread_start ()
#10 0x93fdd0de in thread_start ()

and:

(gdb) print teb
$1 = (TEB *) 0xc13000
(gdb) print teb->uwp_frame 
$2 = (Unwind_protect_frame *) 0x0

The code involved here has a lot of stuff going on with exit frames and dynamic unwinds.

Thoughts, @promovicz, @housel, @hannesm ?

@waywardmonkeys
Copy link
Member Author

@cgay too ...

@hannesm
Copy link
Contributor

hannesm commented Jun 26, 2012

we're getting smaller: http://paste.lisp.org/display/130273

@hannesm
Copy link
Contributor

hannesm commented Jun 26, 2012

but slightly different:
[nlx] step: unwinding to 0xb00809d0
[nlx] unwinding uwp 0xb00809d0 towards bef 0x6da2e0
[nlx] step: reached uwp 0xb00809d0
[nlx] fall-through from uwp 0xb00809d0
Segmentation fault

primitive_write_thread_variable (h=0xdb3e000, nv=0xc04b8) at posix-threads.c:1429
1429 tlv_vector[offset] = nv;
(gdb) bt
#0 primitive_write_thread_variable (h=0xdb3e000, nv=0xc04b8) at posix-threads.c:1429
#1 0x00005c97 in Krespond_top_levelYhttpiVkoalaI () at server.c:952
#2 0x00088889 in Kanonymous_of_trampoline_functionF66I () at thread.c:1478
#3 0x000bd498 in trampoline (arg=0x5a4e20) at posix-threads.c:376
#4 0x004c7b73 in GC_inner_start_routine ()
#5 0x004c27f1 in GC_call_with_stack_base ()
#6 0x004c8aea in GC_start_routine ()
#7 0x976b9ed9 in _pthread_start ()
#8 0x976bd6de in thread_start ()

@hannesm
Copy link
Contributor

hannesm commented Nov 23, 2012

this is fixed now... thanks @promovicz

@hannesm hannesm closed this as completed Nov 23, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants