Skip to content

BFQ and powering off usb storage devices #33

Closed

Description

@nicholas-peffer

Having issues with BFQ & powering off usb storage. I cannot reproduce the error when using the deadline scheduler on arch linux..

Linux arch64 4.2.3-1-zen #1 ZEN SMP PREEMPT Thu Oct 15 13:44:16 SAST 2015 x86_64 GNU/Linux

udisksctl power-off -b /dev/sda will result in:

Oct 15 14:00:07 arch64 udisksd[420]: Ignoring SCSI command SYNCHRONIZE CACHE failure (Non-GOOD SCSI status from SGIO v3 ioctl: status=2 host_status=0 driver_status=8) on /dev/sdf
Oct 15 14:00:07 arch64 udisksd[420]: Successfully sent SCSI command START STOP UNIT to /dev/sdf
Oct 15 14:00:07 arch64 udisksd[420]: Powered off /dev/sdf - successfully wrote to sysfs path /sys/devices/pci0000:00/0000:00:1d.7/usb4/4-1/4-1.3/remove
Oct 15 14:00:07 arch64 kernel: usb 4-1.3: USB disconnect, device number 6
Oct 15 14:00:07 arch64 udisksd[420]: Successfully sent SCSI command SYNCHRONIZE CACHE to /dev/sdg
Oct 15 14:00:07 arch64 udisksd[420]: Successfully sent SCSI command START STOP UNIT to /dev/sdg
Oct 15 14:00:07 arch64 kernel: BUG: unable to handle kernel NULL pointer dereference at 00000000000006d0
Oct 15 14:00:07 arch64 kernel: IP: [<ffffffff8129b1cb>] blk_throtl_drain+0x2b/0x110
Oct 15 14:00:07 arch64 kernel: PGD 733b5067 PUD 718c8067 PMD 0 
Oct 15 14:00:07 arch64 kernel: Oops: 0000 [#1] PREEMPT SMP 
Oct 15 14:00:07 arch64 kernel: Modules linked in: fuse nls_iso8859_1 nls_cp437 vfat fat reiserfs coretemp i2c_i801 snd_hda_codec_realtek snd_hda_codec_generic mousedev snd_hda_intel snd_hda_codec snd_hwdep snd_hda_core snd_pcm serio_raw option usb_wwan usbserial lpc_ich mfd_core snd_timer snd rng_core acpi_cpufreq thermal processor tpm_infineon tpm_tis evdev r8169 mii tpm soundcore intel_agp shpchp ip_tables x_tables hid_generic usbhid hid sr_mod cdrom uas usb_storage sd_mod ata_generic pata_acpi atkbd libps2 ehci_pci uhci_hcd ehci_hcd ata_piix sata_via usbcore usb_common i8042 serio libata scsi_mod ext4 crc16 mbcache jbd2 xfs crc32c_generic libcrc32c jfs i915 video button intel_gtt i2c_algo_bit drm_kms_helper drm
Oct 15 14:00:07 arch64 kernel: CPU: 0 PID: 650 Comm: pool Not tainted 4.2.3-1-zen #1
Oct 15 14:00:07 arch64 kernel: Hardware name: O.E.M O.E.M/G41MXE/G41MXE-K, BIOS 080015  05/11/2010
Oct 15 14:00:07 arch64 kernel: task: ffff8800673924c0 ti: ffff880069604000 task.ti: ffff880069604000
Oct 15 14:00:07 arch64 kernel: RIP: 0010:[<ffffffff8129b1cb>]  [<ffffffff8129b1cb>] blk_throtl_drain+0x2b/0x110
Oct 15 14:00:07 arch64 kernel: RSP: 0018:ffff8800696078b8  EFLAGS: 00010046
Oct 15 14:00:07 arch64 kernel: RAX: 0000000000000000 RBX: ffff8800726f2af8 RCX: 0000000000000000
Oct 15 14:00:07 arch64 kernel: RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
Oct 15 14:00:07 arch64 kernel: RBP: ffff8800696078d8 R08: ffff880069604000 R09: 0000000000000000
Oct 15 14:00:07 arch64 kernel: R10: 0000000000000000 R11: 0000000000000246 R12: ffff8800745cb000
Oct 15 14:00:07 arch64 kernel: R13: ffff8800726f2af8 R14: ffff880073391418 R15: ffff880073391458
Oct 15 14:00:07 arch64 kernel: FS:  00007f716880a700(0000) GS:ffff880077600000(0000) knlGS:0000000000000000
Oct 15 14:00:07 arch64 kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
Oct 15 14:00:07 arch64 kernel: CR2: 00000000000006d0 CR3: 0000000072e04000 CR4: 00000000000406f0
Oct 15 14:00:07 arch64 kernel: Stack:
Oct 15 14:00:07 arch64 kernel:  ffff880073391418 ffff8800726f2af8 ffffffff818794c0 0000000000000000
Oct 15 14:00:07 arch64 kernel:  ffff8800696078e8 ffffffff81297808 ffff880069607918 ffffffff8127b86b
Oct 15 14:00:07 arch64 kernel:  ffff88007350c750 ffff8800726f2af8 ffffffff818794c0 ffff8800726f2af8
Oct 15 14:00:07 arch64 kernel: Call Trace:
Oct 15 14:00:07 arch64 kernel:  [<ffffffff81297808>] blkcg_drain_queue+0x18/0x20
Oct 15 14:00:07 arch64 kernel:  [<ffffffff8127b86b>] __blk_drain_queue+0xbb/0x160
Oct 15 14:00:07 arch64 kernel:  [<ffffffff8127c49c>] blk_queue_bypass_start+0x5c/0x80
Oct 15 14:00:07 arch64 kernel:  [<ffffffff81296ab9>] blkcg_deactivate_policy+0x39/0x100
Oct 15 14:00:07 arch64 kernel:  [<ffffffff812a9017>] bfq_exit_queue+0x1a7/0x200
Oct 15 14:00:07 arch64 kernel:  [<ffffffff8127740f>] elevator_exit+0x2f/0x50
Oct 15 14:00:07 arch64 kernel:  [<ffffffff812806ae>] blk_release_queue+0x4e/0xc0
Oct 15 14:00:07 arch64 kernel:  [<ffffffff812b24ac>] kobject_put+0x9c/0x1d0
Oct 15 14:00:07 arch64 kernel:  [<ffffffff8127b7a5>] blk_put_queue+0x15/0x20
Oct 15 14:00:07 arch64 kernel:  [<ffffffffa02ef896>] scsi_device_dev_release_usercontext+0x156/0x1b0 [scsi_mod]
Oct 15 14:00:07 arch64 kernel:  [<ffffffff81083955>] execute_in_process_context+0x65/0x70
Oct 15 14:00:07 arch64 kernel:  [<ffffffffa02ef73c>] scsi_device_dev_release+0x1c/0x20 [scsi_mod]
Oct 15 14:00:07 arch64 kernel:  [<ffffffff813b92c6>] device_release+0x36/0xa0
Oct 15 14:00:07 arch64 kernel:  [<ffffffff812b24ac>] kobject_put+0x9c/0x1d0
Oct 15 14:00:07 arch64 kernel:  [<ffffffff813b96c7>] put_device+0x17/0x20
Oct 15 14:00:07 arch64 kernel:  [<ffffffffa02f05f8>] __scsi_remove_device+0x98/0xd0 [scsi_mod]
Oct 15 14:00:07 arch64 kernel:  [<ffffffffa02eebb0>] scsi_forget_host+0x60/0x70 [scsi_mod]
Oct 15 14:00:07 arch64 kernel:  [<ffffffffa02e4279>] scsi_remove_host+0x79/0x140 [scsi_mod]
Oct 15 14:00:07 arch64 kernel:  [<ffffffffa03f71f9>] usb_stor_disconnect+0x59/0xd0 [usb_storage]
Oct 15 14:00:07 arch64 kernel:  [<ffffffffa0431743>] usb_unbind_interface+0x83/0x270 [usbcore]
Oct 15 14:00:07 arch64 kernel:  [<ffffffff813c8503>] ? rpm_idle+0x23/0x260
Oct 15 14:00:07 arch64 kernel:  [<ffffffff813be001>] __device_release_driver+0xa1/0x150
Oct 15 14:00:07 arch64 kernel:  [<ffffffff813be0d3>] device_release_driver+0x23/0x30
Oct 15 14:00:07 arch64 kernel:  [<ffffffff813bd735>] bus_remove_device+0x105/0x180
Oct 15 14:00:07 arch64 kernel:  [<ffffffff813b9c99>] device_del+0x139/0x260
Oct 15 14:00:07 arch64 kernel:  [<ffffffffa042ef99>] usb_disable_device+0x89/0x270 [usbcore]
Oct 15 14:00:07 arch64 kernel:  [<ffffffffa042f9e5>] usb_set_configuration+0x105/0x8e0 [usbcore]
Oct 15 14:00:07 arch64 kernel:  [<ffffffff8115914b>] ? lru_cache_add_active_or_unevictable+0x2b/0x90
Oct 15 14:00:07 arch64 kernel:  [<ffffffffa04351a8>] remove_store+0x58/0x70 [usbcore]
Oct 15 14:00:07 arch64 kernel:  [<ffffffff813b8ea8>] dev_attr_store+0x18/0x30
Oct 15 14:00:07 arch64 kernel:  [<ffffffff8122f3c7>] sysfs_kf_write+0x37/0x40
Oct 15 14:00:07 arch64 kernel:  [<ffffffff8122e96a>] kernfs_fop_write+0x11a/0x170
Oct 15 14:00:07 arch64 kernel:  [<ffffffff811b85a8>] __vfs_write+0x18/0x40
Oct 15 14:00:07 arch64 kernel:  [<ffffffff811b8e14>] vfs_write+0xa4/0x190
Oct 15 14:00:07 arch64 kernel:  [<ffffffff811b9b05>] SyS_write+0x55/0xc0
Oct 15 14:00:07 arch64 kernel:  [<ffffffff81546d2e>] entry_SYSCALL_64_fastpath+0x12/0x71
Oct 15 14:00:07 arch64 kernel: Code: 66 66 66 66 90 55 48 89 e5 41 55 49 89 fd 41 54 53 48 83 ec 08 4c 8b a7 08 08 00 00 e8 0f c2 e2 ff 31 ff 49 8b 84 24 a0 00 00 00 <48> 8b 80 d0 06 00 00 48 8b 70 28 e8 55 b6 e5 ff 48 85 c0 74 5f 
Oct 15 14:00:07 arch64 kernel: RIP  [<ffffffff8129b1cb>] blk_throtl_drain+0x2b/0x110
Oct 15 14:00:07 arch64 kernel:  RSP <ffff8800696078b8>
Oct 15 14:00:07 arch64 kernel: CR2: 00000000000006d0
Oct 15 14:00:07 arch64 kernel: ---[ end trace 3a75c838254e443d ]---
Oct 15 14:00:07 arch64 kernel: note: pool[650] exited with preempt_count 1

Activity

  1. mmstick commented on Nov 1, 2015

    @mmstick

    Not able to reproduce with 4.2.4.

  2. nicholas-peffer commented on Nov 3, 2015

    @nicholas-peffer
    Author

    Also not able to reproduce on 4.2.5-1 on archlinux.

  3. heftig commented on Nov 3, 2015

    @heftig

    I think this might have been fixed by f592560.

  4. added a commit that references this issue on May 19, 2018
  5. 12 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions