hplip 3.18.7 reports filter failed. Patch removing use of imageProcessor resolves issue

Bug #1787289 reported by Colin Keenan
26
This bug affects 5 people
Affects Status Importance Assigned to Milestone
HPLIP
Confirmed
Undecided
Unassigned

Bug Description

On Arch Linux, there is a forum and bug report concerning this issue:

hplip/hplip-plugin 3.18.7 - "Filter failed" after update https://bbs.archlinux.org/viewtopic.php?id=239363

And from the related Arch Linux bug report, there's a fix in Comment by loqs (loqs) - Monday, 13 August 2018, 19:19 GMT
Test patch to remove the use of imageProcessor. Does rebuilding with this patch resolve the issue for those with debug output like nicolo's?
     hplip.patch (2.3 KiB) (https://bugs.archlinux.org/task/59548#comment172098)

It affects many different printers. For me, it's HP LaserJet Professional P 1102w with hp-plugin installed. hp-doctor saw no issue. Rebuilding with the patch from the above comment fixed the issue. Here is a direct link to the patch:

https://bugs.archlinux.org/task/59548?getfile=16673

I have attached the hplip.patch file.

Revision history for this message
Colin Keenan (colinkeenan) wrote :
Revision history for this message
srinivas (srinivas5) wrote :

Hi Colin,

You should not see filter failed issue, we have verified on the supported distros. So please follow below steps.

If you are installing HPLIP 3.18.7 using rpm package,

For the print functionality, we need to install the ‘setroubleshoot’ package before the hplip driver rpm installation.
Command: su -c “yum install setroubleshoot”

Also if RHEL7, run installation command with su -c "rpm -Uvh --force --nodeps xxxx.rpm"
or if RHEL 6, run installation command with su -c "rpm -Uvh --nodeps xxxx.rpm"

Please refer the below link
https://developers.hp.com/hp-linux-imaging-and-printing/install/manual/distros/redhatenterprise

For installing HPLIP 3.18.7 driver using .run file, download and install from below link using "sh hplip-3.18.7.run" command.
(https://developers.hp.com/hp-linux-imaging-and-printing/install/install/index)

Regards,
Srinivas Teja.

Changed in hplip:
status: New → In Progress
Revision history for this message
Colin Keenan (colinkeenan) wrote :

I am using Arch Linux, which is not a supported distribution. I install it using their pacman package manager. The forum and bug report I linked show that it's many Arch Linux users running into this issue. The user that came up with the patch is not experiencing this issue which is why he didn't submit the bug report himself. The patch fixes the issue for me and some others using Arch Linux. We were hoping you would use the patch to fix the issue.

Revision history for this message
brian_p (claremont102) wrote :

Your problem appears to arise from the non-free plugin. Try installing the *files* from its previous version (the one which worked for you).

--
Brian.

Revision history for this message
Colin Keenan (colinkeenan) wrote :

I have tried the older version of the plugin, but I still get the same error. Only by reverting the new libImageProcessor by applying the attached patch when building can I print using this latest version of hplip.

Revision history for this message
Colin Keenan (colinkeenan) wrote :

Just now I ran hp-doctor because I figured having the old version of the plugin would be detected as an error, and it was. I let hp-doctor download and install the matching plugin version, which got me back to where I started. It still won't print. I will now re-install the patched version of hplip with use of libImageProcessor removed.

Revision history for this message
Colin Keenan (colinkeenan) wrote :

Downgrading hp-plugin only works if I also downgrade hplip. The whole point is that the current version of hplip uses the new libImageProcessor and it doesn't work with the matching version of hplip-plugin on Arch Linux.

The Arch user that came up with the patch had made this comment which may help you understand this issue:

loqs
Member
Registered: 2014-03-06
Posts: 5,465
prnt/hpcups/HPCupsFilter.cpp 644: DEBUG: SHIVA inside the while loopprnt/hpcups/HPCupsFilter.cpp 648: DEBUG: imageProcessorStartPage failed result = 2
STATE: +connecting-to-device
STATE: +hplip.plugin-error
prnt/hpcups/HPCupsFilter.cpp 490: m_Job initialization failed with error = 48
With the updated package imageProcessor is now being used but is failing. Unfortunately ImageProcessor is a binary blob and the hplip.plugin is another binary blob.
Some interaction between these two black boxes results in the issue. Raise it upstream?
Edit:

          dbglog("DEBUG: SHIVA inside the while loop");

          IMAGE_PROCESSOR_ERROR result = imageProcessorStartPage(imageProcessor, &cups_header);
          if (result != IPE_SUCCESS){
              dbglog("DEBUG: imageProcessorStartPage failed result = %d\n", result);
          }

          current_page_number++;

          if (current_page_number == 1) {

              if (startPage(&cups_header) != NO_ERROR) {
                  return JOB_CANCELED;
              }

              if (m_JA.pre_process_raster) {
                  // CC ToDo: Why pSwapedPagesFileName should be sent as a parameter?
                      // Remove if not required to send it as parameter
                  err = m_Job.preProcessRasterData(&cups_raster, &cups_header, hpPreProcessedRasterFile);
                  if (err != NO_ERROR) {
                      if (m_iLogLevel & BASIC_LOG) {
                          dbglog ("DEBUG: Job::StartPage failed with err = %d\n", err);
                      }
                      ret_status = JOB_CANCELED;
                      break;
                  }
              }

Revision history for this message
brian_p (claremont102) wrote :

> With the updated package imageProcessor is now being used but is failing.
> Unfortunately ImageProcessor is a binary blob and the hplip.plugin is another
> binary blob.
> Some interaction between these two black boxes results in the issue. Raise

That about says it all.

Upstream is not going to fix this with an Arch-specific patch. Downgrade, (and be able to print) or wait for Arch to sort it out.

--
Brian.

Revision history for this message
rabinnh (rab-nc83) wrote :

Arch may be unsupported, but I have the identical problem on Ubuntu 18.04.1 with hplip 3.17.10 from the repos, or the download tar.gz that installs 3.18.10. So the problem appears to be generic regardless of the distro.

Revision history for this message
László Meskó (lml-pnt) wrote :

I have the same problem on Ubuntu 19.10, with HPLIP 3.19.11 using HP-Laserjet-CP-1025 pritner.

When printing test page, the colors are OK, but the text part of the test page is printed with color ink.
Turning the printer output to grayscale nothing printed and the job is stopped, and in job properties:
job-printer-state-message: Filter failed
job-state: 6
job-state-reasons: cups-filter-crashed

syslog:
Dec 9 10:16:48 apugepe2 hpcups[8632]: prnt/hpcups/HPCupsFilter.cpp 647: DEBUG: imageProcessorStartPage failed result = 2
Dec 9 10:16:48 apugepe2 kernel: [ 4401.556799] hpcups[8632]: segfault at 562ff1daa000 ip 00007f63057c39cd sp 00007fff9e9408c0 error 6 in libImageProcessor-x86_64.so[7f63057bc000+6e000]
Dec 9 10:16:48 apugepe2 kernel: [ 4401.556805] Code: 95 55 1a 8f 5e 90 2a 71 09 fd 73 9c fd 27 c2 64 56 cc aa 41 8d 54 3d 00 4c 01 f2 48 89 94 f3 38 01 00 00 41 8d 14 3b 4c 01 f2 <48> 89 94 f3 40 01 00 00 41 8d 14 3a 4c 01 f2 e9 30 aa 01 00 83 7d

Revision history for this message
Chip Sharp (chipsharpdotcom) wrote :

I have a similar error on Ubuntu 19.10 with HPLIP 3.19.12 as well while attempting to an HP Laserjet P1102w.

 segfault at 55a30c298000 ip 00007fd0e65129cd sp 00007fffc308d2f0 error 6 in libImageProcessor-x86_64.so

Revision history for this message
Felipe Casado (vivamudhoney) wrote :

It happens in ubuntu 20.04 with hplip 3.20.11 with a printer laserjet m1132 mfp. I have updated the patch above as it was failing, but it is the same thing: Removed references to imageprocessor. In order to use it:
hplip-3.20.11.run --noexec
cd hplip-3.20.11
patch -p1 < «path to patch»/evitar_usar_imageprocessor.patch
./hplip-install?field.comment=It happens in ubuntu 20.04 with hplip 3.20.11 I have updated the patch above as it was failing, but it is the same thing: Removed references to imageprocessor. In order to use it:
hplip-3.20.11.run --noexec
cd hplip-3.20.11
patch -p1 < «path to patch»/evitar_usar_imageprocessor.patch
./hplip-install

Revision history for this message
Alberto Salvia Novella (es20490446e) wrote :

The most updated patch is available at:
https://sources.debian.org/patches/hplip/

Changed in hplip:
status: In Progress → Confirmed
Revision history for this message
Alberto Salvia Novella (es20490446e) wrote :

The real fix here will be providing a configure flag for disabling the use of blobs.

Or even better, getting rid of those all together. Nobody seems to be using them.

Revision history for this message
Tako Au (takoau) wrote :

@Alberto

That patch is not enough. What lacking is:
1. prnt/hpcups/HPCupsFilter.cpp, add #define DISABLE_IMAGEPROCESSOR at the top as a workaround
2. Remove all references from -lImageProcessor in Makefile.in

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.