#720721 skanlite: usbfs: interface 0 claimed by usbfs while 'skanlite' sets config #1

Package:
skanlite
Source:
skanlite
Description:
image scanner based on the KSane backend
Submitter:
Ross Boylan
Date:
2013-10-27 06:21:08 UTC
Severity:
important
#720721#5
Date:
2013-08-24 19:22:10 UTC
From:
To:
Dear Maintainer,
After a brief period in which it worked, skanlite is no longer able to access
my
scanner.  Since this makes it completely unusable for me, I have raised the
severity.

   * What led up to the situation?
Installed skanlite.
Started it; could not find scanner.
Plugged in scanner (duh).
Rescan still didn't find scanner.
Relaunching application -> found scanner.
Edited some scanning options (1 bit B/W scans), previewed, scanned and saved
image.
Expanded and shrunk various windows and redid preview scan.
Reduced to 400 dpi.
Tried to select an area to scan.  The entire area was highlighted, but several
smaller squares with red borders were also apparent.  I might have accidentally
clicked to create them.
Requested scan; the areas with red borders were scanned successively, with me
hitting cancel after each one.
I also hit the red button on the bottom right of the window that showed between
scans.
In the main window, right click to deselect all the little squares.
Highlight the overall area to scan.
Request scan.  It may be relevant that significant time (1-2 minutes?) had
passed since my last scan or preview.
After a slight delay skanlite reported (roughly) I/O error: unable to contact
device.  Note that the application was
open continuously between the time it worked and the time it failed. About this
time kern.log shows the last message below:
<kern.log>
Aug 24 11:31:37 tempserver kernel: [6950072.448058] usb 3-1.2: new high-speed
USB device number 9 using ehci_hcd
Aug 24 11:31:37 tempserver kernel: [6950072.547022] usb 3-1.2: New USB device
found, idVendor=04b8, idProduct=011e
Aug 24 11:31:37 tempserver kernel: [6950072.547027] usb 3-1.2: New USB device
strings: Mfr=1, Product=2, SerialNumber=0
Aug 24 11:31:37 tempserver kernel: [6950072.547030] usb 3-1.2: Product: EPSON
Scanner
Aug 24 11:31:37 tempserver kernel: [6950072.547033] usb 3-1.2: Manufacturer:
EPSON
Aug 24 11:46:03 tempserver kernel: [6950936.545558] usb 3-1.2: usbfs: interface
0 claimed by usbfs while 'skanlite' sets config #1
</kern.log>
Tried again, no luck.
Relaunched application -> "Sorry, No devices found" after a pause.
Repeated relaunches and rescans did not help.

   * What exactly did you do (or not do) that was effective (or
     ineffective)?
See above.
Also searched for similar bugs.  The closest, because it involved usbfs, is
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=546558 (fixed in 2009, and
says claimed by usb-storage, while I have usbfs).

There are a number of similar reports, but they seem to involve cups and usblp.
I'm running cups, but usblp does not seem to be the
problem.
http://worldforum.pardus-linux.nl/index.php?topic=4133.0
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=546558

   * What was the outcome of this action?
No resolution found.  Unable to scan.

   * What outcome did you expect instead?
Able to scan.

#720721#10
Date:
2013-08-24 19:34:22 UTC
From:
To:
I installed xsane; it can not locate a scanner either.  It seems likely
the  ultimate cause is in some lower-level component.  Please reassign
as appropriate.

I have disks connected via a usb interface.  While that may contribute
to the problem, it also means that I can't just disable the subsystem if
it gives me access to the drives.

Ross

#720721#15
Date:
2013-08-25 01:17:57 UTC
From:
To:
I disconnected the USB cable and reconnected it. skanlite is working
again.  I waited several minutes between scans, leaving the program
running, and it still worked.

I also got red boxes on my preview again; apparently it automatically
tries to identify interesting regions.  It wasn't close, and so I
selected "disable automatic selections" in the settings.  That seems to
have fixed that problem.

I ran udevadm monitor and recorded what happened when I reconnected the
scanner. It appears there is more than one device, or at least more than
one bus location associated with the scanner.  It is not a multifunction
device.

root@tempserver:/# date; udevadm monitor --kernel --udev --property
Sat Aug 24 17:27:37 PDT 2013
monitor will print the received events for:
UDEV - the event which udev sends out after rule processing
KERNEL - the kernel uevent

# deleted output from the removal
# it looked similar, except it used bus/usb/003/009

KERNEL[6991172.123848]
add      /devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.2 (usb)
ACTION=add
BUSNUM=003
DEVICE=/proc/bus/usb/003/010
DEVNAME=bus/usb/003/010
DEVNUM=010
DEVPATH=/devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.2
DEVTYPE=usb_device
MAJOR=189
MINOR=265
PRODUCT=4b8/11e/100
SEQNUM=6721
SUBSYSTEM=usb
TYPE=255/255/255
UDEV_LOG=3

