From owner-freebsd-bugs@FreeBSD.ORG Mon Nov 15 16:30:45 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5376A16A56B for ; Mon, 15 Nov 2004 16:30:45 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1081043D2F for ; Mon, 15 Nov 2004 16:30:45 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.11/8.12.11) with ESMTP id iAFGUiWo019732 for ; Mon, 15 Nov 2004 16:30:44 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id iAFGUiT4019730; Mon, 15 Nov 2004 16:30:44 GMT (envelope-from gnats) Date: Mon, 15 Nov 2004 16:30:44 GMT Message-Id: <200411151630.iAFGUiT4019730@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Byron Young Subject: Re: gnu/73512: gdb -> Abort trap (core dumped) X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Byron Young List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2004 16:30:45 -0000 The following reply was made to PR gnu/73512; it has been noted by GNATS. From: Byron Young To: freebsd-gnats-submit@FreeBSD.org, esn@x123.info Cc: Subject: Re: gnu/73512: gdb -> Abort trap (core dumped) Date: Mon, 15 Nov 2004 08:28:03 -0800 (PST) Similar output for 5.3-RELEASE (i386). Although I have no solution, the Fedora Core 3 bug #136455 may provide some insight. FC3 released an update for gdb 1.20040607.43 today. Heres what happens on my laptop (80MB RAM, 200MB Swapfile, make buildworld with make.conf CFLAGS=-O0 -ggdb3 -g) when debugging apache_2.0.50_3 rebuilt with -DWITH_DEBUG. Also, the 5.3-RELEASE i386 release notes mentions that a new debugger framework was added, which consists of a new gdb backend. laptop# cat debug.txt b main r -X b dlopen # b rtld.c:1726 laptop# gdb -x debug.txt httpd GNU gdb 6.1.1 [FreeBSD] Copyright 2004 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-marcel-freebsd"... Breakpoint 1 at 0x806b660: file main.c, line 369. Breakpoint 1, main (argc=2, argv=0xbfbfed14) at main.c:369 369 int configtestonly = 0; Breakpoint 2 at 0x2809eb43: file /usr/src/libexec/rtld-elf/rtld.c, line 1672. (gdb) ignore 2 36 Will ignore next 36 crossings of breakpoint 2. (gdb) c Continuing. Breakpoint 2, dlopen ( name=0x80e6190 "/usr/local/libexec/apache2/mod_access.so", mode=258) at /usr/src/libexec/rtld-elf/rtld.c:1672 1672 ld_tracing = (mode & RTLD_TRACE) == 0 ? NULL : "1"; (gdb) b 1726 Breakpoint 3 at 0x2809ed6f: file /usr/src/libexec/rtld-elf/rtld.c, line 1726. (gdb) c Continuing. Breakpoint 3, dlopen ( name=0x80e6190 "/usr/local/libexec/apache2/mod_access.so", mode=2) at /usr/src/libexec/rtld-elf/rtld.c:1726 1726 GDB_STATE(RT_CONSISTENT,obj ? &obj->linkmap : NULL); (gdb) print *obj $1 = {magic = 3578837114, version = 1, next = 0x0, path = 0x280c9180 "/usr/local/libexec/apache2/mod_access.so", origin_path = 0x0, refcount = 1, dl_refcount = 1, mapbase = 0x28470000 "\177ELF\001\001\001\t", mapsize = 12288, textsize = 8192, vaddrbase = 0, relocbase = 0x28470000 "\177ELF\001\001\001\t", dynamic = 0x2847269c, entry = 0x28470a80 "U\211åS\203ì\024èÂÏ", phdr = 0x0, phsize = 0, interp = 0x0, tlsindex = 0, tlsinit = 0x0, tlsinitsize = 0, tlssize = 0, tlsoffset = 0, tlsalign = 0, pltgot = 0x28472758, rel = 0x28470794, relsize = 168, rela = 0x0, relasize = 0, pltrel = 0x2847083c, pltrelsize = 184, pltrela = 0x0, pltrelasize = 0, symtab = 0x2847021c, strtab = 0x284705cc "", strsize = 454, buckets = 0x2847009c, nbuckets = 37, chains = 0x28470130, nchains = 59, rpath = 0x0, needed = 0x0, init = 675743988, fini = 675746796, mainprog = 0 '\0', rtld = 0 '\0', textrel = 0 '\0', symbolic = 0 '\0', bind_now = 0 '\0', traced = 0 '\0', jmpslots_done = 1 '\001', init_done = 1 '\001', tls_done = 0 '\0', linkmap = {l_addr = 0x28470000 "\177ELF\001\001\001\t", l_name = 0x280c9180 "/usr/local/libexec/apache2/mod_access.so", l_ld = 0x2847269c, l_next = 0x280bea58, l_prev = 0x280c5ab8}, dldags = { stqh_first = 0x280c6290, stqh_last = 0x280c6290}, dagmembers = { stqh_first = 0x280c62b0, stqh_last = 0x280c62b0}, dev = 1037, ino = 78231, priv = 0x0} (gdb) l 1721 if (ld_tracing) 1722 goto trace; 1723 } 1724 } 1725 1726 GDB_STATE(RT_CONSISTENT,obj ? &obj->linkmap : NULL); 1727 1728 /* Call the init functions with no locks held. */ 1729 wlock_release(rtld_bind_lock, lockstate); 1730 objlist_call_init(&initlist); (gdb) b 1730 Breakpoint 4 at 0x2809edc2: file /usr/src/libexec/rtld-elf/rtld.c, line 1730. (gdb) c Continuing. gdb in realloc(): error: pointer to wrong page Abort (core dumped) laptop# gdb gdb gdb.core GNU gdb 6.1.1 [FreeBSD] Copyright 2004 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-marcel-freebsd"... Core was generated by `gdb'. Program terminated with signal 6, Aborted. Reading symbols from /lib/libm.so.3...done. Loaded symbols for /lib/libm.so.3 Reading symbols from /lib/libreadline.so.5...done. Loaded symbols for /lib/libreadline.so.5 Reading symbols from /lib/libncurses.so.5...done. Loaded symbols for /lib/libncurses.so.5 Reading symbols from /lib/libc.so.5...done. Loaded symbols for /lib/libc.so.5 Reading symbols from /usr/lib/libthread_db.so...done. Loaded symbols for /usr/lib/libthread_db.so Reading symbols from /libexec/ld-elf.so.1...done. Loaded symbols for /libexec/ld-elf.so.1 #0 0x283c377f in kill () at kill.S:2 2 kill.S: No such file or directory. in kill.S (gdb) bt #0 0x283c377f in kill () at kill.S:2 #1 0x283b5b68 in __raise (s=6) at /usr/src/lib/libc/gen/raise.c:50 #2 0x284495a5 in abort () at /usr/src/lib/libc/stdlib/abort.c:69 #3 0x283d1910 in wrterror (p=0x28450efe "pointer to wrong page\n") at /usr/src/lib/libc/stdlib/malloc.c:309 #4 0x283d1951 in wrtwarning (p=0x28450efe "pointer to wrong page\n") at /usr/src/lib/libc/stdlib/malloc.c:321 #5 0x283d2697 in irealloc (ptr=0xad48000, size=19296) at /usr/src/lib/libc/stdlib/malloc.c:825 #6 0x283d2f83 in pubrealloc (ptr=0xad48000, size=19296, func=0x28450f9d " in realloc():") at /usr/src/lib/libc/stdlib/malloc.c:1131 #7 0x283d30de in realloc (ptr=0xad48000, size=19296) at /usr/src/lib/libc/stdlib/malloc.c:1166 #8 0x080d39f5 in mrealloc (md=0x0, ptr=0xad48000, size=19296) at /usr/src/gnu/usr.bin/gdb/libgdb/../../../../contrib/gdb/gdb/utils.c:1000 #9 0x080d3b12 in xmrealloc (md=0x0, ptr=0xad48000, size=19296) at /usr/src/gnu/usr.bin/gdb/libgdb/../../../../contrib/gdb/gdb/utils.c:1078 #10 0x080d3c10 in xrealloc (ptr=0xad48000, size=19296) at /usr/src/gnu/usr.bin/gdb/libgdb/../../../../contrib/gdb/gdb/utils.c:1134 #11 0x080fcf18 in target_resize_to_sections (target=0x82c2060, num_added=18) at /usr/src/gnu/usr.bin/gdb/libgdb/../../../../contrib/gdb/gdb/target.c:1402 #12 0x0811c60d in update_solib_list (from_tty=0, target=0x82c2060) at /usr/src/gnu/usr.bin/gdb/libgdb/../../../../contrib/gdb/gdb/solib.c:515 #13 0x0811c6a5 in solib_add (pattern=0x0, from_tty=0, target=0x82c2060, readsyms=1) at /usr/src/gnu/usr.bin/gdb/libgdb/../../../../contrib/gdb/gdb/solib.c:559 #14 0x08160991 in handle_inferior_event (ecs=0xbfbfe590) at /usr/src/gnu/usr.bin/gdb/libgdb/../../../../contrib/gdb/gdb/infrun.c:2402 #15 0x0815ec12 in wait_for_inferior () at /usr/src/gnu/usr.bin/gdb/libgdb/../../../../contrib/gdb/gdb/infrun.c:1047 #16 0x0815ea1b in proceed (addr=18446744073709551615, siggnal=TARGET_SIGNAL_DEFAULT, step=0) at /usr/src/gnu/usr.bin/gdb/libgdb/../../../../contrib/gdb/gdb/infrun.c:852 #17 0x08073236 in continue_command (proc_count_exp=0x0, from_tty=1) at /usr/src/gnu/usr.bin/gdb/libgdb/../../../../contrib/gdb/gdb/infcmd.c:540 #18 0x080c1d7b in do_cfunc (c=0x82e3d00, args=0x0, from_tty=1) at /usr/src/gnu/usr.bin/gdb/libgdb/../../../../contrib/gdb/gdb/cli/cli-decode.c:57 #19 0x080c42a1 in cmd_func (cmd=0x82e3d00, args=0x0, from_tty=1) at /usr/src/gnu/usr.bin/gdb/libgdb/../../../../contrib/gdb/gdb/cli/cli-decode.c:1541 #20 0x080db8fe in execute_command (p=0x82c5001 "", from_tty=1) at /usr/src/gnu/usr.bin/gdb/libgdb/../../../../contrib/gdb/gdb/top.c:743 #21 0x08091d51 in command_handler (command=0x82c5000 "c") at /usr/src/gnu/usr.bin/gdb/libgdb/../../../../contrib/gdb/gdb/event-top.c:500 #22 0x08092541 in command_line_handler (rl=0x82fba80 "\220º/\b") at /usr/src/gnu/usr.bin/gdb/libgdb/../../../../contrib/gdb/gdb/event-top.c:793 #23 0x282fd556 in rl_callback_read_char () at /usr/src/gnu/lib/libreadline/readline/../../../../contrib/libreadline/callback.c:123 #24 0x0809143b in rl_callback_read_char_wrapper (client_data=0x0) at /usr/src/gnu/usr.bin/gdb/libgdb/../../../../contrib/gdb/gdb/event-top.c:166 #25 0x08091bea in stdin_event_handler (error=0, client_data=0x0) at /usr/src/gnu/usr.bin/gdb/libgdb/../../../../contrib/gdb/gdb/event-top.c:416 #26 0x080934ce in handle_file_event (event_file_desc=0) at /usr/src/gnu/usr.bin/gdb/libgdb/../../../../contrib/gdb/gdb/event-loop.c:721 #27 0x08092d2e in process_event () at /usr/src/gnu/usr.bin/gdb/libgdb/../../../../contrib/gdb/gdb/event-loop.c:334 #28 0x08092d84 in gdb_do_one_event (data=0x0) at /usr/src/gnu/usr.bin/gdb/libgdb/../../../../contrib/gdb/gdb/event-loop.c:371 #29 0x080db4cc in do_catch_errors (uiout=0x82f7d80, data=0xbfbfe8e8) at /usr/src/gnu/usr.bin/gdb/libgdb/../../../../contrib/gdb/gdb/top.c:523 #30 0x080db285 in catcher (func=0x80db4b0 , func_uiout=0x82f7d80, func_args=0xbfbfe8e8, func_val=0xbfbfe8f4, func_caught=0xbfbfe8f0, errstring=0x8286e05 "", gdberrmsg=0x0, mask=6) at /usr/src/gnu/usr.bin/gdb/libgdb/../../../../contrib/gdb/gdb/top.c:430 #31 0x080db522 in catch_errors (func=0x8092d50 , func_args=0x0, errstring=0x8286e05 "", mask=6) at /usr/src/gnu/usr.bin/gdb/libgdb/../../../../contrib/gdb/gdb/top.c:535 #32 0x081a5eda in tui_command_loop (data=0x0) at /usr/src/gnu/usr.bin/gdb/libgdb/../../../../contrib/gdb/gdb/tui/tui-interp.c:150 #33 0x080725b7 in current_interp_command_loop () at /usr/src/gnu/usr.bin/gdb/libgdb/../../../../contrib/gdb/gdb/interps.c:277 #34 0x080711bb in captured_command_loop (data=0x0) at /usr/src/gnu/usr.bin/gdb/libgdb/../../../../contrib/gdb/gdb/main.c:97 #35 0x080db4cc in do_catch_errors (uiout=0x82f7d80, data=0xbfbfea08) at /usr/src/gnu/usr.bin/gdb/libgdb/../../../../contrib/gdb/gdb/top.c:523 #36 0x080db285 in catcher (func=0x80db4b0 , func_uiout=0x82f7d80, func_args=0xbfbfea08, func_val=0xbfbfea14, func_caught=0xbfbfea10, errstring=0x82215e0 "", gdberrmsg=0x0, mask=6) at /usr/src/gnu/usr.bin/gdb/libgdb/../../../../contrib/gdb/gdb/top.c:430 #37 0x080db522 in catch_errors (func=0x80711b0 , func_args=0x0, errstring=0x82215e0 "", mask=6) at /usr/src/gnu/usr.bin/gdb/libgdb/../../../../contrib/gdb/gdb/top.c:535 #38 0x08071ff0 in captured_main (data=0xbfbfecc8) at /usr/src/gnu/usr.bin/gdb/libgdb/../../../../contrib/gdb/gdb/main.c:805 #39 0x080db4cc in do_catch_errors (uiout=0x82a1f60, data=0xbfbfec68) at /usr/src/gnu/usr.bin/gdb/libgdb/../../../../contrib/gdb/gdb/top.c:523 #40 0x080db285 in catcher (func=0x80db4b0 , func_uiout=0x82a1f60, func_args=0xbfbfec68, func_val=0xbfbfec74, func_caught=0xbfbfec70, errstring=0x82215e0 "", gdberrmsg=0x0, mask=6) at /usr/src/gnu/usr.bin/gdb/libgdb/../../../../contrib/gdb/gdb/top.c:430 #41 0x080db522 in catch_errors (func=0x80711f0 , func_args=0xbfbfecc8, errstring=0x82215e0 "", mask=6) at /usr/src/gnu/usr.bin/gdb/libgdb/../../../../contrib/gdb/gdb/top.c:535 #42 0x08072074 in gdb_main (args=0xbfbfecc8) at /usr/src/gnu/usr.bin/gdb/libgdb/../../../../contrib/gdb/gdb/main.c:814 #43 0x080711ac in main (argc=4, argv=0xbfbfed18) at /usr/src/gnu/usr.bin/gdb/gdb/../../../../contrib/gdb/gdb/gdb.c:35 Current language: auto; currently asm (gdb) __________________________________ Do you Yahoo!? Check out the new Yahoo! Front Page. www.yahoo.com