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

Missing newline in qvm-usb timeout output #5701

Closed
strugee opened this issue Mar 2, 2020 · 8 comments · Fixed by QubesOS/qubes-app-linux-usb-proxy#41
Closed

Missing newline in qvm-usb timeout output #5701

strugee opened this issue Mar 2, 2020 · 8 comments · Fixed by QubesOS/qubes-app-linux-usb-proxy#41
Assignees
Labels
affects-4.1 This issue affects Qubes OS 4.1. affects-4.2 This issue affects Qubes OS 4.2. affects-4.3 This issue affects Qubes OS 4.3. C: core diagnosed Technical diagnosis has been performed (see issue comments). P: minor Priority: minor. The lowest priority, below "default." pr submitted A pull request has been submitted for this issue. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists.

Comments

@strugee
Copy link
Contributor

strugee commented Mar 2, 2020

Qubes OS version:

R4.0

Affected component(s) or functionality:

qvm-usb


Steps to reproduce the behavior:

  1. Run qvm-usb attach <domain> <device> in some situation that will cause an attach timeout (in my case this is a separate bug that I'll report shortly)
  2. Wait a few seconds

Expected or desired behavior:

This error is printed:

Device attach failed: /usr/lib/qubes/usb-import: 94: echo: echo: I/O error
Attach timeout, check kernel log for details. VM: "steevie-cloud" File: "/usr/lib/qubes/usb-import" Version Control: https://github.com/QubesOS/qubes-app-linux-usb-proxy/blob/master/src/usb-import

Maybe without the echo: echo: too, I'm a little confused as to where those are coming from?

Actual behavior:

This is printed:

Device attach failed: /usr/lib/qubes/usb-import: 94: echo: echo: I/O errorAttach timeout, check kernel log for details. VM: "steevie-cloud" File: "/usr/lib/qubes/usb-import" Version Control: https://github.com/QubesOS/qubes-app-linux-usb-proxy/blob/master/src/usb-import

Notice the newline which is missing in between "I/O error" and "Attach timeout".

General notes:

[dom0] $ dnf info qubes-usb-proxy-dom0 | grep Version
Version     : 1.0.27

I have consulted the following relevant documentation:

None

I am aware of the following related, non-duplicate issues:

None

@andrewdavidwong andrewdavidwong added C: core P: minor Priority: minor. The lowest priority, below "default." T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists. labels Mar 3, 2020
@andrewdavidwong andrewdavidwong added this to the Release 4.0 updates milestone Mar 3, 2020
@andrewdavidwong andrewdavidwong added the eol-4.0 Closed because Qubes 4.0 has reached end-of-life (EOL) label Aug 5, 2023
@github-actions
Copy link

github-actions bot commented Aug 5, 2023

This issue is being closed because:

If anyone believes that this issue should be reopened and reassigned to an active milestone, please leave a brief comment.
(For example, if a bug still affects Qubes OS 4.1, then the comment "Affects 4.1" will suffice.)

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 5, 2023
@bakeromso
Copy link

Affects 4.1

@andrewdavidwong andrewdavidwong added needs diagnosis Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed. affects-4.1 This issue affects Qubes OS 4.1. and removed eol-4.0 Closed because Qubes 4.0 has reached end-of-life (EOL) labels Feb 15, 2024
@andrewdavidwong andrewdavidwong removed this from the Release 4.0 updates milestone Feb 15, 2024
@alimirjamali
Copy link

@strugee @bakeromso Could you modify and change one line in the /etc/qubes-rpc/qubes.USBAttach file in your sys-usb:

qrexec-client-vm "$domain" "qubes.USB+$busid" \
    /usr/lib/qubes/usb-import "$statefile" \
    </dev/null >/dev/null 2>/dev/null &

to

qrexec-client-vm "$domain" "qubes.USB+$busid" \
    "$(/usr/lib/qubes/usb-import ${statefile})" \
    </dev/null >/dev/null 2>/dev/null &

and see if it fixes the issue? Since sys-usb is a disposable VM, you should not need to backup the file. Restarting sys-usb would revert the change.

@marmarek
Copy link
Member

that's definitely not how it should be - the /usr/lib/qubes/usb-import path is an argument to qrexec-client-vm (which will call it locally)

@bakeromso
Copy link

@alimirjamali I wouldn't mind testing a fix, however I don't recall what device caused the timeout. If you have a way to force the timeout, then I'd be happy to give it a go.

@marmarek Do you maybe have a different suggestion?

@alimirjamali
Copy link

that's definitely not how it should be - the /usr/lib/qubes/usb-import path is an argument to qrexec-client-vm (which will call it locally)

Sorry for mistake. Just realized it. Mixes another bash related issue with this one. the qrexec-client-vm is not properly parsing the usb-import output. All new-line wraps are missing. Not just one. I will try to look into this further.

@atfinne
Copy link

atfinne commented Aug 31, 2024

if an update is needed

issue still persists

@alimirjamali
Copy link

PR Submitted

Affects 4.2 & 4.3 as well as 4.1

Review priority: Low

Development notes: PR Submitted against main branch of qubes-app-linux-usb-proxy. It should be decided if individual patches are needed for both r4.2 & r4.3 branches.

@andrewdavidwong andrewdavidwong added diagnosed Technical diagnosis has been performed (see issue comments). pr submitted A pull request has been submitted for this issue. affects-4.2 This issue affects Qubes OS 4.2. affects-4.3 This issue affects Qubes OS 4.3. and removed needs diagnosis Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed. labels Aug 31, 2024
alimirjamali added a commit to alimirjamali/qubes-app-linux-usb-proxy that referenced this issue Sep 27, 2024
alimirjamali added a commit to alimirjamali/qubes-app-linux-usb-proxy that referenced this issue Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-4.1 This issue affects Qubes OS 4.1. affects-4.2 This issue affects Qubes OS 4.2. affects-4.3 This issue affects Qubes OS 4.3. C: core diagnosed Technical diagnosis has been performed (see issue comments). P: minor Priority: minor. The lowest priority, below "default." pr submitted A pull request has been submitted for this issue. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants