All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH for-7.0] main-loop: Disable GLOBAL_STATE_CODE() assertions
@ 2022-03-29  9:35 Hanna Reitz
  2022-03-29 10:17 ` Philippe Mathieu-Daudé
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Hanna Reitz @ 2022-03-29  9:35 UTC (permalink / raw)
  To: qemu-block
  Cc: Emanuele Giuseppe Esposito, Kevin Wolf, qemu-devel, Hanna Reitz,
	Stefan Hajnoczi, Paolo Bonzini

These assertions are very useful for developers to find bugs, and so
they have indeed pointed us towards bugs already.  For users, it is not
so useful to find these bugs.  We should probably not enable them in
releases until we are sufficiently certain that they will not fire
during normal operation, unless something is going seriously wrong.

For example, we have received a bug report that you cannot add an NBD
server on a BDS in an I/O thread with `-incoming defer`.  I am sure this
is a real bug that needs investigation, but we do not really have that
time right now, so close to release, and so I would rather disable the
assertions to get time to investigate such reports.

(I am just putting the link as "buglink" below, not "closes", because
disabling the assertion will not fix the likely underlying bug.)

Buglink: https://gitlab.com/qemu-project/qemu/-/issues/945
Signed-off-by: Hanna Reitz <hreitz@redhat.com>
---
 include/qemu/main-loop.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/qemu/main-loop.h b/include/qemu/main-loop.h
index 7a4d6a0920..3bf8aeb3cd 100644
--- a/include/qemu/main-loop.h
+++ b/include/qemu/main-loop.h
@@ -272,7 +272,8 @@ bool qemu_in_main_thread(void);
 /* Mark and check that the function is part of the global state API. */
 #define GLOBAL_STATE_CODE()                                         \
     do {                                                            \
-        assert(qemu_in_main_thread());                              \
+        /* FIXME: Re-enable after 7.0 release */                    \
+        /* assert(qemu_in_main_thread()); */                        \
     } while (0)
 
 /* Mark and check that the function is part of the I/O API. */
-- 
2.35.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH for-7.0] main-loop: Disable GLOBAL_STATE_CODE() assertions
  2022-03-29  9:35 [PATCH for-7.0] main-loop: Disable GLOBAL_STATE_CODE() assertions Hanna Reitz
@ 2022-03-29 10:17 ` Philippe Mathieu-Daudé
  2022-03-29 10:38   ` Hanna Reitz
  2022-03-29 12:33 ` Emanuele Giuseppe Esposito
  2022-03-29 15:03 ` Stefan Hajnoczi
  2 siblings, 1 reply; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-03-29 10:17 UTC (permalink / raw)
  To: Hanna Reitz, qemu-block
  Cc: Emanuele Giuseppe Esposito, Kevin Wolf, Stefan Hajnoczi,
	Peter Maydell, qemu-devel, Akihiko Odaki, Paolo Bonzini

On 29/3/22 11:35, Hanna Reitz wrote:
> These assertions are very useful for developers to find bugs, and so
> they have indeed pointed us towards bugs already.  For users, it is not
> so useful to find these bugs.  We should probably not enable them in
> releases until we are sufficiently certain that they will not fire
> during normal operation, unless something is going seriously wrong.
> 
> For example, we have received a bug report that you cannot add an NBD
> server on a BDS in an I/O thread with `-incoming defer`.  I am sure this
> is a real bug that needs investigation, but we do not really have that
> time right now, so close to release, and so I would rather disable the
> assertions to get time to investigate such reports.
> 
> (I am just putting the link as "buglink" below, not "closes", because
> disabling the assertion will not fix the likely underlying bug.)
> 
> Buglink: https://gitlab.com/qemu-project/qemu/-/issues/945

Also helps:
https://gitlab.com/qemu-project/qemu/-/issues/926

> Signed-off-by: Hanna Reitz <hreitz@redhat.com>
> ---
>   include/qemu/main-loop.h | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/include/qemu/main-loop.h b/include/qemu/main-loop.h
> index 7a4d6a0920..3bf8aeb3cd 100644
> --- a/include/qemu/main-loop.h
> +++ b/include/qemu/main-loop.h
> @@ -272,7 +272,8 @@ bool qemu_in_main_thread(void);
>   /* Mark and check that the function is part of the global state API. */
>   #define GLOBAL_STATE_CODE()                                         \
>       do {                                                            \
> -        assert(qemu_in_main_thread());                              \
> +        /* FIXME: Re-enable after 7.0 release */                    \
> +        /* assert(qemu_in_main_thread()); */                        \
>       } while (0)
>   
>   /* Mark and check that the function is part of the I/O API. */

Do you want me to cancel/repost my PR without this patch?

https://lore.kernel.org/qemu-devel/20220328224012.32737-3-philippe.mathieu.daude@gmail.com/

Otherwise:
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH for-7.0] main-loop: Disable GLOBAL_STATE_CODE() assertions
  2022-03-29 10:17 ` Philippe Mathieu-Daudé
