From dm@home3.dinoex.sub.de  Fri Mar 26 12:49:44 2010
Return-Path: <dm@home3.dinoex.sub.de>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id AD607106566C
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 26 Mar 2010 12:49:44 +0000 (UTC)
	(envelope-from dm@home3.dinoex.sub.de)
Received: from uucp.dinoex.sub.de (uucp.dinoex.sub.de [194.45.71.2])
	by mx1.freebsd.org (Postfix) with ESMTP id 2D0BD8FC0C
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 26 Mar 2010 12:49:43 +0000 (UTC)
Received: from home3.dinoex.sub.de (home3.dinoex.sub.de [194.45.71.20])
	by uucp.dinoex.sub.de (8.14.3/8.14.2) with ESMTP id o2QCnemB024934
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 26 Mar 2010 13:49:56 +0100 (CET)
	(envelope-from dm@home3.dinoex.sub.de)
Received: (from dm@localhost)
	by home3.dinoex.sub.de (8.14.3/8.14.3/Submit) id o2QCpksD024832;
	Fri, 26 Mar 2010 13:51:46 +0100 (CET)
	(envelope-from dm)
Message-Id: <201003261251.o2QCpksD024832@home3.dinoex.sub.de>
Date: Fri, 26 Mar 2010 13:51:46 +0100 (CET)
From: dirk.meyer@dinoex.sub.org
Reply-To: dirk.meyer@dinoex.sub.org
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Reproducable panic in 7.3 while building clamav
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         145058
>Category:       kern
>Synopsis:       [panic] Reproducable panic in 7.3 while building clamav
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Mar 26 12:50:06 UTC 2010
>Closed-Date:    
>Last-Modified:  Sat Aug 28 11:09:36 UTC 2010
>Originator:     Dirk Meyer
>Release:        FreeBSD 7.3-STABLE
>Organization:
privat
>Environment:

FreeBSD t4.dinoex.sub.de 7.3-STABLE FreeBSD 7.3-STABLE #13: Thu Mar 25 13:01:36 CET 2010
	root@t4.dinoex.sub.de:/usr/obj/usr/src/sys/HOME  i386

# cat /usr/src/sys/i386/conf/HOME
include GENERIC
ident HOME
nocpu   I486_CPU
nocpu   I586_CPU
options         IPFIREWALL              #firewall
options         IPFIREWALL_VERBOSE      #enable logging to syslogd(8)
options         IPFIREWALL_VERBOSE_LIMIT=100    #limit verbosity
options         IPFIREWALL_FORWARD      #packet destination changes
options         IPFIREWALL_DEFAULT_TO_ACCEPT
options         DUMMYNET
options         INVARIANTS
options         INVARIANT_SUPPORT
options         DIAGNOSTIC
options         WITNESS
# eof
----------------

>Description:

	System runs well.
	When building a specific port inside a jail, system panics.
	on reboot there is an unexpectet file inconsistency
	on the volume with the jail.

Unread portion of the kernel message buffer:
panic: System call shutdown returning with -1 locks held
cpuid = 1
Uptime: 3h9m46s
Physical memory: 3059 MB
Dumping 199 MB: 184 168 152 136 120 104 88 72 56 40 24 8

Reading symbols from /boot/kernel/acpi.ko...Reading symbols from /boot/kernel/acpi.ko.symbols...done.
done.
Loaded symbols for /boot/kernel/acpi.ko
Reading symbols from /boot/kernel/nullfs.ko...Reading symbols from /boot/kernel/nullfs.ko.symbols...done.
done.
Loaded symbols for /boot/kernel/nullfs.ko
Reading symbols from /boot/kernel/pf.ko...Reading symbols from /boot/kernel/pf.ko.symbols...done.
done.
Loaded symbols for /boot/kernel/pf.ko
Reading symbols from /boot/kernel/linux.ko...Reading symbols from /boot/kernel/linux.ko.symbols...done.
done.
Loaded symbols for /boot/kernel/linux.ko
Reading symbols from /usr/local/modules/fuse.ko...done.
Loaded symbols for /usr/local/modules/fuse.ko
#0  doadump () at pcpu.h:196
kgdb) bt
#0  doadump () at pcpu.h:196
#1  0xc07fed3c in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:418
#2  0xc07fefde in panic (fmt=Variable "fmt" is not available.
) at /usr/src/sys/kern/kern_shutdown.c:574
#3  0xc0b0949c in syscall (frame=0xe9121d38) at /usr/src/sys/i386/i386/trap.c:1169
#4  0xc0aed530 in Xint0x80_syscall () at /usr/src/sys/i386/i386/exception.s:262
#5  0x00000033 in ?? ()
Previous frame inner to this frame (corrupt stack?)