KERNEL[6991172.124434]
add      /devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.2/3-1.2:1.0 (usb)
ACTION=add
DEVICE=/proc/bus/usb/003/010
DEVPATH=/devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.2/3-1.2:1.0
DEVTYPE=usb_interface
INTERFACE=255/255/255
MODALIAS=usb:v04B8p011Ed0100dcFFdscFFdpFFicFFiscFFipFF
PRODUCT=4b8/11e/100
SEQNUM=6722
SUBSYSTEM=usb
TYPE=255/255/255
UDEV_LOG=3

UDEV  [6991172.129112]
add      /devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.2 (usb)
ACTION=add
BUSNUM=003
DEVICE=/proc/bus/usb/003/010
DEVNAME=/dev/bus/usb/003/010
DEVNUM=010
DEVPATH=/devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.2
DEVTYPE=usb_device
ID_BUS=usb
ID_MODEL=EPSON_Scanner
ID_MODEL_ENC=EPSON\x20Scanner
ID_MODEL_ID=011e
ID_REVISION=0100
ID_SERIAL=EPSON_EPSON_Scanner
ID_USB_INTERFACES=:ffffff:
ID_VENDOR=EPSON
ID_VENDOR_ENC=EPSON
ID_VENDOR_ID=04b8
MAJOR=189
MINOR=265
PRODUCT=4b8/11e/100
SEQNUM=6721
SUBSYSTEM=usb
TAGS=:udev-acl:
TYPE=255/255/255
UDEV_LOG=3
USEC_INITIALIZED=6991172125532
libsane_matched=yes

UDEV  [6991172.132784]
add      /devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.2/3-1.2:1.0 (usb)
ACTION=add
DEVICE=/proc/bus/usb/003/010
DEVPATH=/devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.2/3-1.2:1.0
DEVTYPE=usb_interface
INTERFACE=255/255/255
MODALIAS=usb:v04B8p011Ed0100dcFFdscFFdpFFicFFiscFFipFF
PRODUCT=4b8/11e/100
SEQNUM=6722
SUBSYSTEM=usb
TYPE=255/255/255
UDEV_LOG=3
USEC_INITIALIZED=6991172129552

There are 2 blocks for
add      /devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.2/3-1.2:1.0 (usb)
and 2 for
add      /devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.2 (usb)

I'm not sure if that means there were 2 kernel add events for each, or
just that a block is printed each time a udev rule fires.  The 3rd block
appears to be from /lib/udev/rules.d/60-libsane.rules

#720721#20
Date:
2013-08-25 17:50:26 UTC
From:
To:
Here's a recipe for creating the problem.  It is not completely
deterministic, but it seems to do it about half the time.  This at least
suggests the failure may be partly skanlite specific, though it may be
in interaction with other systems.

1. Preview a document after enabling "automatic selections", which is
the default.
2. My document typically gets 4-5 red boxes.
3. Highlight the entire area of the document.
4. Press scan.
5. This will scan each red box in sequence, and then the whole page.
6. For the first few, hit cancel in the popup window that allows you to
save the image.
7. Then, in the main window while an image section is being
scanned--i.e., scanner is physically scanning and progress bar is in an
intermediate state (also worked once with it at 0% but scanning in
progress) hit the red button to the right of the progress bar.  This is
not the red cancel button which is immediately below it.
8. Next region scanned results in "device I/O error".
9. skanlite will not work (i.e., device i/o error or, if relaunched,
failure to detect a scanner) until reset by physically disconnecting USB
cable.

I have never got a failure doing step 7 before the 3rd subsection to be
scanned.  I have got a failure doing step 7 on the final scan  of the
whole page.

Step 7 does not always cause a failure.

Oddly, there are no messages in /var/log/kern.log (except when I
reconnect the scanner) or .xsession errors.  Perhaps running udevadm
monitor caused them to be redirected?

#720721#25
Date:
2013-08-25 18:04:49 UTC
From:
To:
Here's a simpler recipe.

1. Check "disable automatic selections".
2. Preview document.
3. Select the active document area (not sure if this is necessary).
4. click scan.
5. While the progress bar is intermediate and scanner is physically
scanning, hit the red button next to the progress bar but above the
cancel button.

This worked 1/1 times I tried.

The scanner is inaccessible from the existing skanlite run, from new
skanlite runs, and from new xsane runs.

Other settings, active for this and previous experiments:
preview resolution 150 dpi.
scan source flatbed
scan mode lineart
scan resolution 400 dpi
brightness 0 (default)

scanner specific options all at default, I think.