false alarm raised by usb3/storage-server xhci_hcd detection

Bug #1938777 reported by Taihsiang Ho
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Checkbox Provider - Base
Fix Released
Medium
Taihsiang Ho

Bug Description

Platform: Ampere Mt. Jade Server
Release: Ubuntu 20.04
Kernel: Linux howzit 5.4.0-80-generic #90-Ubuntu SMP Fri Jul 9 17:43:26 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux

[Description]

A usb3 port is expected run with xhci_hcd but checkbox reports it didn't.

[Steps to Reproduce]

checkbox-cli run com.canonical.certification::device com.canonical.certification::usb/storage-server com.canonical.certification::usb3/storage-server

[Expected Result]

The test job passes

[Actual Result]

ubuntu@howzit:~$ checkbox-cli run com.canonical.certification::device com.canonical.certification::usb/storage-server com.canonical.certification::usb3/storage-server

<skipped many messages>

--------------[ Running job 7 / 7. Estimated time left: 0:00:45 ]---------------
-------------------------[ Test USB 3.0 or 3.1 ports ]--------------------------
ID: com.canonical.certification::usb3/storage-server
Category: com.canonical.plainbox::usb
... 8< -------------------------------------------------------------------------
--------------------
Removable devices currently mounted:
/dev/sda1 : /home/ubuntu/sda-mount
/dev/sdc1 : /home/ubuntu/sdc-mount
/dev/sdb1 : /home/ubuntu/sdb-mount
Removable devices currently not mounted:
None
--------------------
Found the following mounted usb partitions:
    /dev/sda1 : /home/ubuntu/sda-mount : 5000000000 bits/s
    /dev/sdc1 : /home/ubuntu/sdc-mount : 5000000000 bits/s
    /dev/sdb1 : /home/ubuntu/sdb-mount : 480000000 bits/s (Will not test it, speed is below 500000000 bits/s)
--------------------
/dev/sda1 (Total Data Size / iteration: 255.9662 MB):
        [Iteration 0] Average Speed: 16.1157
        Summary:
                Total Data Attempted: 255.9662 MB
                Total Time to write: 15.8831 secs
                Average Write Time: 15.8831 secs
                Average Write Speed: 16.1157 MB/s
/dev/sdc1 (Total Data Size / iteration: 255.9662 MB):
        [Iteration 0] Average Speed: 18.5906
        Summary:
                Total Data Attempted: 255.9662 MB
                Total Time to write: 13.7686 secs
                Average Write Time: 13.7686 secs
                Average Write Speed: 18.5906 MB/s
                --------------------------------
                Device Detected: SuperSpeed USB
                Disk does not use xhci_hcd.
------------------------------------------------------------------------- >8 ---
Outcome: job failed
Finalizing session that hasn't been submitted anywhere: checkbox-run-2021-07-23T13.46.52
==================================[ Results ]===================================
 ☑ : Collect information about hardware devices (udev)
 ☑ : Collect information about installed snap packages
 ☑ : Collect information about installed software packages
 ☑ : Collect information about the CPU
 ☑ : Test USB 2.0 or 1.1 ports
 ☑ : Collect information about supported types of USB
 ☒ : Test USB 3.0 or 3.1 ports
ubuntu@howzit:~$

[Additional Information]

ubuntu@howzit:~$ lsusb -t -v
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
    |__ Port 3: Dev 2, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
        ID 0781:5583 SanDisk Corp. Ultra Fit
    |__ Port 4: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
        ID 0781:5583 SanDisk Corp. Ultra Fit
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/5p, 480M
        ID 046b:ff01 American Megatrends, Inc.
        |__ Port 1: Dev 4, If 0, Class=Mass Storage, Driver=usb-storage, 480M
            ID 046b:ff20 American Megatrends, Inc.
        |__ Port 2: Dev 5, If 0, Class=Mass Storage, Driver=usb-storage, 480M
            ID 046b:ff31 American Megatrends, Inc.
        |__ Port 3: Dev 6, If 0, Class=Communications, Driver=cdc_ether, 480M
            ID 046b:ffb0 American Megatrends, Inc.
        |__ Port 3: Dev 6, If 1, Class=CDC Data, Driver=cdc_ether, 480M
            ID 046b:ffb0 American Megatrends, Inc.
        |__ Port 4: Dev 7, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
            ID 046b:ff10 American Megatrends, Inc. Virtual Keyboard and Mouse
        |__ Port 4: Dev 7, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M
            ID 046b:ff10 American Megatrends, Inc. Virtual Keyboard and Mouse
    |__ Port 2: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage, 480M
        ID 0781:5583 SanDisk Corp. Ultra Fit

