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
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.
Created attachment 404222 [details] backtrace
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.
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?
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. :-/
(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.
I stated, "Wish these corporate developers would build their tools and hardware from the ground-up..."
(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
added `SANE_BACKENDS="hp"` in my make.conf and emerged it again. Don't seem to have the problem anymore :)
Okay I am going to close this one. The HPLIP Wiki page clearly mentions that some printers require the hp sane backend.
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?
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.