Re: [Qemu-devel] [PULL for-3.0 1/1] trace/simple: fix hang in child after fork(2)

2018-07-26 Thread Stefan Hajnoczi
On Tue, Jul 24, 2018 at 03:41:01PM +0100, Daniel P. Berrangé wrote: > On Tue, Jul 24, 2018 at 03:35:51PM +0100, Daniel P. Berrangé wrote: > > On Tue, Jul 24, 2018 at 03:25:04PM +0100, Stefan Hajnoczi wrote: > > > The simple trace backend spawns a write-out thread which is used to > > >

Re: [Qemu-devel] [PULL for-3.0 1/1] trace/simple: fix hang in child after fork(2)

2018-07-24 Thread Eric Blake
On 07/24/2018 09:25 AM, Stefan Hajnoczi wrote: The simple trace backend spawns a write-out thread which is used to asynchronously flush the in-memory ring buffer to disk. fork(2) does not clone all threads, only the thread that invoked fork(2). As a result there is no write-out thread in the

Re: [Qemu-devel] [PULL for-3.0 1/1] trace/simple: fix hang in child after fork(2)

2018-07-24 Thread Daniel P . Berrangé
On Tue, Jul 24, 2018 at 03:35:51PM +0100, Daniel P. Berrangé wrote: > On Tue, Jul 24, 2018 at 03:25:04PM +0100, Stefan Hajnoczi wrote: > > The simple trace backend spawns a write-out thread which is used to > > asynchronously flush the in-memory ring buffer to disk. > > > > fork(2) does not clone

Re: [Qemu-devel] [PULL for-3.0 1/1] trace/simple: fix hang in child after fork(2)

2018-07-24 Thread Daniel P . Berrangé
On Tue, Jul 24, 2018 at 03:25:04PM +0100, Stefan Hajnoczi wrote: > The simple trace backend spawns a write-out thread which is used to > asynchronously flush the in-memory ring buffer to disk. > > fork(2) does not clone all threads, only the thread that invoked > fork(2). As a result there is no

[Qemu-devel] [PULL for-3.0 1/1] trace/simple: fix hang in child after fork(2)

2018-07-24 Thread Stefan Hajnoczi
The simple trace backend spawns a write-out thread which is used to asynchronously flush the in-memory ring buffer to disk. fork(2) does not clone all threads, only the thread that invoked fork(2). As a result there is no write-out thread in the child process! This causes a hang during shutdown