main-loop: Disable GLOBAL_STATE_CODE() assertions
PATCH 1/1 main-loop: Disable GLOBAL_STATE_CODE() assertions
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.)
--- include/qemu/main-loop.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
include/qemu/main-loop.h +2 -1
@@ -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. */
Signature · 1 line
2.35.1
Quoted 12 lines · 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.
Quoted 4 lines
(I am just putting the link as "buglink" below, not "closes", because disabling the assertion will not fix the likely underlying bug.)
Also helps:
https://gitlab.com/qemu-project/qemu/-/issues/926
Quoted 10 lines
Signed-off-by Hanna Reitz <[email protected]>--- include/qemu/main-loop.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)include/qemu/main-loop.h +0
-0
include/qemu/main-loop.h bool qemu_in_main_thread(void); · line 279
Quoted 9 lines
include/qemu/main-loop.h +2
-1@@ -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/[email protected]/
Otherwise:
Quoted 42 lines · Philippe Mathieu-Daudé
Quoted 12 lines · 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.Quoted 4 lines
(I am just putting the link as "buglink" below, not "closes", because disabling the assertion will not fix the likely underlying bug.)
Also helps:
https://gitlab.com/qemu-project/qemu/-/issues/926Quoted 10 lines
Signed-off-by Hanna Reitz <[email protected]>---
include/qemu/main-loop.h| 3 ++-1 file changed, 2 insertions(+), 1 deletion(-)include/qemu/main-loop.h +0
-0include/qemu/main-loop.h bool qemu_in_main_thread(void); · line 278
Quoted 8 lines
include/qemu/main-loop.h +2
-1@@ -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?
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
Am 29/03/2022 um 11:35 schrieb Hanna Reitz:
Quoted 27 lines
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.)
Signed-off-by Hanna Reitz <[email protected]>--- include/qemu/main-loop.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)include/qemu/main-loop.h +0
-0
include/qemu/main-loop.h bool qemu_in_main_thread(void); · line 279
Quoted 9 lines
include/qemu/main-loop.h +2
-1@@ -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. */
Quoted 12 lines · 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.
Quoted 8 lines
(I am just putting the link as "buglink" below, not "closes", because disabling the assertion will not fix the likely underlying bug.)
Signed-off-by Hanna Reitz <[email protected]>--- include/qemu/main-loop.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Sounds reasonable to me.