usb3/insert failed due to plainbox can't detected USB disk is inserted

Bug #1657659 reported by Erin Chen
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Checkbox Provider - Base
Fix Released
High
Maciej Kisielewski

Bug Description

Test Step:
1) Run usb3/insert, usb3/storage_automated and usb3/remove test case
2) follow the test description to insert a USB disk

Actual results:
System can detect usb3 disk is inserted and it can be read and written data.
Plainbox test case is performed as failed

re-run test: all usb3 test case will be passed.

SKU: PNX-DVT-MT-C1
BIOS: 0.5.3
Manifest: dell-bto-xenial-phoenix-kbl-X33-iso-20170109-0

Revision history for this message
Erin Chen (iamerin-c) wrote :
Revision history for this message
Erin Chen (iamerin-c) wrote :
Revision history for this message
Erin Chen (iamerin-c) wrote :
description: updated
description: updated
Pierre Equoy (pieq)
tags: added: ce-qa-concern
Jerry Kao (jerry.kao)
Changed in plainbox-provider-checkbox:
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Pierre Equoy (pieq) wrote :

This issue can be reproduced on device 201701-25329.

When the USB3 drive is inserted, it's recognized by the system as well as by the `removable_storage_watcher` script apparently, but the timeout happens anyway.

I've run the script manually using the following command, using different USB3 drives:

    ./removable_storage_watcher --verbose --debug -m 500000000 insert usb

The results can be observed in the attached log file (usb3-test-issue.log).

Investigation continues...

Gavin Lin (gavin.lin)
Changed in plainbox-provider-checkbox:
assignee: nobody → Gavin Lin (gavin.lin)
Changed in plainbox-provider-checkbox:
assignee: Gavin Lin (gavin.lin) → Maciej Kisielewski (kissiel)
status: Confirmed → In Progress
Revision history for this message
Maciej Kisielewski (kissiel) wrote :

First of all, I couldn't reproduce that bug on any systems I've got control over.

Log analysis tells us that the removable_storage_watcher script didn't see any insertion of a drive satifsying following requirements: {'block-fs', 'non-empty', 'mounted', 'partition'}.

SUT detected the whole drive (/dev/sdc) as a file system mounting it to a mount point. This made udisks2 not report that as a 'partition', thus ignoring the drive.

When USB stick got inserted SUT tried mounted the whole drive (sdc) to the mount point, which made the 'partition' predicate fail. On another try, it detected sdc1 as a NTFS partition, but did not mount it, making 'mounted' predicate fail.

When Pierre tested removable_storage_watcher with different USB-stick, the SUT properly detected it.

I tried reproducing the bug on very slow machines to see if there's a race condition problem, but no luck.

My conclusion is that the drive could have had its partition table completely messed up making this bug happen.

For pathology purposes, the USB that failed: SanDisk_Ultra_USB_3_2e0_4C530001070610102232 Label: "EE@SanDisk".

@gavin, @erin
Could you try running that test with a fresh drive (that's proven to work preferably) on 201701-25329?

The quickest way should be
$ checkbox-cli run 2013.com.canonical.certification::usb3/insert

Revision history for this message
Maciej Kisielewski (kissiel) wrote :

I managed to capture logs from udisks monitor for a bad case and good case:
bad: http://paste.ubuntu.com/26069033/
good: http://paste.ubuntu.com/26069040/

Revision history for this message
Maciej Kisielewski (kissiel) wrote :

It seems this is a platform issue.
On slower machines the drive got recognized as a block_device and not as a storage drive. This is why checkbox did not pick it up during the tests.

Also note, that the drive was not auto-mounted after insertion (even outside checkbox - no nautilus window popping up after plugging in the drive)

Revision history for this message
Maciej Kisielewski (kissiel) wrote :

We have to decide now whether we want to support those weird cases in checkbox (the bad mount options).

Revision history for this message
Jerry Kao (jerry.kao) wrote :

I can not find public bug for the unmounted issue. It's probably this symptom doesn't affect user. As USB disk is not mounted properly when it was plugged, it still shows up an icon on launcher. Once the USB storage icon was clicked, it will be mounted.

So the solution probably needs to be on Checkbox side.

Revision history for this message
Maciej Kisielewski (kissiel) wrote :

@Jerry

Understood. I'll make the test not require drive to be mounted. The more difficult part will be testing for 'mountable' filesystem, but I thing it's doable.

Stay tuned :)

Revision history for this message
Maciej Kisielewski (kissiel) wrote :
Changed in plainbox-provider-checkbox:
status: In Progress → Fix Committed
Changed in plainbox-provider-checkbox:
milestone: none → 0.42.0
Changed in plainbox-provider-checkbox:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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