Skip to content

Cache event handlers - #868

Open
ben-grande wants to merge 4 commits into
QubesOS:mainfrom
ben-grande:cache-event-collection
Open

Cache event handlers#868
ben-grande wants to merge 4 commits into
QubesOS:mainfrom
ben-grande:cache-event-collection

Conversation

@ben-grande

@ben-grande ben-grande commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Speed up collecting event handlers.

Without the changes:

% ~/stats.py -r 30 -b QubesCollectOldHandlers
['0.000558', '0.000465', '0.000459', '0.000391', '0.000374', '0.000432', '0.000420', '0.000435', '0.000382', '0.000373', '0.000426', '0.000411', '0.000448', '0.000414', '0.000375', '0.000432', '0.000407', '0.000420', '0.000426', '0.000399', '0.000460', '0.000424', '0.000416', '0.000379', '0.000393', '0.000387', '0.000434', '0.000428', '0.000375', '0.000384']

  • 1st: 0.000558
  • Max: 0.000558
  • Min: 0.000373
  • Avg: 0.000418
  • Med: 0.000418

With the changes:

% PYTHONPATH=. ~/stats.py -r 30 -b QubesCollectNewHandlers
['0.000255', '0.000075', '0.000045', '0.000042', '0.000041', '0.000040', '0.000040', '0.000040', '0.000040', '0.000385', '0.000043', '0.000041', '0.000041', '0.000040', '0.000040', '0.000049', '0.000042', '0.000046', '0.000041', '0.000041', '0.000040', '0.000040', '0.000040', '0.000040', '0.000049', '0.000040', '0.000040', '0.000040', '0.000040', '0.000045']

  • 1st: 0.000255
  • Max: 0.000385
  • Min: 0.000040
  • Avg: 0.000061
  • Med: 0.000041

Didn't run tests, so it is draft.

To benchmark, I used: https://github.com/ben-grande/bench, with something similar to:

class QubesCollectOldHandlers(QubesPerf):
    """
    Benchmark time to collect event handlers
    """

    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        self.qube = self.app.domains["default-dvm"]

    def test(self, previous_value=None) -> tuple[list, list]:
        # pylint: disable=unused-argument
        sync_funcs, async_funcs = self.qube._get_event_funcs(
            event="domain-feature-set:internal",
            kwargs={"oldvalue": None, "value": True, "feature": "internal"},
            pre_event=False,
        )
        return sync_funcs, async_funcs

class QubesCollectNewHandlers(QubesPerf):
    """
    Benchmark time to collect event handlers
    """

    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        self.qube = self.app.domains["default-dvm"]

    def test(self, previous_value=None) -> tuple[list, list]:
        # pylint: disable=unused-argument
        sync_funcs, async_funcs = self.qube._get_event_funcs(
            event="domain-feature-set:internal", pre_event=False
        )
        return sync_funcs, async_funcs

Note that the old code does not have _get_event_funcs, because it runs the synchornous funcs in _fire_event, I had to copy from one function to the other, and remove the event handling from _get_event_funcs.

@ben-grande
ben-grande force-pushed the cache-event-collection branch from 5fd45d4 to fec4cf1 Compare August 11, 2026 11:53
@ben-grande

Copy link
Copy Markdown
Contributor Author

PipelineRetryFailed

@ben-grande
ben-grande force-pushed the cache-event-collection branch 2 times, most recently from 028eda0 to e81fa41 Compare August 12, 2026 07:48
Clear separation of concerns, a function that collects events can be
timed separate from the execution of synchronous handlers.
@ben-grande
ben-grande force-pushed the cache-event-collection branch from 12d694d to eccd2dc Compare August 12, 2026 09:07
The type has to be changed for tuple for it to be hashable.
@ben-grande
ben-grande force-pushed the cache-event-collection branch from eccd2dc to f865e54 Compare August 12, 2026 12:13
"itertools.chain" is memory efficient but doesn't allow caching.
@ben-grande
ben-grande force-pushed the cache-event-collection branch from f865e54 to c62604a Compare August 12, 2026 13:08
@codecov

codecov Bot commented Aug 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.51%. Comparing base (e231e51) to head (c62604a).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #868   +/-   ##
=======================================
  Coverage   70.51%   70.51%           
=======================================
  Files          61       61           
  Lines       14371    14394   +23     
=======================================
+ Hits        10133    10150   +17     
- Misses       4238     4244    +6     
Flag Coverage Δ
unittests 70.51% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ben-grande
ben-grande marked this pull request as ready for review August 12, 2026 13:29
@marmarek

Copy link
Copy Markdown
Member

This looks okay on the first sight, but I'd like to run it though openqa, just in case.

@qubesos-bot

qubesos-bot commented Aug 19, 2026

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=2026082719-devel&flavor=pull-requests

Test run included the following:

