From owner-svn-src-head@FreeBSD.ORG Wed Jan 25 05:35:52 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E2BAA106564A; Wed, 25 Jan 2012 05:35:51 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from smtp.fgznet.ch (mail.fgznet.ch [81.92.96.47]) by mx1.freebsd.org (Postfix) with ESMTP id 3539F8FC12; Wed, 25 Jan 2012 05:35:50 +0000 (UTC) Received: from deuterium.andreas.nets (dhclient-91-190-14-19.flashcable.ch [91.190.14.19]) by smtp.fgznet.ch (8.13.8/8.13.8/Submit_SMTPAUTH) with ESMTP id q0P5TxAY092399; Wed, 25 Jan 2012 06:30:00 +0100 (CET) (envelope-from andreast@FreeBSD.org) Message-ID: <4F1F94B3.6020803@FreeBSD.org> Date: Wed, 25 Jan 2012 06:35:47 +0100 From: Andreas Tobler User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.5; rv:9.0) Gecko/20111222 Thunderbird/9.0.1 MIME-Version: 1.0 To: Hiroki Sato References: <201201200138.q0K1cLZP016695@svn.freebsd.org> <4F1F3585.8060802@FreeBSD.org> <20120125.094001.163024621361318219.hrs@allbsd.org> In-Reply-To: <20120125.094001.163024621361318219.hrs@allbsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.64 on 81.92.96.47 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, eadler@FreeBSD.org Subject: Re: svn commit: r230353 - head/usr.sbin/makefs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jan 2012 05:35:52 -0000 On 25.01.12 01:40, Hiroki Sato wrote: > Andreas Tobler wrote > in<4F1F3585.8060802@FreeBSD.org>: > > an> Hi Eitan, > an> > an> On 20.01.12 02:38, Eitan Adler wrote: > an> > Author: eadler > an> > Date: Fri Jan 20 01:38:21 2012 > an> > New Revision: 230353 > an> > URL: http://svn.freebsd.org/changeset/base/230353 > an> > > an> > Log: > an> > Fix warning when compiling with gcc46: > an> > error: variable 'temp' set but not used > an> > > an> > Approved by: dim > an> > Approved by: cperciva (mentor, blanket for pre-mentorship > an> > already-approved commits) > an> > MFC after: 3 days > an> > an> I do not know which of the makefs commits it was: > an> > an> [andreast@neon] /export/home/andreast/> makefs -t cd9660 -o chrp-boot > an> -o rockridge -o label=pseries -B4321 p.iso /data1/netboot/powerpc64/ > an> Segmentation fault (core dumped) > an> > an> [neon:~] andreast% uname -ra > an> FreeBSD neon.andreas.nets 10.0-CURRENT FreeBSD 10.0-CURRENT #11 > an> r230469M: Mon Jan 23 02:53:05 CET 2012 > an> andreast@neon.andreas.nets:/usr/obj/export/devel/fbsd/head/src/sys/NEON > an> amd64 > an> > an> Reverting to 230352 lets me create an iso. > an> > an> I compile makefs with the base compiler. > an> > an> I'll do some more investigations tomorrow, late night here. > > I got the same symptom and am investigating it. Can you rebuild the > binary with a debug option like this: > > % cd /usr/src/usr.sbin/makefs > % make clean > % make DEBUG_FLAGS=-g > % make DEBUG_FLAGS=-g install > > and then send me the output of the following command? > > % printf "run -t cd9660 -o chrp-boot -o rockridge -o label=pseries -B4321 p.iso /data1/netboot/powerpc64/\nbt\nf 1\n f 2\n" | gdb -x /dev/stdin -batch /usr/sbin/makefs > > In my environment both the old and the new version could reproduce > it. I am not sure if mine is the same as yours at this moment, > though. It is actually r230354, this is the commit which shows the failure. And I reverted back to 230353 and onfirmed that it 'works'. I additionally built with -O0 -g, see below. If you need more details, I'll be out the next 15h but later on I can continue. Thank you very much! Andreas Here the output from the binary built with "-g": ------ [andreast@tcx58] /export/home/andreast/> printf "run -t cd9660 -o chrp-boot -o rockridge -o label=pseries -B4321 p.iso /export/netboot/powerpc64/\nbt\nf 1\n f 2\n" | gdb -x /dev/stdin -batch /usr/sbin/makefs Program received signal SIGSEGV, Segmentation fault. 0x0000000800b781d6 in memcpy () from /lib/libc.so.7 #0 0x0000000800b781d6 in memcpy () from /lib/libc.so.7 #1 0x00000000004045f8 in cd9660_rename_filename (iter=0x0, num=36, delete_chars=2) at /export/devel/fbsd/src/usr.sbin/makefs/cd9660.c:1120 #2 0x00000000004044bb in cd9660_handle_collisions (colliding=0x801ba9ec0, past=35) at /export/devel/fbsd/src/usr.sbin/makefs/cd9660.c:1042 #3 0x0000000000404f13 in cd9660_convert_structure (root=0x8013929c0, parent_node=0x801ba9ec0, level=5, numDirectories=0x7fffffffd864, error=0x7fffffffd860) at /export/devel/fbsd/src/usr.sbin/makefs/cd9660.c:1462 #4 0x0000000000404e42 in cd9660_convert_structure (root=0x801378e70, parent_node=0x801b894c0, level=4, numDirectories=0x7fffffffd864, error=0x7fffffffd860) at /export/devel/fbsd/src/usr.sbin/makefs/cd9660.c:1419 #5 0x0000000000404e42 in cd9660_convert_structure (root=0x80123fa60, parent_node=0x8016f2280, level=3, numDirectories=0x7fffffffd864, error=0x7fffffffd860) at /export/devel/fbsd/src/usr.sbin/makefs/cd9660.c:1419 #6 0x0000000000404e42 in cd9660_convert_structure (root=0x80110cec0, parent_node=0x801552100, level=2, numDirectories=0x7fffffffd864, error=0x7fffffffd860) ---Type to continue, or q to quit--- at /export/devel/fbsd/src/usr.sbin/makefs/cd9660.c:1419 #7 0x0000000000404e42 in cd9660_convert_structure (root=0x80104c0b0, parent_node=0x801007140, level=1, numDirectories=0x7fffffffd864, error=0x7fffffffd860) at /export/devel/fbsd/src/usr.sbin/makefs/cd9660.c:1419 #8 0x00000000004036f1 in cd9660_makefs (image=0x7fffffffdd45 "p.iso", dir=0x7fffffffdd4b "/export/netboot/powerpc64/", root=0x80104c060, fsopts=0x7fffffffd920) at /export/devel/fbsd/src/usr.sbin/makefs/cd9660.c:505 #9 0x000000000040bb58 in main (argc=2, argv=0x7fffffffda90) at /export/devel/fbsd/src/usr.sbin/makefs/makefs.c:291 #1 0x00000000004045f8 in cd9660_rename_filename (iter=0x0, num=36, delete_chars=2) at /export/devel/fbsd/src/usr.sbin/makefs/cd9660.c:1120 1120 memcpy(tmp, (iter->o_name), numbts); #2 0x00000000004044bb in cd9660_handle_collisions (colliding=0x801ba9ec0, past=35) at /export/devel/fbsd/src/usr.sbin/makefs/cd9660.c:1042 1042 iter = cd9660_rename_filename(iter, skip, delete_chars); ------ And here the output from a bt full with a binary built with "-g -O0": ------ [andreast@tcx58] /export/home/andreast/> printf "run -t cd9660 -o chrp-boot -o rockridge -o label=pseries -B4321 p.iso /export/netboot/powerpc64/\nbt full\nf 1\n f 2\n" | gdb -x /dev/stdin -batch /usr/sbin/makefs Program received signal SIGSEGV, Segmentation fault. 0x0000000800b781d6 in memcpy () from /lib/libc.so.7 #0 0x0000000800b781d6 in memcpy () from /lib/libc.so.7 No symbol table info available. #1 0x00000000004045f8 in cd9660_rename_filename (iter=0x0, num=36, delete_chars=2) at /export/devel/fbsd/src/usr.sbin/makefs/cd9660.c:1120 i = 35 numbts = 27 digit = 4 digits = 2 temp = 0 powers = 10 count = 31 naming = 0x93 maxlength = 31 tmp = 0x80104b040 "ZULU.;1" #2 0x00000000004044bb in cd9660_handle_collisions (colliding=0x801ba9ec0, past=35) at /export/devel/fbsd/src/usr.sbin/makefs/cd9660.c:1042 iter = (cd9660node *) 0x801bab140 next = (cd9660node *) 0x0 prev = (cd9660node *) 0x0 skip = 36 ---Type to continue, or q to quit--- delete_chars = 2 temp_past = 0 temp_skip = 0 flag = 1 end_of_range = (cd9660node *) 0x801bad6c0 #3 0x0000000000404f13 in cd9660_convert_structure (root=0x8013929c0, parent_node=0x801ba9ec0, level=5, numDirectories=0x7fffffffd864, error=0x7fffffffd860) at /export/devel/fbsd/src/usr.sbin/makefs/cd9660.c:1462 iterator = (fsnode *) 0x0 this_node = (cd9660node *) 0x801badbc0 working_level = 8 add = 1 flag = 1 counter = 35 __func__ = "cd9660_convert_structure" #4 0x0000000000404e42 in cd9660_convert_structure (root=0x801378e70, parent_node=0x801b894c0, level=4, numDirectories=0x7fffffffd864, error=0x7fffffffd860) at /export/devel/fbsd/src/usr.sbin/makefs/cd9660.c:1419 iterator = (fsnode *) 0x801392920 this_node = (cd9660node *) 0x801ba9ec0 working_level = 5 ---Type to continue, or q to quit--- add = 1 flag = 0 counter = 0 __func__ = "cd9660_convert_structure" #5 0x0000000000404e42 in cd9660_convert_structure (root=0x80123fa60, parent_node=0x8016f2280, level=3, numDirectories=0x7fffffffd864, error=0x7fffffffd860) at /export/devel/fbsd/src/usr.sbin/makefs/cd9660.c:1419 iterator = (fsnode *) 0x801378dd0 this_node = (cd9660node *) 0x801b894c0 working_level = 4 add = 1 flag = 0 counter = 0 __func__ = "cd9660_convert_structure" #6 0x0000000000404e42 in cd9660_convert_structure (root=0x80110cec0, parent_node=0x801552100, level=2, numDirectories=0x7fffffffd864, error=0x7fffffffd860) at /export/devel/fbsd/src/usr.sbin/makefs/cd9660.c:1419 iterator = (fsnode *) 0x80123f9c0 this_node = (cd9660node *) 0x8016f2280 working_level = 3 add = 1 ---Type to continue, or q to quit--- flag = 0 counter = 0 __func__ = "cd9660_convert_structure" #7 0x0000000000404e42 in cd9660_convert_structure (root=0x80104c0b0, parent_node=0x801007140, level=1, numDirectories=0x7fffffffd864, error=0x7fffffffd860) at /export/devel/fbsd/src/usr.sbin/makefs/cd9660.c:1419 iterator = (fsnode *) 0x80110ce20 this_node = (cd9660node *) 0x801552100 working_level = 2 add = 1 flag = 0 counter = 0 __func__ = "cd9660_convert_structure" #8 0x00000000004036f1 in cd9660_makefs (image=0x7fffffffdd45 "p.iso", dir=0x7fffffffdd4b "/export/netboot/powerpc64/", root=0x80104c060, fsopts=0x7fffffffd920) at /export/devel/fbsd/src/usr.sbin/makefs/cd9660.c:505 startoffset = 518 numDirectories = 886 pathTableSectors = 140737488345752 firstAvailableSector = 45 totalSpace = 140737488346437 ---Type to continue, or q to quit--- error = 0 real_root = (cd9660node *) 0x801007140 __func__ = "cd9660_makefs" #9 0x000000000040bb58 in main (argc=2, argv=0x7fffffffda90) at /export/devel/fbsd/src/usr.sbin/makefs/makefs.c:291 sb = {st_dev = 112, st_ino = 2652161, st_mode = 16877, st_nlink = 17, st_uid = 0, st_gid = 0, st_rdev = 10608649, st_atim = {tv_sec = 1327469459, tv_nsec = 0}, st_mtim = {tv_sec = 1327223440, tv_nsec = 0}, st_ctim = { tv_sec = 1327223440, tv_nsec = 0}, st_size = 512, st_blocks = 8, st_blksize = 32768, st_flags = 0, st_gen = 2653886287, st_lspare = 0, st_birthtim = {tv_sec = 1324800403, tv_nsec = 0}} start = {tv_sec = 1327469680, tv_usec = 454035} fstype = (fstype_t *) 0x627c28 fsoptions = {size = 0, inodes = 0, curinode = 0, fd = -1, superblock = 0x0, onlyspec = 0, minsize = 0, maxsize = 0, freefiles = 0, freefilepc = 0, freeblocks = 0, freeblockpc = 0, needswap = 1, sectorsize = -1, fs_specific = 0x0} root = (fsnode *) 0x80104c060 ch = -1 len = 4203022 subtree = 0x7fffffffdd4b "/export/netboot/powerpc64/" specfile = 0x0 #1 0x00000000004045f8 in cd9660_rename_filename (iter=0x0, num=36, ---Type to continue, or q to quit--- delete_chars=2) at /export/devel/fbsd/src/usr.sbin/makefs/cd9660.c:1120 1120 memcpy(tmp, (iter->o_name), numbts); #2 0x00000000004044bb in cd9660_handle_collisions (colliding=0x801ba9ec0, past=35) at /export/devel/fbsd/src/usr.sbin/makefs/cd9660.c:1042 1042 iter = cd9660_rename_filename(iter, skip, delete_chars); -----