Related branches

Revision history for this message
Taihsiang Ho (tai271828) wrote :

It seems the fix has been merged. See the commit 182f27d6eb131a49df247c1b9d79288622f41f9f of plainbox-provider-checkbox project.

Next step:
I will try to run the same usb3 job with checkbox codebase from checkbox dev PPA.

Revision history for this message
Taihsiang Ho (tai271828) wrote :
Download full text (3.6 KiB)

I did not resolve this issue with the latest checkbox stack.

ubuntu@howzit:~$ time sudo checkbox-cli run -t file --transport-where /tmp/submition-usb3-xhci-hcd.tar.xz -f com.canonical.plainbox::tar com.canonical.certification::device com.canonical.certification::usb3/storage-server

-------------------------[ Test USB 3.0 or 3.1 ports ]--------------------------
ID: com.canonical.certification::usb3/storage-server
Category: com.canonical.plainbox::usb
... 8< -------------------------------------------------------------------------
--------------------
Removable devices currently mounted:
None
Removable devices currently not mounted:
/dev/sda1
/dev/sdc1
/dev/sdb1
--------------------
Found the following mounted usb partitions:
    /dev/sda1 : /tmp/tmpg0qjhkh1 : 5000000000 bits/s
    /dev/sdc1 : /tmp/tmp_9vm1720 : 5000000000 bits/s
    /dev/sdb1 : /tmp/tmpb8cvl9ct : 480000000 bits/s (Will not test it, speed is below 500000000 bits/s)
--------------------
/dev/sda1 (Total Data Size / iteration: 255.9662 MB):
        [Iteration 0] Average Speed: 19.3209
        Summary:
                Total Data Attempted: 255.9662 MB
                Total Time to write: 13.2481 secs
                Average Write Time: 13.2481 secs
                Average Write Speed: 19.3209 MB/s
/dev/sdc1 (Total Data Size / iteration: 255.9662 MB):
        [Iteration 0] Average Speed: 18.1189
        Summary:
                Total Data Attempted: 255.9662 MB
                Total Time to write: 14.1270 secs
                Average Write Time: 14.1270 secs
                Average Write Speed: 18.1189 MB/s
                --------------------------------
                Device Detected: SuperSpeed USB
                Disk does not use xhci_hcd.
------------------------------------------------------------------------- >8 ---
Outcome: job failed
Finalizing session that hasn't been submitted anywhere: checkbox-run-2021-08-03T12.56.19
==================================[ Results ]===================================
Saving results to /tmp/submition-usb3-xhci-hcd.tar.xz

real 0m39.079s
user 0m8.892s
sys 0m2.384s

ubuntu@howzit:~$ dpkg -l '*checkbox*' '*plainbox*'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-======================================-===========================================-============-=======================================================
ii checkbox-ng 1.14.0+git202107121505+pkg170~ubuntu20.04.1 all CheckBoxNG test runner
un plainbox <none> <none> (no description available)
ii plainbox-provider-certification-server 0.55.0+git202107151407+pkg164~ubuntu20.04.1 all Server Certification provider for Plainbox
ii plainbox-provider-checkbox 0.59.0+git202107261500+pkg168~ubuntu20.04.1 arm64 CheckBox provider for PlainBox
ii plainbox-provider-resource-generic 0.49.0+git2021...

Read more...

Revision history for this message
Jeff Lane  (bladernr) wrote :

what does usb-devices say about the device? It should confirm the driver in use.

For example:
T: Bus=01 Lev=01 Prnt=01 Port=06 Cnt=06 Dev#= 19 Spd=12 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=046d ProdID=c336 Rev=09.00
S: Manufacturer=Logitech
S: Product=Gaming Keyboard G213
S: SerialNumber=1470306F3330
C: #Ifs= 2 Cfg#= 1 Atr=a0 MxPwr=500mA
I: If#=0x0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=01 Driver=usbhid
I: If#=0x1 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=00 Driver=usbhid

It says my keyboard is using usbhid driver.

Changed in plainbox-provider-checkbox:
status: New → Confirmed
importance: Undecided → Medium
tags: added: hwcert-server
Revision history for this message
Jeff Lane  (bladernr) wrote :

I wonder if this is an ARM thing... run this just now on my intel desktop and it does work fine (as it does on any other intel machine).

