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

usbtop: init at 1.0 #67758

Merged
merged 2 commits into from Aug 31, 2019
Merged

usbtop: init at 1.0 #67758

merged 2 commits into from Aug 31, 2019

Conversation

etu
Copy link
Contributor

@etu etu commented Aug 30, 2019

Motivation for this change

usbtop is a top-like utility for displaying traffic on USB buses.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@ivan
Copy link
Member

ivan commented Aug 30, 2019

This builds and runs for me on NixOS x86_64, but then I continued testing by repeatedly starting usbtop during a btrfs scrub start ... on a problem-free Samsung MUF 256GB, and got:

Aug 30 15:34:34 plato kernel: usb 4-2: usbfs: USBDEVFS_CONTROL failed cmd usbtop rqt 128 rq 6 len 273 ret -110
Aug 30 15:34:45 plato kernel: usb 4-2: usbfs: USBDEVFS_CONTROL failed cmd usbtop rqt 128 rq 6 len 273 ret -110
Aug 30 15:34:51 plato kernel: usb 4-2: usbfs: USBDEVFS_CONTROL failed cmd usbtop rqt 128 rq 6 len 273 ret -110
Aug 30 15:35:02 plato kernel: xhci_hcd 0000:26:00.0: Timeout while waiting for setup device command
Aug 30 15:35:02 plato kernel: usb 4-2: Device not responding to setup address.
Aug 30 15:35:03 plato kernel: usb 4-2: device not accepting address 2, error -71
Aug 30 15:35:03 plato kernel: usb 4-2: Device not responding to setup address.
Aug 30 15:35:03 plato kernel: usb 4-2: Device not responding to setup address.
Aug 30 15:35:03 plato kernel: usb 4-2: device not accepting address 2, error -71
Aug 30 15:35:03 plato kernel: usb 4-2: Device not responding to setup address.
Aug 30 15:35:04 plato kernel: usb 4-2: Device not responding to setup address.
Aug 30 15:35:04 plato kernel: usb 4-2: device not accepting address 2, error -71
Aug 30 15:35:04 plato kernel: usb 4-2: Device not responding to setup address.
Aug 30 15:35:04 plato kernel: usb 4-2: Device not responding to setup address.
Aug 30 15:35:04 plato kernel: usb 4-2: device not accepting address 2, error -71
Aug 30 15:35:04 plato kernel: usb 4-2: USB disconnect, device number 2
Aug 30 15:35:04 plato kernel: print_req_error: I/O error, dev sdc, sector 18620416
Aug 30 15:35:04 plato kernel: print_req_error: I/O error, dev sdc, sector 18622464
Aug 30 15:35:04 plato kernel: print_req_error: I/O error, dev sdc, sector 18620416
Aug 30 15:35:04 plato kernel: BTRFS error (device dm-2): bdev /dev/mapper/Samsung-256-1 errs: wr 0, rd 1, flush 0, corrupt 0, gen 0
Aug 30 15:35:04 plato kernel: BTRFS error (device dm-2): bdev /dev/mapper/Samsung-256-1 errs: wr 0, rd 2, flush 0, corrupt 0, gen 0
Aug 30 15:35:04 plato kernel: BTRFS error (device dm-2): bdev /dev/mapper/Samsung-256-1 errs: wr 0, rd 3, flush 0, corrupt 0, gen 0
Aug 30 15:35:04 plato kernel: BTRFS error (device dm-2): unable to fixup (regular) error at logical 8448376832 on dev /dev/mapper/Samsung-256-1
Aug 30 15:35:04 plato kernel: BTRFS error (device dm-2): bdev /dev/mapper/Samsung-256-1 errs: wr 0, rd 4, flush 0, corrupt 0, gen 0
Aug 30 15:35:04 plato kernel: BTRFS error (device dm-2): bdev /dev/mapper/Samsung-256-1 errs: wr 0, rd 5, flush 0, corrupt 0, gen 0
Aug 30 15:35:04 plato kernel: BTRFS error (device dm-2): bdev /dev/mapper/Samsung-256-1 errs: wr 0, rd 6, flush 0, corrupt 0, gen 0
Aug 30 15:35:04 plato kernel: BTRFS error (device dm-2): unable to fixup (regular) error at logical 8448380928 on dev /dev/mapper/Samsung-256-1
Aug 30 15:35:04 plato kernel: BTRFS error (device dm-2): bdev /dev/mapper/Samsung-256-1 errs: wr 0, rd 7, flush 0, corrupt 0, gen 0
Aug 30 15:35:04 plato kernel: BTRFS error (device dm-2): bdev /dev/mapper/Samsung-256-1 errs: wr 0, rd 8, flush 0, corrupt 0, gen 0
Aug 30 15:35:04 plato kernel: BTRFS error (device dm-2): bdev /dev/mapper/Samsung-256-1 errs: wr 0, rd 9, flush 0, corrupt 0, gen 0
Aug 30 15:35:04 plato kernel: BTRFS error (device dm-2): unable to fixup (regular) error at logical 8448385024 on dev /dev/mapper/Samsung-256-1
Aug 30 15:35:04 plato kernel: BTRFS error (device dm-2): bdev /dev/mapper/Samsung-256-1 errs: wr 0, rd 10, flush 0, corrupt 0, gen 0
Aug 30 15:35:04 plato kernel: BTRFS error (device dm-2): unable to fixup (regular) error at logical 8448389120 on dev /dev/mapper/Samsung-256-1
Aug 30 15:35:04 plato kernel: BTRFS error (device dm-2): unable to fixup (regular) error at logical 8448393216 on dev /dev/mapper/Samsung-256-1
Aug 30 15:35:04 plato kernel: BTRFS error (device dm-2): unable to fixup (regular) error at logical 8448397312 on dev /dev/mapper/Samsung-256-1
Aug 30 15:35:04 plato kernel: BTRFS error (device dm-2): unable to fixup (regular) error at logical 8448401408 on dev /dev/mapper/Samsung-256-1
Aug 30 15:35:04 plato kernel: BTRFS error (device dm-2): unable to fixup (regular) error at logical 8448405504 on dev /dev/mapper/Samsung-256-1
Aug 30 15:35:04 plato kernel: BTRFS error (device dm-2): unable to fixup (regular) error at logical 8448409600 on dev /dev/mapper/Samsung-256-1
Aug 30 15:35:04 plato kernel: BTRFS error (device dm-2): unable to fixup (regular) error at logical 8448413696 on dev /dev/mapper/Samsung-256-1
Aug 30 15:35:04 plato kernel: scsi 6:0:0:0: rejecting I/O to dead device
Aug 30 15:35:04 plato kernel: print_req_error: I/O error, dev sdc, sector 18620672
Aug 30 15:35:05 plato kernel: scsi 6:0:0:0: rejecting I/O to dead device
Aug 30 15:35:05 plato kernel: print_req_error: I/O error, dev sdc, sector 18620928
Aug 30 15:35:05 plato kernel: scsi 6:0:0:0: rejecting I/O to dead device
Aug 30 15:35:05 plato kernel: print_req_error: I/O error, dev sdc, sector 18624512
Aug 30 15:35:05 plato kernel: scsi 6:0:0:0: rejecting I/O to dead device
Aug 30 15:35:05 plato kernel: print_req_error: I/O error, dev sdc, sector 18621184
Aug 30 15:35:05 plato kernel: scsi 6:0:0:0: rejecting I/O to dead device
Aug 30 15:35:05 plato kernel: print_req_error: I/O error, dev sdc, sector 18621440
Aug 30 15:35:05 plato kernel: scsi 6:0:0:0: rejecting I/O to dead device
Aug 30 15:35:05 plato kernel: print_req_error: I/O error, dev sdc, sector 18621696
Aug 30 15:35:05 plato kernel: scsi 6:0:0:0: rejecting I/O to dead device
Aug 30 15:35:05 plato kernel: print_req_error: I/O error, dev sdc, sector 18626560
Aug 30 15:35:05 plato usbguard-daemon[829]: [1567179305.077] (W) Ignoring unknown UEvent action: sysfs_devpath=/devices/pci0000:00/0000:00:1c.7/0000:26:00.0/usb4/4-2/4-2:1.0 action=unbind
Aug 30 15:35:05 plato usbguard-daemon[829]: [1567179305.094] (W) Ignoring unknown UEvent action: sysfs_devpath=/devices/pci0000:00/0000:00:1c.7/0000:26:00.0/usb4/4-2 action=unbind
Aug 30 15:35:05 plato usbguard-daemon[829]: [1567179305.096] (A) uid=0 pid=829 device.rule='allow id 090c:1000 serial "0347018060001560" name "Flash Drive FIT" hash "4J1o+D9D9x5kCDQFzzQtlD9SHKZZ9/aASnNPYOLcqnQ=" parent-hash ">
Aug 30 15:35:05 plato kernel: BTRFS: error (device dm-2) in btrfs_commit_transaction:2260: errno=-5 IO failure (Error while writing out transaction)
Aug 30 15:35:05 plato kernel: BTRFS info (device dm-2): forced readonly
Aug 30 15:35:05 plato kernel: BTRFS warning (device dm-2): Skipping commit of aborted transaction.
Aug 30 15:35:05 plato kernel: BTRFS: error (device dm-2) in cleanup_transaction:1860: errno=-5 IO failure
Aug 30 15:35:05 plato kernel: BTRFS info (device dm-2): delayed_refs has NO entry
Aug 30 15:35:05 plato kernel: usb 4-2: Device not responding to setup address.
Aug 30 15:35:05 plato kernel: usb 4-2: Device not responding to setup address.
Aug 30 15:35:05 plato kernel: usb 4-2: device not accepting address 3, error -71
Aug 30 15:35:05 plato kernel: usb 4-2: Device not responding to setup address.
Aug 30 15:35:06 plato kernel: usb 4-2: Device not responding to setup address.
Aug 30 15:35:06 plato kernel: usb 4-2: device not accepting address 4, error -71
Aug 30 15:35:06 plato kernel: usb usb4-port2: attempt power cycle
Aug 30 15:35:11 plato kernel: xhci_hcd 0000:26:00.0: Error while assigning device slot ID
Aug 30 15:35:11 plato kernel: xhci_hcd 0000:26:00.0: Max number of devices this xHCI host supports is 32.
Aug 30 15:35:11 plato kernel: usb usb4-port2: couldn't allocate usb_device

usbtop-btrfs-scrub-50

@etu
Copy link
Contributor Author

etu commented Aug 30, 2019

@ivan Sounds more... like a bug with this program, btrfs or a resource limitation of some kind. Maybe it should be reported somewhere?

@aanderse
Copy link
Member

@etu you've run this a bit with no problems? Everything looks good. Ready for a merge?

@etu
Copy link
Contributor Author

etu commented Aug 31, 2019

@aanderse Yeah, works fine for me here. So I don't think it's a packaging issue.

Copy link
Member

@aanderse aanderse left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@aanderse aanderse merged commit 5858a36 into NixOS:master Aug 31, 2019
@etu etu deleted the init-usbtop branch August 31, 2019 13:52
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.

None yet

4 participants