From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.devel Subject: Re: allocation within critical sections Date: Mon, 13 Feb 2012 11:38:37 +0100 Message-ID: <8762fbhvbm.fsf@pobox.com> References: <87sjijzulh.fsf@pobox.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1329129538 21929 80.91.229.3 (13 Feb 2012 10:38:58 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 13 Feb 2012 10:38:58 +0000 (UTC) To: guile-devel Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Feb 13 11:38:57 2012 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RwtJB-0005E6-7n for guile-devel@m.gmane.org; Mon, 13 Feb 2012 11:38:57 +0100 Original-Received: from localhost ([::1]:55919 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RwtJA-0002TK-CT for guile-devel@m.gmane.org; Mon, 13 Feb 2012 05:38:56 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:34986) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RwtJ4-0002T4-Aj for guile-devel@gnu.org; Mon, 13 Feb 2012 05:38:54 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RwtIx-0002x1-CT for guile-devel@gnu.org; Mon, 13 Feb 2012 05:38:50 -0500 Original-Received: from a-pb-sasl-sd.pobox.com ([74.115.168.62]:45631 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RwtIx-0002wh-9C for guile-devel@gnu.org; Mon, 13 Feb 2012 05:38:43 -0500 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id BC8437564 for ; Mon, 13 Feb 2012 05:38:41 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=xUR836/0gcOYz2y9p0nTgYie2ic=; b=drPGFF dCZGUVoLiQWnCtnSq5TQrNKlHr1h7vhyGezuRnTNmTZVNMSyOCPsWsAjW/KH4Kj5 uJrasd4gfu3zlyMsKXE89elx6jIk9TimoX1LzXTSf2KB+Z1panNa/nxszA4MWiRV WbaBUmy7UuzdOsiof2cNWHCdCMj/3+GxlQtpE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:subject :references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=cxidBPUs6uEqA37LpWkpM2Hlgu1FVGjm UqJ2wVGrdZ2fvHJWdsPcOb/HxQDxTLk2TJzoBBjmzACxhMnsI7NUwQd6FViuT9qL Pfx85Zg/0o9SvAW06Ps9HV9H8jVvv6G765KUvfLMTPQQU6Mmf6Yzpht9zHeVKXU5 wyDMr7zmSHg= Original-Received: from a-pb-sasl-sd.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id B4B977561 for ; Mon, 13 Feb 2012 05:38:41 -0500 (EST) Original-Received: from badger (unknown [90.163.21.206]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTPSA id E0A1E7557 for ; Mon, 13 Feb 2012 05:38:40 -0500 (EST) In-Reply-To: <87sjijzulh.fsf@pobox.com> (Andy Wingo's message of "Thu, 09 Feb 2012 20:15:38 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) X-Pobox-Relay-ID: E524712C-562E-11E1-9254-65B1DE995924-02397024!a-pb-sasl-sd.pobox.com X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 74.115.168.62 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:13852 Archived-At: On Thu 09 Feb 2012 20:15, Andy Wingo 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=, raw_hash=4279044819568792738, pred=0x7fa7d489c680 , closure=0x4b4d720, obj=) at weak-set.c:825 #4 0x00007fa7d4850b33 in scm_c_make_port_with_encoding (tag=, mode_bits=, encoding=0x1ad91d0 "UTF-8", handler=SCM_FAILED_CONVERSION_ERROR, stream=87907616) at ports.c:623 #5 0x00007fa7d487f171 in scm_mkstrport (pos=, str=, modes=327680, caller=) 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=) at vm.c:860 #9 0x00007fa7d4811b45 in scm_error_scm (key=0xf793c0, subr=, message=, args=, data=) at error.c:95 #10 0x00007fa7d4811bc0 in scm_error (key=0xf793c0, subr=0x7fa7d48b4f0a "scm_flush", message=, 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=) at fports.c:858 #13 0x00007fa7d481f8d5 in fport_close (port=) at fports.c:891 ---Type to continue, or q to quit--- #14 0x00007fa7d481f9e9 in fport_free (port=) at fports.c:915 #15 0x00007fa7d485025a in finalize_port (ptr=0x1f9d060, data=) at ports.c:571 #16 finalize_port (ptr=0x1f9d060, data=) 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=) at weak-set.c:707 #24 0x00007fa7d489cea2 in weak_gc_callback (weak=) at weak-set.c:725 #25 weak_gc_hook (hook_data=, fn_data=, data=) 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=, arg2=, arg3=, arg4=) at eval.c:506 #43 0x00007fa7d480fde3 in scm_i_with_continuation_barrier (body=0x7fa7d480f620 , body_data=0x7fffe8ab2760, handler=0x7fa7d480f9f0 , handler_data=0x7fffe8ab2760, pre_unwind_handler=, pre_unwind_handler_data=) at continuations.c:460 #44 0x00007fa7d480fe95 in scm_c_with_continuation_barrier (func=, data=) 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=, arg=) at misc.c:1542 #47 0x00007fa7d4883678 in scm_i_with_guile_and_parent (parent=, data=, func=) at threads.c:940 #48 scm_with_guile (func=, data=) at threads.c:946 #49 0x00007fa7d4830de5 in scm_boot_guile (argc=, argv=, main_func=, closure=) ---Type to continue, or q to quit--- at init.c:319 #50 0x0000000000400ada in main (argc=6, argv=0x7fffe8ab2938) at guile.c:81 (gdb) -- http://wingolog.org/