[Qemu-devel] Segfaults in chardev due to races

2018-12-21 Thread Max Reitz
Hi, While fixing iotest 147 (which currently cannot be run in parallel), I've noticed that after it's fixed (and does run in parallel), I see some segfaults in chardev/char-socket.c. They usually look like this: #0 0x556f3b5765d0 in object_get_class (obj=obj@entry=0x0) at qom/object.c:822 #

Re: [Qemu-devel] Segfaults in chardev due to races

2018-12-22 Thread Paolo Bonzini
On 21/12/18 23:31, Max Reitz wrote: > I suppose the issue is that QMP events are sent by one thread, and > client disconnects are handled by a different one. So if a QMP event is > sent while a client disconnects concurrently, races may occur; and the > only protection against concurrent access ap

Re: [Qemu-devel] Segfaults in chardev due to races

2019-02-06 Thread Marc-André Lureau
Hi On Wed, Jan 23, 2019 at 4:39 PM Max Reitz wrote: > > On 22.12.18 10:17, Paolo Bonzini wrote: > > On 21/12/18 23:31, Max Reitz wrote: > >> I suppose the issue is that QMP events are sent by one thread, and > >> client disconnects are handled by a different one. So if a QMP event is > >> sent w

Re: [Qemu-devel] Segfaults in chardev due to races

2019-02-10 Thread Peter Xu
On Wed, Feb 06, 2019 at 07:38:18PM +0100, Marc-André Lureau wrote: > Hi > > On Wed, Jan 23, 2019 at 4:39 PM Max Reitz wrote: > > > > On 22.12.18 10:17, Paolo Bonzini wrote: > > > On 21/12/18 23:31, Max Reitz wrote: > > >> I suppose the issue is that QMP events are sent by one thread, and > > >> c

Re: [Qemu-devel] Segfaults in chardev due to races

2019-01-23 Thread Max Reitz
On 22.12.18 10:17, Paolo Bonzini wrote: > On 21/12/18 23:31, Max Reitz wrote: >> I suppose the issue is that QMP events are sent by one thread, and >> client disconnects are handled by a different one. So if a QMP event is >> sent while a client disconnects concurrently, races may occur; and the >