Subject: toolchain/36607: nbmakefs crash in netbsd-4 tools
To: None <toolchain-manager@netbsd.org, gnats-admin@netbsd.org,>
From: Greg A. Woods <woods@planix.com>
List: netbsd-bugs
Date: 07/04/2007 23:55:01
>Number: 36607
>Category: toolchain
>Synopsis: nbmakefs crash in netbsd-4 tools
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: toolchain-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Jul 04 23:55:00 +0000 2007
>Originator: Greg A. Woods
>Release: netbsd-4 2007/07/03
>Organization:
Planix, Inc.; Toronto, Ontario; Canada
>Environment:
System: NetBSD 4.0_BETA2
Architecture: i386
Machine: i386
>Description:
I was playing around with "build.sh release syspkgs" and kaboom
went makefs. I rebuilt the tools with '-g' and then did it
again to get this:
$ gdb /build/woods/once/netbsd-4-i386-i386-tools/bin/nbmakefs /build/woods/once/netbsd-4-i386-i386-ppro>
GNU gdb 6.5
Copyright (C) 2006 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--netbsdelf"...
Core was generated by `nbmakefs'.
Program terminated with signal 11, Segmentation fault.
#0 0x08049da0 in cd9660_convert_structure (root=0x80c0031, parent_node=0x80ee200, level=4,
numDirectories=0xbfbfe828, error=0xbfbfe824)
at /building/work/woods/m-NetBSD-4/tools/makefs/../../usr.sbin/makefs/cd9660.c:864
864 cd9660_time_915(newnode->isoDirRecord->date, node->inode->st.st_mtime);
(gdb) info locals
iterator = (fsnode *) 0x80c8fc0
this_node = (cd9660node *) 0x3b5a4754
working_level = <value optimized out>
add = 135004209
flag = <value optimized out>
counter = <value optimized out>
__PRETTY_FUNCTION__ = "cd9660_convert_structure"
(gdb) where
#0 0x08049da0 in cd9660_convert_structure (root=0x80c0031, parent_node=0x80ee200, level=4,
numDirectories=0xbfbfe828, error=0xbfbfe824)
at /building/work/woods/m-NetBSD-4/tools/makefs/../../usr.sbin/makefs/cd9660.c:864
#1 0x08049de8 in cd9660_convert_structure (root=<value optimized out>, parent_node=0x80c1600, level=3,
numDirectories=0xbfbfe828, error=0xbfbfe824)
at /building/work/woods/m-NetBSD-4/tools/makefs/../../usr.sbin/makefs/cd9660.c:1416
#2 0x08049de8 in cd9660_convert_structure (root=<value optimized out>, parent_node=0x80c1500, level=2,
numDirectories=0xbfbfe828, error=0xbfbfe824)
at /building/work/woods/m-NetBSD-4/tools/makefs/../../usr.sbin/makefs/cd9660.c:1416
#3 0x08049de8 in cd9660_convert_structure (root=<value optimized out>, parent_node=0x80c1000, level=1,
numDirectories=0xbfbfe828, error=0xbfbfe824)
at /building/work/woods/m-NetBSD-4/tools/makefs/../../usr.sbin/makefs/cd9660.c:1416
#4 0x0804a1a0 in cd9660_makefs (image=0xbfbfeb18 "i386cd.iso", dir=0xbfbfeb23 "cdrom", root=0x80bf080,
fsopts=0xbfbfe874) at /building/work/woods/m-NetBSD-4/tools/makefs/../../usr.sbin/makefs/cd9660.c:493
#5 0x080576fd in main (argc=Cannot access memory at address 0xf4030000
) at /building/work/woods/m-NetBSD-4/tools/makefs/../../usr.sbin/makefs/makefs.c:272
(gdb)
There's something wrong here though as line 864 is not within
the cd9660_convert_structure() function and the two variables
used in the call on that line are not in the current stack
context:
(gdb) print node
No symbol "node" in current context.
(gdb) print newnode
No symbol "newnode" in current context.
(gdb) down
Bottom (innermost) frame selected; you cannot go down.
(gdb) list
859
860 if (cd9960_translate_node_common(newnode) == 0)
861 return 0;
862
863 /* Finally, overwrite some of the values that are set by default */
864 cd9660_time_915(newnode->isoDirRecord->date, node->inode->st.st_mtime);
865
866 return 1;
867 }
868
(gdb)
>How-To-Repeat:
The error probably occurs because the CD it's trying to create
is way too big with all the syspkg .tgz files also included....
>Fix:
for now I'm just going to prevent the syspkg subdir from being
included in the main CD, just as I had to do with the .debug
files.....
>Unformatted: