qemu-discuss
[Top][All Lists]
Advanced

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

Re: [Qemu-discuss] Qemu exits on pumping traffic over virtio net


From: Prem Anand
Subject: Re: [Qemu-discuss] Qemu exits on pumping traffic over virtio net
Date: Fri, 27 May 2016 17:42:31 +0100

Seems that I forgot to include the error message
Qemu exits with the message
"qemu-system-x86_64: Guest says index 32768 is available"

Regards
Prem

On Fri, May 27, 2016 at 5:39 PM, Prem Anand <address@hidden> wrote:
Hi Folks,

On pumping traffic over a VM (with virtio net), sometimes the qemu process  exits with the message

Looks like, I am hitting this codepath (http://git.qemu.org/?p=qemu.git;a=blob;f=hw/virtio/virtio.c)
"unsigned int head" looks suspicious. I guess it have to be "int head;"

 329 static unsigned int virtqueue_get_head(VirtQueue *vq, unsigned int idx)
 330 {
 331     unsigned int head;
 332
 333     /* Grab the next descriptor number they're advertising, and increment
 334      * the index we've seen. */
 335     head = vring_avail_ring(vq, idx % vq->vring.num);
 336
 337     /* If their number is silly, that's a fatal mistake. */
 338     if (head >= vq->vring.num) {
 339         error_report("Guest says index %u is available", head);
 340         exit(1);
 341     }
 342
 343     return head;
 344 }

Why are we doing an exit instead of forcing a crash here?

On doing a abort() on exit, I was able to catch this in gdb and the backtrace looks like this

(gdb) bt                                                                   
#0  0x00007fad2b834067 in __GI_raise (address@hidden)                     
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:56                          
#1  0x00007fad2b835448 in __GI_abort () at abort.c:89                      
#2  0x00007fad30a35728 in exit () from /home/pharidos/local/lib/catchexit.so
#3  0x000055b352884815 in virtqueue_get_head (address@hidden,  
    idx=<optimized out>)                                                   
    at /home/pharidos/src/qemu-2.5+dfsg/hw/virtio/virtio.c:342             
#4  0x000055b3528857fd in virtqueue_pop (vq=0x55b3537ec758,                
    address@hidden)                                        
    at /home/pharidos/src/qemu-2.5+dfsg/hw/virtio/virtio.c:518
#5  0x000055b352873e6e in virtio_net_flush_tx (address@hidden)
    at /home/pharidos/src/qemu-2.5+dfsg/hw/net/virtio-net.c:1152
#6  0x000055b352873ff5 in virtio_net_tx_bh (opaque=0x55b353806700)
    at /home/pharidos/src/qemu-2.5+dfsg/hw/net/virtio-net.c:1305
#7  0x000055b352a7836d in aio_bh_call (bh=<optimized out>)
    at /home/pharidos/src/qemu-2.5+dfsg/async.c:64
#8  aio_bh_poll (address@hidden)
    at /home/pharidos/src/qemu-2.5+dfsg/async.c:92
#9  0x000055b352a84cf0 in aio_dispatch (ctx=0x55b353569050)
    at /home/pharidos/src/qemu-2.5+dfsg/aio-posix.c:305
#10 0x000055b352a7815e in aio_ctx_dispatch (source=<optimized out>,
    callback=<optimized out>, user_data=<optimized out>)
    at /home/pharidos/src/qemu-2.5+dfsg/async.c:231
#11 0x00007fad2c52fc5d in g_main_dispatch (context=0x55b353569410)
    at /tmp/buildd/glib2.0-2.42.1/./glib/gmain.c:3111
#12 g_main_context_dispatch (address@hidden)
    at /tmp/buildd/glib2.0-2.42.1/./glib/gmain.c:3710
#13 0x000055b352a83676 in glib_pollfds_poll ()
    at /home/pharidos/src/qemu-2.5+dfsg/main-loop.c:211                                
#14 os_host_main_loop_wait (timeout=<optimized out>)                       
    at /home/pharidos/src/qemu-2.5+dfsg/main-loop.c:256                    
#15 main_loop_wait (nonblocking=<optimized out>)                           
    at /home/pharidos/src/qemu-2.5+dfsg/main-loop.c:504                    
#16 0x000055b35280abee in main_loop ()                                     
    at /home/pharidos/src/qemu-2.5+dfsg/vl.c:1927                          
#17 main (argc=<optimized out>, argv=<optimized out>, envp=<optimized out>)
    at /home/pharidos/src/qemu-2.5+dfsg/vl.c:4683

--
Regards
H.Prem Anand



--
Regards
H.Prem Anand

reply via email to

[Prev in Thread] Current Thread [Next in Thread]