hp-plugin infinite loop

Bug #1484916 reported by Ginta
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HPLIP
Fix Released
Undecided
Unassigned
Fedora
Fix Released
Undecided

Bug Description

I am trying to install my printer (it was working before the update), but when installing plugin, it gets on an endless loop, so I can't use my printer at all.

This is the debug log:
http://pastebin.com/D2dL8ECk

Revision history for this message
In , Zoltan (zoltan-redhat-bugs) wrote :

Description of problem:

After upgrading to HPLIP 3.15.7-1, scanning on my LaserJet Pro 200 color MFP M276mw ceased to work, as usual, the plugins must be updated.

Now, when running "sudo hp-plugin -i" I am greeted with:

error: hp-plugin should not be run as root/superuser

OK, tried again with my user but I don't know how it will install the plugins system-wide. Now, "hp-plugin -i" seems to work, until after it properly downloaded hplip-3.15.7-plugin.run. Then it just spins its progress indicator and "pstree -pl" shows this:

|-bash(7573)---hp-plugin(10319)---sh(10356)---hplip-plugin-in(10414)---python3(10417)---su(10443)

Apparently, "su" is run but no root password prompt is shown and neither any GUI helper shows up in X11. Ctrl-C obviously stops "su" and hp-plugin reports the keyboard stopping, the result is that no plugin is installed.

"dnf downgrade hplip hplip-gui hpijs hplip-compat-libs libsane-hpaio hplip-libs hplip-common" downgraded to 3.15.2 but "sudo hp-plugin -i" shows the same error as the last comment in #1196237 :

error: /root/.hplip/hplip-3.15.2-plugin.run file does not match its checksum. File may have been corrupted or altered

Version-Release number of selected component (if applicable):

3.15.7-1.fc22

How reproducible:

Always.

Steps to Reproduce:
1. Run "hp-plugin -i"
2.
3.

Actual results:

As described above.

Expected results:

"hp-plugin -i" should be able to run as root as it always did. After all, machines can be upgraded remotely and setting them up should also be able to be done by the administrator.

Additional info:

Running "hp-plugin" without "-i" does the same, but with the wizard window shown up. The download progress is shown but after pressing the Next button makes it stall, too. The "su" command is also there in pstree.

Revision history for this message
In , Zoltan (zoltan-redhat-bugs) wrote :

I am using MATE desktop on Fedora 22 if that counts.

Revision history for this message
In , Jiri (jiri-redhat-bugs) wrote :

Hmm, hp-plugin [-i] (3.15.7) works for me in GNOME3/gtk3.

You might try to run it with (-g) but other than that I'm not sure how to further debug this.

Revision history for this message
In , Jiri (jiri-redhat-bugs) wrote :
Revision history for this message
In , Jiri (jiri-redhat-bugs) wrote :

*** Bug 1252375 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Jiri (jiri-redhat-bugs) wrote :

*** Bug 1249282 has been marked as a duplicate of this bug. ***

Revision history for this message
goutam (goutamkk) wrote :

you have to accept the license terms to install the plugin files.
Do you accept the license terms for the plug-in (y=yes*, n=no, q=quit) ?
press 'y' to accept the license terms. After that it will ask for user password to authenticate the install.

Revision history for this message
Ginta (stormbyte) wrote :

I accepted the license, you don't need to press y as it is the default option. Anyway I also tried, but password prompt is never comming, so it just stalls

Revision history for this message
goutam (goutamkk) wrote :

Are you able to install the plugins by directly running command 'sh /home/stormbyte/.hplip/hplip-3.15.7-plugin.run' in terminal ?
Also can you provide us 'hp-check' command output here.

Revision history for this message
Ginta (stormbyte) wrote :

I tried what you suggested, the license prompt is showing, but once accepted the license, nothing more happens. I see in ps -Af that su -c <python_script> is being executed, what leads me to think, it is calling su. Since the animated slash it appears, it seems that su password prompt can't be shown.
I tried also executing as root directly with no result.

This is the output of hp-doctor: http://pastebin.com/sD6mFiSD

So I think that the problem is that hp-plugin needs to be allowed to be executed as root, so the su problem dissappears when a user manually executes it as root.

Revision history for this message
Ginta (stormbyte) wrote :

(Execuding as root directly with no result means that the program itself refuses to execute as root)

Revision history for this message
In , Jiri (jiri-redhat-bugs) wrote :

*** Bug 1256070 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Zoltan (zoltan-redhat-bugs) wrote :

Created attachment 1066734
Output of hp-plugin -i -g

