*** glibc detected *** ./src/simple-scan: double free or corruption (fasttop): 0x00007f4f5c06dc90 ***

Bug #1029670 reported by Anthony Harrington
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
simple-scan (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

I can readily reproduce this by doing the following:

1) Open simple-scan
2) scan a page
3) while some way through scanning the page, hit the cancel button and wait for it to finish
4) clicking the scan button now will crash the program

The error appears as
*** glibc detected *** ./src/simple-scan: double free or corruption (fasttop): 0x00007f4f5c06dc90 ***

i'll attach some data below.

Revision history for this message
Anthony Harrington (linuxchemist) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in simple-scan (Ubuntu):
status: New → Confirmed
description: updated
Revision history for this message
Michael Nagel (nailor) wrote :

This might (or might not) be related to the scanner used.
Everyone affected: please attach additional information about make / model / usb id.

summary: - Cancelling a scan and then scanning crashes the program: memory
- corruption?
+ *** glibc detected *** ./src/simple-scan: double free or corruption
+ (fasttop): 0x00007f4f5c06dc90 ***
Revision history for this message
Anthony Harrington (linuxchemist) wrote :

I decided to try reproducing it again a few times and gather some more data on it. Actually got a slightly different warning this time:

ant@Master-Ant:~$ simple-scan
*** glibc detected *** simple-scan: free(): invalid pointer: 0x00007fa300085240 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x7e626)[0x7fa324db0626]
/usr/lib/sane/libsane-hpaio.so.1(sane_hpaio_close+0xa4)[0x7fa2fa132574]
/usr/lib/x86_64-linux-gnu/libsane.so.1(sane_dll_close+0x24)[0x7fa32585a864]
simple-scan[0x4229b9]
simple-scan[0x422a4a]
simple-scan[0x42367c]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x699e5)[0x7fa325ac79e5]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x7e9a)[0x7fa3250f6e9a]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7fa324e244bd]

I've attached the full log of this from the terminal as 'crash' and whilst doing this, i was also running gdb with lot of dbgsym packages in the hopes of getting a decent backtrace.

Addtionally, info for the printer in use is as follows, from the log in the .cache folder in /home/:

DEBUG: scanner.vala:346: Device: name="hpaio:/usb/Photosmart_C4100_series?serial=MY7BDJ10KC04J7" vendor="Hewlett-Packard" model="Photosmart_C4100_series" type="all-in-one"
[+61.64s] DEBUG: simple-scan.vala:296: Requesting scan at 600 dpi from device 'hpaio:/usb/Photosmart_C4100_series?serial=MY7BDJ10KC04J7'
[+61.64s] DEBUG: scanner.vala:1491: Scanner.scan ("hpaio:/usb/Photosmart_C4100_series?serial=MY7BDJ10KC04J7", dpi=600, scan_mode=ScanMode.GRAY, depth=2, type=ScanType.SINGLE, paper_width=2100, paper_height=2970)

When this crash is reproduced, the log is always ended with:
[+80.52s] DEBUG: scanner.vala:1141: sane_start (page=0, pass=0) -> SANE_STATUS_DEVICE_BUSY
[+80.52s] WARNING: scanner.vala:1148: Unable to start device: Device busy
[+80.52s] DEBUG: scanner.vala:715: sane_cancel ()

Revision history for this message
Anthony Harrington (linuxchemist) wrote :

A gdb backtrace. Hope it's useful!

Revision history for this message
Bortnyák Roland (antivirtel) wrote :

I can still confirm that bug with BZR revision 630 (2013-07-18 07:19:41 CEST) installed on 12.04.2 LTS (latest updates), amd64 - compiled with make, as it was writen in the readme file. Output after crash is attached (backtrace)!

Notice me, if you need more information about my environment!

Please fix this issue!

Changed in simple-scan:
status: New → Confirmed
Revision history for this message
Anthony Harrington (linuxchemist) wrote :

I'm surprised this is still happening?

I can't seem to reproduce this at all anymore. I fired everything up a few hours ago, and try as i did to scan, stop suddenly, delete it or start scanning again, whatever i tried...it slowly got on with the next job i set and all with no crashes. :)

I find following the code itself incredibly difficult (and not just because i'm not used to vala lol), but i thought i'd be helpful and build it with clang to look for outstanding errors (really i was trying to look for some sort of obvious deletion of an already deleted entity. If it's there, it's beyond my abilities to see it.)

HOWEVER...aside from a LOT of dead assignments/initialisations (some/all of which may be false-positives) there are 7 null pointer dereferences in the code and since they're unsafe/problematic/apocalyptic, i've put them in bug #1212452 (https://bugs.launchpad.net/ubuntu/+source/simple-scan/+bug/1212452)

Revision history for this message
Bortnyák Roland (antivirtel) wrote :

I'm surprised too, when I saw the date of the original bugreport. But I can easily reproduce this issue on the latest LTS. Whichever version I've tried, it will crash after a cancelled scan. I can't even use that button.

Please, if someone can, fix this issuse! Thanks!

Revision history for this message
JujuLand (alain-aupeix) wrote :

I also had this crash with the version installed for ubuntu 12.04, and also with version 2.6.0 and 3.6.1 on ubuntu 12.04

My scanner is an HP Deskjet F380

lsusb returns :

Bus 002 Device 002: ID 03f0:5511 Hewlett-Packard DeskJet F300 series

I joined crash log captured with 3.4.x (I dont remember) installed with 12.04

A+

Revision history for this message
penalvch (penalvch) wrote :

Anthony Harrington, this bug report is being closed due to your last comment https://bugs.launchpad.net/simple-scan/+bug/1029670/comments/7 regarding this being fixed with an update. For future reference you can manage the status of your own bugs by clicking on the current status in the yellow line and then choosing a new status in the revealed drop down box. You can learn more about bug statuses at https://wiki.ubuntu.com/Bugs/Status. Thank you again for taking the time to report this bug and helping to make Ubuntu better. Please submit any future bugs you may find.

no longer affects: simple-scan (Ubuntu)
affects: simple-scan → simple-scan (Ubuntu)
Changed in simple-scan (Ubuntu):
status: Confirmed → Invalid
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.