Bug 208668 - 11.0-CURRENT since around December 2015 can be remarkably troublesome with USB (for PersonaCrypt)
Summary: 11.0-CURRENT since around December 2015 can be remarkably troublesome with US...
Status: Closed DUPLICATE of bug 208365
Alias: None
Product: Base System
Classification: Unclassified
Component: usb (show other bugs)
Version: CURRENT
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-usb (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-10 12:00 UTC by Graham Perrin
Modified: 2016-04-10 13:52 UTC (History)
2 users (show)

See Also:


Attachments
A diagnostic file, produced by 'PC-BSD bug report tool'; includes dmesg and other information (55.05 KB, text/plain)
2016-04-10 12:00 UTC, Graham Perrin
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Graham Perrin freebsd_committer freebsd_triage 2016-04-10 12:00:34 UTC
Created attachment 169141 [details]
A diagnostic file, produced by 'PC-BSD bug report tool'; includes dmesg and other information

USB 3.1 Gen 1 (USB 3.0) Kingston DataTraveler G4 
http://web.archive.org/web/20151107114009/http://www.kingston.com/en/usb/personal_business#DTIG4 
32GB USB flash drive for PersonaCrypt in PC-BSD 11.0-CURRENT. 

If required: https://www.ixsystems.com/blog/pc-bsd-version-1012-now-available-for-the-security-conscious-desktop-user/ includes an outline of PersonaCrypt. 

With PC-BSD 11.0-CURRENTNOV2015 and less, the Kingston device is *entirely reliable* for PersonaCrypt with a circa 2007 Ergo Vista 621 notebook, with 4 GB memory, where the interface is probably limited to USB 2.0. 

With the following distributions, the same combination of hardware *ceases to work very quickly* (typically within ten minutes of GELI attachment): 

* PC-BSD 11.0-CURRENTDEC2015
* PC-BSD 11.0-CURRENTJAN2016
* PC-BSD 11.0-CURRENTFEB2016
* PC-BSD 11.0-CURRENTMAR2016

For a few weeks the Kingston device was good for PersonaCrypt with PC-BSD 11.0-CURRENTMAR2016 on a more modern notebook -- an early 2011 Apple MacBookPro8,2 with 4 GB memory, https://support.apple.com/kb/SP620 – again, USB 2.0. 

Today with PC-BSD 11.0-CURRENTAPRIL2016 before attempting to use the Kingston device, I gave that Mac notebook an unusually 'hard push' (overnight, with synth at ttyv1) – hard enough to use around 2 GB of 4 GB available swap. Then, as I attempted to log in with PersonaCrypt, the problem recurred. 

An extract: 

----

usb_pc_common_mem_cb: Page offset was not preserved
(da0:umass-sim0:0:0:0): READ(10). CDB: 28 00 00 00 00 a8 00 00 80 00 
(da0:umass-sim0:0:0:0): CAM status: CCB request completed with an error
(da0:umass-sim0:0:0:0): Retrying command
usb_pc_common_mem_cb: Page offset was not preserved
(da0:umass-sim0:0:0:0): READ(10). CDB: 28 00 00 00 00 a8 00 00 80 00 
(da0:umass-sim0:0:0:0): CAM status: CCB request completed with an error
(da0:umass-sim0:0:0:0): Retrying command
usb_pc_common_mem_cb: Page offset was not preserved
(da0:umass-sim0:0:0:0): READ(10). CDB: 28 00 00 00 00 a8 00 00 80 00 
(da0:umass-sim0:0:0:0): CAM status: CCB request completed with an error
(da0:umass-sim0:0:0:0): Retrying command
usb_pc_common_mem_cb: Page offset was not preserved
(da0:umass-sim0:0:0:0): READ(10). CDB: 28 00 00 00 00 a8 00 00 80 00 
(da0:umass-sim0:0:0:0): CAM status: CCB request completed with an error
(da0:umass-sim0:0:0:0): Retrying command
usb_pc_common_mem_cb: Page offset was not preserved
(da0:umass-sim0:0:0:0): READ(10). CDB: 28 00 00 00 00 a8 00 00 80 00 
(da0:umass-sim0:0:0:0): CAM status: CCB request completed with an error
(da0:umass-sim0:0:0:0): Error 5, Retries exhausted

----

I have photographs of today's incident, but I can not attach them at this time. 

I understand that users of USB devices may be cautioned against using USB 2.0 for ZFS, but the difference between NOV2015 and DEC2015 was so extreme that a bug report seems appropriate. 

----

Historically (2010)
-------------------

https://wiki.freebsd.org/USB noted:

    Q: I see the following error and USB stops working 
       "Page offset was not preserved!"
    A: Update your sources, this issue is fixed.

Recently (2015-11-24)
---------------------

svn commit: r291251 - stable/9/sys/dev/usb
https://lists.freebsd.org/pipermail/svn-src-stable-9/2015-November/008097.html

> MFC r290326:
> Relax the BUS_DMA_KEEP_PG_OFFSET requirement to 
> allow optimising allocation of DMA bounce buffers.

Modified:

    stable/9/sys/dev/usb/usb_busdma.c

A wild guess: I wonder whether the problem(s) affecting my use of a USB device are an unintended consequence of that allowance for optimisation.
Comment 1 Hans Petter Selasky freebsd_committer freebsd_triage 2016-04-10 13:52:31 UTC

*** This bug has been marked as a duplicate of bug 208365 ***