Re: panic: System call lstat returning with 1 locks held

From: Kostik Belousov <kostikbel_at_gmail.com>
Date: Tue, 15 Jan 2008 16:39:24 +0200
On Tue, Jan 15, 2008 at 07:52:12AM -0600, Scot Hetzel wrote:
> When I boot a Jan 13th or Jan 15th kernel, and then run
> /usr/local/etc/cvsup/update.sh to update the local CVS repository, I
> get the following panic:
> 
> panic: System call lstat returning with 1 locks held
> cpuid = 0
> KDB: enter: panic
> [thread ; pid 1240 tid 10031]
> stopped at kdb_enter+0x3d: movq $0,0x41b048(%rip)
> db> show alllocks
> db> show locks
> db> bt
> tracing pid 1240 tid 10031 td 0xffffff001c1ad360
> kdb_enter() at kdb_enter+0x3d
> panic() at panic+0x176
> syscalls() at syscalls+0x66d
> Xfast_syscalls() at Xfast_syscalls+0xab
> --- syscall (0, FreeBSD ELF64, nosys), rip = 0x8009e87ec, rsp=
> 0x72ec50, rbp = 0x72ed28 ---
> 
I think this could be related to the recent vn_lock()/VOP_LOCK() KPI changes.
Please, add DEBUG_VFS_LOCKS to the kernel config, and do the
	show lockedvnods
from the ddb prompt when the panic occurs. The witness does not track
the lockmgr locks.

> ----
> $ strings /boot/kernel_hp_debug/kernel | grep CURRENT
> _at_(#)FreeBSD 8.0-CURRENT #0: Tue Jan 15 01:30:50 CST 2008
> FreeBSD 8.0-CURRENT #0: Tue Jan 15 01:30:50 CST 2008
> 8.0-CURRENT
> 
> $ strings /boot/kernel_hp_debug.old/kernel | grep CURRENT
> _at_(#)FreeBSD 8.0-CURRENT #0: Sun Jan 13 13:12:56 CST 2008
> FreeBSD 8.0-CURRENT #0: Sun Jan 13 13:12:56 CST 2008
> 8.0-CURRENT
> ---
> 
> When I try to look at the core file that gets generated, kgdb is
> having problems reading it:
> 
> hp010# cd /sys/amd64/compile/DV8135NR
> hp010# kgdb -n 14 kernel.debug
> kgdb: kvm_read: invalid address (0x1050000)
> [GDB will not be able to debug user-mode threads:
> /usr/lib/libthread_db.so: Undefined symbol "ps_pglobal_lookup"]
> 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 "amd64-marcel-freebsd".
> Ready to go.  Enter 'tr' to connect to the remote target
> with /dev/cuad0, 'tr /dev/cuad1' to connect to a different port
> or 'trf portno' to connect to the remote target with the firewire
> interface.  portno defaults to 5556.
> 
> Type 'getsyms' after connection to load kld symbols.
> 
> If you're debugging a local system, you can use 'kldsyms' instead
> to load the kld symbols.  That's a less obnoxious interface.
> During symbol reading...location expression too complex...
> During symbol reading, unsupported tag: 'DW_TAG_const_type'.
> Cannot access memory at address 0x0
> (kgdb)
> 
> ---
> 
> A Jan 9th kernel doesn't exhibit this problem with lstat when
> /usr/local/etc/cvsup/update.sh is run.
> 
> Any suggestions to isolate this problem?
> 
> Scot

> options	CONFIG_AUTOGENERATED
> ident	DV8135NR-debug
> machine	amd64
> cpu	HAMMER
> makeoptions	KODIR=/boot/${KERNEL}_hp_debug
> makeoptions	DEBUG=-g
> options	INCLUDE_CONFIG_FILE
> options	WITNESS_SKIPSPIN
> options	WITNESS
> options	INVARIANT_SUPPORT
> options	INVARIANTS
> options	GDB
> options	DDB
> options	KDB
> options	ATA_STATIC_ID
> options	SMP
> options	AUDIT
> options	STOP_NMI
> options	KBD_INSTALL_CDEV
> options	_KPOSIX_PRIORITY_SCHEDULING
> options	SYSVSEM
> options	SYSVMSG
> options	SYSVSHM
> options	STACK
> options	KTRACE
> options	SCSI_DELAY=5000
> options	COMPAT_FREEBSD7
> options	COMPAT_FREEBSD6
> options	COMPAT_FREEBSD5
> options	COMPAT_FREEBSD4
> options	COMPAT_IA32
> options	COMPAT_43TTY
> options	GEOM_LABEL
> options	GEOM_PART_GPT
> options	PSEUDOFS
> options	PROCFS
> options	CD9660
> options	MSDOSFS
> options	NTFS
> options	NFS_ROOT
> options	NFSSERVER
> options	NFSCLIENT
> options	MD_ROOT
> options	UFS_GJOURNAL
> options	UFS_DIRHASH
> options	UFS_ACL
> options	SOFTUPDATES
> options	FFS
> options	SCTP
> options	INET6
> options	INET
> options	PREEMPTION
> options	SCHED_ULE
> options	KSE
> options	GEOM_MBR
> options	GEOM_BSD
> device	isa
> device	mem
> device	io
> device	uart_ns8250
> device	cpufreq
> device	acpi
> device	pci
> device	fdc
> device	ata
> device	atadisk
> device	ataraid
> device	atapicd
> device	atapifd
> device	atapist
> device	scbus
> device	ch
> device	da
> device	sa
> device	cd
> device	pass
> device	ses
> device	atkbdc
> device	atkbd
> device	psm
> device	kbdmux
> device	vga
> device	splash
> device	sc
> device	agp
> device	cbb
> device	pccard
> device	cardbus
> device	sio
> device	uart
> device	miibus
> device	rl
> device	loop
> device	random
> device	ether
> device	sl
> device	ppp
> device	tun
> device	pty
> device	md
> device	gif
> device	faith
> device	firmware
> device	bpf
> device	uhci
> device	ohci
> device	ehci
> device	usb
> device	ugen
> device	uhid
> device	ukbd
> device	ulpt
> device	umass
> device	ums
> device	urio
> device	uscanner
> device	ucom
> device	uark
> device	ubsa
> device	ubser
> device	uftdi
> device	uipaq
> device	uplcom
> device	uvisor
> device	uvscom
> device	firewire
> device	sbp
> device	fwe
> device	fwip
> device	dcons
> device	dcons_crom
> > _______________________________________________
> freebsd-current_at_freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe_at_freebsd.org"

Received on Tue Jan 15 2008 - 13:39:34 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:26 UTC