Upload failures

  • system_tests_extra

    • system_tests: wait_serial (unknown)
      # Command: testfunc qubes.tests.extra...

    • system_tests: Failed (test died + timed out)
      # Test died: command 'testfunc qubes.tests.extra' timed out at qube...

  • system_tests_backupdispvm

    • system_tests: Failed (test died)
      # Test died: command 'curl --form upload=@tests-qubes.tests.integ.b...

New failures, excluding unstable

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

  • system_tests_qrexec

  • system_tests_qwt_win10@hw13

    • windows_install: wait_serial (wait serial expected)
      # wait_serial expected: qr/install-complete-\d+-/...
  • system_tests_qwt_win11@hw13

    • windows_install: wait_serial (wait serial expected)
      # wait_serial expected: qr/install-complete-\d+-/...
  • system_tests_gpu_passthrough@hw13

    • gpu_passthrough: Failed (test died)
      # Test died: command 'ansible-playbook -i inventory -e pci_devices=...

Failed tests

10 failures
  • system_tests_qrexec

  • system_tests_dispvm

  • system_tests_qwt_win10@hw13

    • windows_install: wait_serial (wait serial expected)
      # wait_serial expected: qr/install-complete-\d+-/...

    • windows_install: Failed (test died + timed out)
      # Test died: Install timed out at qubesos/tests/windows_install.pm ...

  • system_tests_qwt_win11@hw13

    • windows_install: wait_serial (wait serial expected)
      # wait_serial expected: qr/install-complete-\d+-/...

    • windows_install: Failed (test died + timed out)
      # Test died: Install timed out at qubesos/tests/windows_install.pm ...

  • system_tests_whonix

    • [unstable] whonixcheck: fail (unknown)
      Whonixcheck for anon-whonix failed...

    • [unstable] whonixcheck: fail (unknown)
      Whonixcheck for sys-whonix failed...

    • [unstable] whonixcheck: Failed (test died)
      # Test died: systemcheck failed at qubesos/tests/whonixcheck.pm lin...

  • system_tests_gpu_passthrough@hw13

    • gpu_passthrough: Failed (test died)
      # Test died: command 'ansible-playbook -i inventory -e pci_devices=...

Fixed failures

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