>How-To-Repeat:

	run inside the jail:

pkg_add /usr/ports/packages7/All/libcheck-0.9.8.tbz
pkg_add /usr/ports/packages7/All/arc-5.21o_1.tbz
pkg_add /usr/ports/packages7/All/arj-3.10.22_3.tbz
pkg_add /usr/ports/packages7/All/lha-1.14i_6.tbz
pkg_add /usr/ports/packages7/All/unzoo-4.4_2.tbz
pkg_add /usr/ports/packages7/All/gmake-3.81_3.tbz
pkg_add /usr/ports/packages7/All/autoconf-2.62.tbz
pkg_add /usr/ports/packages7/All/help2man-1.37.1_2.tbz
cd /usr/ports/security/clamav && make package
===>  Vulnerability check disabled, database not found
===>  Extracting for clamav-0.95.3
=> MD5 Checksum OK for clamav-0.95.3.tar.gz.
===>  Vulnerability check disabled, database not found
===>  Extracting for clamav-0.95.3
=> MD5 Checksum OK for clamav-0.95.3.tar.gz.
=> SHA256 Checksum OK for clamav-0.95.3.tar.gz.
[...]
100%: Checks: 265, Failures: 0, Errors: 0
PASS: check_clamav
PASS: check_freshclam.sh
PASS: check_sigtool.sh
PASS: check1_clamscan.sh
PASS: check2_clamd.sh
Running suite(s): clamd
[System panics here]

>Fix:
	
	Workaround: Disabeling debug options

>Release-Note:
>Audit-Trail:

From: Mikolaj Golub <to.my.trociny@gmail.com>
To: dirk.meyer@dinoex.sub.org
Cc: bug-followup@FreeBSD.org
Subject: Re: kern/145058: Reproducable panic in 7.3 while building clamav
Date: Sat, 27 Mar 2010 16:32:18 +0200

 The system panics when shutdown(sockd, SHUT_WR) on unix socket is called in
 unit_tests/check_clamd.c:test_command(). The socket is created in working
 directory.
 
 Do you have the jail ports tree nullfs/unionfs mounted or this is regular fs?
 
 -- 
 Mikolaj Golub

From: dirk.meyer@dinoex.sub.org (Dirk Meyer)
To: bug-followup@FreeBSD.org, to.my.trociny@gmail.com (Mikolaj Golub)
Cc:  
Subject: Re: kern/145058: Reproducable panic in 7.3 while building
	clamav
Date: Mon, 29 Mar 2010 12:12:53 +0200

 > The system panics when shutdown(sockd, SHUT_WR) on unix socket is called in
 > unit_tests/check_clamd.c:test_command(). The socket is created in working
 > directory.
 > 
 > Do you have the jail ports tree nullfs/unionfs mounted or this is regular fs?
 
 yes I do have nullfs mounts:
 /usr/src on /usr/jail/build/usr/src (nullfs, local, read-only)
 /usr/obj on /usr/jail/build/usr/obj (nullfs, local, read-only)
 /usr/jail/build/usr/ports on /usr/ports (nullfs, local)
 
 But the WRKDIRPREFIX ist set and ports to a real disk /dev/ad10s1f.
 
 kind regards Dirk
 
 - Dirk Meyer, Im Grund 4, 34317 Habichtswald, Germany
 - [dirk.meyer@dinoex.sub.org],[dirk.meyer@guug.de],[dinoex@FreeBSD.org]
 http://people.freebsd.org/~dinoex/errorlogs/
State-Changed-From-To: open->feedback 
State-Changed-By: vwe 
State-Changed-When: Thu Aug 19 21:37:42 UTC 2010 
State-Changed-Why:  
Dirk, 
can you please check if that relates to kern/147839? 
Plase disable WITNESS and see if you still get the blues. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=145058 
State-Changed-From-To: feedback->open 
State-Changed-By: vwe 
State-Changed-When: Sat Aug 28 11:08:42 UTC 2010 
State-Changed-Why:  
disabling WITNESS has been confirmed to help work around this issue 

http://www.freebsd.org/cgi/query-pr.cgi?pr=145058 
>Unformatted:
