Re: 3.12.1 Virt dev invalid for slot_id 0x1 from drivers/usb/host/xhci.c

2013-12-02 Thread Sarah Sharp
On Wed, Nov 27, 2013 at 05:21:57PM -0700, Shuah Khan wrote:
 On 11/27/2013 02:59 PM, Sarah Sharp wrote:
 On Mon, Nov 25, 2013 at 11:41:47AM -0700, Shuah Khan wrote:
 I started seeing the following on my Samsung Series on 3.12.1
 
 Is this bad? Looks like the following WARN_ON is firing:
 
 drivers/usb/host/xhci.c:
 
  if (WARN_ON(!virt_dev)) {
  /*
   * In plug/unplug torture test with an NEC controller,
   * a zero-dereference was observed once due to
 virt_dev = 0.
   * Print useful debug rather than crash if it is
 observed again!
   */
  xhci_warn(xhci, Virt dev invalid for slot_id 0x%x!\n,
  udev-slot_id);
  return -EINVAL;
  }
 
 As the comment says, the WARN_ON was there so we can track down why this
 specific NULL pointer dereference bug could have been hit.
 
 What are the specific steps to reproduce this?  It looks like it's
 coming from a device resume path.  Did you have auto-suspend enabled for
 your USB devices, or did this warning occur right after an S3 resume?
 
 Can you enable CONFIG_USB_DEBUG and CONFIG_DYNAMIC_DEBUG, and send me
 dmesg starting from just before you trigger the WARN_ON()?  I need to
 see what the xHCI driver state that causes this might be.
 
 Sarah Sharp
 
 I forgot to mention that this problem is seen when I run
 suspend-to-disk test in reboot mode. Reproduced it again on
 3.12.2-rc1 once and dmesg buffer wrapped around before I could save
 the log.

Do you have CONFIG_LOG_BUF_SHIFT set to 21?  That might help you capture
dmesg.

 I enabled CONFIG_USB_DEBUG and I already had CONFIG_DYNAMIC_DEBUG
 enabled in config.
 
 It doesn't seem to happen every time I to suspend-to-disk. I will
 try again and send you the log.

Ok, thanks!

Sarah Sharp
--
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: 3.12.1 Virt dev invalid for slot_id 0x1 from drivers/usb/host/xhci.c

2013-11-27 Thread Sarah Sharp
On Mon, Nov 25, 2013 at 11:41:47AM -0700, Shuah Khan wrote:
 I started seeing the following on my Samsung Series on 3.12.1
 
 Is this bad? Looks like the following WARN_ON is firing:
 
 drivers/usb/host/xhci.c:
 
 if (WARN_ON(!virt_dev)) {
 /*
  * In plug/unplug torture test with an NEC controller,
  * a zero-dereference was observed once due to
 virt_dev = 0.
  * Print useful debug rather than crash if it is
 observed again!
  */
 xhci_warn(xhci, Virt dev invalid for slot_id 0x%x!\n,
 udev-slot_id);
 return -EINVAL;
 }

As the comment says, the WARN_ON was there so we can track down why this
specific NULL pointer dereference bug could have been hit.

What are the specific steps to reproduce this?  It looks like it's
coming from a device resume path.  Did you have auto-suspend enabled for
your USB devices, or did this warning occur right after an S3 resume?

Can you enable CONFIG_USB_DEBUG and CONFIG_DYNAMIC_DEBUG, and send me
dmesg starting from just before you trigger the WARN_ON()?  I need to
see what the xHCI driver state that causes this might be.