@ 2022-03-29 10:38   ` Hanna Reitz
  0 siblings, 0 replies; 5+ messages in thread
From: Hanna Reitz @ 2022-03-29 10:38 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-block
  Cc: Emanuele Giuseppe Esposito, Kevin Wolf, Stefan Hajnoczi,
	Peter Maydell, qemu-devel, Akihiko Odaki, Paolo Bonzini

On 29.03.22 12:17, Philippe Mathieu-Daudé wrote:
> On 29/3/22 11:35, Hanna Reitz wrote:
>> These assertions are very useful for developers to find bugs, and so
>> they have indeed pointed us towards bugs already.  For users, it is not
>> so useful to find these bugs.  We should probably not enable them in
>> releases until we are sufficiently certain that they will not fire
>> during normal operation, unless something is going seriously wrong.
>>
>> For example, we have received a bug report that you cannot add an NBD
>> server on a BDS in an I/O thread with `-incoming defer`.  I am sure this
>> is a real bug that needs investigation, but we do not really have that
>> time right now, so close to release, and so I would rather disable the
>> assertions to get time to investigate such reports.
>>
>> (I am just putting the link as "buglink" below, not "closes", because
>> disabling the assertion will not fix the likely underlying bug.)
>>
>> Buglink: https://gitlab.com/qemu-project/qemu/-/issues/945
>
> Also helps:
> https://gitlab.com/qemu-project/qemu/-/issues/926
>
>> Signed-off-by: Hanna Reitz <hreitz@redhat.com>
>> ---
>>   include/qemu/main-loop.h | 3 ++-
>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/include/qemu/main-loop.h b/include/qemu/main-loop.h
>> index 7a4d6a0920..3bf8aeb3cd 100644
>> --- a/include/qemu/main-loop.h
>> +++ b/include/qemu/main-loop.h
>> @@ -272,7 +272,8 @@ bool qemu_in_main_thread(void);
>>   /* Mark and check that the function is part of the global state 
>> API. */
>>   #define GLOBAL_STATE_CODE()                                         \
>>       do {                                                            \
>> - assert(qemu_in_main_thread());                              \
>> +        /* FIXME: Re-enable after 7.0 release */                    \
>> +        /* assert(qemu_in_main_thread()); */                        \
>>       } while (0)
>>     /* Mark and check that the function is part of the I/O API. */
>
> Do you want me to cancel/repost my PR without this patch?
>
> https://lore.kernel.org/qemu-devel/20220328224012.32737-3-philippe.mathieu.daude@gmail.com/

I think we should let Peter take your PR first, as long as the 
discussion on this is still out.  I’d like to give it a couple more 
hours, and as far as I understand, we definitely want yours.

(Taking mine will then cause me rebase conflicts and make it look weird, 
but that’s not too bad for something that’s just a temporary band-aid 
anyway.)

Hanna



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH for-7.0] main-loop: Disable GLOBAL_STATE_CODE() assertions
  2022-03-29  9:35 [PATCH for-7.0] main-loop: Disable GLOBAL_STATE_CODE() assertions Hanna Reitz
  2022-03-29 10:17 ` Philippe Mathieu-Daudé
@ 2022-03-29 12:33 ` Emanuele Giuseppe Esposito
  2022-03-29 15:03 ` Stefan Hajnoczi
  2 siblings, 0 replies; 5+ messages in thread
