Open dzavalishin opened 8 years ago
Is this panic connected to the issue?
#4 0x001a76eb in panic (fmt=0x1f250c "virtio.c:%u, %s: assertion 'desc[nout].addr' failed") at t_panic.c:49
ap = 0x4023fdfc "\b\002"
#5 0x001500b0 in virtio_detach_buffers_list (vd=0x4910d60 <vdev>, qindex=0, nDesc=10, desc=0x4023fe74, dataLen=0x4023fe70) at virtio.c:520
r = 0x6f0600
nout = 0
__func__ = "virtio_detach_buffers_list"
pos = 15
bufIndex = 71
__FUNCTION__ = "virtio_detach_buffers_list"
flagsCopy = 2
nextCopy = 65535
#6 0x0014d522 in vio_intr_dpc_func (a=0x0) at driver_virtio_disk.c:377
vd = 0x4910d60 <vdev>
cmd = {{addr = 0, len = 16, flags = 1, next = 0}, {addr = 127314944, len = 512, flags = 1, next = 93}, {addr = 76616280, len = 1, flags = 2, next = 65535}, {addr = 7415316872411708, len = 1076100848, flags = 65220, next = 16419}, {addr = 9223372036875787264, len = 31, flags = 65248, next = 16419}, {addr = 1732691, len = 2, flags = 16, next = 0}, {addr = 133143986694, len = 2, flags = 65280, next = 16419}, {addr = 4621818018078638061, len = 1746843, flags = 65296, next = 16419}, {addr = 7318452475424851, len = 7303168, flags = 65328, next = 16419}, {addr = 335787758747630056, len = 6, flags = 65328, next = 16419}}
dlen = 513
nRead = 3
__FUNCTION__ = "vio_intr_dpc_func"
__func__ = "vio_intr_dpc_func"
#7 0x0013ba38 in dpc_request_run () at dpc.c:83
i = 0x4910d94 <vio_intr_dpc>
#8 0x0013ba76 in dpc_thread () at dpc.c:112
No locals.
#9 0x001a5842 in kernel_thread_starter (func=0x13ba3c <dpc_thread>) at t_create.c:127
thread = 0x13ba3c <dpc_thread>
#10 0x001a5e76 in phantom_thread_c_starter () at t_create.c:420
func = 0x1a5831 <kernel_thread_starter>
arg = 0x13ba3c <dpc_thread>
t = 0x6f7000
#11 0x001a89b8 in phantom_thread_trampoline () at /home/gvs/compile/phantom/phantom/threads/ia32/thread.S:99
No locals.
It only happens when running both virtio and IDE disks, I never caught it running with virtio only. The serial0.log record is like this (not sure which one is more informative):
Panic: virtio.c:520, virtio_detach_buffers_list: assertion 'desc[nout].addr' failed
Press any key ...^M ^Mtid 5 Stack:- 1e0d6d: stack_dump
- 1a76fc: panic
- 1500b0: virtio_detach_buffers_list
- 14d522: vio_intr_dpc_func
- 13ba38: dpc_request_run
- 13ba76: dpc_thread
- 1a5842: kernel_thread_starter
- 1a5e76: phantom_thread_c_starter
- 1a89b8: phantom_thread_trampoline
T 1 pri 07 blk 00000002
Thread 1 EIP 0x001A8710, Stack:- 1a792c: phantom_scheduler_soft_interrupt
- 170034: ignore_handler
- 114d61: phantom_kernel_trap
- 685b6e: ?
- 12e3a1: phantom_scheduler_request_soft_irq
- 1a78d4: phantom_scheduler_yield_locked
- 1a8291: thread_block
- 1a84bd: hal_sleep_msec
- 169fc1: main
- 125f74: phantom_multiboot_main
- 1000b5: isspace
T 2 pri 00 blk 00000000
Thread 2 EIP 0x001A8710, Stack:- 1a792c: phantom_scheduler_soft_interrupt
- 112d8c: hal_softirq_dispatcher
- 181567: hal_PIC_interrupt_dispatcher
- 178fd7: call_handler
- 1a7135: haltme
- 1a5e76: phantom_thread_c_starter
- 1a89b8: phantom_thread_trampoline
T 3 pri 02 blk 00000004 cond 498dd90
Thread 3 EIP 0x001A8710, Stack:- 1a792c: phantom_scheduler_soft_interrupt
- 170034: ignore_handler
- 114d61: phantom_kernel_trap
- 685b6e: ?
- 12e3a1: phantom_scheduler_request_soft_irq
- 1a78d4: phantom_scheduler_yield_locked
- 1a8291: thread_block
- 1a4587: hal_cond_wait
- 1a73e6: t_do_some_kills
- 1a715a: kill_thread_thread
- 1a5842: kernel_thread_starter
- 1a5e76: phantom_thread_c_starter
- 1a89b8: phantom_thread_trampoline
T 4 pri 07 blk 00000002
Thread 4 EIP 0x001A8710, Stack:- 1a792c: phantom_scheduler_soft_interrupt
- 170034: ignore_handler
- 114d61: phantom_kernel_trap
- 685b6e: ?
- 12e3a1: phantom_scheduler_request_soft_irq
- 1a78d4: phantom_scheduler_yield_locked
- 1a8291: thread_block
- 1a84bd: hal_sleep_msec
- 12f8ca: net_timer_runner
- 1a5e76: phantom_thread_c_starter
- 1a89b8: phantom_thread_trampoline
T 5 pri 28 blk 00000000
Thread 5 EIP 0x001A8710, Stack:- e3fef0: ?
- ff000000: ?
Dump of i386 state:
EAX ff000000 EBX 006f7000 ECX 0000f5d0 EDX 00000000
ESI 001a5831 EDI 0013ba3c EBP 4023fd30 ESP 4023fd08
CS 0010 SS 40230018 DS 0018 ES 0018 FS 0000 GS 0000
EIP 001e45b2 EFLAGS 00010012
trapno 14: Page fault, error 00000000
page fault linear address ff000004
EIP 1e45b2: stack_dump_one
Stack:- 1e4637: stack_dump_from
- 1a895e: dump_thread_stack
- 1a61f6: dump_thread_stacks
- 1a7701: panic
- 1500b0: virtio_detach_buffers_list
- 14d522: vio_intr_dpc_func
- 13ba38: dpc_request_run
- 13ba76: dpc_thread
- 1a5842: kernel_thread_starter
- 1a5e76: phantom_thread_c_starter
- 1a89b8: phantom_thread_trampoline
looks like it is.
Fresh run with pure virtio ended up in the same panic on pass 2 (after recovering from the snapshot). The serial0.log is attached. Because of the bug with console wait for keypress, there's no backtrace. serial0.log.txt
Identical to what we have: assertion 'desc[nout].addr' failed
Need test it, suppose it is fixed
Unfortuntely, it isn't.
Thread 1 hit Breakpoint 1, panic (fmt=0x1e2a6c "virtio.c:%u, %s: assertion 'desc[nout].addr' failed") at t_panic.c:31 31 if(panic_reenter)
Sometimes it happens on 1st pass, sometimes on 2nd. Attached is the latter. Unfortunately, couldn't catch it with the full stack trace yet. serial0.log.txt
Need active virtio disk tests?