acceptance-system-fedora failures
I'm seeing this gitlab test fail quite often in my Python work; I don't *think* this has anything to do with my patches, but maybe I need to try and bisect this more aggressively.
The very first hint of an error I see is on line 154:
https://gitlab.com/jsnow/qemu/-/jobs/776334918#L154
22:05:36 ERROR|
22:05:36 ERROR| Reproduced traceback from: /builds/jsnow/qemu/build/tests/venv/lib64/python3.8/site-packages/avocado/core/test.py:753
22:05:36 ERROR| Traceback (most recent call last):
22:05:36 ERROR| File "/builds/jsnow/qemu/build/tests/acceptance/avocado_qemu/__init__.py", line 171, in setUp
22:05:36 ERROR| self.cancel("No QEMU binary defined or found in the build tree")Is this a known problem?
--js
Quoted 12 lines · John Snow
I'm seeing this gitlab test fail quite often in my Python work; I don't *think* this has anything to do with my patches, but maybe I need to try and bisect this more aggressively.
The very first hint of an error I see is on line 154:
https://gitlab.com/jsnow/qemu/-/jobs/776334918#L154
22:05:36 ERROR|
22:05:36 ERROR| Reproduced traceback from:
/builds/jsnow/qemu/build/tests/venv/lib64/python3.8/site-packages/avocado/core/test.py:753
Quoted 6 lines
22:05:36 ERROR| Traceback (most recent call last):
22:05:36 ERROR| File "/builds/jsnow/qemu/build/tests/acceptance/avocado_qemu/__init__.py", line 171, in setUp
22:05:36 ERROR|self.cancel("No QEMU binary defined or found in the build tree")
Last year the Avocado developers said we could have a clearer log error report, but meanwhile this verbose output is better that not having anything ¯\_(ツ)_/¯
Quoted 2 lines
Is this a known problem?
"No QEMU binary defined or found in the build tree" is not a problem, it means a test is skipped because the qemu-system-$ARCH binary is not found. In your case this is because your job (acceptance-system-fedora) is based on build-system-fedora which only build the following targets:
TARGETS: tricore-softmmu microblaze-softmmu mips-softmmu
xtensa-softmmu m68k-softmmu riscv32-softmmu ppc-softmmu sparc64-softmmu
Now I don't understand what binary the EmptyCPUModel/Migration tests are expecting. Maybe these tests only work when a single target is built? IOW not expecting that the python code searching for a binary return multiple ones? -> Eduardo/Cleber.
w.r.t. the error in your build, I told Thomas about the test_ppc_mac99/day15/invaders.elf timeouting but he said this is not his area. Richard has been looking yesterday to see if it is a TCG regression, and said the test either finished/crashed raising SIGCHLD, but Avocado parent is still waiting for a timeout, so the children become zombie and the test hang.
Not sure that helps :)
Regards,
Phil.
Quoted 42 lines · Philippe Mathieu-Daudé
Quoted 12 lines · John Snow
I'm seeing this gitlab test fail quite often in my Python work; I don't *think* this has anything to do with my patches, but maybe I need to try and bisect this more aggressively.
The very first hint of an error I see is on line 154:
https://gitlab.com/jsnow/qemu/-/jobs/776334918#L154
22:05:36 ERROR|
22:05:36 ERROR| Reproduced traceback from:
/builds/jsnow/qemu/build/tests/venv/lib64/python3.8/site-packages/avocado/core/test.py:753Quoted 6 lines
22:05:36 ERROR| Traceback (most recent call last):
22:05:36 ERROR| File "/builds/jsnow/qemu/build/tests/acceptance/avocado_qemu/__init__.py", line 171, in setUp
22:05:36 ERROR|self.cancel("No QEMU binary defined or found in the build tree")Last year the Avocado developers said we could have a clearer log error report, but meanwhile this verbose output is better that not having anything ¯\_(ツ)_/¯
Quoted 2 lines
Is this a known problem?
"No QEMU binary defined or found in the build tree" is not a problem, it means a test is skipped because the qemu-system-$ARCH binary is not found. In your case this is because your job (acceptance-system-fedora) is based on build-system-fedora which only build the following targets:
TARGETS: tricore-softmmu microblaze-softmmu mips-softmmu
xtensa-softmmu m68k-softmmu riscv32-softmmu ppc-softmmu sparc64-softmmuNow I don't understand what binary the EmptyCPUModel/Migration tests are expecting. Maybe these tests only work when a single target is built? IOW not expecting that the python code searching for a binary return multiple ones? -> Eduardo/Cleber.
Quoted 6 lines
w.r.t. the error in your build, I told Thomas about the test_ppc_mac99/day15/invaders.elf timeouting but he said this is not his area. Richard has been looking yesterday to see if it is a TCG regression, and said the test either finished/crashed raising SIGCHLD, but Avocado parent is still waiting for a timeout, so the children become zombie and the test hang.
Expected output:
Quiescing Open Firmware ...
Booting Linux via __start() @ 0x01000000 ...
But QEMU exits in replay_char_write_event_load():
Quiescing Open Firmware ...
qemu-system-ppc: Missing character write event in the replay log
$ echo $? 1
Latest events are CHECKPOINT CHECKPOINT INTERRUPT INTERRUPT INTERRUPT.
Replay file is ~22MiB. End of record using "system_powerdown + quit" in HMP.
I guess we have 2 bugs:
- replay log
- avocado doesn't catch children exit(1)
Quick reproducer:
$ make qemu-system-ppc check-venv $ tests/venv/bin/python -m \ avocado --show=app,console,replay \ run --job-timeout 300 -t machine:mac99 \ tests/acceptance/replay_kernel.py
Quoted 7 lines
Not sure that helps :)
Regards,
Phil.
Quoted 5 lines · Philippe Mathieu-Daudé
Quoted 4 lines · Philippe Mathieu-Daudé
Quoted 3 lines · John Snow
I'm seeing this gitlab test fail quite often in my Python work; I don't *think* this has anything to do with my patches, but maybe I need to try and bisect this more aggressively.
[...]
Quoted 28 lines
Quoted 6 lines
w.r.t. the error in your build, I told Thomas about the test_ppc_mac99/day15/invaders.elf timeouting but he said this is not his area. Richard has been looking yesterday to see if it is a TCG regression, and said the test either finished/crashed raising SIGCHLD, but Avocado parent is still waiting for a timeout, so the children become zombie and the test hang.
Expected output:
Quiescing Open Firmware ...
Booting Linux via__start()@0x01000000...But QEMU exits in
replay_char_write_event_load():Quiescing Open Firmware ...
qemu-system-ppc: Missing character write event in the replay log$ echo $? 1Latest events are CHECKPOINT CHECKPOINT INTERRUPT INTERRUPT INTERRUPT.
Replay file is ~22MiB. End of record using "
system_powerdown+ quit" in HMP.I guess we have 2 bugs:
- replay log
- avocado doesn't catch children exit(1)
Quoted 7 lines
Quick reproducer:
$ make qemu-system-ppc check-venv $ tests/venv/bin/python -m \ avocado --show=app,console,replay \ run --job-timeout 300 -t machine:mac99 \ tests/acceptance/replay_kernel.py
Thanks, that was helpful. ... and the winner is:
commit 55adb3c45620c31f29978f209e2a44a08d34e2da
Author: John Snow <[email protected]>
Date: Fri Jul 24 01:23:00 2020 -0400Subject: ide: cancel pending callbacks on SRST
... starting with this commit, the tests starts failing. John, any idea what might be causing this?
Thomas
Quoted 45 lines · Thomas Huth
Quoted 5 lines · Philippe Mathieu-Daudé
Quoted 4 lines · Philippe Mathieu-Daudé
Quoted 3 lines · John Snow
I'm seeing this gitlab test fail quite often in my Python work; I don't *think* this has anything to do with my patches, but maybe I need to try and bisect this more aggressively.
[...]
Quoted 28 lines
Quoted 6 lines
w.r.t. the error in your build, I told Thomas about the test_ppc_mac99/day15/invaders.elf timeouting but he said this is not his area. Richard has been looking yesterday to see if it is a TCG regression, and said the test either finished/crashed raising SIGCHLD, but Avocado parent is still waiting for a timeout, so the children become zombie and the test hang.
Expected output:
Quiescing Open Firmware ...
Booting Linux via__start()@0x01000000...But QEMU exits in
replay_char_write_event_load():Quiescing Open Firmware ...
qemu-system-ppc: Missing character write event in the replay log$ echo $? 1Latest events are CHECKPOINT CHECKPOINT INTERRUPT INTERRUPT INTERRUPT.
Replay file is ~22MiB. End of record using "
system_powerdown+ quit" in HMP.I guess we have 2 bugs:
- replay log
- avocado doesn't catch children exit(1)Quoted 7 lines
Quick reproducer:
$ make qemu-system-ppc check-venv $ tests/venv/bin/python -m \ avocado --show=app,console,replay \ run --job-timeout 300 -t machine:mac99 \ tests/acceptance/replay_kernel.pyThanks, that was helpful. ... and the winner is:
Quoted 7 lines
commit 55adb3c45620c31f29978f209e2a44a08d34e2da Author: John Snow <[email protected]> Date: Fri Jul 24 01:23:00 2020 -0400Subject: ide: cancel pending callbacks on SRST
... starting with this commit, the tests starts failing. John, any idea what might be causing this?
This patch includes the following lines:
+ aio_bh_schedule_oneshot(qemu_get_aio_context(),
+ ide_bus_perform_srst, bus);
replay_bh_schedule_oneshot_event should be used instead of this function, because it synchronizes non-deterministic BHs.
Quoted 3 lines
Thomas
Quoted 57 lines · Pavel Dovgalyuk
Quoted 47 lines · Thomas Huth
Quoted 7 lines · Philippe Mathieu-Daudé
Quoted 6 lines · Philippe Mathieu-Daudé
Quoted 5 lines · John Snow
I'm seeing this gitlab test fail quite often in my Python work; I don't
*think* this has anything to do with my patches, but maybe I need to try
and bisect this more aggressively.[...]
Quoted 28 lines
Quoted 6 lines
w.r.t. the error in your build, I told Thomas about the test_ppc_mac99/day15/invaders.elf timeouting but he said this is not his area. Richard has been looking yesterday to see if it is a TCG regression, and said the test either finished/crashed raising SIGCHLD, but Avocado parent is still waiting for a timeout, so the children become zombie and the test hang.
Expected output:
Quiescing Open Firmware ...
Booting Linux via__start()@0x01000000...But QEMU exits in
replay_char_write_event_load():Quiescing Open Firmware ...
qemu-system-ppc: Missing character write event in the replay log$ echo $? 1Latest events are CHECKPOINT CHECKPOINT INTERRUPT INTERRUPT INTERRUPT.
Replay file is ~22MiB. End of record using "
system_powerdown+ quit" in HMP.I guess we have 2 bugs:
- replay log
- avocado doesn't catch children exit(1)Quoted 7 lines
Quick reproducer:
$ make qemu-system-ppc check-venv $ tests/venv/bin/python -m \ avocado --show=app,console,replay \ run --job-timeout 300 -t machine:mac99 \ tests/acceptance/replay_kernel.pyThanks, that was helpful. ... and the winner is:
Quoted 8 lines
commit
55adb3c45620c31f29978f209e2a44a08d34e2daAuthor: John Snow <[email protected]> Date: Fri Jul 24 01:23:00 2020 -0400
Subject: ide: cancel pending callbacks on SRST... starting with this commit, the tests starts failing. John, any idea what
might be causing this?
Quoted 7 lines
This patch includes the following lines:
+ aio_bh_schedule_oneshot(qemu_get_aio_context(), +
ide_bus_perform_srst, bus);
replay_bh_schedule_oneshot_eventshould be used instead of this function, because it synchronizes non-deterministic BHs.
Why do we have 2 different functions? BH are already complex enough, and we need to also think about the replay API...
What about the other cases such vhost-user (blk/net), virtio-blk?
Quoted 6 lines
Quoted 5 lines
Thomas
Quoted 63 lines · Philippe Mathieu-Daudé
Quoted 62 lines · Pavel Dovgalyuk
Quoted 47 lines · Thomas Huth
Quoted 7 lines · Philippe Mathieu-Daudé
Quoted 6 lines · Philippe Mathieu-Daudé
Quoted 5 lines · John Snow
I'm seeing this gitlab test fail quite often in my Python work; I don't
*think* this has anything to do with my patches, but maybe I need to try
and bisect this more aggressively.[...]
Quoted 28 lines
Quoted 6 lines
w.r.t. the error in your build, I told Thomas about the test_ppc_mac99/day15/invaders.elf timeouting but he said this is not his area. Richard has been looking yesterday to see if it is a TCG regression, and said the test either finished/crashed raising SIGCHLD, but Avocado parent is still waiting for a timeout, so the children become zombie and the test hang.
Expected output:
Quiescing Open Firmware ...
Booting Linux via__start()@0x01000000...But QEMU exits in
replay_char_write_event_load():Quiescing Open Firmware ...
qemu-system-ppc: Missing character write event in the replay log$ echo $? 1Latest events are CHECKPOINT CHECKPOINT INTERRUPT INTERRUPT INTERRUPT.
Replay file is ~22MiB. End of record using "
system_powerdown+ quit" in HMP.I guess we have 2 bugs:
- replay log
- avocado doesn't catch children exit(1)Quoted 7 lines
Quick reproducer:
$ make qemu-system-ppc check-venv $ tests/venv/bin/python -m \ avocado --show=app,console,replay \ run --job-timeout 300 -t machine:mac99 \ tests/acceptance/replay_kernel.pyThanks, that was helpful. ... and the winner is:
Quoted 8 lines
commit 55adb3c45620c31f29978f209e2a44a08d34e2da Author: John Snow <[email protected]> Date: Fri Jul 24 01:23:00 2020 -0400Subject: ide: cancel pending callbacks on SRST
... starting with this commit, the tests starts failing. John, any idea what
might be causing this?This patch includes the following lines:
(quoted diff) +2
-0+ aio_bh_schedule_oneshot(qemu_get_aio_context(), + ide_bus_perform_srst, bus);
Quoted 7 lines
Quoted 2 lines
replay_bh_schedule_oneshot_eventshould be used instead of this function, because it synchronizes non-deterministic BHs.Why do we have 2 different functions? BH are already complex enough, and we need to also think about the replay API...
What about the other cases such vhost-user (blk/net), virtio-blk?
This does seem like something that should be wrapped up inside aio_bh_schedule_oneshot itself or maybe we need a aio_bh_schedule_transaction_oneshot to distinguish it from the other uses the function has.
Signature · 1 line
Alex Bennée
Quoted 28 lines · Alex Bennée
Quoted 25 lines · Philippe Mathieu-Daudé
Quoted 18 lines · Pavel Dovgalyuk
Quoted 11 lines · Thomas Huth
On 07/10/2020 09.13, Philippe Mathieu-Daudé wrote:
Thanks, that was helpful. ... and the winner is:commit 55adb3c45620c31f29978f209e2a44a08d34e2da Author: John Snow <[email protected]> Date: Fri Jul 24 01:23:00 2020 -0400Subject: ide: cancel pending callbacks on SRST
... starting with this commit, the tests starts failing. John, any idea what
might be causing this?This patch includes the following lines:
(quoted diff) +2
-0+ aio_bh_schedule_oneshot(qemu_get_aio_context(), + ide_bus_perform_srst, bus);Quoted 2 lines
replay_bh_schedule_oneshot_eventshould be used instead of this function, because it synchronizes non-deterministic BHs.Why do we have 2 different functions? BH are already complex enough, and we need to also think about the replay API...
Quoted 7 lines
Quoted 1 line
What about the other cases such vhost-user (blk/net), virtio-blk?
This does seem like something that should be wrapped up inside
aio_bh_schedule_oneshotitself or maybe we need aaio_bh_schedule_transaction_oneshotto distinguish it from the other uses the function has.
Maybe there should be two functions:
- one for the guest modification
- one for internal qemu things
The first one may be implemented though the rr+second one.
Maybe replay_ prefix is confusing and the whole BH interface should look like that?
Pavel Dovgalyuk
Quoted 31 lines · Pavel Dovgalyuk
Quoted 30 lines · Alex Bennée
Quoted 26 lines · Philippe Mathieu-Daudé
Quoted 13 lines · Pavel Dovgalyuk
Quoted 11 lines · Thomas Huth
On 07/10/2020 09.13, Philippe Mathieu-Daudé wrote:
Thanks, that was helpful. ... and the winner is:commit
55adb3c45620c31f29978f209e2a44a08d34e2daAuthor: John Snow <[email protected]> Date: Fri Jul 24 01:23:00 2020 -0400
Subject: ide: cancel pending callbacks on SRST... starting with this commit, the tests starts failing. John, any idea what
might be causing this?Quoted 7 lines
This patch includes the following lines:
+ aio_bh_schedule_oneshot(qemu_get_aio_context(), +
ide_bus_perform_srst, bus);
replay_bh_schedule_oneshot_eventshould be used instead of this function, because it synchronizes non-deterministic BHs.Why do we have 2 different functions? BH are already complex enough, and we need to also think about the replay API...
What about the other cases such vhost-user (blk/net), virtio-blk?
Quoted 8 lines
Quoted 5 lines
This does seem like something that should be wrapped up inside
aio_bh_schedule_oneshotitself or maybe we need aaio_bh_schedule_transaction_oneshotto distinguish it from the other uses the function has.Maybe there should be two functions:
- one for the guest modification
aio_bh_schedule_oneshot_deterministic()?
Quoted 1 line
- one for internal qemu things
Not sure why there is a difference, BH are used to avoid delaying the guest, so there always something related to "guest modification".
Quoted 4 lines
The first one may be implemented though the rr+second one. Maybe
replay_prefix is confusing and the whole BH interface should look like that?
Yes, but it would be safer/clearer if we don't need to use a replay_ API.
Can we embed these functions?
- replay_bh_schedule_event
- replay_bh_schedule_oneshot_event
If compiled without rr, events_enabled=false and
compiler can optimize:
-- >8 --
util/async.c +0 -0
@@ -109,14 +109,19 @@ static QEMUBH *aio_bh_dequeue(BHList *head,
unsigned *flags)
void aio_bh_schedule_oneshot(AioContext *ctx, QEMUBHFunc *cb, void *opaque) {
- QEMUBH *bh;
- bh = g_new(QEMUBH, 1);
- *bh = (QEMUBH){
- .ctx = ctx,
- .cb = cb,
- .opaque = opaque,
- };
- aio_bh_enqueue(bh, BH_SCHEDULED | BH_ONESHOT);
+ if (events_enabled) {
+ replay_add_event(REPLAY_ASYNC_EVENT_BH_ONESHOT, cb,
+ opaque, replay_get_current_icount());
+ } else {
+ QEMUBH *bh;
+ bh = g_new(QEMUBH, 1);
+ *bh = (QEMUBH){
+ .ctx = ctx,
+ .cb = cb,
+ .opaque = opaque,+ };
+ aio_bh_enqueue(bh, BH_SCHEDULED | BH_ONESHOT);
+ }
}
QEMUBH *aio_bh_new(AioContext *ctx, QEMUBHFunc *cb, void *opaque)
@@ -178,7 +183,12 @@ void qemu_bh_schedule_idle(QEMUBH *bh)
void qemu_bh_schedule(QEMUBH *bh)
{
- aio_bh_enqueue(bh, BH_SCHEDULED);
+ if (events_enabled) {
+ replay_add_event(REPLAY_ASYNC_EVENT_BH, bh, NULL,
+ replay_get_current_icount());
+ } else {
+ aio_bh_enqueue(bh, BH_SCHEDULED);
+ }
}
---
Quoted 4 lines
Pavel Dovgalyuk
Quoted 41 lines · Philippe Mathieu-Daudé
Quoted 31 lines · Pavel Dovgalyuk
Quoted 30 lines · Alex Bennée
Quoted 26 lines · Philippe Mathieu-Daudé
Quoted 13 lines · Pavel Dovgalyuk
Quoted 11 lines · Thomas Huth
On 07/10/2020 09.13, Philippe Mathieu-Daudé wrote:
Thanks, that was helpful. ... and the winner is:commit
55adb3c45620c31f29978f209e2a44a08d34e2daAuthor: John Snow <[email protected]> Date: Fri Jul 24 01:23:00 2020 -0400
Subject: ide: cancel pending callbacks on SRST... starting with this commit, the tests starts failing. John, any idea what
might be causing this?Quoted 7 lines
This patch includes the following lines:
+ aio_bh_schedule_oneshot(qemu_get_aio_context(), +
ide_bus_perform_srst, bus);
replay_bh_schedule_oneshot_eventshould be used instead of this function, because it synchronizes non-deterministic BHs.Why do we have 2 different functions? BH are already complex enough, and we need to also think about the replay API...
What about the other cases such vhost-user (blk/net), virtio-blk?
Quoted 8 lines
Quoted 5 lines
This does seem like something that should be wrapped up inside
aio_bh_schedule_oneshotitself or maybe we need aaio_bh_schedule_transaction_oneshotto distinguish it from the other uses the function has.Maybe there should be two functions:
- one for the guest modification
Quoted 7 lines
aio_bh_schedule_oneshot_deterministic()?Quoted 1 line
- one for internal qemu things
Not sure why there is a difference, BH are used to avoid delaying the guest, so there always something related to "guest modification".
Not exactly. At least there is one non-related-to-guest case in monitor_init_qmp:
/*
* We can't call qemu_chr_fe_set_handlers() directly here
* since chardev might be running in the monitor I/O
* thread. Schedule a bottom half.
*/
aio_bh_schedule_oneshot(iothread_get_aio_context(mon_iothread),
monitor_qmp_setup_handlers_bh, mon);
Quoted 52 lines
Quoted 5 lines
The first one may be implemented though the rr+second one. Maybe
replay_prefix is confusing and the whole BH interface should look like that?Yes, but it would be safer/clearer if we don't need to use a
replay_API.Can we embed these functions?
-
replay_bh_schedule_event
-replay_bh_schedule_oneshot_eventIf compiled without rr, events_enabled=false and
compiler can optimize:-- >8 --
util/async.c +13
-8@@ -109,14 +109,19 @@ static QEMUBH *aio_bh_dequeue(BHList *head, unsigned *flags)void aio_bh_schedule_oneshot (AioContext *ctx,QEMUBHFunc *cb,void *opaque) { -QEMUBH *bh; - bh =g_new (QEMUBH ,1 ); - *bh = (QEMUBH ){ - .ctx = ctx, - .cb = cb, - .opaque = opaque, - }; -aio_bh_enqueue (bh,BH_SCHEDULED |BH_ONESHOT ); +if (events_enabled) { +replay_add_event (REPLAY_ASYNC_EVENT_BH_ONESHOT , cb, + opaque,replay_get_current_icount ()); + }else { +QEMUBH *bh; + bh =g_new (QEMUBH ,1 ); + *bh = (QEMUBH ){ + .ctx = ctx, + .cb = cb, + .opaque = opaque, + }; +aio_bh_enqueue (bh,BH_SCHEDULED |BH_ONESHOT ); + } }QEMUBH *aio_bh_new(AioContext *ctx, QEMUBHFunc *cb, void *opaque)
util/async.c void qemu_bh_schedule_idle(QEMUBH *bh) · line 184
Quoted 2 lines
util/async.c +0
-0@@ -178,7 +183,12 @@ void qemu_bh_schedule_idle(QEMUBH *bh)void qemu_bh_schedule (QEMUBH *bh)
qemu_bh_schedule is even worse.
Many modules use it (e.g., loadvm_postcopy_handle_run), and there is no need to use replay version there. In such cases QEMU will halt if trying to call replay_bh_schedule_event.
Quoted 10 lines
util/async.c +6
-1{ -aio_bh_enqueue (bh,BH_SCHEDULED ); +if (events_enabled) { +replay_add_event (REPLAY_ASYNC_EVENT_BH , bh,NULL , +replay_get_current_icount ()); + }else { +aio_bh_enqueue (bh,BH_SCHEDULED ); + } }
Quoted 50 lines · Pavel Dovgalyuk
Quoted 41 lines · Philippe Mathieu-Daudé
Quoted 31 lines · Pavel Dovgalyuk
Quoted 30 lines · Alex Bennée
Quoted 26 lines · Philippe Mathieu-Daudé
Quoted 13 lines · Pavel Dovgalyuk
Quoted 11 lines · Thomas Huth
On 07/10/2020 09.13, Philippe Mathieu-Daudé wrote:
Thanks, that was helpful. ... and the winner is:commit
55adb3c45620c31f29978f209e2a44a08d34e2daAuthor: John Snow <[email protected]> Date: Fri Jul 24 01:23:00 2020 -0400
Subject: ide: cancel pending callbacks on SRST... starting with this commit, the tests starts failing. John, any idea what
might be causing this?Quoted 7 lines
This patch includes the following lines:
+ aio_bh_schedule_oneshot(qemu_get_aio_context(), +
ide_bus_perform_srst, bus);
replay_bh_schedule_oneshot_eventshould be used instead of this function, because it synchronizes non-deterministic BHs.Why do we have 2 different functions? BH are already complex enough, and we need to also think about the replay API...
What about the other cases such vhost-user (blk/net), virtio-blk?
Quoted 8 lines
Quoted 5 lines
This does seem like something that should be wrapped up inside
aio_bh_schedule_oneshotitself or maybe we need aaio_bh_schedule_transaction_oneshotto distinguish it from the other uses the function has.Maybe there should be two functions:
- one for the guest modificationQuoted 7 lines
aio_bh_schedule_oneshot_deterministic()?Quoted 1 line
- one for internal qemu things
Not sure why there is a difference, BH are used to avoid delaying the guest, so there always something related to "guest modification".
Quoted 9 lines
Not exactly. At least there is one non-related-to-guest case in
monitor_init_qmp:
/*
* We can't callqemu_chr_fe_set_handlers()directly here
* since chardev might be running in the monitor I/O
* thread. Schedule a bottom half.
*/aio_bh_schedule_oneshot(iothread_get_aio_context(mon_iothread), monitor_qmp_setup_handlers_bh, mon);
I don't understand the documentation in docs/devel/replay.txt:
---
Bottom halves
=============
Bottom half callbacks, that affect the guest state, should be invoked throughreplay_bh_schedule_event or replay_bh_schedule_oneshot_event functions. Their invocations are saved in record mode and synchronized with the existing
log in replay mode.
---
But then it is only used in block drivers, which are not related to guest state:
$ git grep replay_bh_schedule_oneshot_event block/block-backend.c:1385: replay_bh_schedule_oneshot_event(blk_get_aio_context(blk), block/block-backend.c:1450: replay_bh_schedule_oneshot_event(blk_get_aio_context(blk), block/io.c:371: replay_bh_schedule_oneshot_event(bdrv_get_aio_context(bs), block/iscsi.c:286: replay_bh_schedule_oneshot_event(iTask->iscsilun->aio_context, block/nfs.c:262: replay_bh_schedule_oneshot_event(task->client->aio_context, block/null.c:183: replay_bh_schedule_oneshot_event(bdrv_get_aio_context(bs), block/nvme.c:323: replay_bh_schedule_oneshot_event(q->aio_context, block/nvme.c:1075: replay_bh_schedule_oneshot_event(data->ctx, nvme_rw_cb_bh, data); block/rbd.c:865: replay_bh_schedule_oneshot_event(bdrv_get_aio_context(acb->common.bs), docs/devel/replay.txt:25:replay_bh_schedule_event or replay_bh_schedule_oneshot_event functions. include/sysemu/replay.h:178:void replay_bh_schedule_oneshot_event(AioContext *ctx, replay/replay-events.c:141:void replay_bh_schedule_oneshot_event(AioContext *ctx, stubs/replay-user.c:5:void replay_bh_schedule_oneshot_event(AioContext *ctx,
Is replay_bh_schedule_oneshot_event ever used by replay? Maybe we can remove it and use aio_bh_schedule_oneshot() in place?
Else the documentation need to be clarified please.
Quoted 74 lines
Quoted 55 lines
Quoted 7 lines
The first one may be implemented though the rr+second one. Maybe
replay_prefix is confusing and the whole BH interface should look like that?Yes, but it would be safer/clearer if we don't need to use a
replay_API.Can we embed these functions?
-
replay_bh_schedule_event
-replay_bh_schedule_oneshot_eventIf compiled without rr, events_enabled=false and
compiler can optimize:-- >8 --
util/async.c +0
-0@@ -109,14 +109,19 @@ static QEMUBH *aio_bh_dequeue(BHList *head, unsigned *flags)void
aio_bh_schedule_oneshot(AioContext *ctx, QEMUBHFunc *cb, void *opaque)
{
- QEMUBH *bh;
- bh =g_new(QEMUBH, 1);
- *bh = (QEMUBH){
- .ctx = ctx,
- .cb = cb,
- .opaque = opaque,
- };
-aio_bh_enqueue(bh, BH_SCHEDULED | BH_ONESHOT);
+ if (events_enabled) {
+ replay_add_event(REPLAY_ASYNC_EVENT_BH_ONESHOT, cb, + opaque,replay_get_current_icount()); + } else {
+ QEMUBH *bh;
+ bh =g_new(QEMUBH, 1);
+ *bh = (QEMUBH){
+ .ctx = ctx,
+ .cb = cb,
+ .opaque = opaque,
+ };
+aio_bh_enqueue(bh, BH_SCHEDULED | BH_ONESHOT);
+ }
}QEMUBH *aio_bh_new(AioContext *ctx, QEMUBHFunc *cb, void *opaque)
util/async.c void qemu_bh_schedule_idle(QEMUBH *bh) · line 184
Quoted 2 lines
util/async.c +0
-0@@ -178,7 +183,12 @@ void qemu_bh_schedule_idle(QEMUBH *bh) void qemu_bh_schedule(QEMUBH *bh)
qemu_bh_scheduleis even worse.
Many modules use it (e.g.,loadvm_postcopy_handle_run), and there is no need to use replay version there. In such cases QEMU will halt if trying to callreplay_bh_schedule_event.Quoted 10 lines
util/async.c +6
-1{ - aio_bh_enqueue(bh, BH_SCHEDULED); + if (events_enabled) { + replay_add_event(REPLAY_ASYNC_EVENT_BH, bh, NULL, + replay_get_current_icount()); + } else { + aio_bh_enqueue(bh, BH_SCHEDULED); + } }
Am 08.10.2020 um 12:26 hat Philippe Mathieu-Daudé geschrieben:
Quoted 75 lines · Pavel Dovgalyuk
Quoted 50 lines · Philippe Mathieu-Daudé
Quoted 41 lines · Pavel Dovgalyuk
Quoted 31 lines · Alex Bennée
Quoted 30 lines
Quoted 26 lines · Philippe Mathieu-Daudé
Quoted 13 lines · Pavel Dovgalyuk
Quoted 11 lines · Thomas Huth
On 07/10/2020 09.13, Philippe Mathieu-Daudé wrote:
Thanks, that was helpful. ... and the winner is:      commit Â
55adb3c45620c31f29978f209e2a44a08d34e2da      Author: John Snow <[email protected]>
      Date:   Fri Jul 24 01:23:00 2020 -0400       Subject: ide: cancel pending callbacks on SRST... starting with this commit, the tests starts failing. John, any idea what
might be causing this?Quoted 7 lines
This patch includes the following lines:
+Â Â Â Â Â Â Â aio_bh_schedule_oneshot(qemu_get_aio_context(),
+Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Âide_bus_perform_srst, bus);
replay_bh_schedule_oneshot_eventshould be used instead of this function, because it synchronizes non-deterministic BHs.Why do we have 2 different functions? BH are already complex enough, and we need to also think about the replay API...
What about the other cases such vhost-user (blk/net), virtio-blk?
Quoted 8 lines
Quoted 5 lines
This does seem like something that should be wrapped up inside
aio_bh_schedule_oneshotitself or maybe we need aaio_bh_schedule_transaction_oneshotto distinguish it from the other uses the function has.Maybe there should be two functions:
- one for the guest modificationQuoted 7 lines
aio_bh_schedule_oneshot_deterministic()?Quoted 1 line
- one for internal qemu things
Not sure why there is a difference, BH are used to avoid delaying the guest, so there always something related to "guest modification".
Quoted 9 lines
Not exactly. At least there is one non-related-to-guest case
inmonitor_init_qmp:
       /*
        * We can't callqemu_chr_fe_set_handlers()directly here
        * since chardev might be running in the monitor I/O
        * thread. Schedule a bottom half.
        */
       aio_bh_schedule_oneshot(iothread_get_aio_context(mon_iothread),
                              Âmonitor_qmp_setup_handlers_bh, mon);I don't understand the documentation in
docs/devel/replay.txt:---
Bottom halves
=============Bottom half callbacks, that affect the guest state, should be invoked through
replay_bh_schedule_eventorreplay_bh_schedule_oneshot_eventfunctions. Their invocations are saved in record mode and synchronized with the existing
log in replay mode.
---
Quoted 2 lines
But then it is only used in block drivers, which are not related to guest state:
Pavel can tell you the details, but I think the idea was that you need to use this function not when the code calling it modifies guest state, but when the BH implementation can do so.
In the case of generic callbacks like provided by the blk_aio_*() functions, we don't know whether this is the case, but it's generally device emulation code, so chances are relatively high that they do.
I seem to remember that when reviewing the code that introduced replay_bh_schedule_event(), I was relatively sure that we didn't catch all necessary instances, but since it worked for Pavel and I didn't feel like getting too involved with replay code, we just merged it anyway.
As I said, the details are a question for Pavel.
Kevin
Quoted 108 lines
$ git grep replay_bh_schedule_oneshot_event block/block-backend.c:1385: replay_bh_schedule_oneshot_event(blk_get_aio_context(blk), block/block-backend.c:1450: replay_bh_schedule_oneshot_event(blk_get_aio_context(blk), block/io.c:371: replay_bh_schedule_oneshot_event(bdrv_get_aio_context(bs), block/iscsi.c:286: replay_bh_schedule_oneshot_event(iTask->iscsilun->aio_context, block/nfs.c:262: replay_bh_schedule_oneshot_event(task->client->aio_context, block/null.c:183: replay_bh_schedule_oneshot_event(bdrv_get_aio_context(bs), block/nvme.c:323: replay_bh_schedule_oneshot_event(q->aio_context, block/nvme.c:1075: replay_bh_schedule_oneshot_event(data->ctx, nvme_rw_cb_bh, data); block/rbd.c:865: replay_bh_schedule_oneshot_event(bdrv_get_aio_context(acb->common.bs), docs/devel/replay.txt:25:replay_bh_schedule_event or replay_bh_schedule_oneshot_event functions. include/sysemu/replay.h:178:void replay_bh_schedule_oneshot_event(AioContext *ctx, replay/replay-events.c:141:void replay_bh_schedule_oneshot_event(AioContext *ctx, stubs/replay-user.c:5:void replay_bh_schedule_oneshot_event(AioContext *ctx,Is
replay_bh_schedule_oneshot_eventever used by replay? Maybe we can remove it and useaio_bh_schedule_oneshot()in place?Else the documentation need to be clarified please.
Quoted 74 lines
Quoted 55 lines
Quoted 7 lines
The first one may be implemented though the rr+second one. Maybe
replay_prefix is confusing and the whole BH interface should look like that?Yes, but it would be safer/clearer if we don't need to use a
replay_API.Can we embed these functions?
-
replay_bh_schedule_event
-replay_bh_schedule_oneshot_eventIf compiled without rr, events_enabled=false and
compiler can optimize:-- >8 --
util/async.c +0
-0@@ -109,14 +109,19 @@ static QEMUBH *aio_bh_dequeue(BHList *head, unsigned *flags)Â void
aio_bh_schedule_oneshot(AioContext *ctx, QEMUBHFunc *cb, void *opaque)
 {
-Â Â Â QEMUBH *bh;
-Â Â Â bh =g_new(QEMUBH, 1);
-Â Â Â *bh = (QEMUBH){
-Â Â Â Â Â Â Â .ctx = ctx,
-Â Â Â Â Â Â Â .cb = cb,
-Â Â Â Â Â Â Â .opaque = opaque,
-Â Â Â };
-Â Â Âaio_bh_enqueue(bh, BH_SCHEDULED | BH_ONESHOT);
+Â Â Â if (events_enabled) {
+Â Â Â Â Â Â Â replay_add_event(REPLAY_ASYNC_EVENT_BH_ONESHOT, cb,
+Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â opaque,replay_get_current_icount()); +Â Â Â } else {
+Â Â Â Â Â Â Â QEMUBH *bh;
+Â Â Â Â Â Â Â bh =g_new(QEMUBH, 1);
+Â Â Â Â Â Â Â *bh = (QEMUBH){
+Â Â Â Â Â Â Â Â Â Â Â .ctx = ctx,
+Â Â Â Â Â Â Â Â Â Â Â .cb = cb,
+Â Â Â Â Â Â Â Â Â Â Â .opaque = opaque,
+Â Â Â Â Â Â Â };
+Â Â Â Â Â Â Âaio_bh_enqueue(bh, BH_SCHEDULED | BH_ONESHOT);
+Â Â Â }
 } QEMUBH *aio_bh_new(AioContext *ctx, QEMUBHFunc *cb, void *opaque)
util/async.c void qemu_bh_schedule_idle(QEMUBH *bh) · line 184
Quoted 2 lines
util/async.c +0
-0@@ -178,7 +183,12 @@ void qemu_bh_schedule_idle(QEMUBH *bh) Â void qemu_bh_schedule(QEMUBH *bh)
qemu_bh_scheduleis even worse.
Many modules use it (e.g.,loadvm_postcopy_handle_run), and there is no need to use replay version there. In such cases QEMU will halt if trying to callreplay_bh_schedule_event.Quoted 10 lines
util/async.c +6
-1Â { -Â Â Â aio_bh_enqueue(bh, BH_SCHEDULED); +Â Â Â if (events_enabled) { +Â Â Â Â Â Â Â replay_add_event(REPLAY_ASYNC_EVENT_BH, bh, NULL, +Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â replay_get_current_icount()); +Â Â Â } else { +Â Â Â Â Â Â Â aio_bh_enqueue(bh, BH_SCHEDULED); +Â Â Â } Â }
Quoted 83 lines · Kevin Wolf
Am 08.10.2020 um 12:26 hat Philippe Mathieu-Daudé geschrieben:
Quoted 75 lines · Pavel Dovgalyuk
Quoted 50 lines · Philippe Mathieu-Daudé
Quoted 41 lines · Pavel Dovgalyuk
Quoted 31 lines · Alex Bennée
Quoted 30 lines
Quoted 26 lines · Philippe Mathieu-Daudé
Quoted 13 lines · Pavel Dovgalyuk
Quoted 11 lines · Thomas Huth
On 07/10/2020 09.13, Philippe Mathieu-Daudé wrote:
Thanks, that was helpful. ... and the winner is:      commit Â
55adb3c45620c31f29978f209e2a44a08d34e2da      Author: John Snow <[email protected]>
      Date:   Fri Jul 24 01:23:00 2020 -0400       Subject: ide: cancel pending callbacks on SRST... starting with this commit, the tests starts failing. John, any idea what
might be causing this?Quoted 7 lines
This patch includes the following lines:
+Â Â Â Â Â Â Â aio_bh_schedule_oneshot(qemu_get_aio_context(),
+Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Âide_bus_perform_srst, bus);
replay_bh_schedule_oneshot_eventshould be used instead of this function, because it synchronizes non-deterministic BHs.Why do we have 2 different functions? BH are already complex enough, and we need to also think about the replay API...
What about the other cases such vhost-user (blk/net), virtio-blk?
Quoted 8 lines
Quoted 5 lines
This does seem like something that should be wrapped up inside
aio_bh_schedule_oneshotitself or maybe we need aaio_bh_schedule_transaction_oneshotto distinguish it from the other uses the function has.Maybe there should be two functions:
- one for the guest modificationQuoted 7 lines
aio_bh_schedule_oneshot_deterministic()?Quoted 1 line
- one for internal qemu things
Not sure why there is a difference, BH are used to avoid delaying the guest, so there always something related to "guest modification".
Quoted 9 lines
Not exactly. At least there is one non-related-to-guest case
inmonitor_init_qmp:
       /*
        * We can't callqemu_chr_fe_set_handlers()directly here
        * since chardev might be running in the monitor I/O
        * thread. Schedule a bottom half.
        */
       aio_bh_schedule_oneshot(iothread_get_aio_context(mon_iothread),
                              Âmonitor_qmp_setup_handlers_bh, mon);I don't understand the documentation in
docs/devel/replay.txt:---
Bottom halves
=============Bottom half callbacks, that affect the guest state, should be invoked through
replay_bh_schedule_eventorreplay_bh_schedule_oneshot_eventfunctions. Their invocations are saved in record mode and synchronized with the existing
log in replay mode.
---Quoted 2 lines
But then it is only used in block drivers, which are not related to guest state:
Pavel can tell you the details, but I think the idea was that you need to use this function not when the code calling it modifies guest state, but when the BH implementation can do so.
Quoted 8 lines
In the case of generic callbacks like provided by the blk_aio_*() functions, we don't know whether this is the case, but it's generally device emulation code, so chances are relatively high that they do.
I seem to remember that when reviewing the code that introduced
replay_bh_schedule_event(), I was relatively sure that we didn't catch all necessary instances, but since it worked for Pavel and I didn't feel like getting too involved with replay code, we just merged it anyway.
That's right.
Block layer does not touch guest by itself.
But it includes callbacks that may invoke interrupts on finishing disk operations. That is why we synchronize these callbacks with vCPU through the replay layer.
Pavel Dovgalyuk
Quoted 89 lines · Pavel Dovgalyuk
Quoted 88 lines · Kevin Wolf
Am 08.10.2020 um 12:26 hat Philippe Mathieu-Daudé geschrieben:
Quoted 76 lines · Pavel Dovgalyuk
Quoted 51 lines · Philippe Mathieu-Daudé
Quoted 42 lines · Pavel Dovgalyuk
Quoted 32 lines · Alex Bennée
Quoted 31 lines
Quoted 27 lines · Philippe Mathieu-Daudé
Quoted 13 lines · Pavel Dovgalyuk
Quoted 11 lines · Thomas Huth
On 07/10/2020 09.13, Philippe Mathieu-Daudé wrote:
Thanks, that was helpful. ... and the winner is:      commit Â
55adb3c45620c31f29978f209e2a44a08d34e2da      Author: John Snow <[email protected]>
      Date:   Fri Jul 24 01:23:00 2020 -0400       Subject: ide: cancel pending callbacks on SRST... starting with this commit, the tests starts failing. John, any idea what
might be causing this?Quoted 8 lines
This patch includes the following lines:
+Â Â Â Â Â Â Â aio_bh_schedule_oneshot(qemu_get_aio_context(), +Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
ide_bus_perform_srst, bus);
replay_bh_schedule_oneshot_eventshould be used instead of this function, because it synchronizes non-deterministic BHs.Why do we have 2 different functions? BH are already complex enough, and we need to also think about the replay API...
What about the other cases such vhost-user (blk/net), virtio-blk?
Quoted 8 lines
Quoted 5 lines
This does seem like something that should be wrapped up inside
aio_bh_schedule_oneshotitself or maybe we need aaio_bh_schedule_transaction_oneshotto distinguish it from the other uses the function has.Maybe there should be two functions:
- one for the guest modificationQuoted 7 lines
aio_bh_schedule_oneshot_deterministic()?Quoted 1 line
- one for internal qemu things
Not sure why there is a difference, BH are used to avoid delaying the guest, so there always something related to "guest modification".
Quoted 9 lines
Not exactly. At least there is one non-related-to-guest case
inmonitor_init_qmp:
       /*
        * We can't callqemu_chr_fe_set_handlers()directly here
        * since chardev might be running in the monitor I/O
        * thread. Schedule a bottom half.
        */
       aio_bh_schedule_oneshot(iothread_get_aio_context(mon_iothread),
                              Âmonitor_qmp_setup_handlers_bh, mon);I don't understand the documentation in
docs/devel/replay.txt:---
Bottom halves
=============Bottom half callbacks, that affect the guest state, should be invoked through
replay_bh_schedule_eventorreplay_bh_schedule_oneshot_eventfunctions. Their invocations are saved in record mode and synchronized with the existing
log in replay mode.
---Quoted 2 lines
But then it is only used in block drivers, which are not related to guest state:
Pavel can tell you the details, but I think the idea was that you need to use this function not when the code calling it modifies guest state, but when the BH implementation can do so.
In the case of generic callbacks like provided by the blk_aio_*() functions, we don't know whether this is the case, but it's generally device emulation code, so chances are relatively high that they do.
Quoted 8 lines
Quoted 4 lines
I seem to remember that when reviewing the code that introduced
replay_bh_schedule_event(), I was relatively sure that we didn't catch all necessary instances, but since it worked for Pavel and I didn't feel like getting too involved with replay code, we just merged it anyway.That's right.
Block layer does not touch guest by itself.
But it includes callbacks that may invoke interrupts on finishing disk operations. That is why we synchronize these callbacks with vCPU through the replay layer.
Instead having to remember to use replay_bh_schedule_event when guest state is modified else the code is buggy, what about expecting replay used everywhere, and disabling its use when we know guest state is not modified?
Quoted 3 lines
Pavel Dovgalyuk
Quoted 60 lines · Philippe Mathieu-Daudé
Quoted 59 lines · Pavel Dovgalyuk
Quoted 47 lines · Thomas Huth
Quoted 7 lines · Philippe Mathieu-Daudé
Quoted 6 lines · Philippe Mathieu-Daudé
Quoted 5 lines · John Snow
I'm seeing this gitlab test fail quite often in my Python work; I don't
*think* this has anything to do with my patches, but maybe I need to try
and bisect this more aggressively.[...]
Quoted 28 lines
Quoted 6 lines
w.r.t. the error in your build, I told Thomas about the test_ppc_mac99/day15/invaders.elf timeouting but he said this is not his area. Richard has been looking yesterday to see if it is a TCG regression, and said the test either finished/crashed raising SIGCHLD, but Avocado parent is still waiting for a timeout, so the children become zombie and the test hang.
Expected output:
Quiescing Open Firmware ...
Booting Linux via__start()@0x01000000...But QEMU exits in
replay_char_write_event_load():Quiescing Open Firmware ...
qemu-system-ppc: Missing character write event in the replay log$ echo $? 1Latest events are CHECKPOINT CHECKPOINT INTERRUPT INTERRUPT INTERRUPT.
Replay file is ~22MiB. End of record using "
system_powerdown+ quit" in HMP.I guess we have 2 bugs:
- replay log
- avocado doesn't catch children exit(1)Quoted 7 lines
Quick reproducer:
$ make qemu-system-ppc check-venv $ tests/venv/bin/python -m \ avocado --show=app,console,replay \ run --job-timeout 300 -t machine:mac99 \ tests/acceptance/replay_kernel.pyThanks, that was helpful. ... and the winner is:
Quoted 8 lines
commit
55adb3c45620c31f29978f209e2a44a08d34e2daAuthor: John Snow <[email protected]> Date: Fri Jul 24 01:23:00 2020 -0400
Subject: ide: cancel pending callbacks on SRST... starting with this commit, the tests starts failing. John, any idea what
might be causing this?This patch includes the following lines:
Quoted 9 lines
Quoted 5 lines
+ aio_bh_schedule_oneshot(qemu_get_aio_context(), +
ide_bus_perform_srst, bus);
replay_bh_schedule_oneshot_eventshould be used instead of this function, because it synchronizes non-deterministic BHs.Why do we have 2 different functions? BH are already complex enough, and we need to also think about the replay API...
There is note about it in docs/devel/replay.txt
It's hard to protect the guest state from incorrect operations.
There was the similar problem with icount - everyone who modify translate modules, needs to take it info account. But now we have record/replay tests that assert that patches do not break icount/rr.
Quoted 1 line
What about the other cases such vhost-user (blk/net), virtio-blk?
I do not know much about these modules.
The main idea is the following: if the code works with the guest state, it should deal with icount and rr functions.
Pavel Dovgalyuk
Quoted 5 lines · Thomas Huth
... starting with this commit, the tests starts failing. John, any idea what might be causing this?
Thomas
Ahh, oh no! It *was* my fault, just nothing to do with what I was actually working on. good!
I'll look a little more closely, I see some more discussion below; I'll see if the recommended changes to the BH oneshot help alleviate the problem.
Thanks.
--js
Quoted 4 lines · Philippe Mathieu-Daudé
Quoted 3 lines · John Snow
I'm seeing this gitlab test fail quite often in my Python work; I don't *think* this has anything to do with my patches, but maybe I need to try and bisect this more aggressively.
[...]
Quoted 8 lines
w.r.t. the error in your build, I told Thomas about the test_ppc_mac99/day15/invaders.elf timeouting but he said this is not his area. Richard has been looking yesterday to see if it is a TCG regression, and said the test either finished/crashed raising SIGCHLD, but Avocado parent is still waiting for a timeout, so the children become zombie and the test hang.
Not sure that helps :)
No clue why that invaders.elf is now failing with the replay test, but if you look at the history of the CI runs:
https://gitlab.com/qemu-project/qemu/-/pipelines
... you can clearly see that the problem started with John's ide-pull-request 5 days ago:
https://gitlab.com/qemu-project/qemu/-/pipelines/197124608
So maybe it's worth the effort to have a look at the patches that got merged here?
Thomas
Quoted 20 lines · Thomas Huth
Quoted 4 lines · Philippe Mathieu-Daudé
Quoted 3 lines · John Snow
I'm seeing this gitlab test fail quite often in my Python work; I don't *think* this has anything to do with my patches, but maybe I need to try and bisect this more aggressively.
[...]
Quoted 8 lines
w.r.t. the error in your build, I told Thomas about the test_ppc_mac99/day15/invaders.elf timeouting but he said this is not his area. Richard has been looking yesterday to see if it is a TCG regression, and said the test either finished/crashed raising SIGCHLD, but Avocado parent is still waiting for a timeout, so the children become zombie and the test hang.
Not sure that helps :)
No clue why that invaders.elf is now failing with the replay test, but if you look at the history of the CI runs:
Quoted 7 lines
... you can clearly see that the problem started with John's ide-pull-request 5 days ago:
https://gitlab.com/qemu-project/qemu/-/pipelines/197124608
So maybe it's worth the effort to have a look at the patches that got merged here?
Great idea!
Bisected using:
$ make qemu-system-ppc check-venv && \ tests/venv/bin/python -m \ avocado --show=app,console,replay \ run -t machine:mac99 \ tests/acceptance/replay_kernel.py
55adb3c45620c31f29978f209e2a44a08d34e2da is the first bad commit commit 55adb3c45620c31f29978f209e2a44a08d34e2da
Author: John Snow <[email protected]> Date: Fri Jul 24 01:23:00 2020 -0400
ide: cancel pending callbacks on SRST
The SRST implementation did not keep up with the rest of IDE; it is possible to perform a weak reset on an IDE device to remove the BSY/DRQ bits, and then issue writes to the control/device registers which can cause chaos with the state machine.
Fix that by actually performing a real reset.
hw/ide/core.c | 58 ++++++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 40 insertions(+), 18 deletions(-)
Regards,
Phil.
Quoted 13 lines · Philippe Mathieu-Daudé
Quoted 12 lines · John Snow
I'm seeing this gitlab test fail quite often in my Python work; I don't *think* this has anything to do with my patches, but maybe I need to try and bisect this more aggressively.
The very first hint of an error I see is on line 154:
https://gitlab.com/jsnow/qemu/-/jobs/776334918#L154
22:05:36 ERROR|
22:05:36 ERROR| Reproduced traceback from:
/builds/jsnow/qemu/build/tests/venv/lib64/python3.8/site-packages/avocado/core/test.py:753
Quoted 7 lines
Quoted 6 lines
22:05:36 ERROR| Traceback (most recent call last):
22:05:36 ERROR| File "/builds/jsnow/qemu/build/tests/acceptance/avocado_qemu/__init__.py", line 171, in setUp
22:05:36 ERROR|self.cancel("No QEMU binary defined or found in the build tree")
One very bad aspect of this output is that the test outcome (a test cancelation) is determined by an exception handler by the runner, and the "ERROR" prefix is indeed very misleading.
But yes, in short, it's not an *error*, but the test getting canceled.
Quoted 4 lines
Last year the Avocado developers said we could have a clearer log error report, but meanwhile this verbose output is better that not having anything ¯\_(ツ)_/¯
With the new test runner ("avocado run --test-runner=nrunner") that just made its way into Avocado 81.0, there's a much better separation of what happens within the test, and within the runner.
The next step is to post the QEMU and "Avocado >= 82.0" integration, so hopefully this will improve soon.
Quoted 9 lines
Quoted 2 lines
Is this a known problem?
"No QEMU binary defined or found in the build tree" is not a problem, it means a test is skipped because the qemu-system-$ARCH binary is not found. In your case this is because your job (acceptance-system-fedora) is based on build-system-fedora which only build the following targets:
Quoted 4 lines
TARGETS: tricore-softmmu microblaze-softmmu mips-softmmu
xtensa-softmmu m68k-softmmu riscv32-softmmu ppc-softmmu sparc64-softmmu
Right.
Quoted 5 lines
Now I don't understand what binary the EmptyCPUModel/Migration tests are expecting. Maybe these tests only work when a single target is built? IOW not expecting that the python code searching for a binary return multiple ones? -> Eduardo/Cleber.
avocado_qemu.pick_default_qemu(), if not given an arch, will try to find a target binary that matches the host. The problem with picking any (first available?) built target is the non-deterministic aspect.
BTW, with regards to how avocado_qemu.pick_default_qemu() will get an arch, it can come either from a test parameter, or from an "arch" tag.
Cheers,
- Cleber.