Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 631996 - net-print/hplip-3.17.9 : hp-setup segfault after asking for password
Summary: net-print/hplip-3.17.9 : hp-setup segfault after asking for password
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Daniel Pielmeier
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-25 13:14 UTC by Thomas Capricelli
Modified: 2018-11-12 19:03 UTC (History)
1 user (show)

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


Attachments
emerge --info output (emergeinfo.txt,17.23 KB, text/plain)
2017-09-25 13:14 UTC, Thomas Capricelli
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Capricelli 2017-09-25 13:14:47 UTC
Created attachment 496350 [details]
emerge --info output

(tested with 3.17.6 and 3.17.9, couldn't test with 3.16.3 because of #631942)

I have the following USE flags on:

     Installed versions:  3.17.9(11:27:07 25/09/2017)(X hpcups kde policykit qt5 scanner snmp -doc -fax -hpijs -libressl -libusb0 -minimal -parport -static-ppds PYTHON_SINGLE_TARGET="python2_7 -python3_4 -python3_5 -python3_6" PYTHON_TARGETS="python2_7 python3_4 -python3_5 -python3_6")


After doing xhost + so that root can connect to my X session, i do this in a console :
    su hp-setup

The (qt5) interface finds the right printer (on ethernet) and at the end, asks me for a password (which is strange, i've done a su!?).

Once the password is entered, i have the window dissappear, and this displayed in console :

--------------------------------------
warning: Fax setup disabled - Python 2.3+ required.
^[[FXmbTextListToTextProperty result code -2
XmbTextListToTextProperty result code -2
XmbTextListToTextProperty result code -2
Searching... (bus=net, timeout=5, ttl=4, search=(None) desc=0, method=slp)
warning: /usr/share/hplip/plugin.spec file doesn't exists.
warning: /usr/share/hplip/plugin.spec file doesn't exists.
XmbTextListToTextProperty result code -2
XmbTextListToTextProperty result code -2
XmbTextListToTextProperty result code -2
XmbTextListToTextProperty result code -2
XmbTextListToTextProperty result code -2
XmbTextListToTextProperty result code -2
XmbTextListToTextProperty result code -2
XmbTextListToTextProperty result code -2
XmbTextListToTextProperty result code -2
XmbTextListToTextProperty result code -2
error:  Printer queue setup failed.   Error : successful-ok-ignored-or-substituted-attributes
XmbTextListToTextProperty result code -2
XmbTextListToTextProperty result code -2
XmbTextListToTextProperty result code -2
QXcbConnection: XCB error: 3 (BadWindow), sequence: 3386, resource id: 10650378, major code: 40 (TranslateCoords), minor code: 0
QXcbConnection: XCB error: 3 (BadWindow), sequence: 3396, resource id: 10649410, major code: 40 (TranslateCoords), minor code: 0

Done.
--------------------------------------


The part starting at "error: Printer" is displayed after the password was entered.


I have the same behaviour using the text interface (hp-setup -i) : 

--------------------------------------
% sudo hp-setup  -i

HP Linux Imaging and Printing System (ver. 3.17.9)
Printer/Fax Setup Utility ver. 9.0

Copyright (c) 2001-15 HP Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

(Note: Defaults for each question are maked with a '*'. Press <enter> to accept the default.)


--------------------------------
| SELECT CONNECTION (I/O) TYPE |
--------------------------------

  Num       Connection  Description                                               
            Type                                                                  
  --------  ----------  ----------------------------------------------------------
  0*        usb         Universal Serial Bus (USB)                                
  1         net         Network/Ethernet/Wireless (direct connection or JetDirect)

Enter number 0...1 for connection type (q=quit, enter=usb*) ? 1

Using connection type: net

 
Setting up device: hp:/net/HP_Color_LaserJet_MFP_M377dw?ip=10.11.3.13


warning: /usr/share/hplip/plugin.spec file doesn't exists.
warning: /usr/share/hplip/plugin.spec file doesn't exists.

---------------------
| PRINT QUEUE SETUP |
---------------------


Please enter a name for this print queue (m=use model name:'HP_Color_LaserJet_MFP_M377dw'*, q=quit) ?HP
Using queue name: HP
Locating PPD file... Please wait.

Found PPD file: lsb/usr/cupsfilters/HP-Color_LaserJet_CM3530_MFP-PDF.ppd
Description: 

Note: The model number may vary slightly from the actual model number on the device.

Does this PPD file appear to be the correct one (y=yes*, n=no, q=quit) ? 
Enter a location description for this printer (q=quit) ?bureau
Enter additonal information or notes for this printer (q=quit) ?

Adding print queue to CUPS:
Device URI: hp:/net/HP_Color_LaserJet_MFP_M377dw?ip=10.11.3.13
Queue name: HP
PPD file: lsb/usr/cupsfilters/HP-Color_LaserJet_CM3530_MFP-PDF.ppd
Location: bureau
Information: 


You do not have permission to add a printer. You need authentication.
Username: root
Password: 
error: Printer queue setup failed. Error : successful-ok-ignored-or-substituted-attributes 

--------------------------------------


I've checked in /etc/cups/ and in the cups web interface, but nothing was changed here.
Comment 1 Thomas Capricelli 2017-09-25 13:20:40 UTC
i have coredump files, if i look with gdb, i got this trace.

libQt5Core.so.5 is from dev-qt/qtcore-5.7.1-r3 which was installed on april 24th. At this time i was using gcc 5 and i'm now using gcc 6.4.0, though i've done everything on https://wiki.gentoo.org/wiki/Upgrading_GCC

I'll try re-emerging the whole Qt, though ..


#0  0x00007fca3db09c88 in QtSharedPointer::ExternalRefCountData::getAndRef(QObject const*) () from /usr/lib64/libQt5Core.so.5
#1  0x00007fca3df46065 in QWindowSystemInterface::handleExtendedKeyEvent(QWindow*, unsigned long, QEvent::Type, int, QFlags<Qt::KeyboardModifier>, unsigned int, unsigned int, unsigned int, QString const&, bool, unsigned short, bool) () from /usr/lib64/libQt5Gui.so.5
#2  0x00007fca34fa7590 in QXcbKeyboard::handleKeyEvent(unsigned int, QEvent::Type, unsigned char, unsigned short, unsigned int) () from /usr/lib64/libQt5XcbQpa.so.5
#3  0x00007fca34f9eec4 in QXcbConnection::handleXcbEvent(xcb_generic_event_t*) () from /usr/lib64/libQt5XcbQpa.so.5
#4  0x00007fca34f9f484 in QXcbConnection::processXcbEvents() () from /usr/lib64/libQt5XcbQpa.so.5
#5  0x00007fca3dc59401 in QObject::event(QEvent*) () from /usr/lib64/libQt5Core.so.5
#6  0x00007fca3e47be1c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#7  0x00007fca3e483a55 in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#8  0x00007fca3eb781be in sipQApplication::notify(QObject*, QEvent*) () from /usr/lib64/python2.7/site-packages/PyQt5/QtWidgets.so
#9  0x00007fca3dc30a29 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib64/libQt5Core.so.5
#10 0x00007fca3dc3322c in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib64/libQt5Core.so.5
#11 0x00007fca3dc7f993 in postEventSourceDispatch(_GSource*, int (*)(void*), void*) () from /usr/lib64/libQt5Core.so.5
#12 0x00007fca3bf2b1ee in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#13 0x00007fca3bf2b465 in g_main_context_iterate.isra () from /usr/lib64/libglib-2.0.so.0
#14 0x00007fca3bf2b52c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#15 0x00007fca3dc7fa1f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#16 0x00007fca3dc2f852 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core
Comment 2 Thomas Capricelli 2017-09-25 13:21:56 UTC
if i try "sudo gdb /usr/bin/python2.7"
and inside gdb "run /usr/bin/hp-setup -i", then it ends with :


---------------------------------------------
You do not have permission to add a printer. You need authentication.
Username: root
Password: 
error: Printer queue setup failed. Error : successful-ok-ignored-or-substituted-attributes 
[Inferior 1 (process 30687) exited with code 01]
(gdb) bt
No stack.
---------------------------------------------

So it seems it's just quitting with an error, the segfault is probably some qt-gui only stuff, and not important/relevant here.
Comment 3 Daniel Pielmeier gentoo-dev 2017-09-26 17:39:50 UTC
You should not need root to add a printer. Is the user running hp-setup in the lpadmin group?
Comment 4 Thomas Capricelli 2017-09-26 19:26:33 UTC
Yes, my user is in lpadmin (and has always been).

Whether I do "hp-setup" or "sudo hp-setup", i keep having the dialog "Enter Username/Password" at the end (clicking on "add printer" button in "Step 3 of 3")

Is there any place on the disk i should check permissions, or something ? I don't know where to go for debugging this. I'm on irc ('orzel') if needed.
Comment 5 Daniel Pielmeier gentoo-dev 2017-09-27 21:17:08 UTC
As I said you should not require to be root if the user trying to add the queue is in the lpadmin group.


Can you please try if you are able to set up the printer queue using the cups web-interface.

Also installing cups used to help in such strange cases.

Did you try to enter the credentials of the user which is member of the lpadmin group when being asked for a password?
Comment 6 Daniel Pielmeier gentoo-dev 2017-10-21 18:35:20 UTC
Any news here?

Btw. I meant re-installing cups in my last comment.
Comment 7 Thomas Capricelli 2017-10-21 21:39:08 UTC
I uninstalled hplip/cups and re-installed them, but the behaviour was the same.

I kinda have some improvement if i change my /etc/cups/client.conf. It had

    ServerName 10.11.3.1

because my first (usb-only) printer is 'shared' by the router 10.11.3.1 running linux/cups.

If i put
   ServerName /run/cups/cups.sock

and start cupsd, then hp-setup seem to work. But i can't use my first printer anymore.
Comment 8 Daniel Pielmeier gentoo-dev 2018-04-23 19:50:55 UTC
(In reply to Thomas Capricelli from comment #7)
> I uninstalled hplip/cups and re-installed them, but the behaviour was the
> same.
> 
> I kinda have some improvement if i change my /etc/cups/client.conf. It had
> 
>     ServerName 10.11.3.1
> 
> because my first (usb-only) printer is 'shared' by the router 10.11.3.1
> running linux/cups.
> 
> If i put
>    ServerName /run/cups/cups.sock
> 
> and start cupsd, then hp-setup seem to work. But i can't use my first
> printer anymore.

I am still missing an answer from comment #5.

When you were asked for a password did you try to enter the credentials of the user which is member of the lpadmin group?

Also are you able to add the user with the cups web interface?
Comment 9 Daniel Pielmeier gentoo-dev 2018-04-23 19:52:44 UTC
Additionally your printer requires a binary plugin (hplip-plugin). Do you have it installed properly?