You are not logged in.

#1 2018-04-16 15:02:17

nesk
Member
Registered: 2011-03-31
Posts: 181

[solved] USB Flash drives no longer work

I have 3 of them - exact same symptoms for each, so I think hardware failure can be ruled out.

Scenario:

  • Insert the drive

  • Run parted /dev/sdX on it

  • Exit parted, run it again - it hangs at startup

  • Get this in journal:

    Apr 16 17:48:31 arch systemd-udevd[763]: seq 3823 '/devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.0/host3/target3:0:0/3:0:0:0/block/sdc' is taking a long time
    Apr 16 17:50:31 arch systemd-udevd[763]: seq 3823 '/devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.0/host3/target3:0:0/3:0:0:0/block/sdc' killed
    Apr 16 17:50:31 arch systemd-udevd[763]: worker [1058] terminated by signal 9 (KILL)
    Apr 16 17:50:31 arch systemd-udevd[763]: worker [1058] failed while handling '/devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.0/host3/target3:0:0/3:0:0:0/block/sdc'

    parted can't be killed, not even with kill -9

Restarting systemd-udevd.service doesn't help.

Last edited by nesk (2018-04-18 05:30:40)

Offline

#2 2018-04-16 15:11:42

ooo
Member
Registered: 2013-04-10
Posts: 1,637

Re: [solved] USB Flash drives no longer work

Did you test with different usb-ports (and cables) before ruling out hardware failure?

Offline

#3 2018-04-16 15:42:14

nesk
Member
Registered: 2011-03-31
Posts: 181

Re: [solved] USB Flash drives no longer work

ooo wrote:

Did you test with different usb-ports (and cables) before ruling out hardware failure?

Yes, with 2 different ports.

Offline

#4 2018-04-16 16:26:50

seth
Member
Registered: 2012-09-03
Posts: 49,951

Re: [solved] USB Flash drives no longer work

dmesg?
(You can "dmesg -w" and then trigger the issue to live-view its kernel messages)

Offline

#5 2018-04-16 17:21:45

nesk
Member
Registered: 2011-03-31
Posts: 181

Re: [solved] USB Flash drives no longer work

seth wrote:

dmesg?
(You can "dmesg -w" and then trigger the issue to live-view its kernel messages)