Revision history for this message
In , Zoltan (zoltan-redhat-bugs) wrote :

(In reply to Zoltan Boszormenyi from comment #7)
> Created attachment 1066734 [details]
> Output of hp-plugin -i -g

I pressed Ctrl-C at the end, this is where I got the python backtrace.

Revision history for this message
In , Zoltan (zoltan-redhat-bugs) wrote :

A new Fedora 22 installation from scratch using the MATE Spin Live DVD and installing all the upgrades before setting up the printer behaves the same. This time it happened on a computer with a HP LaserJet 1020 printer attached.

The workaround I found is to do this:

$ mkdir HP
$ cd HP
$ wget https://www.openprinting.org/download/printdriver/auxfiles/HP/plugins/hplip-3.15.7-plugin.run
$ chmod +x hplip-3.15.7-plugin.run
$ ./hplip-3.15.7-plugin.run --noexec --keep
$ cd plugin_tmp

In the plugin_tmp directory, edit plugin_install.py and either remove or comment out lines 42-44.

Then:

$ sudo ./hplip-plugin-install

or

$ sudo ./hplip-plugin-install -i

This workaround helped with the LaserJet 1020 printer to print and I can scan with my HP LaserJet Pro MFP printer, too.

Revision history for this message
In , Zoltan (zoltan-redhat-bugs) wrote :

Another note I have to add (should be in a different ticket) is that the firmware for the LJ1020 is not loaded automatically. I have to create a panel icon to run "hp-firmware" before the user wants to print.

Revision history for this message
In , Jiri (jiri-redhat-bugs) wrote :

(In reply to Zoltan Boszormenyi from comment #10)
> Another note I have to add (should be in a different ticket) is that the
> firmware for the LJ1020 is not loaded automatically.

That's bug #1033952 (should be fixed in Fedora 23).

Revision history for this message
In , Zoltan (zoltan-redhat-bugs) wrote :

Same error with HPLIP 3.15.9

$ rpm -q hplip
hplip-3.15.9-1.fc22.x86_64

The same workaround works as for 3.15.9.
The new plugin URL is https://www.openprinting.org/download/printdriver/auxfiles/HP/plugins/hplip-3.15.9-plugin.run

Revision history for this message
In , Jiri (jiri-redhat-bugs) wrote :
Revision history for this message
In , Gustavo (gustavo-redhat-bugs) wrote :

I can reproduce this in GNOME3. The workaround of comment #13 works for me.

Revision history for this message
In , pavka (pavka-redhat-bugs) wrote :

% uname -a
Linux pa 4.2.0-0.bpo.1-amd64 #1 SMP Debian 4.2.6-1~bpo8+1 (2015-11-18) x86_64 GNU/Linux

% hp-plugin

HP Linux Imaging and Printing System (ver. 3.15.11)
Plugin Download and Install Utility ver. 2.1

***

HP Linux Imaging and Printing System (ver. 3.15.11)
Plugin Download and Install Utility ver. 2.1

***

Downloading plug-in from: file:///home/pa/1/hplip-3.15.11-plugin.run
\Download in progress.......100%Download in progress.......100%Receiving digital keys: /usr/bin/gpg --homedir /home/pa/.hplip/.gnupg --no-permission-warning --keyserver pgp.mit.edu --recv-keys 0x4ABA2F66DBD5A95894910E0673D770CDA59047B9
Creating directory plugin_tmp
Verifying archive integrity... All good.
Uncompressing HPLIP 3.15.11 Plugin Self Extracting Archive................................................

HP Linux Imaging and Printing System (ver. 3.15.11)
Plugin Installer ver. 3.0

***

Plug-in version: 3.15.11
Installed HPLIP version: 3.15.11
Number of files to install: 42

>>> waiting for a long time <<<

\^CTraceback (most recent call last):
  File "./plugin_install.py", line 249, in <module>
    ok = installPlugin()
  File "./plugin_install.py", line 56, in installPlugin
    status, output = utils.run(cmd, passwordObj)
  File "/usr/share/hplip/base/utils.py", line 1275, in run
    i = child.expect(EXPECT_LIST)
  File "/usr/share/hplip/base/pexpect/__init__.py", line 1418, in expect
    timeout, searchwindowsize)
  File "/usr/share/hplip/base/pexpect/__init__.py", line 1433, in expect_list
    timeout, searchwindowsize)
  File "/usr/share/hplip/base/pexpect/__init__.py", line 1502, in expect_loop
    c = self.read_nonblocking(self.maxread, timeout)
  File "/usr/share/hplip/base/pexpect/__init__.py", line 901, in read_nonblocking
    r, w, e = self.__select([self.child_fd], [], [], timeout)
  File "/usr/share/hplip/base/pexpect/__init__.py", line 1687, in __select
    return select.select(iwtd, owtd, ewtd, timeout)
KeyboardInterrupt
error: Python gobject/dbus may be not installed
error: Plug-in install failed.

# dpkg -l | grep python-gobj
ii python-gobject 3.14.0-1 all Python 2.x bindings for GObject - transitional package
ii python-gobject-2 2.28.6-12+b1 amd64 deprecated static Python bindings for the GObject library

# dpkg -l | grep python-dbus
ii python-dbus 1.2.0-2+b3 amd64 simple interprocess messaging system (Python interface)
ii python-dbus-dev 1.2.0-2 all main loop integration development files for python-dbus

###
###
help https://bugzilla.redhat.com/show_bug.cgi?id=1249414#c9

Revision history for this message
In , Jiri (jiri-redhat-bugs) wrote :

*** Bug 1252040 has been marked as a duplicate of this bug. ***

Revision history for this message
goutam (goutamkk) wrote :

Hi Ginta,

Can you be able to provide the debug message output from the below command:

sh hplip-3.15.7-plugin.run -- -ig

You can download the file hplip-3.15.7-plugin.run from here https://www.openprinting.org/download/printdriver/auxfiles/HP/plugins/hplip-3.15.7-plugin.run and run the above command and paste the output here.

This will help us to fix the issue in the code.

Thanks,
goutam

Revision history for this message
Sanjay Kumar (sanjay-kumar14) wrote :

Hello Ginta,

Please refer to https://bugs.launchpad.net/hplip/+bug/1510950 and follow #19 and let me know if that fixes the issue.

Thanks,
Sanjay

Revision history for this message
In , Jiri (jiri-redhat-bugs) wrote :

There's appeared a fix in upstream bug
https://bugs.launchpad.net/hplip/+bug/1510950

Instructions with how to test a new build (f23) with the patch applied will appear here shortly - it'd be nice if you could give it a try. thanks.

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

hplip-3.15.11-5.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-85956eaffe

Revision history for this message
In , Zoltan (zoltan-redhat-bugs) wrote :

I installed hplip 3.15.11-5.fc23 and all its subpackages from koji.

Running "hp-plugin" now brings up the windows to ask for the root password under MATE. It doesn't hang anymore.

I commented on bodhi, too.

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

hplip-3.15.11-5.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-85956eaffe

Changed in hplip:
status: New → Fix Committed
Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

hplip-3.15.11-6.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-85956eaffe

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

hplip-3.15.11-6.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-85956eaffe

Revision history for this message
Sanjay Kumar (sanjay-kumar14) wrote :

Fixed in hplip-3.16.2

Changed in hplip:
status: Fix Committed → Fix Released
Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

hplip-3.15.11-6.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Revision history for this message
In , Laszlo (laszlo-redhat-bugs) wrote :

This bug was opened for Fedora 22, which is still supported, and still very much has this error. I checked Koji, and the most recent hplip build, for Fedora 22, is hplip-3.15.9-3.fc22 <http://koji.fedoraproject.org/koji/buildinfo?buildID=708914>, which very much has the same bug still (see comment 12 -- plus I've encountered it just today).

The differences between hplip-3.15.9-1 (comment 12) and hplip-3.15.9-3 (the most recent Fedora 22 build in Koji) do not address this issue; according to the RPM changelog, those changes target bug 1266903 and bug 1241548. (Which are not listed here as duplicates.)

Hence, in my opinion, this bug has not been fixed. Can you please build the fixed package for Fedora 22 as well? (For now I'll have to try building hplip-3.16.3-1 locally, on Fedora22.) Thanks.

Revision history for this message
In , Laszlo (laszlo-redhat-bugs) wrote :

I could rebuild the hplip-3.16.3-1.fc23 SRPM locally on Fedora 22, and the plugin installation succeeded (although the rotten keyserver timed out -- how frustrating). So please make the fix available for Fedora 22 as well. Thanks!

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

hplip-3.15.9-4.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-f0a25261f4

Revision history for this message
In , Laszlo (laszlo-redhat-bugs) wrote :

Highly appreciated!

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

hplip-3.15.9-4.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-f0a25261f4

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

hplip-3.15.9-4.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

Changed in fedora:
importance: Unknown → Undecided
status: Unknown → 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.