tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: memcpy of struct buf, or similar?



Andrew Doran wrote:

> Hi,
> 
> Does anyone know a point in the file system code, or ATA code, where outside
> of vfs_bio.c we issue memcpy() on a buffer, assign to it or copy it another
> way, or clear any part of it with memset()?
> 
> I am trying to fix PR 38761. Threads get stuck in biowait. The buffer always
> has DONE set on it and has a waiter, but the waiter is stuck on the condvar.
> It's on the sleep queue and it looks like no attempt has been made to wake
> it up. The last time I saw this was in the tty code, and something was doing
> memcpy() on clists.

I've had this happen twice from two attempts to do a build with -current
from a few hours ago.  My previous kernel was from May 27 and I hadn't
seen this problem.

Only active disk is a Seagate ST3500630NS, and this is on a 8 CPU
machine with "./build.sh -j 16 ..."

Processes that are blocked are:

 UID   PID  PPID   CPU PRI NI  VSZ   RSS WCHAN   STAT TTY      TIME COMMAND
7006    74 26573 36864 108  0  740  1136 tstile  D    ttyp0 0:00.00 
/home/simonb/netbsd/tools/bin/x86_64--netbsd-objcopy
7006  3992 14282 36864 108  0  168 64220 tstile  D    ttyp0 0:01.94 
/home/simonb/netbsd/tools/bin/nbmake realall 
7006 26935  3992 36864 108  0  160  1004 tstile  D    ttyp0 0:00.00 sh 
7006 27108  3992 36864 108  0  160  1004 tstile  D    ttyp0 0:00.00 sh 
7006 18131  3992 36864 108  0  160  1004 tstile  D    ttyp0 0:00.00 sh 
7006 19799  3992 36864 108  0  160  1004 tstile  D    ttyp0 0:00.00 sh 
7006 24242  3992 36864 108  0  160  1004 tstile  D    ttyp0 0:00.00 sh 
7006 11328 24024 36864 108  0  812  1356 tstile  D    ttyp0 0:00.00 
/home/simonb/netbsd/tools/lib/gcc/x86_64--netbsd/4.1
7006 19996   482 36864 108  0  740  1060 tstile  D    ttyp0 0:00.00 
/home/simonb/netbsd/tools/bin/x86_64--netbsd-objcopy
7006 24157 23171 36864 108  0  812  1352 tstile  D    ttyp0 0:00.00 
/home/simonb/netbsd/tools/lib/gcc/x86_64--netbsd/4.1
7006 24596 26929 36864 108  0  812  1352 tstile  D    ttyp0 0:00.00 
/home/simonb/netbsd/tools/lib/gcc/x86_64--netbsd/4.1
7006 25280 20929 36864 108  0  812  1352 tstile  D    ttyp0 0:00.00 
/home/simonb/netbsd/tools/lib/gcc/x86_64--netbsd/4.1
7006 25769 19446 36864 108  0  744  1452 biowait D    ttyp0 0:00.00 
/home/simonb/netbsd/tools/bin/x86_64--netbsd-objcopy

When I try to reboot, I get one busy buffer:

syncing disks... 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 giving up
Printing vnodes for busy buffers
vnode @ 0xffff80006d437158, flags (30<MPSAFE,LOCKSWORK>)
        tag VT_UFS(1), type VDIR(2), usecount 36, writecount 0, holdcount 4
        freelisthd 0x0, mount 0xffff80006b8ad000, data 0xffff80006d4c2b30 lock 
0xffff80006d437260 recursecnt 0
        tag VT_UFS, ino 20856146, on dev 0, 4 flags 0x6, effnlink 2, nlink 2
        mode 040755, owner 7006, group 0, size 49664
giving up

Anything I can do to help track this down?  For now, I'm going to switch
from amd64 to i386 kernel so that at least DDB is useful...

Cheers,
Simon.


Home | Main Index | Thread Index | Old Index