From: Emanuele Giuseppe Esposito @ 2022-03-29 12:33 UTC (permalink / raw)
  To: Hanna Reitz, qemu-block
  Cc: Kevin Wolf, Paolo Bonzini, qemu-devel, Stefan Hajnoczi



Am 29/03/2022 um 11:35 schrieb Hanna Reitz:
> These assertions are very useful for developers to find bugs, and so
> they have indeed pointed us towards bugs already.  For users, it is not
> so useful to find these bugs.  We should probably not enable them in
> releases until we are sufficiently certain that they will not fire
> during normal operation, unless something is going seriously wrong.
> 
> For example, we have received a bug report that you cannot add an NBD
> server on a BDS in an I/O thread with `-incoming defer`.  I am sure this
> is a real bug that needs investigation, but we do not really have that
> time right now, so close to release, and so I would rather disable the
> assertions to get time to investigate such reports.
> 
> (I am just putting the link as "buglink" below, not "closes", because
> disabling the assertion will not fix the likely underlying bug.)
> 
> Buglink: https://gitlab.com/qemu-project/qemu/-/issues/945
> Signed-off-by: Hanna Reitz <hreitz@redhat.com>
> ---
>  include/qemu/main-loop.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/include/qemu/main-loop.h b/include/qemu/main-loop.h
> index 7a4d6a0920..3bf8aeb3cd 100644
> --- a/include/qemu/main-loop.h
> +++ b/include/qemu/main-loop.h
> @@ -272,7 +272,8 @@ bool qemu_in_main_thread(void);
>  /* Mark and check that the function is part of the global state API. */
>  #define GLOBAL_STATE_CODE()                                         \
>      do {                                                            \
> -        assert(qemu_in_main_thread());                              \
> +        /* FIXME: Re-enable after 7.0 release */                    \
> +        /* assert(qemu_in_main_thread()); */                        \
>      } while (0)
>  
>  /* Mark and check that the function is part of the I/O API. */
> 

Reviewed-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH for-7.0] main-loop: Disable GLOBAL_STATE_CODE() assertions
  2022-03-29  9:35 [PATCH for-7.0] main-loop: Disable GLOBAL_STATE_CODE() assertions Hanna Reitz
  2022-03-29 10:17 ` Philippe Mathieu-Daudé
  2022-03-29 12:33 ` Emanuele Giuseppe Esposito
@ 2022-03-29 15:03 ` Stefan Hajnoczi
  2 siblings, 0 replies; 5+ messages in thread
From: Stefan Hajnoczi @ 2022-03-29 15:03 UTC (permalink / raw)
  To: Hanna Reitz
  Cc: Emanuele Giuseppe Esposito, Kevin Wolf, qemu-devel, qemu-block,
	Paolo Bonzini

[-- Attachment #1: Type: text/plain, Size: 1216 bytes --]

On Tue, Mar 29, 2022 at 11:35:45AM +0200, Hanna Reitz wrote:
> These assertions are very useful for developers to find bugs, and so
> they have indeed pointed us towards bugs already.  For users, it is not
> so useful to find these bugs.  We should probably not enable them in
> releases until we are sufficiently certain that they will not fire
> during normal operation, unless something is going seriously wrong.
> 
> For example, we have received a bug report that you cannot add an NBD
> server on a BDS in an I/O thread with `-incoming defer`.  I am sure this
> is a real bug that needs investigation, but we do not really have that
> time right now, so close to release, and so I would rather disable the
> assertions to get time to investigate such reports.
> 
> (I am just putting the link as "buglink" below, not "closes", because
> disabling the assertion will not fix the likely underlying bug.)
> 
> Buglink: https://gitlab.com/qemu-project/qemu/-/issues/945
> Signed-off-by: Hanna Reitz <hreitz@redhat.com>
> ---
>  include/qemu/main-loop.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Sounds reasonable to me.

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-03-29 15:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-29  9:35 [PATCH for-7.0] main-loop: Disable GLOBAL_STATE_CODE() assertions Hanna Reitz
2022-03-29 10:17 ` Philippe Mathieu-Daudé
2022-03-29 10:38   ` Hanna Reitz
2022-03-29 12:33 ` Emanuele Giuseppe Esposito
2022-03-29 15:03 ` Stefan Hajnoczi

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.