[ 5339.122636] usb 3-2: new SuperSpeed USB device number 3 using xhci_hcd
[ 5339.140012] usb 3-2: New USB device found, idVendor=090c, idProduct=1000
[ 5339.140017] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 5339.140020] usb 3-2: Product: Flash Drive
[ 5339.140023] usb 3-2: Manufacturer: Samsung
[ 5339.140025] usb 3-2: SerialNumber: 0342416020016714
[ 5339.143392] usb-storage 3-2:1.0: USB Mass Storage device detected
[ 5339.143559] scsi host3: usb-storage 3-2:1.0
[ 5340.398832] scsi 3:0:0:0: Direct-Access     Samsung  Flash Drive      1100 PQ: 0 ANSI: 6
[ 5340.416246] sd 3:0:0:0: [sdc] 31326208 512-byte logical blocks: (16.0 GB/14.9 GiB)
[ 5340.416736] sd 3:0:0:0: [sdc] Write Protect is off
[ 5340.416743] sd 3:0:0:0: [sdc] Mode Sense: 43 00 00 00
[ 5340.417166] sd 3:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 5340.424900]  sdc:
[ 5340.426428] sd 3:0:0:0: [sdc] Attached SCSI removable disk
[ 5373.068052]  sdc:
[ 5530.621575] INFO: task kworker/u8:4:2750 blocked for more than 120 seconds.
[ 5530.621582]       Not tainted 4.15.15-1-zen #1
[ 5530.621584] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 5530.621588] kworker/u8:4    D    0  2750      2 0x80000000
[ 5530.621598] Workqueue: events_freezable_power_ disk_events_workfn
[ 5530.621600] Call Trace:
[ 5530.621609]  ? __schedule+0x5d5/0xe10
[ 5530.621615]  ? sbitmap_get+0x73/0x120
[ 5530.621618]  schedule+0x2d/0xc0
[ 5530.621624]  io_schedule+0x41/0x70
[ 5530.621629]  blk_mq_get_tag+0x204/0x420
[ 5530.621633]  ? wait_woken+0x80/0x80
[ 5530.621637]  blk_mq_get_request+0xf9/0x410
[ 5530.621642]  blk_mq_alloc_request+0x7e/0xe0
[ 5530.621647]  blk_get_request_flags+0x40/0x1a0
[ 5530.621661]  scsi_test_unit_ready+0x57/0x200 [scsi_mod]
[ 5530.621668]  sd_check_events+0x18f/0x260 [sd_mod]
[ 5530.621673]  disk_events_workfn+0x66/0x160
[ 5530.621679]  process_one_work+0x1e9/0x4f0
[ 5530.621684]  worker_thread+0x2b/0x450
[ 5530.621689]  ? process_one_work+0x4f0/0x4f0
[ 5530.621692]  kthread+0x163/0x180
[ 5530.621696]  ? kthread_associate_blkcg+0xe0/0xe0
[ 5530.621700]  ? do_syscall_64+0x74/0x190
[ 5530.621703]  ? SyS_exit+0x13/0x20
[ 5530.621707]  ret_from_fork+0x35/0x40
[ 5530.621731] INFO: task parted:3106 blocked for more than 120 seconds.
[ 5530.621734]       Not tainted 4.15.15-1-zen #1
[ 5530.621736] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 5530.621739] parted          D    0  3106   3042 0x00000000
[ 5530.621743] Call Trace:
[ 5530.621747]  ? __schedule+0x5d5/0xe10
[ 5530.621752]  ? add_to_page_cache_lru+0x1ce/0x370
[ 5530.621756]  schedule+0x2d/0xc0
[ 5530.621760]  io_schedule+0x41/0x70
[ 5530.621763]  do_read_cache_page+0x34f/0x680
[ 5530.621768]  ? blkdev_writepages+0x30/0x30
[ 5530.621774]  ? file_check_and_advance_wb_err+0xf0/0xf0
[ 5530.621778]  read_dev_sector+0x28/0xc0
[ 5530.621787]  scsicam_bios_param+0x60/0x3c0 [scsi_mod]
[ 5530.621793]  sd_getgeo+0xbf/0xd0 [sd_mod]
[ 5530.621797]  blkdev_ioctl+0x1ed/0xbf0
[ 5530.621801]  ? _raw_spin_unlock+0x16/0x30
[ 5530.621806]  block_ioctl+0x39/0x40
[ 5530.621811]  SyS_ioctl+0x101/0x8c0
[ 5530.621815]  ? ____fput+0x166/0x1e0
[ 5530.621818]  ? preempt_count_add+0x68/0xa0
[ 5530.621822]  ? _raw_spin_lock_irq+0x1a/0x40
[ 5530.621826]  ? _raw_spin_unlock_irq+0x1d/0x30
[ 5530.621828]  ? task_work_run+0x6f/0xa0
[ 5530.621833]  do_syscall_64+0x74/0x190
[ 5530.621838]  entry_SYSCALL_64_after_hwframe+0x3d/0xa2
[ 5530.621841] RIP: 0033:0x7f0c873fed87
[ 5530.621843] RSP: 002b:00007ffeaa7a5388 EFLAGS: 00000202 ORIG_RAX: 0000000000000010
[ 5530.621846] RAX: ffffffffffffffda RBX: 0000558c4c209a40 RCX: 00007f0c873fed87
[ 5530.621848] RDX: 00007ffeaa7a5390 RSI: 0000000000000301 RDI: 0000000000000003
[ 5530.621850] RBP: 0000558c4c247ce0 R08: 0000000000000000 R09: 0000000000000000
[ 5530.621851] R10: 00007f0c87460860 R11: 0000000000000202 R12: 0000558c4c247ce0
[ 5530.621853] R13: 0000558c4c259280 R14: 0000558c4c247ce0 R15: 0000000000000020

And after a short while in journalctl -f:

Apr 16 20:19:16 arch systemd-udevd[267]: worker [3105] terminated by signal 9 (KILL)
Apr 16 20:19:16 arch systemd-udevd[267]: worker [3105] failed while handling '/devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.0/host3/target3:0:0/3:0:0:0/block/sdc'

Offline

#6 2018-04-16 17:37:06

seth
Member
Registered: 2012-09-03
Posts: 49,951

Re: [solved] USB Flash drives no longer work

What if you blacklist (install /bin/false, see https://wiki.archlinux.org/index.php/Ke … cklisting) xhci_hcd? (Ensure ehci_hcd is in use)
Is this a notebook?

Offline

#7 2018-04-16 18:47:15

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,410

Re: [solved] USB Flash drives no longer work

That's a known issue with blk-mq / BFQ and certain USB drives. Disable blk-mq for now: https://bugs.archlinux.org/task/57496

Offline

#8 2018-04-18 05:30:24

nesk
Member
Registered: 2011-03-31
Posts: 181

Re: [solved] USB Flash drives no longer work

V1del wrote:

That's a known issue with blk-mq / BFQ and certain USB drives. Disable blk-mq for now: https://bugs.archlinux.org/task/57496

Looks like that's it - can't reproduce it without blk-mq stuff on cmdline. Thanks. FWIW - I am using linux-zen.

seth wrote:

What if you blacklist (install /bin/false, see https://wiki.archlinux.org/index.php/Ke … cklisting) xhci_hcd? (Ensure ehci_hcd is in use)
Is this a notebook?

Thanks for the follow-up, seth.

Offline

Board footer

Powered by FluxBB