Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 411051 - net-print/hplip-3.12.2-r2 segfaults with xsane/sane
Summary: net-print/hplip-3.12.2-r2 segfaults with xsane/sane
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Printing (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Daniel Pielmeier
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-06 15:56 UTC by Roger
Modified: 2016-03-02 19:32 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
backtrace (file_411051.txt,2.05 KB, text/plain)
2015-05-28 20:20 UTC, Nuno Silva
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roger 2012-04-06 15:56:43 UTC
When using XSane (or it's cli scanning tools), net-print/hplip-3.12.2-r2 causes a segmentation fault (segfault) with xsane/sane when using the "soapht_control_option" function within /usr/lib/sane/libsane-hpaio.so.

To work around, I went back to using net-print/hplip-3.11.10 and the problem seems to be worked-around for now.

(The strace and gdb btrace just went off my terminal history.  If nobody else can reproduce this, I'll reinstall the version affected and post strace and gdb logs.)

Reproducible: Always
Comment 1 Nuno Silva 2015-05-28 20:18:57 UTC
Here, with hplip-3.14.10 built with dbus, and a scanner supported by libsane-hpaio, I get segfaults when I try to scan as a regular user, even if the dbus system bus has been started. Syslog mentions 'xsane[1581]: scan/sane/io.c 53: dBus Connection Error (Failed to connect to socket /var/run/dbus/system_bus_socket: Permission denied)!', and the crash happens in dbus_connection_send(). This does not happen if I run the sane tools as root.

Setting USE="-fax -qt4" avoids this, as these USE flags are what will enable dbus support when compiling.
Comment 2 Nuno Silva 2015-05-28 20:20:24 UTC
Created attachment 404222 [details]
backtrace
Comment 3 Roger 2015-05-29 04:18:57 UTC
Maybe you have not updated the binary driver after upgrading the net-print/hplip package.

Pretty sure the procedure for upgrading the binary driver to be either (typed as root) "hp-plugin" for the qt interface or "hp-plugin -i" for command line interface.

If I'm not mistaken, the hplip binary driver provides fax and scanning functions. Hence why the "fax" USE flag is likely causing problems.

I just recently purchased a Canon 9000f MK2 flatbed scanner, having a completely open sourced Sane (pixma) driver adequate for reflective media, resorting to VueScan for scanning negatives.  Overall, the Canon has much better scan quality then the HP.  Which reminds me, I might further recompile or uninstall hplip's binary stuff as it's no longer needed here.
Comment 4 Nuno Silva 2015-05-29 04:26:50 UTC
I ran hp-setup, I didn't try hp-plugin, I'll check that later if I can. But I don't think this could be the problem, as it works if I run it as root with the dbus system bus running. hplip wasn't installed either, so it wasn't an update (I've used it in the past, but then I removed it).

The crash happens only when run as non-root, and only when I start a scanning event. If I run it as root, it doesn't crash.

But comparing it, your crash was in soapht_control_option, which seems to be the one in bug 415377. Perhaps I should file a separate bug?
Comment 5 Roger 2015-05-29 14:36:14 UTC
Might be a good idea to file a new bug if your backtrace is different from the attached.

I've spent five or so years using hplip contributing to it's bug resolutions, and right now I'd be happy just to walk away from it.  Albeit, hplip works if and only if you enable all USE flags or features, and for which some or most users all USE flags are not needed.  Debugging hplip isn't as elegant as most other Unix/Linux tools.  Wish these corporate developers would build their tools and hardware from the ground-up or, CLI to GUI instead of the reverse.

As for this bug, if it's not related to anybody else's experience, then I wouldn't mind seeing it closed. :-/
Comment 6 Patrick Lauer gentoo-dev 2015-05-29 23:12:24 UTC
(In reply to Roger from comment #5)
> As for this bug, if it's not related to anybody else's experience, then I
> wouldn't mind seeing it closed. :-/

Wishing bugs away doesn't fix them. Fixing bugs fixes bugs.
Comment 7 Roger 2015-05-30 03:30:55 UTC
I stated, "Wish these corporate developers would build their tools and hardware from the ground-up..."
Comment 8 Damien 2016-02-29 20:56:32 UTC
(In reply to Nuno Silva from comment #1)
> Here, with hplip-3.14.10 built with dbus, and a scanner supported by
> libsane-hpaio, I get segfaults when I try to scan as a regular user, even if
> the dbus system bus has been started. Syslog mentions 'xsane[1581]:
> scan/sane/io.c 53: dBus Connection Error (Failed to connect to socket
> /var/run/dbus/system_bus_socket: Permission denied)!', and the crash happens
> in dbus_connection_send(). This does not happen if I run the sane tools as
> root.
> 
> Setting USE="-fax -qt4" avoids this, as these USE flags are what will enable
> dbus support when compiling.

This happens to me as well. Last week it was fine, but this week it stopped working properly. this is the core dump http://pastebin.com/eRqTnc8j
Comment 9 Damien 2016-03-01 01:55:54 UTC
added `SANE_BACKENDS="hp"` in my make.conf and emerged it again. Don't seem to have the problem anymore :)
Comment 10 Daniel Pielmeier gentoo-dev 2016-03-02 18:39:07 UTC
Okay I am going to close this one. The HPLIP Wiki page clearly mentions that some printers require the hp sane backend.
Comment 11 Nuno Silva 2016-03-02 19:12:38 UTC
Like I asked in comment 4, given that what I reported, including the attached stack trace, is about a completely different issue that is *not* solved by enabling the hp SANE backend (which in fact happens to be already enabled), should I open a separate bug?
Comment 12 Daniel Pielmeier gentoo-dev 2016-03-02 19:32:54 UTC
Summarizing this and other bugs:

Damien's backtrace like yours says something about a crash in "dbus_connection_send" It is not completely the same backtrace but apparently enabling the hp backend in sane backends fixes his bug.

The segfault in the soapht_control_option () from /usr/lib64/sane/libsane-hpaio.so.1 which this bug is about is according to bug #415377 fixed by reconfiguring the printer queue again.

It is in general recommended to reconfigure all printer queues for hplip after an update of the printer driver.

If your printer requires a binary plugin you also need to make sure the version of the hplip driver and the plugin version are the same.