Sarah Sharp

 [  565.276187] [ cut here ]
 [  565.276198] WARNING: CPU: 2 PID: 2228 at
 drivers/usb/host/xhci.c:3748 xhci_address_device+0x57b/0x630()
 [  565.276262] Modules linked in: parport_pc ppdev arc4 iwldvm
 rfcomm bnep mac80211 i915 ext2 joydev x86_pkg_temp_thermal coretemp
 kvm_intel kvm iwlwifi uvcvideo videobuf2_vmalloc cfg80211
 videobuf2_memops snd_hda_codec_hdmi videobuf2_core videodev
 drm_kms_helper snd_hda_codec_realtek ghash_clmulni_intel aesni_intel
 drm snd_hda_intel aes_x86_64 btusb media ablk_helper snd_hda_codec
 cryptd bluetooth lrw gf128mul glue_helper hid_generic samsung_laptop
 usbhid tpm_infineon hid snd_hwdep snd_pcm psmouse snd_page_alloc
 snd_timer microcode i2c_algo_bit lpc_ich serio_raw lp parport video
 wmi tpm_tis mac_hid r8169 mii
 [  565.276267] CPU: 2 PID: 2228 Comm: kworker/u16:39 Not tainted 3.12.1+ #11
 [  565.276269] Hardware name: SAMSUNG ELECTRONICS CO., LTD.
 900X3C/900X3D/900X4C/900X4D/SAMSUNG_NP1234567890, BIOS P03AAC
 07/12/2012
 [  565.276278] Workqueue: events_unbound async_run_entry_fn
 [  565.276285]  0009 88002fb0fb00 816bf0c1
 
 [  565.276289]  88002fb0fb38 8104d5fd 88040cc7e000
 
 [  565.276293]  8803f0195800 0002 
 88002fb0fb48
 [  565.276294] Call Trace:
 [  565.276307]  [816bf0c1] dump_stack+0x45/0x56
 [  565.276314]  [8104d5fd] warn_slowpath_common+0x7d/0xa0
 [  565.276318]  [8104d6da] warn_slowpath_null+0x1a/0x20
 [  565.276324]  [8150a43b] xhci_address_device+0x57b/0x630
 [  565.276330]  [814d49d4] hub_port_init+0x1f4/0xa40
 [  565.276335]  [814d5336] usb_reset_and_verify_device+0x116/0x730
 [  565.276340]  [814d2ced] ? hub_port_status+0xdd/0x120
 [  565.276345]  [814d7bd0] usb_port_resume+0x2f0/0x5c0
 [  565.276352]  [814eb535] generic_resume+0x15/0x30
 [  565.276358]  [814e26e7] usb_resume_both+0x107/0x150
 [  565.276366]  [814d1e30] ? usb_for_each_dev+0x30/0x30
 [  565.276372]  [814e325f] usb_resume+0x1f/0xd0
 [  565.276377]  [814d1e30] ? usb_for_each_dev+0x30/0x30
 [  565.276383]  [814d1e43] usb_dev_restore+0x13/0x20
 [  565.276392]  [8143c179] dpm_run_callback+0x49/0xa0
 [  565.276398]  [8143c2d6] device_resume+0xc6/0x1f0
 [  565.276404]  [8143c41d] async_resume+0x1d/0x50
 [  565.276409]  [810766c7] async_run_entry_fn+0x37/0x130
 [  565.276418]  [81068357] process_one_work+0x177/0x410
 [  565.276424]  [81068f91] worker_thread+0x121/0x3a0
 [  565.276431]  [81068e70] ? manage_workers.isra.25+0x2b0/0x2b0
 [  565.276436]  [8106f730] kthread+0xc0/0xd0
 [  565.276442]  [8106f670] ? kthread_create_on_node+0x120/0x120
 [  565.276448]  [816ced2c] ret_from_fork+0x7c/0xb0
 [  565.276453]  [8106f670] ? kthread_create_on_node+0x120/0x120
 [  565.276456] ---[ end trace 115d14352276d432 ]---
 [  565.276460] xhci_hcd :03:00.0: Virt dev invalid for slot_id 0x1!
 [  565.478224] [ cut here ]
 
 -- 
 Shuah Khan
 Senior Linux Kernel Developer - Open Source Group
 Samsung Research America(Silicon Valley)
 shuah...@samsung.com | (970) 672-0658
--
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: 3.12.1 Virt dev invalid for slot_id 0x1 from drivers/usb/host/xhci.c

2013-11-27 Thread Shuah Khan

On 11/27/2013 02:59 PM, Sarah Sharp wrote:

On Mon, Nov 25, 2013 at 11:41:47AM -0700, Shuah Khan wrote:

I started seeing the following on my Samsung Series on 3.12.1

Is this bad? Looks like the following WARN_ON is firing:

drivers/usb/host/xhci.c:

 if (WARN_ON(!virt_dev)) {
 /*
  * In plug/unplug torture test with an NEC controller,
  * a zero-dereference was observed once due to
virt_dev = 0.
  * Print useful debug rather than crash if it is
observed again!
  */
 xhci_warn(xhci, Virt dev invalid for slot_id 0x%x!\n,
 udev-slot_id);
 return -EINVAL;
 }


As the comment says, the WARN_ON was there so we can track down why this
specific NULL pointer dereference bug could have been hit.

What are the specific steps to reproduce this?  It looks like it's
coming from a device resume path.  Did you have auto-suspend enabled for
your USB devices, or did this warning occur right after an S3 resume?

Can you enable CONFIG_USB_DEBUG and CONFIG_DYNAMIC_DEBUG, and send me
dmesg starting from just before you trigger the WARN_ON()?  I need to
see what the xHCI driver state that causes this might be.

Sarah Sharp


I forgot to mention that this problem is seen when I run suspend-to-disk 
test in reboot mode. Reproduced it again on 3.12.2-rc1 once and dmesg 
buffer wrapped around before I could save the log.


I enabled CONFIG_USB_DEBUG and I already had CONFIG_DYNAMIC_DEBUG 
enabled in config.


It doesn't seem to happen every time I to suspend-to-disk. I will try 
again and send you the log.


-- Shuah

--
Shuah Khan
Senior Linux Kernel Developer - Open Source Group
Samsung Research America(Silicon Valley)
shuah...@samsung.com | (970) 672-0658
--
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


