Your message dated Sun, 27 May 2001 03:01:28 +0200 with message-id <[EMAIL PROTECTED]> and subject line fixed has caused the attached Bug report to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what I am talking about this indicates a serious mail system misconfiguration somewhere. Please contact me immediately.) Darren Benham (administrator, Debian Bugs database) -------------------------------------- Received: (at submit) by bugs.debian.org; 6 Mar 2001 03:31:13 +0000 >From [EMAIL PROTECTED] Mon Mar 05 21:31:13 2001 Return-path: <[EMAIL PROTECTED]> Received: from mail-cl16-hme0.zet.net (zet.net) [::ffff:195.189.32.26] by master.debian.org with smtp (Exim 3.12 1 (Debian)) id 14a8Bt-0008MN-00; Mon, 05 Mar 2001 21:31:13 -0600 Received: (COMMCENTER.MAIL 21385); 6 Mar 2001 03:31:10 -0000 Received: from (HELO localhost) (62.67.88.16) by mail-cl16-hme0.zet.net with SMTP; 6 Mar 2001 03:31:10 -0000 Received: from marcus by localhost with local (Exim 3.22 #1 (Debian)) id 14a877-00007T-00; Tue, 06 Mar 2001 04:26:17 +0100 Date: Tue, 6 Mar 2001 04:25:57 +0100 From: Marcus Brinkmann <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: mtrace triggers SIGBUS at first malloc Message-ID: <[EMAIL PROTECTED]> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.15i Sender: Marcus Brinkmann <[EMAIL PROTECTED]> Organization: Marcus Brinkmann's Home Delivered-To: [EMAIL PROTECTED] Package: libc0.2 Version: 2.2.2-1 Hi, mtrace() triggers SIGBUS on a server binary. I tested the following patch to ext2fs: --- gnu/cvs/hurd/ext2fs/ext2fs.c Mon Jan 8 23:27:01 2001 +++ gnu/hurd/hurd/hurd-20010111/ext2fs/ext2fs.c Tue Mar 6 03:57:38 2001 @@ -28,6 +28,7 @@ #include <error.h> #include <argz.h> #include <argp.h> +#include <mcheck.h> #include <hurd/store.h> #include <version.h> #include "ext2fs.h" @@ -166,6 +167,9 @@ { error_t err; mach_port_t bootstrap; + + setenv("MALLOC_TRACE", "/tmp/mtrace", 1); + mtrace(); /* Initialize the diskfs library, parse arguments, and open the store. This starts the first diskfs thread for us. */ The below transcript is the result. Note that this doesn't happen for a very simple test case that only calls setenv/mtrace/malloc. Thanks, Marcus Script started on Tue Mar 6 04:08:15 2001 hurd:~# gdb /hurd/ext2fs.mtrace GNU gdb 5.0 Copyright 2000 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 "i386-unknown-gnu0.2"... (gdb) run Starting program: /hurd/ext2fs.mtrace Program received signal SIGBUS, Bus error. 0x11e4910 in _dl_addr (address=0x804cce9, info=0x124fc4c) at dl-addr.c:67 67 dl-addr.c: No such file or directory. (gdb) bt full #0 0x11e4910 in _dl_addr (address=0x804cce9, info=0x124fc4c) at dl-addr.c:67 l = (struct link_map *) 0x124fc4c match = (struct link_map *) 0x207c8 symtab = (Elf32_Sym *) 0x207c8 matchsym = (Elf32_Sym *) 0x8048034 strtab = 0x8 <Address 0x8 out of bounds> #1 0x1143c75 in tr_where (caller=0x804cce9) at mtrace.c:99 info = {dli_fname = 0x169cb "", dli_fbase = 0x0, dli_sname = 0x8 <Address 0x8 out of bounds>, dli_saddr = 0xddc9} #2 0x1144074 in tr_mallochook (size=8, caller=0x804cce9) at mtrace.c:171 size = 8 hdr = (void *) 0x8056e30 #3 0x1140516 in __libc_malloc (bytes=8) at malloc.c:2701 result = (void *) 0x1021c40 bytes = 133064 ar_ptr = (arena *) 0x124fe20 nb = 133064 victim = 0x8056a08 #4 0x804cce9 in parse_opt (key=16777219, arg=0x0, state=0x124fe20) at ../../ext2fs/ext2fs.c:106 key = 16915520 state = (struct argp_state *) 0x124fe20 values = (struct {...} *) 0x0 #5 0x11c32bc in group_parse (group=0x8056a08, state=0x124fe20, key=16777219, ---Type <return> to continue, or q <return> to quit--- arg=0x0) at argp-parse.c:279 group = (struct group *) 0x8056a08 state = (struct argp_state *) 0x124fe20 #6 0x11c382d in parser_init (parser=0x124fe04, argp=0x124fd84, argc=1, argv=0x124ff64, flags=8, input=0x124fea0) at argp-parse.c:566 argp = (struct argp *) 0x124fe20 argc = 16915520 input = (void *) 0x1021c40 err = 0 group = (struct group *) 0x8056a08 szs = {short_len = 115, long_len = 38, num_groups = 7, num_child_inputs = 7} #7 0x11c3fdd in __argp_parse (argp=0x124fd84, argc=1, argv=0x124ff64, flags=8, end_index=0x0, input=0x124fea0) at argp-parse.c:931 err = 16915520 parser = {argp = 0x124fd84, short_opts = 0x8056db4 "-DS:C:rws::nSEAT:mI:L?V", long_opts = 0x8056b44, groups = 0x8056a08, egroup = 0x8056b04, child_inputs = 0x8056b28, try_getopt = 1, state = {root_argp = 0x124fd84, argc = 1, argv = 0x124ff64, next = 0, flags = 8, arg_num = 0, quoted = 0, input = 0x124fea0, child_inputs = 0x8056b28, hook = 0x0, name = 0x0, err_stream = 0x80568b0, out_stream = 0x8056858, pstate = 0x124fe04}, storage = 0x8056a08} arg_ebadkey = 0 #8 0x103eb24 in diskfs_init_main () from /lib/libdiskfs.so.0.2 ---Type <return> to continue, or q <return> to quit--- No symbol table info available. #9 0x804cadf in main (argc=1, argv=0x124ff64) at ../../ext2fs/ext2fs.c:176 argc = 1 argv = (char **) 0x124ff64 err = 16915520 bootstrap = 19201816 #10 0x10f7720 in __libc_start_main (main=0x804caa0 <main>, argc=1, ubp_av=0x124ff64, init=0x804a1c4 <_init>, fini=0x8052a5c <_fini>, rtld_fini=0xe6a0 <_dl_fini>, stack_end=0x124ff5c) at ../sysdeps/generic/libc-start.c:129 fini = (void (*)()) 0x20700 <_dl_debug_impcalls> rtld_fini = (void (*)()) 0x124fc4c ubp_ev = (char **) 0x1021c40 (gdb) x/5i $pc 0x11e4910 <_dl_addr+176>: mov (%eax),%eax 0x11e4912 <_dl_addr+178>: mov %eax,(%ecx) 0x11e4914 <_dl_addr+180>: mov 0x14c(%edx),%eax 0x11e491a <_dl_addr+186>: mov %eax,0x4(%ecx) 0x11e491d <_dl_addr+189>: mov 0xfffffff4(%ebp),%edx (gdb) i reg eax 0x1021c40 16915520 ecx 0x124fc4c 19201100 edx 0x207c8 133064 ebx 0x12014b8 18879672 esp 0x124fb64 0x124fb64 ebp 0x124fb8c 0x124fb8c esi 0x8048034 134512692 edi 0x8 8 eip 0x11e4910 0x11e4910 eflags 0x10246 66118 cs 0x17 23 ss 0x1f 31 ds 0x1f 31 es 0x1f 31 fs 0x1f 31 gs 0x1f 31 fctrl 0x0 0 fstat 0x0 0 ftag 0x0 0 fiseg 0x0 0 fioff 0x0 0 foseg 0x0 0 fooff 0x0 0 fop 0x0 0 (gdb) The program is running. Exit anyway? (y or n) y hurd:~# exit Script done on Tue Mar 6 04:09:04 2001 -- `Rhubarb is no Egyptian god.' Debian http://www.debian.org [EMAIL PROTECTED] Marcus Brinkmann GNU http://www.gnu.org [EMAIL PROTECTED] [EMAIL PROTECTED] http://www.marcus-brinkmann.de --------------------------------------- Received: (at 88690-done) by bugs.debian.org; 27 May 2001 01:01:30 +0000 >From [EMAIL PROTECTED] Sat May 26 20:01:30 2001 Return-path: <[EMAIL PROTECTED]> Received: from (localhost) [212.23.136.22] (mail) by master.debian.org with esmtp (Exim 3.12 1 (Debian)) id 153ovy-00044P-00; Sat, 26 May 2001 20:01:30 -0500 Received: from marcus by localhost with local (Exim 3.22 #1 (Debian)) id 153ovw-0006qf-00 for <[EMAIL PROTECTED]>; Sun, 27 May 2001 03:01:28 +0200 Date: Sun, 27 May 2001 03:01:28 +0200 From: Marcus Brinkmann <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: fixed Message-ID: <[EMAIL PROTECTED]> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.15i Sender: Marcus Brinkmann <[EMAIL PROTECTED]> Delivered-To: [EMAIL PROTECTED] mtrace in servers (-lthreads) works since Marks glibc change from 2001-03-24 Marcus -- `Rhubarb is no Egyptian god.' Debian http://www.debian.org [EMAIL PROTECTED] Marcus Brinkmann GNU http://www.gnu.org [EMAIL PROTECTED] [EMAIL PROTECTED] http://www.marcus-brinkmann.de _______________________________________________ Bug-hurd mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-hurd