Bug 177633

Summary: FreeBSD 9.1 and ZFS deadlocked at shutdown/reboot
Product: Base System Reporter: Scott Kitchin <scott>
Component: amd64Assignee: freebsd-amd64 (Nobody) <amd64>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description Scott Kitchin 2013-04-04 15:30:00 UTC
I tried FreeBSD 9.1 (RELEASE/RELENG/STABLE) with ZFS mirrored (raid1) pool and iRedMail (http://www.iredmail.org) and it hangs when I issue a shutdown command. The only last message displayed "All buffers synched" and it hangs indefinitely until I hit the reset/power button.

FreeBSD 9.1 with ZFS (raid1) pool shutdown hang/deadlock.
FreeBSD 9.1 without ZFS shutdown successful.
FreeBSD 9.0 with ZFS shutdown successful.
FreeBSD 9.0 without ZFS shutdown successful.

This only happens after I install iRedMail. If I uninstall or delete iRedMail and it shutdowns normal. If I reinstall iRedMail and it hangs. iRedMail's mail daemons must be causing some kind of deadlock and preventing FreeBSD 9.1 from normal shutdown. I think this is serious problem if the server is at a remote location without physical access to power button.

I was able to reproduce this problem in VirtualBox with two virtual drives for ZFS pool mirroring and two different computers.

The server can be shutdown using this command 'shutdown -n -o -r now' but it's risky.

Fix: 

N/A
How-To-Repeat: 1) Install FreeBSD 9.1 with ZFS mirrored (raid1) pools
2) Install Bash from ports
3) Install iRedMail from http://www.iredmail.org
4) Shutdown to start all services
5) Shutdown again and it hangs

I use ZFS creation tool from http://iceblood.googlecode.com/svn/FreeBSD_ZFS/freebsd_zfs_inst.sh
Comment 1 Andriy Gapon freebsd_committer freebsd_triage 2013-04-04 16:32:48 UTC
I believe that this should be fixed in stable/9.

-- 
Andriy Gapon
Comment 2 Palle Girgensohn 2013-04-04 17:11:39 UTC
Does the ireadmail rc.d script work for properly for the "stop" command?
Comment 3 Scott Kitchin 2013-04-08 16:29:28 UTC
Latest -STABLE/9 branch fixed this problem.

Please close this ticket.
Comment 4 Mark Linimon freebsd_committer freebsd_triage 2013-04-08 17:43:46 UTC
State Changed
From-To: open->closed

Closed at submitter's request.