3.12.1 Virt dev invalid for slot_id 0x1 from drivers/usb/host/xhci.c

2013-11-25 Thread Shuah Khan

I started seeing the following on my Samsung Series on 3.12.1

Is this bad? Looks like the following WARN_ON is firing:

drivers/usb/host/xhci.c:

if (WARN_ON(!virt_dev)) {
/*
 * In plug/unplug torture test with an NEC controller,
 * a zero-dereference was observed once due to virt_dev 
= 0.
 * Print useful debug rather than crash if it is 
observed again!

 */
xhci_warn(xhci, Virt dev invalid for slot_id 0x%x!\n,
udev-slot_id);
return -EINVAL;
}


[  565.276187] [ cut here ]
[  565.276198] WARNING: CPU: 2 PID: 2228 at drivers/usb/host/xhci.c:3748 
xhci_address_device+0x57b/0x630()
[  565.276262] Modules linked in: parport_pc ppdev arc4 iwldvm rfcomm 
bnep mac80211 i915 ext2 joydev x86_pkg_temp_thermal coretemp kvm_intel 
kvm iwlwifi uvcvideo videobuf2_vmalloc cfg80211 videobuf2_memops 
snd_hda_codec_hdmi videobuf2_core videodev drm_kms_helper 
snd_hda_codec_realtek ghash_clmulni_intel aesni_intel drm snd_hda_intel 
aes_x86_64 btusb media ablk_helper snd_hda_codec cryptd bluetooth lrw 
gf128mul glue_helper hid_generic samsung_laptop usbhid tpm_infineon hid 
snd_hwdep snd_pcm psmouse snd_page_alloc snd_timer microcode 
i2c_algo_bit lpc_ich serio_raw lp parport video wmi tpm_tis mac_hid 
r8169 mii

[  565.276267] CPU: 2 PID: 2228 Comm: kworker/u16:39 Not tainted 3.12.1+ #11
[  565.276269] Hardware name: SAMSUNG ELECTRONICS CO., LTD. 
900X3C/900X3D/900X4C/900X4D/SAMSUNG_NP1234567890, BIOS P03AAC 07/12/2012

[  565.276278] Workqueue: events_unbound async_run_entry_fn
[  565.276285]  0009 88002fb0fb00 816bf0c1 

[  565.276289]  88002fb0fb38 8104d5fd 88040cc7e000 

[  565.276293]  8803f0195800 0002  
88002fb0fb48

[  565.276294] Call Trace:
[  565.276307]  [816bf0c1] dump_stack+0x45/0x56
[  565.276314]  [8104d5fd] warn_slowpath_common+0x7d/0xa0
[  565.276318]  [8104d6da] warn_slowpath_null+0x1a/0x20
[  565.276324]  [8150a43b] xhci_address_device+0x57b/0x630
[  565.276330]  [814d49d4] hub_port_init+0x1f4/0xa40
[  565.276335]  [814d5336] usb_reset_and_verify_device+0x116/0x730
[  565.276340]  [814d2ced] ? hub_port_status+0xdd/0x120
[  565.276345]  [814d7bd0] usb_port_resume+0x2f0/0x5c0
[  565.276352]  [814eb535] generic_resume+0x15/0x30
[  565.276358]  [814e26e7] usb_resume_both+0x107/0x150
[  565.276366]  [814d1e30] ? usb_for_each_dev+0x30/0x30
[  565.276372]  [814e325f] usb_resume+0x1f/0xd0
[  565.276377]  [814d1e30] ? usb_for_each_dev+0x30/0x30
[  565.276383]  [814d1e43] usb_dev_restore+0x13/0x20
[  565.276392]  [8143c179] dpm_run_callback+0x49/0xa0
[  565.276398]  [8143c2d6] device_resume+0xc6/0x1f0
[  565.276404]  [8143c41d] async_resume+0x1d/0x50
[  565.276409]  [810766c7] async_run_entry_fn+0x37/0x130
[  565.276418]  [81068357] process_one_work+0x177/0x410
[  565.276424]  [81068f91] worker_thread+0x121/0x3a0
[  565.276431]  [81068e70] ? manage_workers.isra.25+0x2b0/0x2b0
[  565.276436]  [8106f730] kthread+0xc0/0xd0
[  565.276442]  [8106f670] ? kthread_create_on_node+0x120/0x120
[  565.276448]  [816ced2c] ret_from_fork+0x7c/0xb0
[  565.276453]  [8106f670] ? kthread_create_on_node+0x120/0x120
[  565.276456] ---[ end trace 115d14352276d432 ]---
[  565.276460] xhci_hcd :03:00.0: Virt dev invalid for slot_id 0x1!
[  565.478224] [ cut here ]

--
Shuah Khan
Senior Linux Kernel Developer - Open Source Group
Samsung Research America(Silicon Valley)
shuah...@samsung.com | (970) 672-0658
--
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