Bug 145058 - [panic] Reproducable panic in 7.3 while building clamav
Summary: [panic] Reproducable panic in 7.3 while building clamav
Status: Closed Overcome By Events
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 7.3-STABLE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-26 12:50 UTC by dirk.meyer
Modified: 2018-04-15 01:28 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dirk.meyer 2010-03-26 12:50:06 UTC
	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?)

Fix: 

Workaround: Disabeling debug options
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]
Comment 1 Mikolaj Golub 2010-03-27 14:32:18 UTC
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
Comment 2 dirk.meyer 2010-03-29 11:12:53 UTC
> 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/
Comment 3 Volker Werth freebsd_committer freebsd_triage 2010-08-19 22:37:42 UTC
State Changed
From-To: open->feedback

Dirk, 
can you please check if that relates to kern/147839? 
Plase disable WITNESS and see if you still get the blues.
Comment 4 Volker Werth freebsd_committer freebsd_triage 2010-08-28 12:08:42 UTC
State Changed
From-To: feedback->open

disabling WITNESS has been confirmed to help work around this issue
Comment 5 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:01:08 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 6 Larry Rosenman freebsd_committer freebsd_triage 2018-04-15 01:28:49 UTC
7.3 is ancient and out of support, I've seen nothing like this with clamav on 10, 11, or 12. 

Closing as OBE, if the submitter can reproduce it, please submit another bug.