All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 0/3] another round of qemu-char fixes
Date: Thu, 18 Apr 2013 08:14:40 +0200	[thread overview]
Message-ID: <516F8F50.3040301@redhat.com> (raw)
In-Reply-To: <516E76A5.7020406@redhat.com>

On 04/17/13 12:17, Paolo Bonzini wrote:
> Il 17/04/2013 09:06, Gerd Hoffmann ha scritto:
>>>> cheers,
>>>>   Gerd
>> Trapped into the next issue.  Added qmp monitor to the virtual machine,
>> linked to unix socket.  Start playing with the qom-* scrips in QMP.
>> qemu hangs after the first qmp-list command (triggered by socket
>> disconnect?).
> 
> Hmm, I cannot reproduce this. 
> 
> x86_64-softmmu/qemu-system-x86_64 -qmp unix:/home/pbonzini/qmp.sock,nowait,server -vnc :1
> 
> (Tried also without nowait, with SDL or -nographic, with KVM, with an additional
> "-serial mon:stdio").
> 
> Multiple executions of "./qom-list -s /home/pbonzini/qmp.sock /machine" work,
> both with and without these three patches.

Hmm.  I'm running with a bunch of monitors actually, maybe that makes
the difference.  qemu is started via libvirt:

rincewind root ~# virsh dumpxml fedora-org-virtio
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  <name>fedora-org-virtio</name>
[ ... ]
  <qemu:commandline>
    <qemu:arg value='-readconfig'/>
    <qemu:arg value='/root/libvirt/fedora-mon.cfg'/>
[ ... ]
rincewind root ~# cat /root/libvirt/fedora-mon.cfg
[chardev "hmp"]
  backend = "socket"
  path = "/root/mon/fedora"
  server = "on"
  wait = "off"

[chardev "qmp"]
  backend = "socket"
  path = "/root/mon/fedora.qmp"
  server = "on"
  wait = "off"

[mon]
  chardev = "hmp"

[mon]
  chardev = "qmp"
  mode = "control"


Hangs here:

(gdb) thread apply all bt

Thread 6 (Thread 0x7f902919b700 (LWP 27869)):
#0  sem_timedwait () at
../nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S:106
#1  0x00007f90385307f3 in qemu_sem_timedwait (sem=0x7f903abe0978,
ms=<value optimized out>)
    at /home/kraxel/projects/qemu/util/qemu-thread-posix.c:237
#2  0x00007f90383e835e in worker_thread (opaque=0x7f903abe08e0)
    at /home/kraxel/projects/qemu/thread-pool.c:96
#3  0x00007f90366a7851 in start_thread (arg=0x7f902919b700) at
pthread_create.c:301
#4  0x00007f9030bf890d in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 5 (Thread 0x7f901cfc7700 (LWP 27870)):
#0  __lll_lock_wait () at
../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:136
#1  0x00007f90366a9388 in _L_lock_854 () from /lib64/libpthread.so.0
#2  0x00007f90366a9257 in __pthread_mutex_lock (mutex=0x7f9038d5af20) at
pthread_mutex_lock.c:61
#3  0x00007f9038530c99 in qemu_mutex_lock (mutex=<value optimized out>)
    at /home/kraxel/projects/qemu/util/qemu-thread-posix.c:57
#4  0x00007f9038476f95 in kvm_cpu_exec (env=0x7f903fe6f680)
    at /home/kraxel/projects/qemu/kvm-all.c:1558
#5  0x00007f9038420b41 in qemu_kvm_cpu_thread_fn (arg=0x7f903fe6f680)
    at /home/kraxel/projects/qemu/cpus.c:759
#6  0x00007f90366a7851 in start_thread (arg=0x7f901cfc7700) at
pthread_create.c:301
#7  0x00007f9030bf890d in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 4 (Thread 0x7f9017fff700 (LWP 27871)):
#0  0x00007f9030bf0a47 in ioctl () at ../sysdeps/unix/syscall-template.S:82
#1  0x00007f9038474969 in kvm_vcpu_ioctl (cpu=<value optimized out>,
type=<value optimized out>)
    at /home/kraxel/projects/qemu/kvm-all.c:1667
#2  0x00007f9038476f8d in kvm_cpu_exec (env=0x7f903fea1090)
    at /home/kraxel/projects/qemu/kvm-all.c:1556
#3  0x00007f9038420b41 in qemu_kvm_cpu_thread_fn (arg=0x7f903fea1090)
    at /home/kraxel/projects/qemu/cpus.c:759
