NetBSD Problem Report #47078

From msaitoh@execsw.org  Sun Oct 14 20:27:54 2012
Return-Path: <msaitoh@execsw.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	by www.NetBSD.org (Postfix) with ESMTP id 6CF8763E3C3
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 14 Oct 2012 20:27:54 +0000 (UTC)
Message-Id: <20121014202752.B9FCE439857@vslock.execsw.org>
Date: Mon, 15 Oct 2012 05:27:52 +0900 (JST)
From: msaitoh@execsw.org
Reply-To: msaitoh@execsw.org
To: gnats-bugs@gnats.NetBSD.org
Subject: endless stack trace in gdb.
X-Send-Pr-Version: 3.95

>Number:         47078
>Category:       port-arm
>Synopsis:       endless stack trace in gdb.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    port-arm-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Oct 14 20:30:06 +0000 2012
>Last-Modified:  Mon Oct 15 10:00:05 +0000 2012
>Originator:     SAITOH Masanobu
>Release:        netbsd-6
>Organization:
>Environment:
	evbarm (and other arm ports)
	netbsd-6 and current
Architecture: arm
Machine: evbarm
>Description:
	While running /usr/test/atf/fs/vfs/t_renamerace, program die
	and dumps core. While dumping the stack trace by gdb, it loops
	forever.

	e.g.:

tc-start: 1350245565.206610, msdosfs_renamerace_dirs
tc-so:panic: rename: lost dir entry
tc-so:rump kernel halting...
tc-so:halted
tc-se:Test program crashed; attempting to get stack trace <=== stop at here.

	(login remotely and kill the gdb process)
# ps -auxw |grep gdb
root    4620 87.7  2.1 14780 10788 pts/0 R+    5:12AM  8:50.65 gdb -batch -q -ex bt t_renamerace /tmp/atf-run.03959k/t_renamerace.cor
root    3847  0.0  0.0     0     0 pts/1 R+         -  0:00.00 grep gdb (sh)
# kill 4620

	(and then)
