On Sun, Jun 23, 2013 at 02:38:04PM +0300, Michael S. Tsirkin wrote:
> On Fri, Jun 21, 2013 at 08:10:15AM -0500, Anthony Liguori wrote:
> > "Michael S. Tsirkin" <m...@redhat.com> writes:
> > 
> > > From: Michael S. Tsirkin <m...@redhat.com>
> > >
> > > The following changes since commit 
> > > 90a2541b763b31d2b551b07e24aae3de5266d31b:
> > >
> > >   target-i386: fix over 80 chars warnings (2013-06-15 17:50:38 +0000)
> > >
> > > are available in the git repository at:
> > >
> > >   git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_anthony
> > >
> > > for you to fetch changes up to f96c30047009f8a9c3cecf68104d8d99f989f54d:
> > >
> > >   pci: Fold host_buses list into PCIHostState functionality
> > >   (2013-06-19 18:35:05 +0300)
> > 
> > SEGV's during pretty much any test I try to run during startup:
> > 
> > Core was generated by 
> > `/home/aliguori/build/qemu/x86_64-softmmu/qemu-system-x86_64 -kernel 
> > /usr/local/'.
> > Program terminated with signal 11, Segmentation fault.
> > #0  qemu_get_queue (nic=0x0) at /home/aliguori/git/qemu/net/net.c:263
> 
> 
> It's caused by the rx filter patch, sorry about not catching it.

If we don't assign 'id' for virtio-net nic device, crash[1] will occur.
Your fix is right for that.

But anthony's calltrace seems different from that.

> I've fixed it up but will send a pull request without it,
> so it can get a bit more testing.

BTW, we can use 'nc->name' to avoid the rx-filter crash[1].
I have sent a patch for mst/pci.

-- 
                        Amos.

crash [1]

#0  0x00007ffff59236b1 in __strlen_sse2_pminub () from /lib64/libc.so.6
#1  0x0000555555873a8d in qstring_from_str (str=0x0) at qobject/qstring.c:72
#2  0x0000555555876dae in parse_escape (ap=0x7ffff1c3c910, ctxt=0x7fffe4015650) 
at qobject/json-parser.c:614
#3  parse_value (ctxt=ctxt@entry=0x7fffe4015650, ap=ap@entry=0x7ffff1c3c910) at 
qobject/json-parser.c:691
#4  0x0000555555876fd2 in parse_pair (ctxt=ctxt@entry=0x7fffe4015650, 
dict=dict@entry=0x7fffe4032400, ap=ap@entry=0x7ffff1c3c910) at 
qobject/json-parser.c:393
#5  0x00005555558765fe in parse_object (ap=0x7ffff1c3c910, ctxt=0x7fffe4015650) 
at qobject/json-parser.c:454
#6  parse_value (ctxt=ctxt@entry=0x7fffe4015650, ap=ap@entry=0x7ffff1c3c910) at 
qobject/json-parser.c:686
#7  0x0000555555877193 in json_parser_parse_err (tokens=<optimized out>, 
ap=0x7ffff1c3c910, errp=errp@entry=0x0) at qobject/json-parser.c:717
#8  0x000055555587729f in json_parser_parse (tokens=<optimized out>, 
ap=<optimized out>) at qobject/json-parser.c:705
#9  0x0000555555875254 in parse_json (parser=0x7ffff1c3c8a0, tokens=<optimized 
out>) at qobject/qjson.c:34
#10 0x0000555555875d6a in json_message_process_token (lexer=0x7ffff1c3c8a8, 
token=0x7fffe4015440, type=JSON_OPERATOR, x=26, y=0) at 
qobject/json-streamer.c:87
#11 0x000055555588a7af in json_lexer_feed_char 
(lexer=lexer@entry=0x7ffff1c3c8a8, ch=125 '}', flush=flush@entry=false) at 
qobject/json-lexer.c:303
#12 0x000055555588a8f6 in json_lexer_feed (lexer=lexer@entry=0x7ffff1c3c8a8, 
buffer=buffer@entry=0x5555558d1882 "{ 'name': %s, 'path': %s }", 
size=<optimized out>)
    at qobject/json-lexer.c:356
#13 0x0000555555875f81 in json_message_parser_feed 
(parser=parser@entry=0x7ffff1c3c8a0, buffer=buffer@entry=0x5555558d1882 "{ 
'name': %s, 'path': %s }", size=<optimized out>)
    at qobject/json-streamer.c:110
#14 0x0000555555875a2d in qobject_from_jsonv (string=0x5555558d1882 "{ 'name': 
%s, 'path': %s }", ap=ap@entry=0x7ffff1c3c910) at qobject/qjson.c:44
#15 0x0000555555875b39 in qobject_from_jsonf 
(string=string@entry=0x5555558d1882 "{ 'name': %s, 'path': %s }") at 
qobject/qjson.c:66
#16 0x00005555557b5477 in rxfilter_notify (nc=nc@entry=0x5555567463e0) at 
/home/devel/qemu/hw/net/virtio-net.c:203
#17 0x00005555557b6fbe in virtio_net_handle_rx_mode (iov_cnt=<optimized out>, 
iov=0x7ffff1c44ab0, cmd=0 '\000', n=0x555556756528) at 
/home/devel/qemu/hw/net/virtio-net.c:542
#18 virtio_net_handle_ctrl (vdev=0x555556756528, vq=0x555556767850) at 
/home/devel/qemu/hw/net/virtio-net.c:755
#19 0x00005555557c7cf2 in access_with_adjusted_size (addr=addr@entry=16, 
value=value@entry=0x7ffff1c48b68, size=2, access_size_min=<optimized out>, 
    access_size_max=<optimized out>, access=access@entry=0x5555557c8310 
<memory_region_write_accessor>, opaque=opaque@entry=0x5555567563e0) at 
/home/devel/qemu/memory.c:399
#20 0x00005555557c93d7 in memory_region_iorange_write (iorange=<optimized out>, 
offset=16, width=2, data=2) at /home/devel/qemu/memory.c:475
#21 0x00005555557c6a16 in kvm_handle_io (count=1, size=2, direction=1, 
data=<optimized out>, port=49232) at /home/devel/qemu/kvm-all.c:1510
#22 kvm_cpu_exec (env=env@entry=0x5555566d6660) at 
/home/devel/qemu/kvm-all.c:1659
#23 0x00005555557706d5 in qemu_kvm_cpu_thread_fn (arg=0x5555566d6660) at 
/home/devel/qemu/cpus.c:759
#24 0x00007ffff6985d15 in start_thread () from /lib64/libpthread.so.0
#25 0x00007ffff58b548d in clone () from /lib64/libc.so.6


Reply via email to