Re: Kernel Ooops upon USB disconnect of a Western Digital My Passport 1TB drive

2015-02-15 Thread Athlion
Just one more FYI, by blacklisting the ses module, the oops goes away.

On Tue, Feb 3, 2015 at 6:05 PM, Alan Stern st...@rowland.harvard.edu wrote:
 On Tue, 3 Feb 2015, Athlion wrote:

 On Mon, Feb 2, 2015 at 7:27 PM, Alan Stern st...@rowland.harvard.edu wrote:

  Had you made any changes to the runtime suspend settings?
  blk_post_runtime_resume wouldn't be called unless the drive had gone
  into runtime suspend.  And even then, it's not likely to be called
  after you unplug the USB cable.
 
  Alan Stern

 I have enabled SCSI ATA Bus power management with this udev rule:
 ACTION==add, SUBSYSTEM==scsi_host, KERNEL==host*,
 ATTR{link_power_management_policy}=min_power

 That won't have any effect on SCSI over USB, as far as I know.

 ( And generally almost all of actions herein:
 https://wiki.archlinux.org/index.php/Power_saving#Laptop_Mode )

 Here's another with dynamic debugging on (and some of the stack trace):

 [ 1565.610481] usb usb2: usb wakeup-resume
 [ 1565.613019] usb usb2: usb auto-resume
 [ 1565.615599] hub 2-0:1.0: hub_resume
 [ 1565.617876] usb usb2-port1: status 0507 change 
 [ 1565.620125] hub 2-0:1.0: state 7 ports 3 chg  evt 
 [ 1565.623471] hub 2-0:1.0: state 7 ports 3 chg  evt 
 [ 1565.650219] hub 2-0:1.0: state 7 ports 3 chg  evt 0002
 [ 1565.663520] usb 2-1: usb wakeup-resume
 [ 1565.665518] usb 2-1: finish resume
 [ 1565.667684] hub 2-1:1.0: hub_resume
 [ 1565.669812] usb 2-1-port2: status 0101 change 0001
 [ 1565.773645] usb usb2-port1: resume, status 0
 [ 1565.776031] hub 2-1:1.0: state 7 ports 8 chg 0004 evt 
 [ 1565.778664] usb 2-1-port2: status 0101, change , 12 Mb/s
 [ 1565.847291] usb 2-1.2: new high-speed USB device number 3 using ehci-pci
 [ 1565.860480] usb 2-1-port2: not reset yet, waiting 10ms
 [ 1565.945202] usb 2-1.2: default language 0x0409
 [ 1565.947882] usb 2-1.2: udev 3, busnum 2, minor = 130
 [ 1565.950384] usb 2-1.2: usb_probe_device
 [ 1565.952704] usb 2-1.2: configuration #1 chosen from 1 choice
 [ 1565.955145] usb 2-1.2: adding 2-1.2:1.0 (config #1, interface 0)
 [ 1565.957630] hub 2-1:1.0: state 7 ports 8 chg  evt 0004
 [ 1566.005124] usb-storage 2-1.2:1.0: usb_probe_interface
 [ 1566.006655] usb-storage 2-1.2:1.0: usb_probe_interface - got id
 [ 1566.008169] usb-storage 2-1.2:1.0: USB Mass Storage device detected
 [ 1566.010155] scsi host6: usb-storage 2-1.2:1.0
 [ 1566.012149] usbcore: registered new interface driver usb-storage
 [ 1566.016061] usbcore: registered new interface driver uas
 [ 1567.015852] scsi 6:0:0:0: Direct-Access WD   My Passport
 0748 1016 PQ: 0 ANSI: 6
 [ 1567.018966] scsi 6:0:0:1: Enclosure WD   SES Device
   1016 PQ: 0 ANSI: 6

 Your device contains two Logical Units.  One of them is the My Passport
 disk drive, and the other is the SES Device enclosure.

 [ 1567.027072] scsi 6:0:0:1: scsi_runtime_idle
 [ 1567.029695] sd 6:0:0:0: [sdb] Spinning up disk...
 [ 1567.032764] scsi 6:0:0:1: scsi_runtime_suspend
 [ 1568.031907] .ready
 [ 1569.060225] sd 6:0:0:0: [sdb] 1953458176 512-byte logical blocks:
 (1.00 TB/931 GiB)
 [ 1569.063857] sd 6:0:0:0: [sdb] Write Protect is off
 [ 1569.065613] ses 6:0:0:1: Attached Enclosure device
 [ 1569.068492] sd 6:0:0:0: [sdb] Mode Sense: 47 00 10 08
 [ 1569.071598] sd 6:0:0:0: [sdb] No Caching mode page found
 [ 1569.073628] sd 6:0:0:0: [sdb] Assuming drive cache: write through
 [ 1569.087891]  sdb: sdb1
 [ 1569.093382] sd 6:0:0:0: [sdb] Attached SCSI disk
 [ 1615.830142] hub 2-1:1.0: state 7 ports 8 chg  evt 0004
 [ 1615.833066] usb 2-1-port2: status 0100, change 0001, 12 Mb/s
 [ 1615.835764] usb 2-1.2: USB disconnect, device number 3
 [ 1615.838471] usb 2-1.2: unregistering device
 [ 1615.841199] usb 2-1.2: unregistering interface 2-1.2:1.0
 [ 1615.844996] scsi target6:0:0: scsi_runtime_idle
 [ 1615.848746] scsi target6:0:0: scsi_runtime_suspend
 [ 1615.868925] scsi target6:0:0: scsi_runtime_resume
 [ 1615.870975] ses 6:0:0:1: scsi_runtime_resume
 [ 1615.872913] BUG: unable to handle kernel NULL pointer dereference
 at 01a0
 [ 1615.874896] IP: [812850d5] blk_post_runtime_resume+0x65/0x80
 [ 1615.876843] PGD 0
 [ 1615.878765] Oops: 0002 [#1] PREEMPT SMP
 [ 1615.880734] Modules linked in: ses enclosure uas usb_storage
 netconsole joydev mousedev snd_hda_codec_hdmi snd_hda_codec_conexant
 snd_hda_codec_generic coretemp intel_rapl x86_pkg_temp_thermal
 intel_powerclamp kvm_intel kvm arc4 crct10dif_pclmul iwldvm
 crc32_pclmul iTCO_wdt iTCO_vendor_support crc32c_intel mac80211
 ghash_clmulni_intel ip6t_REJECT nf_reject_ipv6 aesni_intel xt_hl
 aes_x86_64 lrw gf128mul ip6t_rt psmouse iwlwifi glue_helper
 ablk_helper cryptd i2c_i801 serio_raw cfg80211 nf_conntrack_ipv6
 nf_defrag_ipv6 snd_hda_intel wmi thinkpad_acpi nvram thermal rfkill
 ipt_REJECT nf_reject_ipv4 hwmon tpm_tis ac tpm battery
 snd_hda_controller snd_hda_codec snd_hwdep evdev snd_pcm mac_hid
 xt_limit e1000e snd_timer xt_tcpudp mei_me snd mei ptp soundcore
 shpchp 

Re: Kernel Ooops upon USB disconnect of a Western Digital My Passport 1TB drive

2015-02-03 Thread Athlion
On Mon, Feb 2, 2015 at 7:27 PM, Alan Stern st...@rowland.harvard.edu wrote:

 Had you made any changes to the runtime suspend settings?
 blk_post_runtime_resume wouldn't be called unless the drive had gone
 into runtime suspend.  And even then, it's not likely to be called
 after you unplug the USB cable.

 Alan Stern

I have enabled SCSI ATA Bus power management with this udev rule:
ACTION==add, SUBSYSTEM==scsi_host, KERNEL==host*,
ATTR{link_power_management_policy}=min_power
( And generally almost all of actions herein:
https://wiki.archlinux.org/index.php/Power_saving#Laptop_Mode )

Here's another with dynamic debugging on (and some of the stack trace):

[ 1565.610481] usb usb2: usb wakeup-resume
[ 1565.613019] usb usb2: usb auto-resume
[ 1565.615599] hub 2-0:1.0: hub_resume
[ 1565.617876] usb usb2-port1: status 0507 change 
[ 1565.620125] hub 2-0:1.0: state 7 ports 3 chg  evt 
[ 1565.623471] hub 2-0:1.0: state 7 ports 3 chg  evt 
[ 1565.650219] hub 2-0:1.0: state 7 ports 3 chg  evt 0002
[ 1565.663520] usb 2-1: usb wakeup-resume
[ 1565.665518] usb 2-1: finish resume
[ 1565.667684] hub 2-1:1.0: hub_resume
[ 1565.669812] usb 2-1-port2: status 0101 change 0001
[ 1565.773645] usb usb2-port1: resume, status 0
[ 1565.776031] hub 2-1:1.0: state 7 ports 8 chg 0004 evt 
[ 1565.778664] usb 2-1-port2: status 0101, change , 12 Mb/s
[ 1565.847291] usb 2-1.2: new high-speed USB device number 3 using ehci-pci
[ 1565.860480] usb 2-1-port2: not reset yet, waiting 10ms
[ 1565.945202] usb 2-1.2: default language 0x0409
[ 1565.947882] usb 2-1.2: udev 3, busnum 2, minor = 130
[ 1565.950384] usb 2-1.2: usb_probe_device
[ 1565.952704] usb 2-1.2: configuration #1 chosen from 1 choice
[ 1565.955145] usb 2-1.2: adding 2-1.2:1.0 (config #1, interface 0)
[ 1565.957630] hub 2-1:1.0: state 7 ports 8 chg  evt 0004
[ 1566.005124] usb-storage 2-1.2:1.0: usb_probe_interface
[ 1566.006655] usb-storage 2-1.2:1.0: usb_probe_interface - got id
[ 1566.008169] usb-storage 2-1.2:1.0: USB Mass Storage device detected
[ 1566.010155] scsi host6: usb-storage 2-1.2:1.0
[ 1566.012149] usbcore: registered new interface driver usb-storage
[ 1566.016061] usbcore: registered new interface driver uas
[ 1567.015852] scsi 6:0:0:0: Direct-Access WD   My Passport
0748 1016 PQ: 0 ANSI: 6
[ 1567.018966] scsi 6:0:0:1: Enclosure WD   SES Device
  1016 PQ: 0 ANSI: 6
[ 1567.027072] scsi 6:0:0:1: scsi_runtime_idle
[ 1567.029695] sd 6:0:0:0: [sdb] Spinning up disk...
[ 1567.032764] scsi 6:0:0:1: scsi_runtime_suspend
[ 1568.031907] .ready
[ 1569.060225] sd 6:0:0:0: [sdb] 1953458176 512-byte logical blocks:
(1.00 TB/931 GiB)
[ 1569.063857] sd 6:0:0:0: [sdb] Write Protect is off
[ 1569.065613] ses 6:0:0:1: Attached Enclosure device
[ 1569.068492] sd 6:0:0:0: [sdb] Mode Sense: 47 00 10 08
[ 1569.071598] sd 6:0:0:0: [sdb] No Caching mode page found
[ 1569.073628] sd 6:0:0:0: [sdb] Assuming drive cache: write through
[ 1569.087891]  sdb: sdb1
[ 1569.093382] sd 6:0:0:0: [sdb] Attached SCSI disk
[ 1615.830142] hub 2-1:1.0: state 7 ports 8 chg  evt 0004
[ 1615.833066] usb 2-1-port2: status 0100, change 0001, 12 Mb/s
[ 1615.835764] usb 2-1.2: USB disconnect, device number 3
[ 1615.838471] usb 2-1.2: unregistering device
[ 1615.841199] usb 2-1.2: unregistering interface 2-1.2:1.0
[ 1615.844996] scsi target6:0:0: scsi_runtime_idle
[ 1615.848746] scsi target6:0:0: scsi_runtime_suspend
[ 1615.868925] scsi target6:0:0: scsi_runtime_resume
[ 1615.870975] ses 6:0:0:1: scsi_runtime_resume
[ 1615.872913] BUG: unable to handle kernel NULL pointer dereference
at 01a0
[ 1615.874896] IP: [812850d5] blk_post_runtime_resume+0x65/0x80
[ 1615.876843] PGD 0
[ 1615.878765] Oops: 0002 [#1] PREEMPT SMP
[ 1615.880734] Modules linked in: ses enclosure uas usb_storage
netconsole joydev mousedev snd_hda_codec_hdmi snd_hda_codec_conexant
snd_hda_codec_generic coretemp intel_rapl x86_pkg_temp_thermal
intel_powerclamp kvm_intel kvm arc4 crct10dif_pclmul iwldvm
crc32_pclmul iTCO_wdt iTCO_vendor_support crc32c_intel mac80211
ghash_clmulni_intel ip6t_REJECT nf_reject_ipv6 aesni_intel xt_hl
aes_x86_64 lrw gf128mul ip6t_rt psmouse iwlwifi glue_helper
ablk_helper cryptd i2c_i801 serio_raw cfg80211 nf_conntrack_ipv6
nf_defrag_ipv6 snd_hda_intel wmi thinkpad_acpi nvram thermal rfkill
ipt_REJECT nf_reject_ipv4 hwmon tpm_tis ac tpm battery
snd_hda_controller snd_hda_codec snd_hwdep evdev snd_pcm mac_hid
xt_limit e1000e snd_timer xt_tcpudp mei_me snd mei ptp soundcore
shpchp pps_core lpc_ich processor xt_addrtype nf_conntrack_ipv4
nf_defrag_ipv4 xt_conntrack at ffd8
[ 1616.064883] IP: [81091500] kthread_data+0x10/0x20
[ 1616.068189] PGD 1814067 PUD 1816067 PMD 0
[ 1616.071462] Oops:  [#2] PREEMPT SMP
[ 1616.074719] Modules linked in: ses enclosure uas usb_storage
netconsole joydev mousedev snd_hda_codec_hdmi snd_hda_codec_conexant
snd_hda_codec_generic coretemp intel_rapl x86_pkg_temp_thermal
intel_powerclamp 

Re: Kernel Ooops upon USB disconnect of a Western Digital My Passport 1TB drive

2015-02-03 Thread Alan Stern
On Tue, 3 Feb 2015, Athlion wrote:

 On Mon, Feb 2, 2015 at 7:27 PM, Alan Stern st...@rowland.harvard.edu wrote:
 
  Had you made any changes to the runtime suspend settings?
  blk_post_runtime_resume wouldn't be called unless the drive had gone
  into runtime suspend.  And even then, it's not likely to be called
  after you unplug the USB cable.
 
  Alan Stern
 
 I have enabled SCSI ATA Bus power management with this udev rule:
 ACTION==add, SUBSYSTEM==scsi_host, KERNEL==host*,
 ATTR{link_power_management_policy}=min_power

That won't have any effect on SCSI over USB, as far as I know.

 ( And generally almost all of actions herein:
 https://wiki.archlinux.org/index.php/Power_saving#Laptop_Mode )
 
 Here's another with dynamic debugging on (and some of the stack trace):
 
 [ 1565.610481] usb usb2: usb wakeup-resume
 [ 1565.613019] usb usb2: usb auto-resume
 [ 1565.615599] hub 2-0:1.0: hub_resume
 [ 1565.617876] usb usb2-port1: status 0507 change 
 [ 1565.620125] hub 2-0:1.0: state 7 ports 3 chg  evt 
 [ 1565.623471] hub 2-0:1.0: state 7 ports 3 chg  evt 
 [ 1565.650219] hub 2-0:1.0: state 7 ports 3 chg  evt 0002
 [ 1565.663520] usb 2-1: usb wakeup-resume
 [ 1565.665518] usb 2-1: finish resume
 [ 1565.667684] hub 2-1:1.0: hub_resume
 [ 1565.669812] usb 2-1-port2: status 0101 change 0001
 [ 1565.773645] usb usb2-port1: resume, status 0
 [ 1565.776031] hub 2-1:1.0: state 7 ports 8 chg 0004 evt 
 [ 1565.778664] usb 2-1-port2: status 0101, change , 12 Mb/s
 [ 1565.847291] usb 2-1.2: new high-speed USB device number 3 using ehci-pci
 [ 1565.860480] usb 2-1-port2: not reset yet, waiting 10ms
 [ 1565.945202] usb 2-1.2: default language 0x0409
 [ 1565.947882] usb 2-1.2: udev 3, busnum 2, minor = 130
 [ 1565.950384] usb 2-1.2: usb_probe_device
 [ 1565.952704] usb 2-1.2: configuration #1 chosen from 1 choice
 [ 1565.955145] usb 2-1.2: adding 2-1.2:1.0 (config #1, interface 0)
 [ 1565.957630] hub 2-1:1.0: state 7 ports 8 chg  evt 0004
 [ 1566.005124] usb-storage 2-1.2:1.0: usb_probe_interface
 [ 1566.006655] usb-storage 2-1.2:1.0: usb_probe_interface - got id
 [ 1566.008169] usb-storage 2-1.2:1.0: USB Mass Storage device detected
 [ 1566.010155] scsi host6: usb-storage 2-1.2:1.0
 [ 1566.012149] usbcore: registered new interface driver usb-storage
 [ 1566.016061] usbcore: registered new interface driver uas
 [ 1567.015852] scsi 6:0:0:0: Direct-Access WD   My Passport
 0748 1016 PQ: 0 ANSI: 6
 [ 1567.018966] scsi 6:0:0:1: Enclosure WD   SES Device
   1016 PQ: 0 ANSI: 6

Your device contains two Logical Units.  One of them is the My Passport
disk drive, and the other is the SES Device enclosure.

 [ 1567.027072] scsi 6:0:0:1: scsi_runtime_idle
 [ 1567.029695] sd 6:0:0:0: [sdb] Spinning up disk...
 [ 1567.032764] scsi 6:0:0:1: scsi_runtime_suspend
 [ 1568.031907] .ready
 [ 1569.060225] sd 6:0:0:0: [sdb] 1953458176 512-byte logical blocks:
 (1.00 TB/931 GiB)
 [ 1569.063857] sd 6:0:0:0: [sdb] Write Protect is off
 [ 1569.065613] ses 6:0:0:1: Attached Enclosure device
 [ 1569.068492] sd 6:0:0:0: [sdb] Mode Sense: 47 00 10 08
 [ 1569.071598] sd 6:0:0:0: [sdb] No Caching mode page found
 [ 1569.073628] sd 6:0:0:0: [sdb] Assuming drive cache: write through
 [ 1569.087891]  sdb: sdb1
 [ 1569.093382] sd 6:0:0:0: [sdb] Attached SCSI disk
 [ 1615.830142] hub 2-1:1.0: state 7 ports 8 chg  evt 0004
 [ 1615.833066] usb 2-1-port2: status 0100, change 0001, 12 Mb/s
 [ 1615.835764] usb 2-1.2: USB disconnect, device number 3
 [ 1615.838471] usb 2-1.2: unregistering device
 [ 1615.841199] usb 2-1.2: unregistering interface 2-1.2:1.0
 [ 1615.844996] scsi target6:0:0: scsi_runtime_idle
 [ 1615.848746] scsi target6:0:0: scsi_runtime_suspend
 [ 1615.868925] scsi target6:0:0: scsi_runtime_resume
 [ 1615.870975] ses 6:0:0:1: scsi_runtime_resume
 [ 1615.872913] BUG: unable to handle kernel NULL pointer dereference
 at 01a0
 [ 1615.874896] IP: [812850d5] blk_post_runtime_resume+0x65/0x80
 [ 1615.876843] PGD 0
 [ 1615.878765] Oops: 0002 [#1] PREEMPT SMP
 [ 1615.880734] Modules linked in: ses enclosure uas usb_storage
 netconsole joydev mousedev snd_hda_codec_hdmi snd_hda_codec_conexant
 snd_hda_codec_generic coretemp intel_rapl x86_pkg_temp_thermal
 intel_powerclamp kvm_intel kvm arc4 crct10dif_pclmul iwldvm
 crc32_pclmul iTCO_wdt iTCO_vendor_support crc32c_intel mac80211   
 ghash_clmulni_intel ip6t_REJECT nf_reject_ipv6 aesni_intel xt_hl
 aes_x86_64 lrw gf128mul ip6t_rt psmouse iwlwifi glue_helper
 ablk_helper cryptd i2c_i801 serio_raw cfg80211 nf_conntrack_ipv6
 nf_defrag_ipv6 snd_hda_intel wmi thinkpad_acpi nvram thermal rfkill
 ipt_REJECT nf_reject_ipv4 hwmon tpm_tis ac tpm battery
 snd_hda_controller snd_hda_codec snd_hwdep evdev snd_pcm mac_hid
 xt_limit e1000e snd_timer xt_tcpudp mei_me snd mei ptp soundcore
 shpchp pps_core lpc_ich processor xt_addrtype nf_conntrack_ipv4
 nf_defrag_ipv4 xt_conntrack at ffd8
 [ 1616.064883] IP: [81091500] 

Re: Kernel Ooops upon USB disconnect of a Western Digital My Passport 1TB drive

2015-02-02 Thread Athlion
Hello again,

I tried setting up netconsole (I don't have a null-modem serial cable
with usb adaptor) and although it *does* capture some of the dump, it
does not capture everything. The dump is from 3.18.5. Here goes (from
the USB connection):

[  169.827703] usb 2-1.2: new high-speed USB device number 3 using ehci-pci
[  169.980222] usb-storage 2-1.2:1.0: USB Mass Storage device detected
[  169.982264] scsi host6: usb-storage 2-1.2:1.0
[  169.984548] usbcore: registered new interface driver usb-storage
[  169.989296] usbcore: registered new interface driver uas
[  170.989458] scsi 6:0:0:0: Direct-Access WD   My Passport
0748 1016 PQ: 0 ANSI: 6
[  170.992673] scsi 6:0:0:1: Enclosure WD   SES Device
  1016 PQ: 0 ANSI: 6
[  171.002766] sd 6:0:0:0: [sdb] Spinning up disk...
[  172.009278] .ready
[  173.012719] sd 6:0:0:0: [sdb] 1953458176 512-byte logical blocks:
(1.00 TB/931 GiB)
[  173.016434] sd 6:0:0:0: [sdb] Write Protect is off
[  173.017780] ses 6:0:0:1: Attached Enclosure device
[  173.021519] sd 6:0:0:0: [sdb] Mode Sense: 47 00 10 08
[  173.024736] sd 6:0:0:0: [sdb] No Caching mode page found
[  173.026785] sd 6:0:0:0: [sdb] Assuming drive cache: write through
[  173.040339]  sdb: sdb1
[  173.045652] sd 6:0:0:0: [sdb] Attached SCSI disk
[  183.706124] usb 2-1.2: USB disconnect, device number 3
[  183.725921] BUG: unable to handle kernel NULL pointer dereference
at 01a0
[  183.728560] IP: [812850d5] blk_post_runtime_resume+0x65/0x80
[  183.730820] PGD 0
[  183.733038] Oops: 0002 [#1] PREEMPT SMP
[  183.735285] Modules linked in: ses enclosure uas usb_storage
netconsole joydev mousedev snd_hda_codec_hdmi snd_hda_codec_conexant
snd_hda_codec_generic coretemp arc4 intel_rapl x86_pkg_temp_thermal
intel_powerclamp kvm_intel iwldvm kvm mac80211 crct10dif_pclmul
crc32_pclmul crc32c_intel iTCO_wdt iTCO_vendor_support
ghash_clmulni_intel aesni_intel iwlwifi aes_x86_64 lrw gf128mul
glue_helper ablk_helper cryptd psmouse serio_raw i2c_i801 cfg80211
ip6t_REJECT nf_reject_ipv6 thinkpad_acpi wmi nvram xt_hl rfkill
ip6t_rt hwmon battery ac snd_hda_intel tpm_tis snd_hda_controller tpm
snd_hda_codec snd_hwdep nf_conntrack_ipv6 snd_pcm nf_defrag_ipv6 evdev
snd_timer e1000e snd thermal mac_hid mei_me soundcore mei ptp
ipt_REJECT lpc_ich nf_reject_ipv4 pps_core shpchp processor xt_limit
xt_tcpudp xt_addrtype nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack
ip6table_filter ip6_tables nf_conntrack_netbios_ns
nf_conntrack_broadcast nf_nat_ftp nf_nat nf_conntrack_ftp nf_conntrack
e1000e snd thermal mac_hid mei_me soundcore mei ptp ipt_REJECT lpc_ich
nf_reject_ipv4 pps_core shpchp processor xt_limit xt_tcpudp
xt_addrtype nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack
ip6table_filter ip6_tables nf_conntrack_netbios_ns
nf_conntrack_broadcast nf_nat_ftp nf_nat nf_conntrack_ftp nf_conntrack
iptable_filter ip_tables x_tables sch_fq_codel vboxdrv(O) usbnet mii
tp_smapi(O) thinkpad_ec(O) nfs lockd grace sunrpc fscache
cpufreq_powersave acpi_call(O) ext4 crc16 mbcache jbd2 sd_mod atkbd
libps2 sdhci_pci sdhci led_class ahci libahci libata ehci_pci ehci_hcd
scsi_mod mmc_core usbcore usb_common i8042 serio i915 button intel_gtt
i2c_algo_bit video drm_kms_helper drm i2c_core
[  183.981709] CPU: 0 PID: 4 Comm: kworker/0:0 Tainted: G UD O
3.18.5-1-ARCH #1
[  183.985915] Hardware name: LENOVO 4177CTO/4177CTO, BIOS 83ET70WW
(1.40 ) 06/12/2012
[  183.990082] task: 880212941e30 ti: 88021296c000 task.ti:
88021296c000
[  183.994203] RIP: 0010:[81091500] [81091500]
kthread_data+0x10/0x20
[  183.998426] RSP: 0018:88021296f3e8  EFLAGS: 00010092
[  184.002645] RAX:  RBX:  RCX: 
[  184.006893] RDX: 000f RSI:  RDI: 880212941e30
[  184.011063] RBP: 88021296f3e8 R08:  R09: 880215803a00
[  184.015247] R10: 88021e216480 R11: ea000846fc40 R12: 88021e213640
[  184.019428] R13: 88021e213640 R14: 880212941e30 R15: 
[  184.023591] FS:  () GS:88021e20()
knlGS:
[  184.027820] CS:  0010 DS:  ES:  CR0: 80050033
[  184.032041] CR2: 0028 CR3: 01811000 CR4: 000407f0
[  184.036227] Stack:
[  184.040518]  88021296f408 8108c275 88021296f408

[  184.044910]  88021296f528 81550f55 880212941e30
00013640
[  184.235199]  [815552fc] ret_from_fork+0x7c/0xb0
[  184.237699]  [81090d50] ? kthread_create_on_node+0x1c0/0x1c0
[  184.240179] Code: 00 48 89 e5 5d 48 8b 40 c8 48 c1 e8 02 83 e0 01


Is there anything I can do to make netconsole dump everything?
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Kernel Ooops upon USB disconnect of a Western Digital My Passport 1TB drive

2015-02-02 Thread Alan Stern
On Mon, 2 Feb 2015, Athlion wrote:

 Hello again,
 
 I tried setting up netconsole (I don't have a null-modem serial cable
 with usb adaptor) and although it *does* capture some of the dump, it
 does not capture everything. The dump is from 3.18.5. Here goes (from
 the USB connection):
 
 [  169.827703] usb 2-1.2: new high-speed USB device number 3 using ehci-pci
 [  169.980222] usb-storage 2-1.2:1.0: USB Mass Storage device detected
 [  169.982264] scsi host6: usb-storage 2-1.2:1.0
 [  169.984548] usbcore: registered new interface driver usb-storage
 [  169.989296] usbcore: registered new interface driver uas
 [  170.989458] scsi 6:0:0:0: Direct-Access WD   My Passport
 0748 1016 PQ: 0 ANSI: 6
 [  170.992673] scsi 6:0:0:1: Enclosure WD   SES Device
   1016 PQ: 0 ANSI: 6
 [  171.002766] sd 6:0:0:0: [sdb] Spinning up disk...
 [  172.009278] .ready
 [  173.012719] sd 6:0:0:0: [sdb] 1953458176 512-byte logical blocks:
 (1.00 TB/931 GiB)
 [  173.016434] sd 6:0:0:0: [sdb] Write Protect is off
 [  173.017780] ses 6:0:0:1: Attached Enclosure device
 [  173.021519] sd 6:0:0:0: [sdb] Mode Sense: 47 00 10 08
 [  173.024736] sd 6:0:0:0: [sdb] No Caching mode page found
 [  173.026785] sd 6:0:0:0: [sdb] Assuming drive cache: write through
 [  173.040339]  sdb: sdb1
 [  173.045652] sd 6:0:0:0: [sdb] Attached SCSI disk
 [  183.706124] usb 2-1.2: USB disconnect, device number 3
 [  183.725921] BUG: unable to handle kernel NULL pointer dereference
 at 01a0
 [  183.728560] IP: [812850d5] blk_post_runtime_resume+0x65/0x80
 [  183.730820] PGD 0
 [  183.733038] Oops: 0002 [#1] PREEMPT SMP
 [  183.735285] Modules linked in: ses enclosure uas usb_storage
 netconsole joydev mousedev snd_hda_codec_hdmi snd_hda_codec_conexant
...
 i2c_algo_bit video drm_kms_helper drm i2c_core

There should have been a stack dump here, but there wasn't.  Too bad; 
it would have been helpful.

 Is there anything I can do to make netconsole dump everything?

Not as far as I know.  But it might help if we saw the USB debugging
messages.  Try turning on dynamic debugging for usbcore and scsi_mod
before running the test by doing:

echo 'module usbcore =p' /sys/kernel/debug/dynamic_debug/control
echo 'module scsi_mod =p' /sys/kernel/debug/dynamic_debug/control

Had you made any changes to the runtime suspend settings?  
blk_post_runtime_resume wouldn't be called unless the drive had gone 
into runtime suspend.  And even then, it's not likely to be called 
after you unplug the USB cable.

Alan Stern

--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Kernel Ooops upon USB disconnect of a Western Digital My Passport 1TB drive

2015-01-27 Thread Alan Stern
On Tue, 27 Jan 2015, Athlion wrote:

 Hello all.
 
 On my Thunkpad T420i with 3.18.2 and 3.18.3 kernels, I can reproduce
 the following behaviour 100% of the time:
 
 1. Connect one of my (NTFS-formatted) WD 1TB 'My Passport' drives via USB.
 2. Disconnect the cable.
 3. Kernel Ooops.
 
 For last entries of the journal (it actually caught the kernel oops
 one time, I'm amazed) see the photo here:
 https://dl.dropboxusercontent.com/u/63420/journal.jpg
 
 Please note that the drive need not be mounted at all. In fact, this
 even happens if I stop all graphical and automount services and
 plug-in and then disconnect the cable. Also, other USB drives and USB
 flash disks do not exhibit this behaviour... Go figure!
 
 If I'm on a console, I can only see the last 45 or so lines of the
 stack trace (using KVM 1600x900 resolution console). The first lines
 (along with the initial oops message (caught in the journal) get
 scrolled off so I cannot post anything).
 
 What can I do to further debug this? I'm uncomfortable having any
 plug-in utility writing to my disk after the crash since I'm using
 this laptop for work and have crucial data on it.

If you have another computer handy, you can set up a network console 
(or a serial console) so that the entire oops message gets captured.

Also, you could try running the latest 3.19-rc kernel to see if the 
problem has already been fixed.

Alan Stern

--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Kernel Ooops upon USB disconnect of a Western Digital My Passport 1TB drive

2015-01-26 Thread Athlion
Hello all.

On my Thunkpad T420i with 3.18.2 and 3.18.3 kernels, I can reproduce
the following behaviour 100% of the time:

1. Connect one of my (NTFS-formatted) WD 1TB 'My Passport' drives via USB.
2. Disconnect the cable.
3. Kernel Ooops.

For last entries of the journal (it actually caught the kernel oops
one time, I'm amazed) see the photo here:
https://dl.dropboxusercontent.com/u/63420/journal.jpg

Please note that the drive need not be mounted at all. In fact, this
even happens if I stop all graphical and automount services and
plug-in and then disconnect the cable. Also, other USB drives and USB
flash disks do not exhibit this behaviour... Go figure!

If I'm on a console, I can only see the last 45 or so lines of the
stack trace (using KVM 1600x900 resolution console). The first lines
(along with the initial oops message (caught in the journal) get
scrolled off so I cannot post anything).

What can I do to further debug this? I'm uncomfortable having any
plug-in utility writing to my disk after the crash since I'm using
this laptop for work and have crucial data on it.

I have also opened a bug here: https://bugzilla.kernel.org/show_bug.cgi?id=92091

Thanks!
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html