[25774] in SIPB bug reports
Solaris mutt is undebugable?
daemon@ATHENA.MIT.EDU (John Hawkinson)
Fri Aug 18 11:33:06 2006
From jhawk@MIT.EDU Fri Aug 18 15:33:05 2006
Return-Path: <jhawk@MIT.EDU>
Delivered-To: bug-sipb-mtg@CHARON.mit.edu
Received: (qmail 2813 invoked from network); 18 Aug 2006 15:33:05 -0000
Received: from biscayne-one-station.mit.edu (18.7.7.80)
by charon.mit.edu with SMTP; 18 Aug 2006 15:33:05 -0000
Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])
by biscayne-one-station.mit.edu (8.13.6/8.9.2) with ESMTP id k7IFX4HW027487;
Fri, 18 Aug 2006 11:33:04 -0400 (EDT)
Received: from multics.mit.edu (MULTICS.MIT.EDU [18.187.1.73])
(authenticated bits=56)
(User authenticated as jhawk@ATHENA.MIT.EDU)
by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id k7IFWujB028314
(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT);
Fri, 18 Aug 2006 11:32:57 -0400 (EDT)
Received: (from jhawk@localhost) by multics.mit.edu (8.12.9.20060308)
id k7IFWtWo000645; Fri, 18 Aug 2006 11:32:55 -0400 (EDT)
Date: Fri, 18 Aug 2006 11:32:55 -0400 (EDT)
Message-Id: <200608181532.k7IFWtWo000645@multics.mit.edu>
To: bug-sipb@MIT.EDU
Subject: Solaris mutt is undebugable?
From: John Hawkinson <jhawk@MIT.EDU>
X-Spam-Score: 1.217
X-Spam-Level: * (1.217)
X-Spam-Flag: NO
X-Scanned-By: MIMEDefang 2.42
After my krb4 tickets expired per bugs[26925],
mutt segfaulted on me. It appears that it
produces a core dump unreadable with gdb:
[multics!jhawk:b] /var/tmp> gdb mutt mutt.core.jhawk
GNU gdb 4.18
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "sparc-sun-solaris2.6"...
Core was generated by `mutt'.
Program terminated with signal 11, Segmentation Fault.
Reading symbols from /usr/athena/lib/libssl.so.0.9.7...done.
Reading symbols from /usr/athena/lib/libcrypto.so.0.9.7...done.
Reading symbols from /usr/athena/lib/libsasl2.so.2...Error while reading shared library symbols:
Dwarf Error: Cannot handle DW_FORM_strp in DWARF reader.
Cannot access memory at address 0x4e9350.
No stack.
(gdb) where
No stack.
I don't know what went wrong to cause this, but it seems very very sad
:(
On the other hand, adb can show me a stack:
[multics!jhawk:b] /var/tmp> adb `which mutt` mutt.core.jhawk
core file = mutt.core.jhawk -- program ``/mit/sipb/arch/sun4x_510/bin/mutt'' on platform SUNW,UltraAX-i2
SIGSEGV: Segmentation Fault
$c
hash_destroy+0x20(15feb8, 0, 0, 1f8000, cfff8000, 20)
mx_fastclose_mailbox+0x60(15fe80, 400, 0, 14745c, 147e34, 0)
mx_close_mailbox+0x9e8(15fe80, ffbfe370, 400, 3621bc, 1, 0)
mutt_index_menu+0x293c(15fe80, 0, 0, 1598f7, 0, 80808080)
main+0x146c(1, ffbfef34, ffbfef3c, 13d000, ff110140, ff110180)
_start+0x108(0, 0, 0, 0, 0, 0)
Though I must say, not having source-level debugging sure is a bummer.
Oh, ``pstack'' also works:
[multics!jhawk:b] /var/tmp> pstack mutt.core.jhawk
core 'mutt.core.jhawk' of 4177: mutt
0007ad10 hash_destroy (15feb8, 0, 0, 1f8000, cfff8000, 20) + 20
00095a58 mx_fastclose_mailbox (15fe80, 400, 0, 14745c, 147e34, 0) + 60
000966a8 mx_close_mailbox (15fe80, ffbfe370, 400, 3621bc, 1, 0) + 9e8
000598fc mutt_index_menu (15fe80, 0, 0, 1598f7, 0, 80808080) + 293c
00085bac main (1, ffbfef34, ffbfef3c, 13d000, ff110140, ff110180) + 146c
000359b0 _start (0, 0, 0, 0, 0, 0) + 108
In terms of speculative debugging, looking at mx.c:
738 void mx_fastclose_mailbox (CONTEXT *ctx)
739 {
740 int i;
741
742 if(!ctx)
743 return;
744
745 #ifdef USE_IMAP
746 if (ctx->magic == M_IMAP)
747 imap_close_mailbox (ctx);
748 #endif /* USE_IMAP */
749 #ifdef USE_POP
750 if (ctx->magic == M_POP)
751 pop_close_mailbox (ctx);
752 #endif /* USE_POP */
753 if (ctx->subj_hash)
754 hash_destroy (&ctx->subj_hash, NULL);
755 if (ctx->id_hash)
756 hash_destroy (&ctx->id_hash, NULL);
757 mutt_clear_threads (ctx);
it suggests that either subj_hash or id_hash got
instantiated but not properly populated when mutt
tried to open my imap maiblx but failed because
of authentication.
I expect this is easy to reproduce by running mutt
against an MIT imap mailbox with nonexistant tickets.
Trying under linux, I get a segfault closing mutt
(it tries to open the mailbox, fails, and gives
me a blank index. I then hit 'x'):
gdb) where
#0 0x00608dfc in remove_error_table (et=0xdc56c8) at error_message.c:94
#1 0x00d53bf3 in krb5int_lib_fini () at krb5_libinit.c:83
#2 0x00d536df in __do_global_dtors_aux () from /usr/athena/lib/libkrb5.so.3
#3 0x00dbdbea in _fini () from /usr/athena/lib/libkrb5.so.3
#4 0x00f5d86b in _dl_close () from /lib/tls/libc.so.6
#5 0x005cfd5a in dlclose_doit () from /lib/libdl.so.2
#6 0x006690fe in _dl_catch_error () from /lib/ld-linux.so.2
#7 0x005d02bb in _dlerror_run () from /lib/libdl.so.2
#8 0x005cfd8a in dlclose () from /lib/libdl.so.2
#9 0x00c4f57d in _sasl_done_with_plugins () at dlopen.c:534
#10 0x00c46106 in sasl_done () at common.c:323
#11 0x08077613 in main (argc=1, argv=0xbfe87024) at main.c:971
That one is totally different.
(gdb) frame 11
#11 0x08077613 in main (argc=1, argv=0xbfe87024) at main.c:971
971 mutt_sasl_done ();
(gdb) list
966 }
967 #ifdef USE_IMAP
968 imap_logout_all ();
969 #endif
970 #ifdef USE_SASL
971 mutt_sasl_done ();
972 #endif
973 mutt_free_opts ();
974 mutt_endwin (Errorbuf);
975 }
(gdb) down
#10 0x00c46106 in sasl_done () at common.c:323
323 common.c: No such file or directory.
in common.c
"Go figure."
--jhawk