Skip to content

Initialize asyncio event loop before using it#35

Merged
marmarek merged 1 commit into
QubesOS:mainfrom
alimirjamali:issue-10188-asyncio
Sep 18, 2025
Merged

Initialize asyncio event loop before using it#35
marmarek merged 1 commit into
QubesOS:mainfrom
alimirjamali:issue-10188-asyncio

Conversation

@alimirjamali

Copy link
Copy Markdown
Contributor

Python 3.14 (in Fedora 43) throws RunetimeError if event loop is not initialized before using it.

Resolves: QubesOS/qubes-issues#10188

@alimirjamali
alimirjamali marked this pull request as draft August 27, 2025 16:54
@alimirjamali
alimirjamali marked this pull request as ready for review August 28, 2025 07:54
@qubesos-bot

qubesos-bot commented Aug 31, 2025

Copy link
Copy Markdown

OpenQA test summary

Complete test suite and dependencies: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2025091702-4.3-fedora&flavor=pull-requests

Test run included the following:

New failures, excluding unstable

Compared to: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2025081011-4.3&flavor=update

  • system_tests_splitgpg

    • system_tests: Fail (unknown)
      Tests qubes.tests.extra failed (exit code 1), details reported sepa...

    • system_tests: Failed (test died)
      # Test died: Some tests failed at qubesos/tests/system_tests.pm lin...

    • TC_10_Thunderbird_fedora-43-xfce: test_000_send_receive_default (failure + cleanup)
      ModuleNotFoundError: No module named 'pyatspi.image'

    • TC_10_Thunderbird_fedora-43-xfce: test_010_send_receive_inline_signed_only (failure + cleanup)
      ModuleNotFoundError: No module named 'pyatspi.image'

    • TC_10_Thunderbird_fedora-43-xfce: test_020_send_receive_inline_with_attachment (failure + cleanup)
      ModuleNotFoundError: No module named 'pyatspi.image'

  • system_tests_extra

  • system_tests_dispvm

    • TC_20_DispVM_fedora-43-xfce: test_100_open_in_dispvm (failure + cleanup)
      AssertionError: './open-file test.txt' failed with ./open-file test...
  • system_tests_audio

  • system_tests_qwt_win10@hw13

    • windows_clipboard_and_filecopy: unnamed test (unknown)
    • windows_clipboard_and_filecopy: Failed (test died)
      # Test died: no candidate needle with tag(s) 'clipboard-copy-notifi...
  • system_tests_qwt_win10_seamless@hw13

    • windows_clipboard_and_filecopy: unnamed test (unknown)
    • windows_clipboard_and_filecopy: Failed (test died)
      # Test died: no candidate needle with tag(s) 'windows-Edge-address-...
  • system_tests_qwt_win11@hw13

    • windows_clipboard_and_filecopy: unnamed test (unknown)
    • windows_clipboard_and_filecopy: Failed (test died)
      # Test died: no candidate needle with tag(s) 'windows-menu-power' m...
  • system_tests_gpu_passthrough@hw13

    • gpu_passthrough: wait_serial (wait serial expected)
      # wait_serial expected: qr/jejxo-\d+-/...

    • gpu_passthrough: Failed (test died + timed out)
      # Test died: command 'qvm-template install debian-12-xfce' timed ou...

    • gpu_passthrough: wait_serial (wait serial expected)
      # wait_serial expected: qr/2JQKX-\d+-/...

  • system_tests_guivm_vnc_gui_interactive

    • gui_filecopy: unnamed test (unknown)
    • gui_filecopy: Failed (test died)
      # Test died: no candidate needle with tag(s) 'disp-text-editor' mat...

Failed tests

