Re: geom - panic: sleepq_add: sleep with sleeping prohibited

2015-04-09 Thread Alexander Motin
Hi.

> I've got the following panic running FreeBSD-11-current:

I'm sorry, it was my mistake. Should be fixed by r281310.

Though that is generally a bad Carma to loose active swap device.

-- 
Alexander Motin
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


geom - panic: sleepq_add: sleep with sleeping prohibited

2015-04-07 Thread Svatopluk Kraus
Hi,

I've got the following panic running FreeBSD-11-current:

panic: sleepq_add: td 0xc128a330 to sleep on wchan 0xc1bdd080 with
sleeping prohibited

After some digging, the call stack is the following:

...
g_io_schedule_up()
biodone()
swapgeom_done()
g_waitfor_event()
_sleep()
...

As biodone() in g_io_schedule_up() is wrapped by THREAD_NO_SLEEPING()
and THREAD_SLEEPING_OK(), IMHO, there is something missing in code as
_sleep() can be called regularly in this case.

Svatopluk Kraus

-

More info about this is bellow:

root@raspberry-pi:/usr/src/src2 # ~~~(da0:umass-sim0:0:0:0): READ(10).
CDB: 28 00 00 12 1c 50 00 00 18 00
(da0:umass-sim0:0:0:0): CAM status: SCSI Status Error
(da0:umass-sim0:0:0:0): SCSI status: Check Condition
(da0:umass-sim0:0:0:0): SCSI sense: UNIT ATTENTION asc:28,0 (Not ready
to ready change, medium may have changed)
(da0:umass-sim0:0:0:0): Retrying command (per sense data)
(da0:umass-sim0:0:0:0): READ(10). CDB: 28 00 00 12 1c 50 00 00 18 00
(da0:umass-sim0:0:0:0): CAM status: SCSI Status Error
(da0:umass-sim0:0:0:0): SCSI status: Check Condition
(da0:umass-sim0:0:0:0): SCSI sense: UNIT ATTENTION asc:28,0 (Not ready
to ready change, medium may have changed)
(da0:umass-sim0:0:0:0): Retrying command (per sense data)
(da0:umass-sim0:0:0:0): READ(10). CDB: 28 00 00 12 1c 50 00 00 18 00
(da0:umass-sim0:0:0:0): CAM status: SCSI Status Error
(da0:umass-sim0:0:0:0): SCSI status: Check Condition
(da0:umass-sim0:0:0:0): SCSI sense: UNIT ATTENTION asc:28,0 (Not ready
to ready change, medium may have changed)
(da0:umass-sim0:0:0:0): Retrying command (per sense data)
(da0:umass-sim0:0:0:0): READ(10). CDB: 28 00 00 12 1c 50 00 00 18 00
(da0:umass-sim0:0:0:0): CAM status: SCSI Status Error
(da0:umass-sim0:0:0:0): SCSI status: Check Condition
(da0:umass-sim0:0:0:0): SCSI sense: UNIT ATTENTION asc:28,0 (Not ready
to ready change, medium may have changed)
(da0:umass-sim0:0:0:0): Retrying command (per sense data)
(da0:umass-sim0:0:0:0): READ(10). CDB: 28 00 00 12 1c 50 00 00 18 00
(da0:umass-sim0:0:0:0): CAM status: SCSI Status Error
(da0:umass-sim0:0:0:0): SCSI status: Check Condition
(da0:umass-sim0:0:0:0): SCSI sense: UNIT ATTENTION asc:28,0 (Not ready
to ready change, medium may have changed)
(da0:umass-sim0:0:0:0): Error 6, Retries exhausted
(da0:umass-sim0:0:0:0): Invalidating pack
g_vfs_done():da0s1a[READ(offset=606642176, length=12288)]error = 6
vnode_pager_generic_getpages_done: I/O read error 5
vm_fault: pager read error, pid 327 (dhclient)
pid 327 (dhclient), uid 65: exited on signal 11
swap_pager: I/O error - pagein failed; blkno 57953,size 4096, error 6
panic: sleepq_add: td 0xc128a330 to sleep on wchan 0xc1bdd080 with
sleeping prohibited
KDB: enter: panic
[ thread pid 12 tid 17 ]
Stopped at  kdb_enter+0x48: ldrbr15, [r15, r15, ror r15]!
db> bt
Tracing pid 12 tid 17 td 0xc128a330
db_trace_self() at db_trace_self
 pc = 0xc04ee7cc  lr = 0xc0131f90 (db_hex2dec+0x4c0)
 sp = 0xcfec2970  fp = 0xcfec2988
r10 = 0xc070f6f8
db_hex2dec() at db_hex2dec+0x4c0
 pc = 0xc0131f90  lr = 0xc01319dc (db_command_loop+0x3c4)
 sp = 0xcfec2990  fp = 0xcfec2a30
 r4 = 0x  r5 = 0x
 r6 = 0x r10 = 0xc070f6f8
db_command_loop() at db_command_loop+0x3c4
 pc = 0xc01319dc  lr = 0xc0131674 (db_command_loop+0x5c)
 sp = 0xcfec2a38  fp = 0xcfec2a48
 r4 = 0xc054916d  r5 = 0xc0569f39
 r6 = 0xc070f6e4  r7 = 0xc0622154
 r8 = 0xc07079b0  r9 = 0xc07079b4
r10 = 0xcfec2c10
db_command_loop() at db_command_loop+0x5c
 pc = 0xc0131674  lr = 0xc01340c0 (db_fetch_ksymtab+0x298)
 sp = 0xcfec2a50  fp = 0xcfec2b68
 r4 = 0x  r5 = 0xc070f6f0
 r6 = 0xc07079d8 r10 = 0xcfec2c10
db_fetch_ksymtab() at db_fetch_ksymtab+0x298
 pc = 0xc01340c0  lr = 0xc02d2eb8 (kdb_trap+0xbc)
 sp = 0xcfec2b70  fp = 0xcfec2b90
 r4 = 0x  r5 = 0x0001
 r6 = 0xc07079d8  r7 = 0xc0622154
kdb_trap() at kdb_trap+0xbc
 pc = 0xc02d2eb8  lr = 0xc0505a08 (undefinedinstruction+0x2b4)
 sp = 0xcfec2b98  fp = 0xcfec2c08
 r4 = 0x  r5 = 0x
 r6 = 0xc05056a4  r7 = 0xe7ff
 r8 = 0xc128a330  r9 = 0xc02d27b0
r10 = 0xcfec2c10
undefinedinstruction() at undefinedinstruction+0x2b4
 pc = 0xc0505a08  lr = 0xc04efe38 (exception_exit)
 sp = 0xcfec2c10  fp = 0xcfec2ca8
 r4 = 0xc0569f8e  r5 = 0xcfec2cfc
 r6 = 0xc056f664  r7 = 0xc06f9f18
 r8 = 0xc128a330  r9 = 0xc0710e50
r10 = 0xc06f9d80
exception_exit() at exception_exit
 pc = 0xc04efe38  lr = 0xc02d27a4 (kdb_enter+0x3c)
 sp = 0xcfec2ca0  fp = 0xcfec2ca8
 r0 = 0xc07079c4  r1 = 0x
 r2 = 0xc056dc29  r3 = 0xc056d86c
 r4 = 0xc0569f8e  r5 = 0xcfec2cfc
 r6 = 0xc056f664  r7 = 0xc06f9f18
 r8 = 0xc128a330  r9 = 0xc0710e50