simple-scan consumes 100% cpu and fills disk with logs attempting to scan wirelessly with Brother MFC-7860DW

Bug #1344869 reported by James Hunt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Simple Scan
Incomplete
Medium
Unassigned
simple-scan (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Attempting to scan via wifi from a Brother MFC-7860 DW fails; the scanner shows scanning but:

- no image appears in simple-scan.
- simple-scan consumes 100% CPU
- the ~/.cache/simple-scan/simple-scan.log grows indefinately until disk space is exhausted.

This used to work perfectly and indeed the following provides an instant work-around:

$ sudo apt-get install -y xsane && xsane

ProblemType: Bug
DistroRelease: Ubuntu 14.10
Package: simple-scan 3.13.3-0ubuntu1
ProcVersionSignature: Ubuntu 3.16.0-4.9-generic 3.16.0-rc5
Uname: Linux 3.16.0-4-generic x86_64
ApportVersion: 2.14.4-0ubuntu2
Architecture: amd64
CurrentDesktop: Unity
Date: Sat Jul 19 13:44:59 2014
DriverPackageVersions:
 libsane 1.0.24-1.1ubuntu1
 libsane-extras N/A
 hplip 3.14.6-1
 hpoj N/A
InstallationDate: Installed on 2014-04-11 (98 days ago)
InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Daily amd64 (20140409)
MachineType: LENOVO 20AQCTO1WW
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-3.16.0-4-generic root=/dev/mapper/ubuntu--vg-root ro quiet splash vt.handoff=7
SourcePackage: simple-scan
UpgradeStatus: Upgraded to utopic on 2014-05-08 (72 days ago)
dmi.bios.date: 02/10/2014
dmi.bios.vendor: LENOVO
dmi.bios.version: GJET71WW (2.21 )
dmi.board.asset.tag: Not Available
dmi.board.name: 20AQCTO1WW
dmi.board.vendor: LENOVO
dmi.board.version: 0B98405 STD
dmi.chassis.asset.tag: No Asset Information
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Not Available
dmi.modalias: dmi:bvnLENOVO:bvrGJET71WW(2.21):bd02/10/2014:svnLENOVO:pn20AQCTO1WW:pvrThinkPadT440s:rvnLENOVO:rn20AQCTO1WW:rvr0B98405STD:cvnLENOVO:ct10:cvrNotAvailable:
dmi.product.name: 20AQCTO1WW
dmi.product.version: ThinkPad T440s
dmi.sys.vendor: LENOVO

Revision history for this message
James Hunt (jamesodhunt) wrote :
Revision history for this message
James Hunt (jamesodhunt) wrote :

When simple-scan is spinning, the following entry is added to the log repeatedly until ENOSPC:

[+15,29s] DEBUG: scanner.vala:1310: sane_read (0) -> (SANE_STATUS_GOOD, 0)

Further details:

$ cat /proc/$(pidof simple-scan)/stack
[<0000000000000000>] poll_schedule_timeout+0x49/0x70
[<0000000000000000>] do_sys_poll+0x422/0x540
[<0000000000000000>] SyS_poll+0x65/0x100
[<0000000000000000>] tracesys+0xe1/0xe6
[<0000000000000000>] 0xffffffffffffffff

Revision history for this message
James Hunt (jamesodhunt) wrote :
Revision history for this message
Robert Ancell (robert-ancell) wrote :

When did this used to work?

I'm assuming you have the Brother proprietary drivers installed, can you check the versions of the 'brscan', 'brscan2', 'brscan3' and 'brscan4' packages?

Can you get a log containing the calls leading up to the loop (the attached log is from a fresh start where no scanning was started). You can get the log from simple-scan with:
$ simple-scan --debug
if that is easier to capture it.

You can also get the equivalent from xsane by running:
$ ltrace -l libsane.so.1 xsane

The particular response from the driver is in fact valid, we are correctly waiting for SANE_STATUS_EOF before stopping the sane_reads. So this might be a buggy driver that's triggered by the options that simple-scan sets.

Changed in simple-scan (Ubuntu):
status: New → Incomplete
importance: Undecided → Medium
Changed in simple-scan:
status: New → Incomplete
importance: Undecided → Medium
Revision history for this message
James Hunt (jamesodhunt) wrote :

Hi Robert,

Sorry to be vague, but I don't actually scan much so the last time I recall doing it I was running trusty.

Yes, the proprietary brother drivers are required for wireless scanning AIUI.

$ dpkg -l | grep brscan
ii brscan-skey 0.2.4-1 amd64 Brother Linux scanner S-KEY tool
ii brscan4 0.4.2-3 amd64 Brother Scanner Driver

Gah - I've just got an updated simple-scan package (3.13.4-0ubuntu1). The behaviour with this version is different; simple-scan tellms me there is no scanner connected, yet if I click "scan", it clearly is talking to the scanner (which I can hear whirring in the background). So, although I no longer get ENOSPC, the scanned image never appears in simple-scan. When I quit simple-scan, it seems a command is sent to the scanner to reset since it sounds like it is resetting itself.

Updated simple-scan debug log attached.

Revision history for this message
James Hunt (jamesodhunt) wrote :

'ltrace -o /tmp/bug-1344869-ltrace-xsane.log -s 1024 -fl libsane.so.1 xsane' log from a successful wireless scan using xsane.

Revision history for this message
Robert Ancell (robert-ancell) wrote :

I think this is fixed in simple-scan 3.13.4.2, please re-test.

Revision history for this message
James Hunt (jamesodhunt) wrote :

Yes, I confirm that the issue is resolved with 3.13.4.2-0ubuntu1.

Not relevant to this bug, but I do notice that the scan speed is quit slow using simple-scan. Comparing with xsane at the same resolution (300dpi):

- xsane: 23 seconds
- simple-scan: 2 minutes.

Thanks very much for the fast turn-around!

Changed in simple-scan (Ubuntu):
status: Incomplete → Fix Released
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.