--------------[ Running job 7 / 7. Estimated time left: 0:00:45 ]---------------
-------------------------[ Test USB 3.0 or 3.1 ports ]--------------------------
ID: com.canonical.certification::usb3/storage-server
Category: com.canonical.plainbox::usb
... 8< -------------------------------------------------------------------------
--------------------
Removable devices currently mounted:
None
Removable devices currently not mounted:
/dev/sde1
--------------------
Found the following mounted usb partitions:
    /dev/sde1 : /tmp/tmp8x8qq2ty : 5000000000 bits/s
--------------------
/dev/sde1 (Total Data Size / iteration: 255.9662 MB):
        [Iteration 0] Average Speed: 22.1929
        Summary:
                Total Data Attempted: 255.9662 MB
                Total Time to write: 11.5337 secs
                Average Write Time: 11.5337 secs
                Average Write Speed: 22.1929 MB/s
                --------------------------------
                Device Detected: SuperSpeed USB
                Driver Detected: xhci_hcd
-------------------------------------------------------------

Revision history for this message
Jeff Lane  (bladernr) wrote :

I would call this a legitimate issue with that SoC at the moment...

Revision history for this message
Taihsiang Ho (tai271828) wrote :

usb-devices shows:

<skipped>

T: Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=5000 MxCh= 4
D: Ver= 3.00 Cls=09(hub ) Sub=00 Prot=03 MxPS= 9 #Cfgs= 1
P: Vendor=1d6b ProdID=0003 Rev=05.04
S: Manufacturer=Linux 5.4.0-80-generic xhci-hcd
S: Product=xHCI Host Controller
S: SerialNumber=0004:03:00.0
C: #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I: If#=0x0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub

T: Bus=02 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#= 2 Spd=5000 MxCh= 0
D: Ver= 3.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 9 #Cfgs= 1
P: Vendor=0781 ProdID=5583 Rev=01.00
S: Manufacturer=SanDisk
S: Product=Ultra Fit
S: SerialNumber=4C530001221231116401
C: #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=896mA
I: If#=0x0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage

T: Bus=02 Lev=01 Prnt=01 Port=03 Cnt=02 Dev#= 3 Spd=5000 MxCh= 0
D: Ver= 3.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 9 #Cfgs= 1
P: Vendor=0781 ProdID=5583 Rev=01.00
S: Manufacturer=SanDisk
S: Product=Ultra Fit
S: SerialNumber=4C530001321231117002
C: #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=896mA
I: If#=0x0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage

Revision history for this message
Taihsiang Ho (tai271828) wrote :
Download full text (4.0 KiB)

By the way, from checkbox we could see the usb devices and their block numbers, SanDisk usb sticks as sda and sdc, by running:

$ sudo checkbox-cli run -t file --transport-where /tmp/submition-device.tar.xz -f com.canonical.plainbox::tar com.canonical.certification::device

<skipped>

path: /devices/pci0004:00/0004:00:03.0/0004:03:00.0/usb2/2-3
name: bus/usb/002/002
bus: usb
driver: usb
product: Ultra Fit
vendor: SanDisk Corp.
product_slug: Ultra_Fit
vendor_slug: SanDisk_Corp.

path: /devices/pci0004:00/0004:00:03.0/0004:03:00.0/usb2/2-3/2-3:1.0/host0/target0:0:0/0:0:0:0
name: sda
bus: scsi
driver: sd
product: Ultra Fit
vendor: SanDisk
product_slug: Ultra_Fit
vendor_slug: SanDisk

path: /devices/pci0004:00/0004:00:03.0/0004:03:00.0/usb2/2-4
name: bus/usb/002/003
bus: usb ...

Read more...

Revision history for this message
Taihsiang Ho (tai271828) wrote :

When running the script on Mt. Jade, the enumerator of `enumerator = GUdev.Enumerator(client=udev_client)` does not return any device with driver name "xhci-hcd" but "xhci_hcd". (watch out the dash vs. under score)

Thus, this issue may be specific to the Mt. Jade platform and some other platforms. It does not impacts the platforms with "xhci-hcd".

Next step:
I will create a merge proposal and perform some regression test for the "new" parser.

Changed in plainbox-provider-checkbox:
milestone: none → 0.60.0
assignee: nobody → Taihsiang Ho (taihsiangho)
Changed in plainbox-provider-checkbox:
milestone: 0.60.0 → 0.61.0
status: Confirmed → In Progress
Changed in plainbox-provider-checkbox:
milestone: 0.61.0 → 0.60.0
status: In Progress → Fix Committed
Changed in plainbox-provider-checkbox:
status: Fix Committed → Fix Released
Matias Piipari (mz2)
tags: added: cbox-24
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.