Bug 23258

Summary: panic: softdep_lock: locking against myself
Product: Base System Reporter: Roman Shterenzon <roman>
Component: kernAssignee: Kirk McKusick <mckusick>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.2-RELEASE   
Hardware: Any   
OS: Any   

Description Roman Shterenzon 2000-12-04 08:20:01 UTC
In the middle of the day the computer crashed.

How-To-Repeat: 
I don't know yet.
Comment 1 Vladimir Yu. Stepanov 2000-12-19 17:20:30 UTC
This problem fixed if disabled in kernel config file option
SOFTUPDATES or disable this feature:
tunefs -n disable <disklabel>.
Option SOFTUPDATES now incompatible with NFS or QUOTA options.
I haven't patch for correct this bug.
Will be take same effect if kernel compiled with options SOFTUPDATES&QUOTA
setup limit inodes to one and create file in this disk label.

edquota <somebody>
/: blocks in use: 158, limits (soft = 0, hard = 0)
        inodes in use: 118, limits (soft = 0, hard = 1)
                                              ^^^^^^^^
su <somebody> -c 'touch /test'

Result:
"panic: softdep_lock: locking against myself".

Release: 4.1.1-RELEASE i386

kernel config file:

ident           WWW
maxusers        256

### CPU
machine         i386
cpu             I686_CPU
#options        CPU_FASTER_5X86_FPU
options         NO_F00F_HACK

### File system
options         FFS
options         FFS_ROOT
options         SOFTUPDATES
options         MFS
options         MD_ROOT
options         NFS
options         MSDOSFS
options         CD9660
options         PROCFS
options         UNION
options         QUOTA
options         SUIDDIR

pseudo-device   gzip
pseudo-device   vn
pseudo-device   md

### Control time extension
#options        PPS_SYNC
options         P1003_1B
options         _KPOSIX_PRIORITY_SCHEDULING
options         VFS_AIO

### Other
options         USER_LDT
options         COMPAT_43
options         KTRACE
options         SYSVSHM
options         SYSVMSG
options         SYSVSEM

### Network
options         INET
options         ICMP_BANDLIM
pseudo-device   pty
pseudo-device   bpf
pseudo-device   loop
pseudo-device   ether
options         IPFIREWALL
options         IPFIREWALL_FORWARD
options         IPDIVERT
options         IPFILTER
options         DUMMYNET


### Hardware
device          isa
device          pci

# Floppy drives
device          fdc0    at isa? port IO_FD1 irq 6 drq 2
device          fd0     at fdc0 drive 0
device          fd1     at fdc0 drive 1

# ATA and ATAPI devices
device          ata0    at isa? port IO_WD1 irq 14
device          ata1    at isa? port IO_WD2 irq 15
device          ata
device          atadisk
device          atapicd
options         ATA_STATIC_ID
options         ATA_ENABLE_ATAPI_DMA

# atkbdc0 controls both the keyboard and the PS/2 mouse
device          atkbdc0 at isa? port IO_KBD
device          atkbd0  at atkbdc? irq 1 flags 0x1
options         KBD_INSTALL_CDEV
device          psm0    at atkbdc? irq 12

# VGA
device          vga0    at isa?

pseudo-device   splash
pseudo-device   speaker

# syscons is the default console driver, resembling an SCO console
device          sc0     at isa? flags 0x100

# Floating point support - do not disable.
device          npx0    at nexus? port IO_NPX irq 13

# Power management support (see LINT for more options)
device          apm0    at nexus? disable flags 0x20 # Advanced Power Management

# Serial (COM) ports
device          sio0    at isa? port IO_COM1 irq 4
device          sio1    at isa? port IO_COM2 irq 3

# SCSI peripherals
device          scbus
device          da

# Parallel port
device          ppc0    at isa? irq 7
device          ppbus
device          lpt
device          plip
device          ppi
device          vpo

# PCI Ethernet NICs that use the common MII bus controller code.
device          miibus
device          rl
Comment 2 Roman Shterenzon 2000-12-19 22:30:43 UTC
On Tue, 19 Dec 2000, vys wrote:

>
> This problem fixed if disabled in kernel config file option
> SOFTUPDATES or disable this feature:
> tunefs -n disable <disklabel>.
This is workaround and not solution.

> Option SOFTUPDATES now incompatible with NFS or QUOTA options.
This is the first time I hear such thing. There were problems with QUOTA
on softupdates enabled partitions, but it was fixed before 4.1 I think.

> I haven't patch for correct this bug.
> Will be take same effect if kernel compiled with options SOFTUPDATES&QUOTA
> setup limit inodes to one and create file in this disk label.

--Roman Shterenzon, UNIX System Administrator and Consultant
[ Xpert UNIX Systems Ltd., Herzlia, Israel. Tel: +972-9-9522361 ]
Comment 3 Kris Kennaway freebsd_committer freebsd_triage 2001-06-02 10:41:48 UTC
Responsible Changed
From-To: freebsd-bugs->mckusick

Kirk's baby 
There were softupdates problems with 4.2-RELEASE; perhaps this is already fixed.
Comment 4 Kirk McKusick freebsd_committer freebsd_triage 2002-02-11 00:23:38 UTC
State Changed
From-To: open->closed

This was fixed in revision 1.87 to /sys/ufs/ffs/ffs_softdep.c.