#4  0x00007f90366a7851 in start_thread (arg=0x7f9017fff700) at
pthread_create.c:301
#5  0x00007f9030bf890d in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 3 (Thread 0x7f90161ff700 (LWP 27881)):
#0  0x00007f9030bef253 in __poll (fds=<value optimized out>, nfds=<value
optimized out>,
    timeout=<value optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007f9031815eac in red_worker_main (arg=<value optimized out>) at
red_worker.c:11871
#2  0x00007f90366a7851 in start_thread (arg=0x7f90161ff700) at
pthread_create.c:301
#3  0x00007f9030bf890d in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 2 (Thread 0x7f8f4bfff700 (LWP 27882)):
#0  0x00007f9030bef253 in __poll (fds=<value optimized out>, nfds=<value
optimized out>,
    timeout=<value optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007f9031815eac in red_worker_main (arg=<value optimized out>) at
red_worker.c:11871
#2  0x00007f90366a7851 in start_thread (arg=0x7f8f4bfff700) at
pthread_create.c:301
#3  0x00007f9030bf890d in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 1 (Thread 0x7f9038188980 (LWP 27849)):
---Type <return> to continue, or q <return> to quit---
#0  __lll_lock_wait () at
../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:136
#1  0x00007f90366a9388 in _L_lock_854 () from /lib64/libpthread.so.0
#2  0x00007f90366a9257 in __pthread_mutex_lock (mutex=0x7f903abb1538) at
pthread_mutex_lock.c:61
#3  0x00007f9037903c37 in ?? () from /lib64/libglib-2.0.so.0
#4  0x00007f90383c5d96 in io_watch_poll_finalize (source=<value
optimized out>)
    at /home/kraxel/projects/qemu/qemu-char.c:648
#5  0x00007f903790382a in ?? () from /lib64/libglib-2.0.so.0
#6  0x00007f9037903b85 in ?? () from /lib64/libglib-2.0.so.0
#7  0x00007f903790616e in g_source_remove () from /lib64/libglib-2.0.so.0
#8  0x00007f90383c6645 in tcp_chr_read (chan=<value optimized out>,
cond=<value optimized out>,
    opaque=0x7f903abb2fd0) at /home/kraxel/projects/qemu/qemu-char.c:2523
#9  0x00007f9037903f0e in g_main_context_dispatch () from
/lib64/libglib-2.0.so.0
#10 0x00007f903839ee09 in glib_pollfds_poll (nonblocking=<value
optimized out>)
    at /home/kraxel/projects/qemu/main-loop.c:187
#11 os_host_main_loop_wait (nonblocking=<value optimized out>)
    at /home/kraxel/projects/qemu/main-loop.c:232
#12 main_loop_wait (nonblocking=<value optimized out>)
    at /home/kraxel/projects/qemu/main-loop.c:468
#13 0x00007f90384168e5 in main_loop (argc=<value optimized out>,
argv=<value optimized out>,
    envp=<value optimized out>) at /home/kraxel/projects/qemu/vl.c:1990
#14 main (argc=<value optimized out>, argv=<value optimized out>,
envp=<value optimized out>)
    at /home/kraxel/projects/qemu/vl.c:4379

  reply	other threads:[~2013-04-18  6:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-16 11:10 [Qemu-devel] [PATCH 0/3] another round of qemu-char fixes Paolo Bonzini
2013-04-16 11:10 ` [Qemu-devel] [PATCH 1/3] qemu-char: use consistent idiom for removing sources Paolo Bonzini
2013-04-16 11:10 ` [Qemu-devel] [PATCH 2/3] qemu-char: simplify pty polling Paolo Bonzini
2013-04-16 11:10 ` [Qemu-devel] [PATCH 3/3] qemu-char: correct return value from chr_read functions Paolo Bonzini
2013-04-16 11:22 ` [Qemu-devel] [PATCH 0/3] another round of qemu-char fixes Gerd Hoffmann
2013-04-17  7:06   ` Gerd Hoffmann
2013-04-17  9:28     ` Paolo Bonzini
2013-04-17 10:17     ` Paolo Bonzini
2013-04-18  6:14       ` Gerd Hoffmann [this message]
2013-04-18 12:38         ` Paolo Bonzini
2013-04-18 12:54           ` Gerd Hoffmann
2013-04-18 13:11           ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=516F8F50.3040301@redhat.com \
    --to=kraxel@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.