Skip to content

Instantly share code, notes, and snippets.

@tycho
Created November 18, 2013 01:27
Show Gist options
  • Save tycho/7520953 to your computer and use it in GitHub Desktop.
Save tycho/7520953 to your computer and use it in GitHub Desktop.
Lua lanes deadlock in garbage collector
Thread 2 (Thread 0x7f378bf98700 (LWP 30758)):
#0 0x00007f378bfa503f in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
No symbol table info available.
#1 0x00007f378c3f9542 in SIGNAL_WAIT (ref=0x10868e0, mu=0x10854b0, abs_secs=-1) at threading.c:554
rc = 0
__PRETTY_FUNCTION__ = "SIGNAL_WAIT"
#2 0x00007f378c3f418b in LG_linda_receive (L=0x108b020) at lanes.c:639
s = 0x10a0760
prev_status = RUNNING
K = 0x10854b0
linda = 0x10868b0
pushed = 0
expected_pushed_min = 2
expected_pushed_max = 2
cancel = CANCEL_NONE
keeper_receive = 0x7f378c4000d8 <keepercall_receive>
timeout = -1
key_i = 3
#3 0x000000000040a500 in luaD_precall (L=0x108b020, func=0x108b490, nresults=2) at ldo.c:320
ci = 0x108b2e0
n = 0
cl = 0x1099b00
funcr = 176
#4 0x00000000004184c3 in luaV_execute (L=0x108b020, nexeccalls=1) at lvm.c:591
b = 5
nresults = 2
i = 41992732
ra = 0x108b490
cl = 0x10a0140
base = 0x108b410
k = 0x109c990
pc = 0x109c8a8
#5 0x000000000040a7a7 in luaD_call (L=0x108b020, func=0x108b400, nResults=-1) at ldo.c:378
No locals.
#6 0x0000000000406e18 in f_call (L=0x108b020, ud=0x7f378bf97f00) at lapi.c:800
c = 0x7f378bf97f00
#7 0x0000000000409730 in luaD_rawrunprotected (L=0x108b020, f=0x406de3 <f_call>, ud=0x7f378bf97f00)
at ldo.c:116
lj = {previous = 0x0, b = {{__jmpbuf = {139876548314880, -2537068089551786840, 0, 139876571291648,
0, 139876548314880, -2537068089652450136, 2496561480379886760}, __mask_was_saved = 0,
__saved_mask = {__val = {139876548312576, 139876414521376, 40, 0, 139876571291648, 0,
139876548314880, 139876558068816, 139876571291648, 139876548314880, 139876548312640,
4304406, 40, 0, 0, 0}}}}, status = 0}
#8 0x000000000040aba5 in luaD_pcall (L=0x108b020, func=0x406de3 <f_call>, u=0x7f378bf97f00, old_top=32,
ef=16) at ldo.c:464
status = 0
oldnCcalls = 0
old_ci = 0
old_allowhooks = 1 '\001'
old_errfunc = 0
#9 0x0000000000406ec9 in lua_pcall (L=0x108b020, nargs=0, nresults=-1, errfunc=1) at lapi.c:821
c = {func = 0x108b400, nresults = -1}
status = 0
func = 16
#10 0x00007f378c3f60df in lane_main (vs=0x10a0760) at lanes.c:1810
s = 0x10a0760
rc = 0
rc2 = 0
L = 0x108b020
__PRETTY_FUNCTION__ = "lane_main"
#11 0x00007f378bfa10a2 in start_thread () from /usr/lib/libpthread.so.0
No symbol table info available.
#12 0x00007f378c94f49d in clone () from /usr/lib/libc.so.6
No symbol table info available.
Thread 1 (Thread 0x7f378d53d700 (LWP 30757)):
#0 0x00007f378bfa779c in __lll_lock_wait () from /usr/lib/libpthread.so.0
No symbol table info available.
#1 0x00007f378bfa3467 in _L_lock_531 () from /usr/lib/libpthread.so.0
No symbol table info available.
#2 0x00007f378bfa3290 in pthread_mutex_lock () from /usr/lib/libpthread.so.0
No symbol table info available.
#3 0x00007f378c400d33 in keeper_acquire (ptr=0x10a6b40) at keeper.c:628
i = 0
K = 0x10854b0
#4 0x00007f378c3f4aa2 in linda_id (L=0x1069010, which=0x7f378c401ebd "delete") at lanes.c:966
K = 0x1fbc4b210
l = 0x10a6b40
#5 0x00007f378c3fb743 in deep_userdata_gc (L=0x1069010) at tools.c:862
idfunc = 0x7f378c3f4905 <linda_id>
proxy = 0x10a6bd8
p = 0x107d6d0
v = 0
#6 0x000000000040a500 in luaD_precall (L=0x1069010, func=0x10785e0, nresults=0) at ldo.c:320
ci = 0x1069370
n = 32767
cl = 0x1086e40
funcr = 768
#7 0x000000000040a792 in luaD_call (L=0x1069010, func=0x10785e0, nResults=0) at ldo.c:377
No locals.
#8 0x000000000040d1f2 in GCTM (L=0x1069010) at lgc.c:467
oldah = 1 '\001'
oldt = 104304
g = 0x10690c8
o = 0x10a6bb0
udata = 0x10a6bb0
tm = 0x1086f00
#9 0x000000000040d803 in singlestep (L=0x1069010) at lgc.c:594
g = 0x10690c8
#10 0x000000000040d8dd in luaC_step (L=0x1069010) at lgc.c:617
g = 0x10690c8
lim = 1200
#11 0x00000000004065ff in lua_createtable (L=0x1069010, narray=0, nrec=0) at lapi.c:580
No locals.
#12 0x00007f378c3feeb6 in luaG_inter_copy (L=0x1085670, L2=0x1069010, n=1, mode_=eLM_FromKeeper)
at tools.c:2114
top_L = 1
top_L2 = 3
i = 4294967295
j = 1
tmpBuf = "Z\b\000\000\001\000\000\000\bY\b\001\000\000\000"
pBuf = 0x7f378c402324 "?"
copyok = 1
#13 0x00007f378c3ff018 in luaG_inter_move (L=0x1085670, L2=0x1069010, n=1, mode_=eLM_FromKeeper)
at tools.c:2152
ret = 0
#14 0x00007f378c400f2c in keeper_call (K=0x1085670, _func=0x7f378c3fff51 <keepercall_send>, L=0x1069010,
linda=0x60719f0, starting_index=2) at keeper.c:700
args = 2
Ktos = 0
retvals = 1
#15 0x00007f378c3f3a1e in LG_linda_send (L=0x1069010) at lanes.c:428
_oldtop_KL = 0
K = 0x10854b0
KL = 0x1085670
linda = 0x60719f0
ret = 0
cancel = CANCEL_NONE
pushed = 17270272
timeout = -1
key_i = 2
#16 0x000000000040a500 in luaD_precall (L=0x1069010, func=0x10785a0, nresults=0) at ldo.c:320
ci = 0x1069348
n = 1
cl = 0x1086bf0
funcr = 704
#17 0x00000000004184c3 in luaV_execute (L=0x1069010, nexeccalls=3) at lvm.c:591
b = 0
nresults = 0
i = 16412
ra = 0x10785a0
cl = 0x1e7fc50
base = 0x10785a0
k = 0x1071350
pc = 0x107169c
#18 0x000000000040a7a7 in luaD_call (L=0x1069010, func=0x1069410, nResults=-1) at ldo.c:378
No locals.
#19 0x0000000000406e18 in f_call (L=0x1069010, ud=0x7ffffbc4bbc0) at lapi.c:800
c = 0x7ffffbc4bbc0
#20 0x0000000000409730 in luaD_rawrunprotected (L=0x1069010, f=0x406de3 <f_call>, ud=0x7ffffbc4bbc0)
at ldo.c:116
lj = {previous = 0x7ffffbc4bd90, b = {{__jmpbuf = {0, -2496570376804799320, 4209744,
140737417363536, 0, 0, -2496570376771244888, 2496561480379886760}, __mask_was_saved = 0,
__saved_mask = {__val = {140737417362096, 139876557779814, 4210053, 2,
0 <repeats 12 times>}}}}, status = 0}
#21 0x000000000040aba5 in luaD_pcall (L=0x1069010, func=0x406de3 <f_call>, u=0x7ffffbc4bbc0, old_top=64,
ef=48) at ldo.c:464
status = 0
oldnCcalls = 1
old_ci = 40
old_allowhooks = 1 '\001'
old_errfunc = 0
#22 0x0000000000406ec9 in lua_pcall (L=0x1069010, nargs=0, nresults=-1, errfunc=2) at lapi.c:821
c = {func = 0x1069410, nresults = -1}
status = 0
func = 48
#23 0x000000000040406b in docall (L=0x1069010, narg=0, clear=0) at lua.c:102
status = 0
base = 2
#24 0x000000000040490e in handle_script (L=0x1069010, argv=0x7ffffbc4c058, n=1) at lua.c:250
status = 0
fname = 0x7ffffbc4df44 "tests/linda_perf.lua"
narg = 0
#25 0x0000000000404e79 in pmain (L=0x1069010) at lua.c:362
s = 0x7ffffbc4bf50
argv = 0x7ffffbc4c058
script = 1
has_i = 0
has_v = 0
has_e = 0
#26 0x000000000040a500 in luaD_precall (L=0x1069010, func=0x10693e0, nresults=0) at ldo.c:320
ci = 0x10692a8
n = 0
cl = 0x106a1a0
funcr = 16
#27 0x000000000040a792 in luaD_call (L=0x1069010, func=0x10693e0, nResults=0) at ldo.c:377
No locals.
#28 0x0000000000406fdf in f_Ccall (L=0x1069010, ud=0x7ffffbc4bf10) at lapi.c:846
c = 0x7ffffbc4bf10
cl = 0x106a1a0
#29 0x0000000000409730 in luaD_rawrunprotected (L=0x1069010, f=0x406f04 <f_Ccall>, ud=0x7ffffbc4bf10)
at ldo.c:116
lj = {previous = 0x0, b = {{__jmpbuf = {0, -2496570376918045528, 4209744, 140737417363536, 0, 0,
-2496570377018708824, 2496561480379886760}, __mask_was_saved = 0, __saved_mask = {__val = {
0, 0, 15950173696781020328, 4209744, 140737417363536, 0, 0, 15950173696680357032,
2496561480379886760, 0, 139874199928956, 139876557561856, 0, 139876561384992, 616,
4209744}}}}, status = 0}
#30 0x000000000040aba5 in luaD_pcall (L=0x1069010, func=0x406f04 <f_Ccall>, u=0x7ffffbc4bf10, old_top=16,
ef=0) at ldo.c:464
status = 0
oldnCcalls = 0
old_ci = 0
old_allowhooks = 1 '\001'
old_errfunc = 0
#31 0x000000000040703b in lua_cpcall (L=0x1069010, func=0x404d02 <pmain>, ud=0x7ffffbc4bf50) at lapi.c:856
c = {func = 0x404d02 <pmain>, ud = 0x7ffffbc4bf50}
status = 0
#32 0x0000000000404f55 in main (argc=2, argv=0x7ffffbc4c058) at lua.c:387
status = 0
s = {argc = 2, argv = 0x7ffffbc4c058, status = 0}
L = 0x1069010
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment