Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Build 2024060404-4.3] openQA test fails in TC_00_Basic.test_203_udev_block_exclude_varlibqubes:starting #9283

Closed
marmarek opened this issue Jun 4, 2024 · 1 comment
Labels
affects-4.3 This issue affects Qubes OS 4.3. C: core diagnosed Technical diagnosis has been performed (see issue comments). P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. pr submitted A pull request has been submitted for this issue. r4.2-host-stable r4.3-host-cur-test T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists.

Comments

@marmarek
Copy link
Member

marmarek commented Jun 4, 2024

Observation

openQA test in scenario qubesos-4.3-update-x86_64-system_tests_basic_vm_qrexec_gui@hw1 fails in
TC_00_Basic

qubes.tests.integ.basic/TC_00_Basic/test_203_udev_block_exclude_varlibqubes
Check if VM images are excluded from udev parsing - ... CRITICAL:qubes.tests.integ.basic.TC_00_Basic.test_203_udev_block_exclude_varlibqubes:starting
WARNING:vm.test-inst-appvm:Activating the test-inst-appvm VM
device-mapper: remove ioctl on origin-fd04:655927  failed: Device or resource busy
Command failed.
ERROR
ERROR:asyncio:Task exception was never retrieved
future: <Task finished name='Task-7112' coro=<QubesVM._domain_stopped_coro() done, defined at /usr/lib/python3.11/site-packages/qubes/vm/qubesvm.py:1308> exception=CalledProcessError(1, '/usr/lib/qubes/destroy-snapshot', None, None)>
Traceback (most recent call last):
  File "/usr/lib64/python3.11/unittest/case.py", line 57, in testPartExecutor
    yield
  File "/usr/lib64/python3.11/unittest/case.py", line 623, in run
    self._callTestMethod(testMethod)
  File "/usr/lib/python3.11/site-packages/qubes/tests/never_awaited.py", line 51, in wrapper
    func(*args, **kwargs)
  File "/usr/lib64/python3.11/unittest/case.py", line 579, in _callTestMethod
    if method() is not None:
       ^^^^^^^^
  File "/usr/lib64/python3.11/contextlib.py", line 81, in inner
    return func(*args, **kwds)
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/qubes/tests/integ/basic.py", line 336, in test_203_udev_block_exclude_varlibqubes
    self.assertVolumesExcludedFromUdev(self.vm)
  File "/usr/lib/python3.11/site-packages/qubes/tests/integ/basic.py", line 269, in assertVolumesExcludedFromUdev
    self.loop.run_until_complete(vm.shutdown(wait=True))
  File "/usr/lib64/python3.11/asyncio/base_events.py", line 653, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/qubes/vm/qubesvm.py", line 1371, in shutdown
    await asyncio.wait_for(waiter, timeout=timeout)
  File "/usr/lib64/python3.11/asyncio/tasks.py", line 489, in wait_for
    return fut.result()
           ^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/qubes/vm/qubesvm.py", line 1319, in _domain_stopped_coro
    await self.fire_event_async('domain-stopped')
  File "/usr/lib/python3.11/site-packages/qubes/events.py", line 234, in fire_event_async
    effect = task.result()
             ^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/qubes/vm/qubesvm.py", line 1335, in on_domain_stopped
    await self.storage.stop()
  File "/usr/lib/python3.11/site-packages/qubes/storage/__init__.py", line 756, in stop
    await qubes.utils.void_coros_maybe(
  File "/usr/lib/python3.11/site-packages/qubes/utils.py", line 277, in void_coros_maybe
    task.result()  # re-raises exception if task failed
    ^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/qubes/storage/file.py", line 483, in stop
    await self._destroy_blockdev()
  File "/usr/lib/python3.11/site-packages/qubes/storage/file.py", line 273, in _destroy_blockdev
    await qubes.utils.run_program(DESTROY_SCRIPT,
  File "/usr/lib/python3.11/site-packages/qubes/utils.py", line 262, in run_program
    raise subprocess.CalledProcessError(p.returncode,
subprocess.CalledProcessError: Command '/usr/lib/qubes/destroy-snapshot' returned non-zero exit status 1.

Test suite description

Reproducible

Fails since (at least) Build 2024052808-4.3

Expected result

Last good: (unknown) (or more recent)

Further details

Always latest result in this scenario: latest

@marmarek marmarek added T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists. P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. labels Jun 4, 2024
@rustybird
Copy link

rustybird commented Jun 4, 2024

Changing the dmsetup -- remove calls in /usr/lib/qubes/destroy-snapshot (there's 3 of them, 1 without the -- end-of-options separator) to dmsetup remove --retry -- might help to paper over whatever is happening here

@andrewdavidwong andrewdavidwong added C: core diagnosed Technical diagnosis has been performed (see issue comments). pr submitted A pull request has been submitted for this issue. affects-4.3 This issue affects Qubes OS 4.3. labels Jun 5, 2024
marmarek added a commit to QubesOS/qubes-core-admin that referenced this issue Jun 25, 2024
destroy-snapshot sometimes fails with "Device or resource busy" error,
retry a few times in case of udev or other process still accessing the
device.

Suggested-by: @rustybird
Fixes QubesOS/qubes-issues#9283

(cherry picked from commit aa86d39)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-4.3 This issue affects Qubes OS 4.3. C: core diagnosed Technical diagnosis has been performed (see issue comments). P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. pr submitted A pull request has been submitted for this issue. r4.2-host-stable r4.3-host-cur-test T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists.
Projects
None yet
Development

No branches or pull requests

4 participants