tc-se:[New process 20]
tc-se:[New process 19]
tc-se:[New process 18]
tc-se:[New process 17]
tc-se:[New process 16]
tc-se:[New process 15]
tc-se:[New process 14]
tc-se:[New process 13]
tc-se:[New process 12]
tc-se:[New process 11]
tc-se:[New process 10]
tc-se:[New process 9]
tc-se:[New process 8]
tc-se:[New process 7]
tc-se:[New process 6]
tc-se:[New process 5]
tc-se:[New process 4]
tc-se:[New process 3]
tc-se:[New process 2]
tc-se:[New process 1]
tc-se:Core was generated by `t_renamerace'.
tc-se:Program terminated with signal 6, Aborted.
tc-se:#0  0x205d3024 in _lwp_kill () from /usr/lib/libc.so.12
tc-se:#0  0x205d3024 in _lwp_kill () from /usr/lib/libc.so.12
tc-se:#1  0x205d20d4 in abort () from /usr/lib/libc.so.12
tc-se:#2  0x204394dc in rumpuser_exit () from /usr/lib/librumpuser.so.0
tc-se:#3  0x203f8e3c in rumpns_cpu_reboot () from /usr/lib/librump.so.0
tc-se:#4  0x203c8f0c in rumpns_vpanic () from /usr/lib/librump.so.0
tc-se:#5  0x203c9024 in rumpns_panic () from /usr/lib/librump.so.0
tc-se:#6  0x2010073c in rumpns_msdosfs_rename () from /usr/lib/librumpfs_msdos.so.0
tc-se:#7  0x203bd838 in rumpns_VOP_RENAME () from /usr/lib/librump.so.0
tc-se:#8  0x20342640 in rumpns_do_sys_rename () from /usr/lib/librumpvfs.so.0
tc-se:#9  0x203f0008 in ?? () from /usr/lib/librump.so.0
tc-se:#10 0x203f0008 in ?? () from /usr/lib/librump.so.0
tc-se:#11 0x203f0008 in ?? () from /usr/lib/librump.so.0
tc-se:#12 0x203f0008 in ?? () from /usr/lib/librump.so.0
tc-se:#13 0x203f0008 in ?? () from /usr/lib/librump.so.0
tc-se:#14 0x203f0008 in ?? () from /usr/lib/librump.so.0
tc-se:#15 0x203f0008 in ?? () from /usr/lib/librump.so.0
tc-se:#16 0x203f0008 in ?? () from /usr/lib/librump.so.0
tc-se:#17 0x203f0008 in ?? () from /usr/lib/librump.so.0
tc-se:#18 0x203f0008 in ?? () from /usr/lib/librump.so.0
	(snip)
tc-se:#951 0x203f0008 in ?? () from /usr/lib/librump.so.0
tc-se:#952 0x203f0008 in ?? () from /usr/lib/librump.so.0
tc-se:#953 0x203f0008 in ?? () from /usr/lib/librump.so.0
tc-se:Stack trace complete    	   <= by killing the gdb process.

>How-To-Repeat:
	see above
>Fix:
	I don't know.

>Audit-Trail:
From: Masanobu SAITOH <msaitoh@execsw.org>
To: gnats-bugs@NetBSD.org
Cc: port-arm-maintainer@netbsd.org, gnats-admin@netbsd.org, 
 netbsd-bugs@netbsd.org, msaitoh@execsw.org
Subject: Re: port-arm/47078: endless stack trace in gdb.
Date: Mon, 15 Oct 2012 18:59:30 +0900

 > # ps -auxw |grep gdb
 > root    4620 87.7  2.1 14780 10788 pts/0 R+    5:12AM  8:50.65 gdb -batch -q -ex bt t_renamerace /tmp/atf-run.03959k/t_renamerace.cor
 > root    3847  0.0  0.0     0     0 pts/1 R+         -  0:00.00 grep gdb (sh)
 > # kill 4620
 > 
 > 	(and then)
 > tc-se:[New process 20]
 > tc-se:[New process 19]
 > tc-se:[New process 18]
 > tc-se:[New process 17]
 > tc-se:[New process 16]
 > tc-se:[New process 15]
 > tc-se:[New process 14]
 > tc-se:[New process 13]
 > tc-se:[New process 12]
 > tc-se:[New process 11]
 > tc-se:[New process 10]
 > tc-se:[New process 9]
 > tc-se:[New process 8]
 > tc-se:[New process 7]
 > tc-se:[New process 6]
 > tc-se:[New process 5]
 > tc-se:[New process 4]
 > tc-se:[New process 3]
 > tc-se:[New process 2]
 > tc-se:[New process 1]
 > tc-se:Core was generated by `t_renamerace'.
 > tc-se:Program terminated with signal 6, Aborted.
 > tc-se:#0  0x205d3024 in _lwp_kill () from /usr/lib/libc.so.12
 > tc-se:#0  0x205d3024 in _lwp_kill () from /usr/lib/libc.so.12
 > tc-se:#1  0x205d20d4 in abort () from /usr/lib/libc.so.12
 > tc-se:#2  0x204394dc in rumpuser_exit () from /usr/lib/librumpuser.so.0
 > tc-se:#3  0x203f8e3c in rumpns_cpu_reboot () from /usr/lib/librump.so.0
 > tc-se:#4  0x203c8f0c in rumpns_vpanic () from /usr/lib/librump.so.0
 > tc-se:#5  0x203c9024 in rumpns_panic () from /usr/lib/librump.so.0
 > tc-se:#6  0x2010073c in rumpns_msdosfs_rename () from /usr/lib/librumpfs_msdos.so.0
 > tc-se:#7  0x203bd838 in rumpns_VOP_RENAME () from /usr/lib/librump.so.0
 > tc-se:#8  0x20342640 in rumpns_do_sys_rename () from /usr/lib/librumpvfs.so.0
 > tc-se:#9  0x203f0008 in ?? () from /usr/lib/librump.so.0
 > tc-se:#10 0x203f0008 in ?? () from /usr/lib/librump.so.0
 > tc-se:#11 0x203f0008 in ?? () from /usr/lib/librump.so.0
 > tc-se:#12 0x203f0008 in ?? () from /usr/lib/librump.so.0
 > tc-se:#13 0x203f0008 in ?? () from /usr/lib/librump.so.0
 > tc-se:#14 0x203f0008 in ?? () from /usr/lib/librump.so.0
 > tc-se:#15 0x203f0008 in ?? () from /usr/lib/librump.so.0
 > tc-se:#16 0x203f0008 in ?? () from /usr/lib/librump.so.0
 > tc-se:#17 0x203f0008 in ?? () from /usr/lib/librump.so.0
 > tc-se:#18 0x203f0008 in ?? () from /usr/lib/librump.so.0
 > 	(snip)
 > tc-se:#951 0x203f0008 in ?? () from /usr/lib/librump.so.0
 > tc-se:#952 0x203f0008 in ?? () from /usr/lib/librump.so.0
 > tc-se:#953 0x203f0008 in ?? () from /usr/lib/librump.so.0
 > tc-se:Stack trace complete    	   <= by killing the gdb process.
 > 
 >> How-To-Repeat:
 > 	see above
 >> Fix:
 > 	I don't know.

 As joreg adviced me, I compiled librump with -g and tried again.
 The endless problem have disappeard with this change.

 > tc-se:Core was generated by `t_renamerace'.
 > tc-se:Program terminated with signal 6, Aborted.
 > tc-se:#0  0x205d3024 in _lwp_kill () from /usr/lib/libc.so.12
 > tc-se:#0  0x205d3024 in _lwp_kill () from /usr/lib/libc.so.12
 > tc-se:#1  0x205d20d4 in abort () from /usr/lib/libc.so.12
 > tc-se:#2  0x204394dc in rumpuser_exit () from /usr/lib/librumpuser.so.0
 > tc-se:#3  0x203f8e3c in cpu_reboot (howto=<optimized out>, bootstr=<optimized out>) at /var/sources/NetBSD-current/src/lib/librump/../../sys/rump/librump/rumpkern/rump.c:564
 > tc-se:#4  0x203c8f0c in vpanic (fmt=0x20107464 "rename: lost dir entry", ap=0x234079d8) at /var/sources/NetBSD-current/src/lib/librump/../../sys/rump/../kern/subr_prf.c:308
 > tc-se:#5  0x203c9024 in panic (fmt=0x20107464 "rename: lost dir entry") at /var/sources/NetBSD-current/src/lib/librump/../../sys/rump/../kern/subr_prf.c:205
 > tc-se:#6  0x20100738 in rumpns_msdosfs_rename () from /usr/lib/librumpfs_msdos.so.0
 > tc-se:#7  0x203bd838 in VOP_RENAME (fdvp=0x21f054d0, fvp=<optimized out>, fcnp=<optimized out>, tdvp=<optimized out>, tvp=0x0, tcnp=0x23407ae8) at /var/sources/NetBSD-current/src/lib/librump/../../sys/rump/../kern/vnode_if.c:801
 > tc-se:#8  0x203426a4 in rumpns_do_sys_rename () from /usr/lib/librumpvfs.so.0
 > tc-se:#9  0x203f0008 in sy_call (uap=0x23407bb0, l=0x21fa7400, sy=0x20418c48, rval=0x23407bb8) at /var/sources/NetBSD-current/src/lib/librump/../../sys/rump/../sys/syscallvar.h:61
 > tc-se:#10 rsys_syscall (num=<optimized out>, data=0x23407bb0, retval=0x23407bb8, dlen=<optimized out>) at /var/sources/NetBSD-current/src/lib/librump/../../sys/rump/librump/rumpkern/rump_syscalls.c:52
 > tc-se:#11 0x203f1220 in rump___sysimpl_rename (from=<optimized out>, to=<optimized out>) at /var/sources/NetBSD-current/src/lib/librump/../../sys/rump/librump/rumpkern/rump_syscalls.c:1412
 > tc-se:#12 0x0000d0fc in w2 ()
 > tc-se:#13 0x20461cd8 in ?? () from /usr/lib/libpthread.so.1
 > tc-se:#14 0x20461cd8 in ?? () from /usr/lib/libpthread.so.1
 > tc-se:Backtrace stopped: previous frame identical to this frame (corrupt stack?)
 > tc-se:Stack trace complete
 > tc-end: 1350294337.582626, msdosfs_renamerace_dirs, expected_signal, PR kern/43626




 -- 
 -----------------------------------------------
                 SAITOH Masanobu (msaitoh@execsw.org
                                  msaitoh@netbsd.org)

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.