27 failures
  • system_tests_splitgpg

    • system_tests: Fail (unknown)
      Tests qubes.tests.extra failed (exit code 1), details reported sepa...

    • system_tests: Failed (test died)
      # Test died: Some tests failed at qubesos/tests/system_tests.pm lin...

    • TC_10_Thunderbird_fedora-43-xfce: test_000_send_receive_default (failure + cleanup)
      ModuleNotFoundError: No module named 'pyatspi.image'

    • TC_10_Thunderbird_fedora-43-xfce: test_010_send_receive_inline_signed_only (failure + cleanup)
      ModuleNotFoundError: No module named 'pyatspi.image'

    • TC_10_Thunderbird_fedora-43-xfce: test_020_send_receive_inline_with_attachment (failure + cleanup)
      ModuleNotFoundError: No module named 'pyatspi.image'

  • system_tests_extra

    • system_tests: Fail (unknown)
      Tests qubes.tests.extra failed (exit code 1), details reported sepa...

    • system_tests: Failed (test died)
      # Test died: Some tests failed at qubesos/tests/system_tests.pm lin...

    • TC_10_Thunderbird_fedora-43-xfce: test_000_send_receive_default (failure + cleanup)
      ModuleNotFoundError: No module named 'pyatspi.image'

    • TC_10_Thunderbird_fedora-43-xfce: test_010_send_receive_inline_signed_only (failure + cleanup)
      ModuleNotFoundError: No module named 'pyatspi.image'

    • TC_10_Thunderbird_fedora-43-xfce: test_020_send_receive_inline_with_attachment (failure + cleanup)
      ModuleNotFoundError: No module named 'pyatspi.image'

  • system_tests_dispvm

    • system_tests: Fail (unknown)
      Tests qubes.tests.integ.dispvm failed (exit code 1), details report...

    • system_tests: Failed (test died)
      # Test died: Some tests failed at qubesos/tests/system_tests.pm lin...

    • TC_20_DispVM_fedora-43-xfce: test_100_open_in_dispvm (failure + cleanup)
      AssertionError: './open-file test.txt' failed with ./open-file test...

  • system_tests_audio

    • system_tests: Fail (unknown)
      Tests qubes.tests.integ.audio failed (exit code 1), details reporte...

    • system_tests: Failed (test died)
      # Test died: Some tests failed at qubesos/tests/system_tests.pm lin...

    • TC_20_AudioVM_PipeWire_fedora-43-xfce: test_260_audio_mic_enabled_switch_audiovm (failure)
      AssertionError: 0 not greater than 0 : Failed to move-source-output

  • system_tests_qwt_win10@hw13

    • windows_clipboard_and_filecopy: unnamed test (unknown)
    • windows_clipboard_and_filecopy: Failed (test died)
      # Test died: no candidate needle with tag(s) 'clipboard-copy-notifi...
  • system_tests_qwt_win10_seamless@hw13

    • windows_clipboard_and_filecopy: unnamed test (unknown)
    • windows_clipboard_and_filecopy: Failed (test died)
      # Test died: no candidate needle with tag(s) 'windows-Edge-address-...
  • system_tests_qwt_win11@hw13

    • windows_clipboard_and_filecopy: unnamed test (unknown)
    • windows_clipboard_and_filecopy: Failed (test died)
      # Test died: no candidate needle with tag(s) 'windows-menu-power' m...
  • system_tests_gpu_passthrough@hw13

    • gpu_passthrough: wait_serial (wait serial expected)
      # wait_serial expected: qr/jejxo-\d+-/...

    • gpu_passthrough: Failed (test died + timed out)
      # Test died: command 'qvm-template install debian-12-xfce' timed ou...

    • gpu_passthrough: wait_serial (wait serial expected)
      # wait_serial expected: qr/2JQKX-\d+-/...

  • system_tests_guivm_vnc_gui_interactive

    • gui_filecopy: unnamed test (unknown)
    • gui_filecopy: Failed (test died)
      # Test died: no candidate needle with tag(s) 'disp-text-editor' mat...

Fixed failures

Compared to: https://openqa.qubes-os.org/tests/149225#dependencies

