From: Andy Wingo <wingo@pobox.com>
To: guile-devel <guile-devel@gnu.org>
Subject: Re: allocation within critical sections
Date: Mon, 13 Feb 2012 11:38:37 +0100 [thread overview]
Message-ID: <8762fbhvbm.fsf@pobox.com> (raw)
In-Reply-To: <87sjijzulh.fsf@pobox.com> (Andy Wingo's message of "Thu, 09 Feb 2012 20:15:38 +0100")
On Thu 09 Feb 2012 20:15, Andy Wingo <wingo@pobox.com> writes:
> Andy, who got the following backtrace, with wip-threads-and-fork:
I fixed that one. Just got another interesting backtrace (appended).
FWIW, I'm running the threaded web server on guile master with
wip-threads-and-fork on my web site. It seems to be doing OK, but I
suspect there are a few more deadlocks to unravel. There are more than
on stable-2.0 because master has more locking.
Andy
Thread 1 (Thread 0x7fa7d4d3d700 (LWP 9369)):
#0 0x00007fa7d40ebcec in __lll_lock_wait () from /lib/x86_64-linux-gnu/libpthread.so.0
#1 0x00007fa7d40e7339 in _L_lock_926 () from /lib/x86_64-linux-gnu/libpthread.so.0
#2 0x00007fa7d40e715b in pthread_mutex_lock () from /lib/x86_64-linux-gnu/libpthread.so.0
#3 0x00007fa7d489d1a2 in scm_c_weak_set_add_x (set=<optimized out>, raw_hash=4279044819568792738, pred=0x7fa7d489c680 <eq_predicate>,
closure=0x4b4d720, obj=<optimized out>) at weak-set.c:825
#4 0x00007fa7d4850b33 in scm_c_make_port_with_encoding (tag=<optimized out>, mode_bits=<optimized out>, encoding=0x1ad91d0 "UTF-8",
handler=SCM_FAILED_CONVERSION_ERROR, stream=87907616) at ports.c:623
#5 0x00007fa7d487f171 in scm_mkstrport (pos=<optimized out>, str=<optimized out>, modes=327680, caller=<optimized out>) at strports.c:320
#6 0x00007fa7d487f3dc in scm_call_with_output_string (proc=0x4b4d740) at strports.c:410
#7 0x00007fa7d489a465 in vm_regular_engine (vm=0xfc7050, program=0x1092b40, argv=0xfc9c60, nargs=-1) at vm-i-system.c:892
#8 0x00007fa7d489c02e in scm_call_with_vm (vm=0xfc7050, proc=0x1092b40, args=<optimized out>) at vm.c:860
#9 0x00007fa7d4811b45 in scm_error_scm (key=0xf793c0, subr=<optimized out>, message=<optimized out>, args=<optimized out>, data=<optimized out>)
at error.c:95
#10 0x00007fa7d4811bc0 in scm_error (key=0xf793c0, subr=0x7fa7d48b4f0a "scm_flush", message=<optimized out>, args=0x4b4f400, rest=0x4b4f440)
at error.c:62
#11 0x00007fa7d4811c27 in scm_syserror (subr=0x7fa7d48b4f0a "scm_flush") at error.c:178
#12 0x00007fa7d481f799 in fport_flush (port=<optimized out>) at fports.c:858
#13 0x00007fa7d481f8d5 in fport_close (port=<optimized out>) at fports.c:891
---Type <return> to continue, or q <return> to quit---
#14 0x00007fa7d481f9e9 in fport_free (port=<optimized out>) at fports.c:915
#15 0x00007fa7d485025a in finalize_port (ptr=0x1f9d060, data=<optimized out>) at ports.c:571
#16 finalize_port (ptr=0x1f9d060, data=<optimized out>) at ports.c:551
#17 0x00007fa7d3b0051e in GC_invoke_finalizers () at finalize.c:872
#18 0x00007fa7d3b0076e in GC_notify_or_invoke_finalizers () at finalize.c:951
#19 0x00007fa7d3b01f0c in GC_generic_malloc (lb=976, k=0) at malloc.c:158
#20 0x00007fa7d3b02211 in GC_core_malloc_atomic (lb=976) at malloc.c:226
#21 0x00007fa7d489ca80 in resize_set (set=0xf41cc0) at weak-set.c:315
#22 0x00007fa7d489ccd0 in vacuum_weak_set (set=0xf41cc0) at weak-set.c:401
#23 do_vacuum_weak_set (set=<optimized out>) at weak-set.c:707
#24 0x00007fa7d489cea2 in weak_gc_callback (weak=<optimized out>) at weak-set.c:725
#25 weak_gc_hook (hook_data=<optimized out>, fn_data=<optimized out>, data=<optimized out>) at weak-set.c:734
#26 0x00007fa7d482dd6c in scm_c_hook_run (hook=0x7fa7d4b24020, data=0x0) at hooks.c:103
#27 0x00007fa7d4821d42 in after_gc_async_thunk () at gc.c:685
#28 0x00007fa7d489a471 in vm_regular_engine (vm=0xfc7050, program=0xf74620, argv=0xfc95f0, nargs=-1) at vm-i-system.c:889
#29 0x00007fa7d4803851 in scm_async_tick () at async.c:166
#30 0x00007fa7d489bbc1 in vm_regular_engine (vm=0xfc7050, program=0x1051cc0, argv=0xfc95a8, nargs=-1) at vm-i-system.c:1255
#31 0x00007fa7d4814cd3 in scm_primitive_eval (exp=0x1163ba0) at eval.c:684
#32 0x00007fa7d4814d33 in scm_eval (exp=0x1163ba0, module_or_state=0x10bb000) at eval.c:718
#33 0x00007fa7d489a455 in vm_regular_engine (vm=0xfc7050, program=0x1149300, argv=0xfc9248, nargs=-1) at vm-i-system.c:895
#34 0x00007fa7d4814637 in scm_call_1 (proc=0x1149300, arg1=0x1159440) at eval.c:485
#35 0x00007fa7d489a455 in vm_regular_engine (vm=0xfc7050, program=0x1051cc0, argv=0xfc91c8, nargs=-1) at vm-i-system.c:895
#36 0x00007fa7d4814cd3 in scm_primitive_eval (exp=0x1155e20) at eval.c:684
#37 0x00007fa7d4814d33 in scm_eval (exp=0x1155e20, module_or_state=0x10bb000) at eval.c:718
#38 0x00007fa7d48616af in scm_shell (argc=6, argv=0x7fffe8ab2938) at script.c:441
#39 0x00007fa7d4830cdd in invoke_main_func (body_data=0x7fffe8ab2810) at init.c:336
#40 0x00007fa7d480f62a in c_body (d=0x7fffe8ab2760) at continuations.c:522
#41 0x00007fa7d489a84f in vm_regular_engine (vm=0xfc7050, program=0x10914e0, argv=0xfc90c0, nargs=-1) at vm-i-system.c:960
#42 0x00007fa7d4814753 in scm_call_4 (proc=0x10914e0, arg1=<optimized out>, arg2=<optimized out>, arg3=<optimized out>, arg4=<optimized out>)
at eval.c:506
#43 0x00007fa7d480fde3 in scm_i_with_continuation_barrier (body=0x7fa7d480f620 <c_body>, body_data=0x7fffe8ab2760,
handler=0x7fa7d480f9f0 <c_handler>, handler_data=0x7fffe8ab2760, pre_unwind_handler=<optimized out>, pre_unwind_handler_data=<optimized out>)
at continuations.c:460
#44 0x00007fa7d480fe95 in scm_c_with_continuation_barrier (func=<optimized out>, data=<optimized out>) at continuations.c:556
#45 0x00007fa7d48834ca in with_guile_and_parent (base=0x7fffe8ab27c0, data=0x7fffe8ab27e0) at threads.c:897
#46 0x00007fa7d3b071d5 in GC_call_with_stack_base (fn=<optimized out>, arg=<optimized out>) at misc.c:1542
#47 0x00007fa7d4883678 in scm_i_with_guile_and_parent (parent=<optimized out>, data=<optimized out>, func=<optimized out>) at threads.c:940
#48 scm_with_guile (func=<optimized out>, data=<optimized out>) at threads.c:946
#49 0x00007fa7d4830de5 in scm_boot_guile (argc=<optimized out>, argv=<optimized out>, main_func=<optimized out>, closure=<optimized out>)
---Type <return> to continue, or q <return> to quit---
at init.c:319
#50 0x0000000000400ada in main (argc=6, argv=0x7fffe8ab2938) at guile.c:81
(gdb)
--
http://wingolog.org/
next prev parent reply other threads:[~2012-02-13 10:38 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-09 19:15 allocation within critical sections Andy Wingo
2012-02-13 10:38 ` Andy Wingo [this message]
2012-02-13 15:29 ` Andy Wingo
2012-02-16 21:30 ` Ludovic Courtès
2012-02-16 22:27 ` Andy Wingo
2012-02-17 2:46 ` Mike Gran
2012-02-17 8:16 ` Andy Wingo
2012-02-17 10:32 ` Mike Gran
2012-02-17 15:20 ` Andy Wingo
2012-02-17 22:59 ` Ludovic Courtès
2012-02-19 9:42 ` Andy Wingo
2012-02-19 20:56 ` Ludovic Courtès
2012-02-19 21:29 ` Andy Wingo
2012-02-24 15:04 ` Andy Wingo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8762fbhvbm.fsf@pobox.com \
--to=wingo@pobox.com \
--cc=guile-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).