[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [PATCH] tests: Disable test-bdrv-drain
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-block] [Qemu-devel] [PATCH] tests: Disable test-bdrv-drain |
Date: |
Tue, 9 Oct 2018 13:16:16 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 |
On 08/10/2018 18:40, Kevin Wolf wrote:
>>
>> I'm pretty confident this analysis of the problem is correct:
>> unfortunately I have no idea what the right way to fix it is...
> Yes, I agree with your analysis. If __thread variables can be destructed
> before pthread_key_create() destructors are called (and in particular if
> the former are implemented in terms of the latter), this implies at
> least two rules:
>
> 1. The Notfier itself can't be a TLS variable
>
> 2. The notifier callback can't access any TLS variables
>
> Of course, with these restrictions, qemu_thread_atexit_*() with its
> existing API is as useless as it could be.
Yup, we have to stop using pthread_key_create. Luckily, these days
there is always qemu_thread_start that wraps the thread, so we can call
qemu_thread_atexit_run from there, and change exit_key to a thread-local
NotifierList.
Paolo
- Re: [Qemu-block] [Qemu-devel] [PATCH] tests: Disable test-bdrv-drain, (continued)
- Re: [Qemu-block] [Qemu-devel] [PATCH] tests: Disable test-bdrv-drain, Peter Maydell, 2018/10/05
- Re: [Qemu-block] [Qemu-devel] [PATCH] tests: Disable test-bdrv-drain, Kevin Wolf, 2018/10/05
- Re: [Qemu-block] [Qemu-devel] [PATCH] tests: Disable test-bdrv-drain, Peter Maydell, 2018/10/05
- Re: [Qemu-block] [Qemu-devel] [PATCH] tests: Disable test-bdrv-drain, Kevin Wolf, 2018/10/05
- Re: [Qemu-block] [Qemu-devel] [PATCH] tests: Disable test-bdrv-drain, Peter Maydell, 2018/10/08
- Re: [Qemu-block] [Qemu-devel] [PATCH] tests: Disable test-bdrv-drain, Peter Maydell, 2018/10/08
- Re: [Qemu-block] [Qemu-devel] [PATCH] tests: Disable test-bdrv-drain, Kevin Wolf, 2018/10/08
- Re: [Qemu-block] [Qemu-devel] [PATCH] tests: Disable test-bdrv-drain, Peter Maydell, 2018/10/08
- Re: [Qemu-block] [Qemu-devel] [PATCH] tests: Disable test-bdrv-drain, Eric Blake, 2018/10/08
- Re: [Qemu-block] [Qemu-devel] [PATCH] tests: Disable test-bdrv-drain, Kevin Wolf, 2018/10/09
- Re: [Qemu-block] [Qemu-devel] [PATCH] tests: Disable test-bdrv-drain,
Paolo Bonzini <=