37 fixed
  • system_tests_pvgrub_salt_storage

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

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

    • TC_41_HVMGrub_debian-13-xfce: test_000_standalone_vm (error)
      qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco...

    • TC_41_HVMGrub_debian-13-xfce: test_001_standalone_vm_dracut (error)
      qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco...

    • TC_41_HVMGrub_debian-13-xfce: test_010_template_based_vm (error)
      qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco...

    • TC_41_HVMGrub_debian-13-xfce: test_011_template_based_vm_dracut (error)
      qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco...

    • TC_41_HVMGrub_fedora-43-xfce: test_010_template_based_vm (error)
      qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco...

  • system_tests_extra

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

    • TC_01_InputProxyExclude_debian-13-xfce: test_000_qemu_tablet (error)
      qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco...

    • TC_01_InputProxyExclude_fedora-43-xfce: test_000_qemu_tablet (error)
      qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco...

    • TC_00_QVCTest_fedora-43-xfce: test_010_screenshare (failure + cleanup)
      ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^... AssertionError: 1179648 != 0

    • TC_00_QVCTest_whonix-gateway-18: test_010_screenshare (failure + cleanup)
      AssertionError: 2.3156185715769593 not less than 2.0

    • TC_00_PDFConverter_fedora-43-xfce: test_004_cancel_stops_conversion (failure)
      AssertionError: DispVM not cleaned up 10s after cancel: {<DispVM at...

  • system_tests_usbproxy

    • 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...

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

    • TC_20_USBProxy_core3_fedora-43-xfce: test_090_attach_stubdom (error)
      qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco...

  • system_tests_network_ipv6

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

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

    • VmIPv6Networking_fedora-43-xfce: test_001_simple_networking_paused_from_none_to_existent (error)
      raise TimeoutError from exc_val... TimeoutError

  • system_tests_audio

  • 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_debian-13-xfce: test_222_audio_rec_unmuted_pulseaudio (failure)
      AssertionError: only silence detected, no useful audio data

  • system_tests_guivm_gpu_gui_interactive@hw13

    • shutdown: unnamed test (unknown)
    • shutdown: Failed (test died)
      # Test died: no candidate needle with tag(s) 'text-logged-in-root' ...
  • system_tests_whonix@hw1

    • whonixcheck: fail (unknown)
      Whonixcheck for sys-whonix failed...

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

  • 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-...

Unstable tests

Details
  • system_tests_extra

    system_tests/Failed (1/5 times with errors)
    • job 192562 # Test died: command 'testfunc qubes.tests.extra' timed out at qube...
    system_tests/Failed (1/5 times with errors)
    • job 193751 # Test died: command 'curl --form upload=@nose2-junit.xml --form up...
    system_tests/wait_serial (1/5 times with errors)
    • job 192562 # Command: testfunc qubes.tests.extra...
  • system_tests_gui_interactive

    clipboard_and_web/ (1/5 times with errors)
    clipboard_and_web/Failed (1/5 times with errors)
    • job 193803 # Test died: no candidate needle with tag(s) 'clipboard-paste-notif...
    gui_keyboard_layout/Failed (1/5 times with errors)
    • job 193752 # Test died: command 'qvm-run -pu root work systemctl --wait is-sys...
  • system_tests_guivm_gui_interactive

    clipboard_and_web/ (1/5 times with errors)
    clipboard_and_web/Failed (1/5 times with errors)
    • job 193754 # Test died: no candidate needle with tag(s) 'clipboard-paste-notif...
  • system_tests_qrexec

    system_tests/Fail (1/5 times with errors)
    • job 193759 Tests qubes.tests.integ.qrexec failed (exit code 1), details report...
    system_tests/Failed (1/5 times with errors)
    • job 193759 # Test died: Some tests failed at qubesos/tests/system_tests.pm lin...
    TC_00_Qrexec_whonix-workstation-18/test_050_qrexec_simple_eof (1/5 times with errors)
    • job 193759 AssertionError: Timeout, probably EOF wasn't transferred to the VM ...
  • system_tests_network_updates

    system_tests/Fail (1/5 times with errors)
    • job 193004 Tests qubes.tests.integ.dom0_update failed (exit code 1), details r...
    system_tests/Fail (1/5 times with errors)
    • job 193841 Tests qubes.tests.integ.dom0_update failed (exit code 1), details r...
    system_tests/Fail (1/5 times with errors)
    • job 193757 Tests qubes.tests.integ.vm_template_upgrade failed (exit code 1), d...
    system_tests/Fail (1/5 times with errors)
    • job 193841 Tests qubes.tests.integ.vm_template_upgrade failed (exit code 1), d...
    system_tests/Failed (1/5 times with errors)
    • job 193004 # Test died: Some tests failed at qubesos/tests/system_tests.pm lin...
    system_tests/Failed (1/5 times with errors)
    • job 193757 # Test died: command 'sudo python3 split_logs.py --junit-xml=nose2-...
    system_tests/Failed (1/5 times with errors)
    • job 193841 # Test died: command 'sudo python3 split_logs.py --junit-xml=nose2-...
    TC_00_Dom0Upgrade_whonix-gateway-18/test_000_update_qubes_vm_update (1/5 times with errors)
    • job 193841 ~~~~~~~~~^^^^^^^^^^^^^^^^^^... AssertionError: qubes-vm-update failed:
    TC_00_Dom0Upgrade_whonix-gateway-18/test_010_instal (1/5 times with errors)
    • job 193004 Error: Failed to download metadata for repo 'test': Cannot download...
    TC_11_QvmTemplateMgmtVM_fedora-44-xfce/test_010_template_install (1/5 times with errors)
    • job 193004 AssertionError: qvm-template failed: [Qrexec] ERROR: dnf command is...
    integ/vm_template_upgrade (2/5 times with errors)
    • job 193757 ModuleNotFoundError: No module named 'qubes.tests.integ.vm_template...
    • job 193841 ModuleNotFoundError: No module named 'qubes.tests.integ.vm_template...
  • system_tests_dispvm

    system_tests/Fail (1/5 times with errors)
    • job 193804 Tests qubes.tests.integ.dispvm failed (exit code 1), details report...
    system_tests/Fail (1/5 times with errors)
    • job 193750 Tests qubes.tests.integ.dispvm failed (exit code 1), details report...
    system_tests/Failed (1/5 times with errors)
    • job 193804 # Test died: Some tests failed at qubesos/tests/system_tests.pm lin...
    system_tests/Failed (1/5 times with errors)
    • job 193750 # Test died: Some tests failed at qubesos/tests/system_tests.pm lin...
    TC_21_DispVM_Preload/test_012_preload_low_mem (2/5 times with errors)
    • job 193750 ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^... AssertionError: 1 != 0
    • job 193804 ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^... AssertionError: 1 != 0
    TC_21_DispVM_Preload/test_012_preload_low_mem_early_startup (2/5 times with errors)
    • job 193750 AssertionError: last preloaded didn't complete in time
    • job 193804 AssertionError: last preloaded didn't complete in time
    TC_20_DispVM_debian-13-xfce/test_013_preload_gui (2/5 times with errors)
    • job 193750 AssertionError: last preloaded didn't complete in time
    • job 193804 AssertionError: last preloaded didn't complete in time
    TC_20_DispVM_fedora-44-xfce/test_013_preload_gui (2/5 times with errors)
    • job 193750 AssertionError: last preloaded didn't complete in time
    • job 193804 AssertionError: last preloaded didn't complete in time
    TC_20_DispVM_whonix-workstation-18/test_013_preload_gui (2/5 times with errors)
    • job 193750 AssertionError: last preloaded didn't complete in time
    • job 193804 AssertionError: last preloaded didn't complete in time
    TC_21_DispVM_Preload/test_015_preload_race_more (2/5 times with errors)
    • job 193750 AssertionError: last preloaded didn't complete in time
    • job 193804 AssertionError: last preloaded didn't complete in time
    TC_21_DispVM_Preload/test_017_preload_autostart (2/5 times with errors)
    • job 193750 AssertionError: last preloaded didn't complete in time
    • job 193804 AssertionError: last preloaded didn't complete in time
    TC_21_DispVM_Preload/test_018_preload_global (2/5 times with errors)
    • job 193750 AssertionError: last preloaded didn't complete in time
    • job 193804 AssertionError: last preloaded didn't complete in time
    TC_21_DispVM_Preload/test_019_preload_discard_outdated_volumes (2/5 times with errors)
    • job 193750 AssertionError: last preloaded didn't complete in time
    • job 193804 AssertionError: last preloaded didn't complete in time
    TC_21_DispVM_Preload/test_020_preload_discard_outdated_volume_size (2/5 times with errors)
    • job 193750 AssertionError: last preloaded didn't complete in time
    • job 193804 AssertionError: last preloaded didn't complete in time
    TC_21_DispVM_Preload/test_021_preload_discard_outdated_setting (2/5 times with errors)
    • job 193750 AssertionError: last preloaded didn't complete in time
    • job 193804 AssertionError: last preloaded didn't complete in time
  • system_tests_kde_gui_interactive

    gui_keyboard_layout/Failed (1/5 times with errors)
    • job 193730 # Test died: command 'qvm-run -pu root work systemctl --wait is-sys...
  • system_tests_guivm_vnc_gui_interactive

    guivm_manager/ (1/5 times with errors)
    guivm_manager/Failed (1/5 times with errors)
    • job 193734 # Test died: no candidate needle with tag(s) 'menu-qubes-tools' mat...
  • system_tests_audio

    system_tests/Fail (1/5 times with errors)
    • job 192976 Tests qubes.tests.integ.audio failed (exit code 1), details reporte...
    system_tests/Failed (1/5 times with errors)
    • job 192976 # Test died: Some tests failed at qubesos/tests/system_tests.pm lin...
    TC_20_AudioVM_Pulse_whonix-workstation-18/test_220_audio_play_pulseaudio (1/5 times with errors)
    • job 192976 AssertionError: too short audio, expected 10s, got 9.49, saved to /...
    TC_20_AudioVM_Pulse_whonix-workstation-18/test_222_audio_rec_unmuted_pulseaudio (1/5 times with errors)
    • job 192976 AssertionError: too short audio, expected 10s, got 9.05251700680272...
    TC_20_AudioVM_PipeWire_whonix-workstation-18/test_226_audio_playback_pipewire (1/5 times with errors)
    • job 192976 AssertionError: too short audio, expected 10s, got 8.97385487528344...
  • system_tests_audio@hw1

    system_tests/Fail (1/5 times with errors)
    • job 192976 Tests qubes.tests.integ.audio failed (exit code 1), details reporte...
    system_tests/Failed (1/5 times with errors)
    • job 192976 # Test died: Some tests failed at qubesos/tests/system_tests.pm lin...
    TC_20_AudioVM_Pulse_whonix-workstation-18/test_220_audio_play_pulseaudio (1/5 times with errors)
    • job 192976 AssertionError: too short audio, expected 10s, got 9.49, saved to /...
    TC_20_AudioVM_Pulse_whonix-workstation-18/test_222_audio_rec_unmuted_pulseaudio (1/5 times with errors)
    • job 192976 AssertionError: too short audio, expected 10s, got 9.05251700680272...
    TC_20_AudioVM_PipeWire_whonix-workstation-18/test_226_audio_playback_pipewire (1/5 times with errors)
    • job 192976 AssertionError: too short audio, expected 10s, got 8.97385487528344...
  • system_tests_gui_interactive@hw7

    clipboard_and_web/ (1/5 times with errors)
    clipboard_and_web/Failed (1/5 times with errors)
    • job 193803 # Test died: no candidate needle with tag(s) 'clipboard-paste-notif...
    gui_keyboard_layout/Failed (1/5 times with errors)
    • job 193752 # Test died: command 'qvm-run -pu root work systemctl --wait is-sys...
  • system_tests_whonix@hw1

    whonixcheck/Failed (1/5 times with errors)
    • job 193726 # Test died: command 'qvm-run -ap whonix-gateway-18 'LC_ALL=C whon...
    whonixcheck/Failed (1/5 times with errors)
    • job 192973 # Test died: systemcheck failed at qubesos/tests/whonixcheck.pm lin...
    whonixcheck/fail (1/5 times with errors)
    • job 193726 Whonixcheck for anon-whonix failed...
    whonixcheck/fail (1/5 times with errors)
    whonixcheck/wait_serial (1/5 times with errors)
    • job 193726 # Command: qvm-run -ap whonix-gateway-18 'LC_ALL=C whonixcheck --v...
  • system_tests_whonix

    whonixcheck/Failed (1/5 times with errors)
    • job 193726 # Test died: command 'qvm-run -ap whonix-gateway-18 'LC_ALL=C whon...
    whonixcheck/Failed (1/5 times with errors)
    • job 192973 # Test died: systemcheck failed at qubesos/tests/whonixcheck.pm lin...
    whonixcheck/fail (1/5 times with errors)
    • job 193726 Whonixcheck for anon-whonix failed...
    whonixcheck/fail (1/5 times with errors)
    whonixcheck/wait_serial (1/5 times with errors)
    • job 193726 # Command: qvm-run -ap whonix-gateway-18 'LC_ALL=C whonixcheck --v...

Performance Tests

Performance degradation:

20 performance degradations
  • debian-13-xfce_exec: 8.92 🔻 ( previous job: 7.85, degradation: 113.56%)
  • debian-13-xfce_exec-data-duplex: 68.96 🔻 ( previous job: 62.45, degradation: 110.42%)
  • whonix-gateway-18_exec-root: 152.54 🔻 ( previous job: 126.14, degradation: 120.93%)
  • whonix-gateway-18_socket-root: 9.36 🔻 ( previous job: 8.37, degradation: 111.81%)
  • whonix-gateway-18_socket-data-duplex: 107.87 🔻 ( previous job: 90.03, degradation: 119.80%)
  • whonix-workstation-18_exec-root: 164.99 🔻 ( previous job: 144.02, degradation: 114.56%)
  • whonix-workstation-18_socket: 9.36 🔻 ( previous job: 7.66, degradation: 122.19%)
  • whonix-workstation-18_socket-root: 10.03 🔻 ( previous job: 8.87, degradation: 113.10%)
  • whonix-workstation-18_exec-data-duplex-root: 153.14 🔻 ( previous job: 130.67, degradation: 117.20%)
  • dom0_root_rnd4k_q1t1_read 3:read_bandwidth_kb: 8002.00 🔻 ( previous job: 8963.00, degradation: 89.28%)
  • dom0_varlibqubes_seq1m_q1t1_write 3:write_bandwidth_kb: 168043.00 🔻 ( previous job: 201978.00, degradation: 83.20%)
  • dom0_varlibqubes_rnd4k_q32t1_write 3:write_bandwidth_kb: 8750.00 🔻 ( previous job: 10623.00, degradation: 82.37%)
  • debian-13-xfce_dom0-dispvm-preload-4-delay-minus-1d2-api (mean:2.709): 32.51 🔻 ( previous job: 28.74, degradation: 113.12%)
  • debian-13-xfce_dom0-dispvm-preload-4-gui-api (mean:4.109): 49.31 🔻 ( previous job: 44.40, degradation: 111.06%)
  • whonix-workstation-18_dom0-dispvm-api (mean:9.757): 117.08 🔻 ( previous job: 97.14, degradation: 120.54%)
  • whonix-workstation-18_dom0-dispvm-gui-api (mean:11.82): 141.84 🔻 ( previous job: 121.86, degradation: 116.40%)
  • whonix-workstation-18_dom0-dispvm-preload-2-api (mean:4.932): 59.18 🔻 ( previous job: 48.39, degradation: 122.30%)
  • whonix-workstation-18_dom0-dispvm-preload-2-delay-0-api (mean:4.513): 54.15 🔻 ( previous job: 48.26, degradation: 112.20%)
  • whonix-workstation-18_dom0-dispvm-preload-2-delay-minus-1d2-api (mean:5.46): 65.52 🔻 ( previous job: 59.22, degradation: 110.65%)
  • whonix-workstation-18_dom0-dispvm-preload-4-api (mean:3.666): 43.99 🔻 ( previous job: 38.29, degradation: 114.90%)

Remaining performance tests:

91 tests
  • debian-13-xfce_exec-root: 26.91 🔻 ( previous job: 26.74, degradation: 100.64%)
  • debian-13-xfce_socket: 9.11 🔻 ( previous job: 8.37, degradation: 108.82%)
  • debian-13-xfce_socket-root: 9.19 🔻 ( previous job: 9.13, degradation: 100.71%)
  • debian-13-xfce_exec-data-simplex: 63.51 🔻 ( previous job: 63.05, degradation: 100.72%)
  • debian-13-xfce_exec-data-duplex-root: 82.32 🔻 ( previous job: 78.04, degradation: 105.48%)
  • debian-13-xfce_socket-data-duplex: 87.73 🔻 ( previous job: 85.67, degradation: 102.42%)
  • fedora-44-xfce_exec: 9.20
  • fedora-44-xfce_exec-root: 71.08
  • fedora-44-xfce_socket: 9.57
  • fedora-44-xfce_socket-root: 8.69
  • fedora-44-xfce_exec-data-simplex: 68.46
  • fedora-44-xfce_exec-data-duplex: 70.90
  • fedora-44-xfce_exec-data-duplex-root: 110.05
  • fedora-44-xfce_socket-data-duplex: 83.95
  • whonix-gateway-18_exec: 7.33 🟢 ( previous job: 8.01, improvement: 91.57%)
  • whonix-gateway-18_socket: 8.69 🔻 ( previous job: 8.63, degradation: 100.66%)
  • whonix-gateway-18_exec-data-simplex: 66.70 🔻 ( previous job: 62.50, degradation: 106.72%)
  • whonix-gateway-18_exec-data-duplex: 65.77 🟢 ( previous job: 68.01, improvement: 96.70%)
  • whonix-gateway-18_exec-data-duplex-root: 146.64 🔻 ( previous job: 137.28, degradation: 106.81%)
  • whonix-workstation-18_exec: 8.00 🟢 ( previous job: 8.14, improvement: 98.36%)
  • whonix-workstation-18_exec-data-simplex: 71.05 🔻 ( previous job: 66.36, degradation: 107.07%)
  • whonix-workstation-18_exec-data-duplex: 68.82 🔻 ( previous job: 65.56, degradation: 104.98%)
  • whonix-workstation-18_socket-data-duplex: 81.85 🟢 ( previous job: 92.97, improvement: 88.04%)
  • dom0_root_seq1m_q8t1_read 3:read_bandwidth_kb: 452557.00 🟢 ( previous job: 388793.00, improvement: 116.40%)
  • dom0_root_seq1m_q8t1_write 3:write_bandwidth_kb: 138971.00 🟢 ( previous job: 119690.00, improvement: 116.11%)
  • dom0_root_seq1m_q1t1_read 3:read_bandwidth_kb: 354248.00 🟢 ( previous job: 245223.00, improvement: 144.46%)
  • dom0_root_seq1m_q1t1_write 3:write_bandwidth_kb: 183433.00 🔻 ( previous job: 199974.00, degradation: 91.73%)
  • dom0_root_rnd4k_q32t1_read 3:read_bandwidth_kb: 100262.00 🟢 ( previous job: 13948.00, improvement: 718.83%)
  • dom0_root_rnd4k_q32t1_write 3:write_bandwidth_kb: 9211.00 🟢 ( previous job: 6899.00, improvement: 133.51%)
  • dom0_root_rnd4k_q1t1_write 3:write_bandwidth_kb: 5137.00 🟢 ( previous job: 5055.00, improvement: 101.62%)
  • dom0_varlibqubes_seq1m_q8t1_read 3:read_bandwidth_kb: 465826.00 🟢 ( previous job: 429040.00, improvement: 108.57%)
  • dom0_varlibqubes_seq1m_q8t1_write 3:write_bandwidth_kb: 275941.00 🟢 ( previous job: 257066.00, improvement: 107.34%)
  • dom0_varlibqubes_seq1m_q1t1_read 3:read_bandwidth_kb: 407372.00 🔻 ( previous job: 446202.00, degradation: 91.30%)
  • dom0_varlibqubes_rnd4k_q32t1_read 3:read_bandwidth_kb: 92548.00 🔻 ( previous job: 102155.00, degradation: 90.60%)
  • dom0_varlibqubes_rnd4k_q1t1_read 3:read_bandwidth_kb: 8313.00 🟢 ( previous job: 8179.00, improvement: 101.64%)
  • dom0_varlibqubes_rnd4k_q1t1_write 3:write_bandwidth_kb: 4758.00 🟢 ( previous job: 4404.00, improvement: 108.04%)
  • fedora-44-xfce_root_seq1m_q8t1_read 3:read_bandwidth_kb: 378820.00
  • fedora-44-xfce_root_seq1m_q8t1_write 3:write_bandwidth_kb: 159732.00
  • fedora-44-xfce_root_seq1m_q1t1_read 3:read_bandwidth_kb: 290625.00
  • fedora-44-xfce_root_seq1m_q1t1_write 3:write_bandwidth_kb: 175455.00
  • fedora-44-xfce_root_rnd4k_q32t1_read 3:read_bandwidth_kb: 78517.00
  • fedora-44-xfce_root_rnd4k_q32t1_write 3:write_bandwidth_kb: 3867.00
  • fedora-44-xfce_root_rnd4k_q1t1_read 3:read_bandwidth_kb: 8527.00
  • fedora-44-xfce_root_rnd4k_q1t1_write 3:write_bandwidth_kb: 1259.00
  • fedora-44-xfce_private_seq1m_q8t1_read 3:read_bandwidth_kb: 342448.00
  • fedora-44-xfce_private_seq1m_q8t1_write 3:write_bandwidth_kb: 221078.00
  • fedora-44-xfce_private_seq1m_q1t1_read 3:read_bandwidth_kb: 255314.00
  • fedora-44-xfce_private_seq1m_q1t1_write 3:write_bandwidth_kb: 47258.00
  • fedora-44-xfce_private_rnd4k_q32t1_read 3:read_bandwidth_kb: 84348.00
  • fedora-44-xfce_private_rnd4k_q32t1_write 3:write_bandwidth_kb: 1799.00
  • fedora-44-xfce_private_rnd4k_q1t1_read 3:read_bandwidth_kb: 8963.00
  • fedora-44-xfce_private_rnd4k_q1t1_write 3:write_bandwidth_kb: 691.00
  • fedora-44-xfce_volatile_seq1m_q8t1_read 3:read_bandwidth_kb: 355932.00
  • fedora-44-xfce_volatile_seq1m_q8t1_write 3:write_bandwidth_kb: 176320.00
  • fedora-44-xfce_volatile_seq1m_q1t1_read 3:read_bandwidth_kb: 307590.00
  • fedora-44-xfce_volatile_seq1m_q1t1_write 3:write_bandwidth_kb: 25840.00
  • fedora-44-xfce_volatile_rnd4k_q32t1_read 3:read_bandwidth_kb: 77572.00
  • fedora-44-xfce_volatile_rnd4k_q32t1_write 3:write_bandwidth_kb: 2476.00
  • fedora-44-xfce_volatile_rnd4k_q1t1_read 3:read_bandwidth_kb: 8934.00
  • fedora-44-xfce_volatile_rnd4k_q1t1_write 3:write_bandwidth_kb: 518.00
  • debian-13-xfce_dom0-dispvm-api (mean:6.439): 77.26 🔻 ( previous job: 74.50, degradation: 103.72%)
  • debian-13-xfce_dom0-dispvm-gui-api (mean:8.322): 99.86 🔻 ( previous job: 93.50, degradation: 106.81%)
  • debian-13-xfce_dom0-dispvm-preload-2-api (mean:3.402): 40.82 🔻 ( previous job: 37.79, degradation: 108.02%)
  • debian-13-xfce_dom0-dispvm-preload-2-delay-0-api (mean:3.016): 36.20 🔻 ( previous job: 34.29, degradation: 105.56%)
  • debian-13-xfce_dom0-dispvm-preload-2-delay-minus-1d2-api (mean:3.322): 39.86 🔻 ( previous job: 38.52, degradation: 103.48%)
  • debian-13-xfce_dom0-dispvm-preload-4-api (mean:2.476): 29.71 🟢 ( previous job: 30.73, improvement: 96.66%)
  • debian-13-xfce_dom0-dispvm-preload-4-delay-0-api (mean:2.572): 30.87 🔻 ( previous job: 29.50, degradation: 104.64%)
  • debian-13-xfce_dom0-dispvm-preload-2-gui-api (mean:4.802): 57.63 🔻 ( previous job: 53.65, degradation: 107.41%)
  • debian-13-xfce_dom0-dispvm-preload-6-gui-api (mean:3.308): 39.70 🟢 ( previous job: 41.47, improvement: 95.73%)
  • debian-13-xfce_dom0-vm-api (mean:0.034): 0.40 🟢 ( previous job: 0.62, improvement: 65.00%)
  • debian-13-xfce_dom0-vm-gui-api (mean:0.032): 0.39 🟢 ( previous job: 0.47, improvement: 83.44%)
  • fedora-44-xfce_dom0-dispvm-api (mean:8.122): 97.46
  • fedora-44-xfce_dom0-dispvm-gui-api (mean:10.282): 123.39
  • fedora-44-xfce_dom0-dispvm-preload-2-api (mean:4.206): 50.47
  • fedora-44-xfce_dom0-dispvm-preload-2-delay-0-api (mean:3.876): 46.51
  • fedora-44-xfce_dom0-dispvm-preload-2-delay-minus-1d2-api (mean:4.128): 49.53
  • fedora-44-xfce_dom0-dispvm-preload-4-api (mean:3.033): 36.39
  • fedora-44-xfce_dom0-dispvm-preload-4-delay-0-api (mean:2.799): 33.59
  • fedora-44-xfce_dom0-dispvm-preload-4-delay-minus-1d2-api (mean:2.91): 34.92
  • fedora-44-xfce_dom0-dispvm-preload-2-gui-api (mean:5.323): 63.88
  • fedora-44-xfce_dom0-dispvm-preload-4-gui-api (mean:4.286): 51.43
  • fedora-44-xfce_dom0-dispvm-preload-6-gui-api (mean:3.558): 42.70
  • fedora-44-xfce_dom0-vm-api (mean:0.033): 0.39
  • fedora-44-xfce_dom0-vm-gui-api (mean:0.03): 0.36
  • whonix-workstation-18_dom0-dispvm-preload-4-delay-0-api (mean:3.394): 40.73 🟢 ( previous job: 43.23, improvement: 94.22%)
  • whonix-workstation-18_dom0-dispvm-preload-4-delay-minus-1d2-api (mean:3.791): 45.49 🔻 ( previous job: 42.67, degradation: 106.62%)
  • whonix-workstation-18_dom0-dispvm-preload-2-gui-api (mean:6.383): 76.59 🔻 ( previous job: 72.05, degradation: 106.31%)
  • whonix-workstation-18_dom0-dispvm-preload-4-gui-api (mean:4.645): 55.74 🔻 ( previous job: 52.81, degradation: 105.54%)
  • whonix-workstation-18_dom0-dispvm-preload-6-gui-api (mean:4.245): 50.94 🔻 ( previous job: 50.72, degradation: 100.44%)
  • whonix-workstation-18_dom0-vm-api (mean:0.035): 0.42 🟢 ( previous job: 0.43, improvement: 96.30%)
  • whonix-workstation-18_dom0-vm-gui-api (mean:0.045): 0.54 🟢 ( previous job: 0.56, improvement: 97.66%)

@ben-grande

Copy link
Copy Markdown
Contributor Author

Not sure to which PR this is related:

https://openqa.qubes-os.org/tests/192802/logfile?filename=serial_terminal.txt

root# pidof -x qvm-start-gui || echo qvm-start-gui crashed; echo 2V_De-$?-
qvm-start-gui crashed

@marmarek

Copy link
Copy Markdown
Member

root# pidof -x qvm-start-gui || echo qvm-start-gui crashed; echo 2V_De-$?-

This one is an outdated test, it's called qvm-start-daemon nowadays. The actual error is:

fedora-44-xfce:err: Traceback (most recent call last):
fedora-44-xfce:err:   File "/run/qubes-update/agent/entrypoint.py", line 217, in <module>
fedora-44-xfce:err:     sys.exit(main())
fedora-44-xfce:err:              ~~~~^^
fedora-44-xfce:err:   File "/run/qubes-update/agent/entrypoint.py", line 34, in main
fedora-44-xfce:err:     pkg_mng = get_package_manager(
fedora-44-xfce:err:         os_data,
fedora-44-xfce:err:     ...<4 lines>...
fedora-44-xfce:err:         parsed_args.no_progress,
fedora-44-xfce:err:     )
fedora-44-xfce:err:   File "/run/qubes-update/agent/entrypoint.py", line 100, in get_package_manager
fedora-44-xfce:err:     PackageManager = import_rhel_package_manager(os_data, log, no_progress)
fedora-44-xfce:err:   File "/run/qubes-update/agent/entrypoint.py", line 156, in import_rhel_package_manager
fedora-44-xfce:err:     from source.dnf.dnf_cli import DNFCLI as PackageManager
fedora-44-xfce:err:   File "/run/qubes-update/agent/source/dnf/dnf_cli.py", line 26, in <module>
fedora-44-xfce:err:     import random
fedora-44-xfce:err:   File "/usr/lib64/python3.14/random.py", line 63, in <module>
fedora-44-xfce:err:     import _random
fedora-44-xfce:err: ImportError: internal Python C API version mismatch: module _random compiled with 3.14.7; runtime version is 3.14.6

I guess an issue with Fedora update...

Comment thread qubes/events.py
Comment on lines +191 to +213
@staticmethod
@functools.cache
def _sort_handlers(handlers):
handlers = tuple(
sorted(
handlers,
key=(lambda handler: hasattr(handler, "ha_bound")),
reverse=True,
)
)
return handlers

@staticmethod
@functools.cache
def _get_handler_funcs(sorted_handlers) -> tuple[list, list]:
sync_funcs = []
async_funcs = []
for func in sorted_handlers:
if asyncio.iscoroutinefunction(func):
async_funcs.append(func)
else:
sync_funcs.append(func)
return sync_funcs, async_funcs

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.

Those two are always used together, do they really need to be separate functions? Merging them could avoid creating yet another intermediate tuple.

Comment thread qubes/events.py
@functools.cache
def _get_ordered_mro(mro, pre_event: bool) -> tuple:
order = tuple(
method for method in mro if hasattr(method, "__handlers__")

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.

Those aren't really methods, but classes.

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.

3 participants