82 fixed
  • system_tests_extra

    • TC_00_QVCTest_whonix-workstation-17: test_010_screenshare (failure)
      AssertionError: 1 != 0 : Timeout waiting for /dev/video0 in test-in...
  • system_tests_dispvm

  • system_tests_audio

    • TC_20_AudioVM_Pulse_whonix-workstation-17: test_223_audio_play_hvm (error)
      qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco...

    • TC_20_AudioVM_Pulse_whonix-workstation-17: test_224_audio_rec_muted_hvm (error)
      qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco...

    • TC_20_AudioVM_Pulse_whonix-workstation-17: test_225_audio_rec_unmuted_hvm (error)
      qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco...

    • TC_20_AudioVM_Pulse_whonix-workstation-17: test_252_audio_playback_audiovm_switch_hvm (error)
      qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco...

  • system_tests_dispvm_perf@hw7

  • system_tests_guivm_gpu_gui_interactive@hw13

    • guivm_startup: wait_serial (wait serial expected)
      # wait_serial expected: qr/lEcbc-\d+-/...

    • guivm_startup: Failed (test died + timed out)
      # Test died: command '! qvm-check sys-whonix || time qvm-start sys-...

  • system_tests_basic_vm_qrexec_gui_ext4

    • system_tests: Fail (unknown)
      Tests qubes.tests.integ.vm_qrexec_gui failed (exit code 1), details...

    • system_tests: Failed (test died)
      # Test died: Some tests failed at qubesos/tests/system_tests.pm lin...

    • TC_20_NonAudio_whonix-gateway-17-pool: test_012_qubes_desktop_run (error + cleanup)
      raise TimeoutError from exc_val... TimeoutError

  • system_tests_audio@hw1

    • system_tests: Fail (unknown)
      Tests qubes.tests.integ.audio failed (exit code 1), details reporte...

    • system_tests: Failed (test died)
      # Test died: Some tests failed at qubesos/tests/system_tests.pm lin...

    • TC_20_AudioVM_Pulse_whonix-workstation-17: test_223_audio_play_hvm (error)
      qubes.exc.QubesVMError: Cannot connect to qrexec agent for 60 secon...

    • TC_20_AudioVM_Pulse_whonix-workstation-17: test_224_audio_rec_muted_hvm (error)
      qubes.exc.QubesVMError: Cannot connect to qrexec agent for 60 secon...

    • TC_20_AudioVM_Pulse_whonix-workstation-17: test_252_audio_playback_audiovm_switch_hvm (error)
      qubes.exc.QubesVMError: Cannot connect to qrexec agent for 60 secon...

  • system_tests_kde_gui_interactive

    • gui_keyboard_layout: wait_serial (wait serial expected)
      # wait_serial expected: "echo -e '[Layout]\nLayoutList=us,de' | sud...

    • gui_keyboard_layout: Failed (test died)
      # Test died: command 'test "$(cd ~user;ls e1*)" = "$(qvm-run -p wor...

Unstable tests

Details

Performance Tests

Performance degradation:

4 performance degradations
  • dom0_root_seq1m_q8t1_write 3:write_bandwidth_kb: 206669.00 🔻 ( previous job: 265260.00, degradation: 77.91%)
  • dom0_root_seq1m_q1t1_read 3:read_bandwidth_kb: 55036.00 🔻 ( previous job: 431512.00, degradation: 12.75%)
  • dom0_root_seq1m_q1t1_write 3:write_bandwidth_kb: 105261.00 🔻 ( previous job: 196254.00, degradation: 53.64%)
  • dom0_varlibqubes_rnd4k_q1t1_read 3:read_bandwidth_kb: 6665.00 🔻 ( previous job: 7695.00, degradation: 86.61%)

Remaining performance tests:

