From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Mark H Weaver Newsgroups: gmane.lisp.guile.devel,gmane.lisp.guile.user Subject: Re: Now crashing [was Re: guile-2.9.2 and threading Date: Wed, 17 Jul 2019 13:47:08 -0400 Message-ID: <87k1cgwo20.fsf@netris.org> References: <87h892ault.fsf@netris.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="138970"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Guile User , Guile Development To: Linas Vepstas Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Jul 17 19:49:37 2019 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hno3c-000a1h-LG for guile-devel@m.gmane.org; Wed, 17 Jul 2019 19:49:36 +0200 Original-Received: from localhost ([::1]:59418 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hno3b-0005cO-A8 for guile-devel@m.gmane.org; Wed, 17 Jul 2019 13:49:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45273) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hno3Z-0005ZB-5Y for guile-devel@gnu.org; Wed, 17 Jul 2019 13:49:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hno3Y-0007BB-89 for guile-devel@gnu.org; Wed, 17 Jul 2019 13:49:33 -0400 Original-Received: from world.peace.net ([64.112.178.59]:42514) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hno3W-00074v-5c; Wed, 17 Jul 2019 13:49:30 -0400 Original-Received: from mhw by world.peace.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hno3K-00019S-My; Wed, 17 Jul 2019 13:49:18 -0400 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 64.112.178.59 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.org gmane.lisp.guile.devel:20014 gmane.lisp.guile.user:15640 Archived-At: Hi Linas, > Investigating the crash with good-old printf's in libguile/vm.c produces > a vast ocean of prints ... that should have not been printed, and/or should > have been actual errors, but somehow were not handled by scm_error. > Using today's git pull of master, here's the diff containing a printf: > > --- a/libguile/vm.c > +++ b/libguile/vm.c > @@ -1514,12 +1514,23 @@ thread->guard); fflush(stdout); assert (0); } > > proc = SCM_SMOB_DESCRIPTOR (proc).apply_trampoline; > SCM_FRAME_LOCAL (vp->fp, 0) = proc; > return SCM_PROGRAM_CODE (proc); > } > > +printf("duuude wrong type to apply!\n" > +"proc=%lx\n" > +"ip=%p\n" > +"sp=%p\n" > +"fp=%p\n" > +"sp_min=%p\n" > +"stack_lim=%p\n", > +SCM_FRAME_SLOT(vp->fp, 0)->as_u64, > +vp->ip, vp->sp, vp->fp, vp->sp_min_since_gc, vp->stack_limit); > +fflush(stdout); > + > vp->ip = SCM_FRAME_VIRTUAL_RETURN_ADDRESS (vp->fp); > > scm_error (scm_arg_type_key, NULL, "Wrong type to apply: ~S", > scm_list_1 (proc), scm_list_1 (proc)); > } > > As you can see, shortly after my printf, there should have been an > error report. Not necessarily. Note that what 'scm_error' actually does is to raise an exception. What happens next depends on what exception handlers are installed at the time of the error. > There is no error report... until 5-10 minutes later, when the error > report itself causes a crash. Before then, I get an endless > high-speed spew of prints: It looks like another error is happening within the exception handler. Mark PS: It would be good to pick either 'guile-devel' or 'guile-user' for continuation of this thread. I don't see a reason why it should be sent to both lists.