sleep mutex panic on 5.2.1-RELEASE

Jon Noack noackjr at
Thu Apr 22 12:49:01 PDT 2004

On 4/22/2004 1:40 PM, Peter Losher wrote:
> On Thursday 22 April 2004 10:58, Brian Fundakowski Feldman wrote:
>> Chances are this bug does not exist anymore. Robert Watson rewrote
>> a large amount of the pipe code to improve its locking and
>> security, and I hammered out some left-over bugs that showed up
>> with SMP testing. Please try either upgrading to -CURRENT or, if
>> you are not using MAC, these two diffs might be all you need:
> Thanks for the pointers (I'd rather stay in the release branch if I can), 
> the patches applied cleanly, but it has a issue when compiling it in. 
> -=-
> cc -c -O -pipe -mcpu=pentiumpro -Wall -Wredundant-decls -Wnested-externs 
> -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline 
> -Wcast-qual  -fformat-extensions -std=c99 -g -nostdinc -I-  -I. 
> -I/usr/src/sys -I/usr/src/sys/contrib/dev/acpica 
> -I/usr/src/sys/contrib/ipfilter -I/usr/src/sys/contrib/dev/ath 
> -I/usr/src/sys/contrib/dev/ath/freebsd -I/usr/src/sys/contrib/ngatm 
> -D_KERNEL -include opt_global.h -fno-common -finline-limit=15000 
> -fno-strict-aliasing  -mno-align-long-strings 
> -mpreferred-stack-boundary=2 -ffreestanding 
> -Werror  /usr/src/sys/kern/sys_pipe.c
> /usr/src/sys/kern/sys_pipe.c: In function `pipe':
> /usr/src/sys/kern/sys_pipe.c:364: warning: implicit declaration of 
> function `fdunused'
> *** Error code 1
> -=-
> Is there something else I might be missing here?

See revision 1.163 of src/sys/kern/sys_pipe.c.  It references the new 
file descriptor allocation code:

Either remove that part of the diff (it's just the one line with 
'fdunused' -- line 364 of the patched file) or pull in the new file 
descriptor allocation code as well.  This seems to be the only issue I 
see after brief inspection of the commit history.  However, the gremlins 
are clever...

Jon Noack

More information about the freebsd-current mailing list