78 tests
  • fedora-43-xfce_dispvm (mean:7.814): 93.77
  • fedora-43-xfce_dispvm-gui (mean:8.961): 107.54
  • fedora-43-xfce_dispvm-concurrent (mean:3.754): 45.05
  • fedora-43-xfce_dispvm-gui-concurrent (mean:4.407): 52.88
  • fedora-43-xfce_dispvm-dom0 (mean:8.288): 99.46
  • fedora-43-xfce_dispvm-dom0-gui (mean:9.584): 115.00
  • fedora-43-xfce_dispvm-dom0-concurrent (mean:3.863): 46.35
  • fedora-43-xfce_dispvm-dom0-gui-concurrent (mean:4.625): 55.49
  • fedora-43-xfce_dispvm-preload (mean:4.269): 51.23
  • fedora-43-xfce_dispvm-preload-gui (mean:4.879): 58.55
  • fedora-43-xfce_dispvm-preload-concurrent (mean:3.113): 37.35
  • fedora-43-xfce_dispvm-preload-gui-concurrent (mean:3.716): 44.59
  • fedora-43-xfce_dispvm-preload-dom0 (mean:4.463): 53.55
  • fedora-43-xfce_dispvm-preload-dom0-gui (mean:5.484): 65.81
  • fedora-43-xfce_dispvm-preload-dom0-concurrent (mean:3.662): 43.94
  • fedora-43-xfce_dispvm-preload-dom0-gui-concurrent (mean:4.295): 51.54
  • fedora-43-xfce_dispvm-api (mean:8.369): 100.43
  • fedora-43-xfce_dispvm-gui-api (mean:9.713): 116.55
  • fedora-43-xfce_dispvm-concurrent-api (mean:3.961): 47.54
  • fedora-43-xfce_dispvm-gui-concurrent-api (mean:4.611): 55.33
  • fedora-43-xfce_dispvm-preload-api (mean:4.537): 54.44
  • fedora-43-xfce_dispvm-preload-less-api (mean:7.721): 92.65
  • fedora-43-xfce_dispvm-preload-more-api (mean:4.14): 49.68
  • fedora-43-xfce_dispvm-preload-gui-api (mean:5.483): 65.79
  • fedora-43-xfce_dispvm-preload-concurrent-api (mean:3.69): 44.28
  • fedora-43-xfce_dispvm-preload-gui-concurrent-api (mean:4.37): 52.44
  • fedora-43-xfce_vm (mean:0.027): 0.32
  • fedora-43-xfce_vm-gui (mean:0.034): 0.41
  • fedora-43-xfce_vm-concurrent (mean:0.02): 0.24
  • fedora-43-xfce_vm-gui-concurrent (mean:0.019): 0.23
  • fedora-43-xfce_vm-api (mean:0.038): 0.46
  • fedora-43-xfce_vm-gui-api (mean:0.042): 0.50
  • fedora-43-xfce_vm-concurrent-api (mean:0.027): 0.32
  • fedora-43-xfce_vm-gui-concurrent-api (mean:0.03): 0.36
  • fedora-43-xfce_exec: 9.20
  • fedora-43-xfce_exec-root: 68.14
  • fedora-43-xfce_socket: 8.38
  • fedora-43-xfce_socket-root: 8.60
  • fedora-43-xfce_exec-data-simplex: 73.71
  • fedora-43-xfce_exec-data-duplex: 70.85
  • fedora-43-xfce_exec-data-duplex-root: 104.75
  • fedora-43-xfce_socket-data-duplex: 136.61
  • dom0_root_seq1m_q8t1_read 3:read_bandwidth_kb: 460305.00 🔻 ( previous job: 497426.00, degradation: 92.54%)
  • dom0_root_rnd4k_q32t1_read 3:read_bandwidth_kb: 23928.00 🔻 ( previous job: 23940.00, degradation: 99.95%)
  • dom0_root_rnd4k_q32t1_write 3:write_bandwidth_kb: 3619.00 🟢 ( previous job: 2446.00, improvement: 147.96%)
  • dom0_root_rnd4k_q1t1_read 3:read_bandwidth_kb: 10829.00 🟢 ( previous job: 5874.00, improvement: 184.35%)
  • dom0_root_rnd4k_q1t1_write 3:write_bandwidth_kb: 4540.00 🟢 ( previous job: 29.00, improvement: 15655.17%)
  • dom0_varlibqubes_seq1m_q8t1_read 3:read_bandwidth_kb: 504851.00 🟢 ( previous job: 292489.00, improvement: 172.61%)
  • dom0_varlibqubes_seq1m_q8t1_write 3:write_bandwidth_kb: 227161.00 🟢 ( previous job: 110817.00, improvement: 204.99%)
  • dom0_varlibqubes_seq1m_q1t1_read 3:read_bandwidth_kb: 438001.00 🟢 ( previous job: 137802.00, improvement: 317.85%)
  • dom0_varlibqubes_seq1m_q1t1_write 3:write_bandwidth_kb: 188523.00 🟢 ( previous job: 121719.00, improvement: 154.88%)
  • dom0_varlibqubes_rnd4k_q32t1_read 3:read_bandwidth_kb: 107693.00 🟢 ( previous job: 103932.00, improvement: 103.62%)
  • dom0_varlibqubes_rnd4k_q32t1_write 3:write_bandwidth_kb: 8406.00 🟢 ( previous job: 6356.00, improvement: 132.25%)
  • dom0_varlibqubes_rnd4k_q1t1_write 3:write_bandwidth_kb: 4744.00 🟢 ( previous job: 3925.00, improvement: 120.87%)
  • fedora-43-xfce_root_seq1m_q8t1_read 3:read_bandwidth_kb: 389805.00
  • fedora-43-xfce_root_seq1m_q8t1_write 3:write_bandwidth_kb: 154440.00
  • fedora-43-xfce_root_seq1m_q1t1_read 3:read_bandwidth_kb: 316407.00
  • fedora-43-xfce_root_seq1m_q1t1_write 3:write_bandwidth_kb: 48034.00
  • fedora-43-xfce_root_rnd4k_q32t1_read 3:read_bandwidth_kb: 89265.00
  • fedora-43-xfce_root_rnd4k_q32t1_write 3:write_bandwidth_kb: 3502.00
  • fedora-43-xfce_root_rnd4k_q1t1_read 3:read_bandwidth_kb: 8816.00
  • fedora-43-xfce_root_rnd4k_q1t1_write 3:write_bandwidth_kb: 602.00
  • fedora-43-xfce_private_seq1m_q8t1_read 3:read_bandwidth_kb: 350811.00
  • fedora-43-xfce_private_seq1m_q8t1_write 3:write_bandwidth_kb: 214652.00
  • fedora-43-xfce_private_seq1m_q1t1_read 3:read_bandwidth_kb: 269764.00
  • fedora-43-xfce_private_seq1m_q1t1_write 3:write_bandwidth_kb: 82896.00
  • fedora-43-xfce_private_rnd4k_q32t1_read 3:read_bandwidth_kb: 41074.00
  • fedora-43-xfce_private_rnd4k_q32t1_write 3:write_bandwidth_kb: 3460.00
  • fedora-43-xfce_private_rnd4k_q1t1_read 3:read_bandwidth_kb: 6787.00
  • fedora-43-xfce_private_rnd4k_q1t1_write 3:write_bandwidth_kb: 1261.00
  • fedora-43-xfce_volatile_seq1m_q8t1_read 3:read_bandwidth_kb: 258524.00
  • fedora-43-xfce_volatile_seq1m_q8t1_write 3:write_bandwidth_kb: 193899.00
  • fedora-43-xfce_volatile_seq1m_q1t1_read 3:read_bandwidth_kb: 320567.00
  • fedora-43-xfce_volatile_seq1m_q1t1_write 3:write_bandwidth_kb: 17583.00
  • fedora-43-xfce_volatile_rnd4k_q32t1_read 3:read_bandwidth_kb: 40466.00
  • fedora-43-xfce_volatile_rnd4k_q32t1_write 3:write_bandwidth_kb: 1982.00
  • fedora-43-xfce_volatile_rnd4k_q1t1_read 3:read_bandwidth_kb: 8282.00
  • fedora-43-xfce_volatile_rnd4k_q1t1_write 3:write_bandwidth_kb: 1439.00

@marmarek marmarek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one is a perfect case for asyncio.run()

Python 3.14 (in Fedora 43) throws RunetimeError if event loop is not
initialized before using it.

Resolves: QubesOS/qubes-issues#10188
@alimirjamali

Copy link
Copy Markdown
Contributor Author

This one is a perfect case for asyncio.run()

Done

@marmarek
marmarek merged commit 6ee7b17 into QubesOS:main Sep 18, 2025
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

asyncio.get_event_loop() throws RuntimeError on Fedora 43 / Python 3.14 if event loop is not initialized

3 participants