Bug 1420461

Summary: Evoluion email print request causes segfault
Product: [Fedora] Fedora Reporter: John Himpel <john>
Component: cupsAssignee: Zdenek Dohnal <zdohnal>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 25CC: john, jpopelka, twaugh, zdohnal
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-12 10:26:38 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
/etc/cups/ppd/HP_Officejet_Pro_8620.ppd
none
/var/log/cups/error_log
none
output from hp-check
none
/var/log/cups/error_log after running hp-setup (advanced settings)
none
/var/log/cups/error_log (while running strace evolution)
none
strace of evolution during print request
none
strace_output_file
none
journalctl_txt
none
cupsd.conf
none
cups-files.conf
none
hp-check.log none

Description John Himpel 2017-02-08 17:45:32 UTC
Description of problem: Evolution email print request causes segfault in Evolution


Version-Release number of selected component (if applicable):
evolution 3.22.4-2.fc25
cups 2.2.0-5
Printer HP6260 via local network

How reproducible:
Every time

Steps to Reproduce:
1) Start evolution email client
2) Select an email to print
3) File->Print


Actual results:
Evolution segfaults

journalctl shows :

Feb 08 11:25:16 dubby.jlhimpel.net cupsd[982]: Start rendering...
Feb 08 11:25:16 dubby.jlhimpel.net cupsd[982]: Set job-printer-state-message to "Start rendering...", current level=INFO
Feb 08 11:25:16 dubby.jlhimpel.net cupsd[982]: Processing page 1...
Feb 08 11:25:16 dubby.jlhimpel.net cupsd[982]: Set job-printer-state-message to "Processing page 1...", current level=INFO
Feb 08 11:25:16 dubby.jlhimpel.net cupsd[982]: Unrecoverable error: rangecheck in setpagedevice
Feb 08 11:25:16 dubby.jlhimpel.net cupsd[982]: Operand stack:
Feb 08 11:25:16 dubby.jlhimpel.net cupsd[982]: true  true  --nostringval--  --nostringval--  --nostringval--  --nostringval--  --nostringval--  --nostringval--  --nost
Feb 08 11:25:16 dubby.jlhimpel.net cupsd[982]: Rendering completed
Feb 08 11:25:16 dubby.jlhimpel.net cupsd[982]: Set job-printer-state-message to "Rendering completed", current level=INFO
Feb 08 11:25:16 dubby.jlhimpel.net hpcups[2204]: prnt/hpcups/HPCupsFilter.cpp 573: cupsRasterOpen failed, fd = 0
Feb 08 11:25:16 dubby.jlhimpel.net cupsd[982]: PID 2202 (/usr/lib/cups/filter/gstoraster) stopped with status 1.


Expected results: Printed copy of email on printer


Additional info:

Comment 1 Zdenek Dohnal 2017-02-08 19:29:17 UTC
Hi John,

thank you for contacting us. Would you mind sending following files:

1) /var/log/cups/error_log (you need to do following steps: run command 'sudo cupsctl LogLevel=debug2', setting ErrorLog to /var/log/cups/error_log in /etc/cups/cups-files.conf and after that try to print )
2) file with 'hp-check' output
3) PPD file, which is used by your printer (from /etc/cups/ppd)

Does it happen with every email or with specific one? Did you try to install your printer by 'hp-setup' and 'hp-plugin'?

Comment 2 John Himpel 2017-02-08 22:15:08 UTC
Created attachment 1248672 [details]
/etc/cups/ppd/HP_Officejet_Pro_8620.ppd

Comment 3 John Himpel 2017-02-08 22:16:33 UTC
Created attachment 1248673 [details]
/var/log/cups/error_log

Comment 4 John Himpel 2017-02-08 22:19:34 UTC
Created attachment 1248675 [details]
output from hp-check

Comment 5 John Himpel 2017-02-08 22:22:43 UTC
Zdenek,

This fails everytime I attempt to print an email from Evolution.

It often fails when I attempt to print a pdf from Firefox (but not everytime).

I installed the printer under F23.  It worked fine under F23 and F24.  The problem seems to have begun after the upgrade from F24 -> F25.

When I did the install, I tried to use hp-setup, but I could not get it to work (lots of missing packages and version mis-matches).  I don't recall exactly how I got it to finally work.

Thanks.

John

Comment 6 Zdenek Dohnal 2017-02-09 08:18:20 UTC
John,

would you mind reinstalling hplip package from our repositories and run 'hp-setup -i' and 'hp-plugin -i' ('-i' option means the command will be run in interactive mode, if you would like to use graphical interface, you have to install hplip-gui package in addition of hplip)?

Comment 7 John Himpel 2017-02-09 14:28:07 UTC
Zdenek,
My HP8260 is connected via wireless on the same subnet as my server.

When I run hp-setup -i, I get:

[root@dubby ~]# hp-setup -i

HP Linux Imaging and Printing System (ver. 3.16.11)
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)
  2         par         Parallel Port (LPT:)                                      

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

Using connection type: net

error: No device selected/specified or that supports this functionality.
[root@dubby ~]# 

When I use hp-setup (GUI method), I got a fourth option:
Wireless/802.11 (requires a temporary USB connection and is only available for select devices).

Should I buy a USB cable and connect the server and the printer, then use the GUI version?

Comment 8 John Himpel 2017-02-09 14:30:05 UTC
I forgot to add that I don't have a jetDirect card (unless it's builtin the printer).

Comment 9 Zdenek Dohnal 2017-02-09 15:28:05 UTC
Can you ping printer's IP? If you can ping the device, you can set this IP in 'hp-setup' Advance settings->Manual setting. JetDirect you can set on 1. Does it help?

Comment 10 John Himpel 2017-02-09 17:56:51 UTC
Zednek,

I can ping the printer's IP address.  I logged in as root using wayland.  I opened a terminal session and ran hp-setup using the advanced settings.  It ran okay.  I then ran hp-plugin (using the download option), since I could not find the .run file.

Evolution still segfaults.

I have attached the error_log from this latest attempt.

Comment 11 John Himpel 2017-02-09 18:02:19 UTC
Created attachment 1248874 [details]
/var/log/cups/error_log after running hp-setup (advanced settings)

Comment 12 Zdenek Dohnal 2017-02-09 18:20:59 UTC
John, is error_log taken after that evolution segfault? If it is, then it is curious, because I do not see any similar logs which are in comment #0. And are errors in 'hp-check' gone? And would you mind running strace on evolution when it segfaults (just connect to running evolution process, try to print and attach output here please)?

Comment 13 John Himpel 2017-02-09 18:55:41 UTC
Created attachment 1248880 [details]
/var/log/cups/error_log (while running strace evolution)

Comment 14 John Himpel 2017-02-09 18:56:49 UTC
Created attachment 1248882 [details]
strace of evolution during print request

Comment 15 John Himpel 2017-02-09 18:58:46 UTC
I have attached an error_log that I am certain covers the time when strace was running and the print request was done via evolution.

I have also attached the strace of evolution.

I will be away from my terminal for a couple of hours running errands.

Thanks for all you help so far.  I really appreciate it.

John

Comment 16 Zdenek Dohnal 2017-02-10 09:52:19 UTC
That is really strange. Still no such lines in error_log... so we will try it with journal. Please do these steps:

1) check in /etc/cups/cupsd.conf if LogLevel is set to debug2
2) set ErrorLog to syslog in /etc/cups/cups-files.conf
3) restart cups with 'systemctl restart cups'
4) run 'ulimit -c unlimited' (this will do that coredumps can have whatever size they need - don't worry, this setting is only for current shell)
5) change settings in /proc/sys/kernel/core_pattern (just delete exiting content and write 'core' - without apostrophe) - now it should create coredump in directory, where executable is, when Evolution will segfault
6) open Evolution
7) run 'journalctl -f' in terminal - it will show most recent journal logs and if new 
8) attach to cupsd with 'strace -p cupsd_pid -f -s 4096 -o strace_output_file'
9) try to print in Evolution
10) post here cupsd strace output from step 8), logs from journal from 7) and evolution coredump

And do hp-check errors disappeared after reinstall?

Comment 17 John Himpel 2017-02-10 13:32:16 UTC
Output from console while running Evolution:
[jwhimpel@dubby ~]$ evolution
Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.

(evolution:7418): evolution-util-CRITICAL **: e_activity_get_alert_sink: assertion 'E_IS_ACTIVITY (activity)' failed

(evolution:7418): evolution-util-CRITICAL **: e_activity_handle_cancellation: assertion 'E_IS_ACTIVITY (activity)' failed

(evolution:7418): evolution-util-CRITICAL **: e_activity_set_state: assertion 'E_IS_ACTIVITY (activity)' failed

(evolution:7418): GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

(evolution:7418): GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
Segmentation fault (core dumped)
[jwhimpel@dubby ~]$

Comment 18 John Himpel 2017-02-10 13:40:05 UTC
Created attachment 1249041 [details]
strace_output_file

Comment 19 John Himpel 2017-02-10 13:45:28 UTC
Created attachment 1249043 [details]
journalctl_txt

Comment 20 John Himpel 2017-02-10 13:47:05 UTC
Created attachment 1249044 [details]
cupsd.conf

Comment 21 John Himpel 2017-02-10 13:47:31 UTC
Created attachment 1249045 [details]
cups-files.conf

Comment 22 John Himpel 2017-02-10 14:08:38 UTC
Zdenek,

The core file is 541M which is too large to upload into bugzilla.  How would you like me to send it to you?

John

Comment 23 Zdenek Dohnal 2017-02-10 14:46:52 UTC
There is ftp server dropbox.rehat.com , where you can upload core dump like this:

$ lftp dropbox.redhat.com
> cd /incoming
> put your_coredump

And did hp-check errors disappear after reinstall?

Comment 24 John Himpel 2017-02-10 14:47:23 UTC
Created attachment 1249050 [details]
hp-check.log

Comment 25 John Himpel 2017-02-10 14:52:10 UTC
I apparently do not have permissions on /incoming

John

Comment 26 Zdenek Dohnal 2017-02-10 16:04:14 UTC
If 'cd' command failed, reason could be wrong mode of lftp - supported mode is passive, which is default mode of lftp. Or if you use ftp proxy, it doesn't have to pass along PASV mode option - in that case you will need to configure that proxy to work properly. But for to be sure, execute:

$ lftp dropbox.redhat.com -e 'set ftp:passive-mode `true'; set ftp:proxy `''

and after that proceed as showed in comment #23. And when you use command 'put name_of_coredump', that name needs to be unique (something like jhimpel20170210).

Comment 27 Zdenek Dohnal 2017-02-10 16:04:42 UTC
If 'cd' command failed, reason could be wrong mode of lftp - supported mode is passive, which is default mode of lftp. Or if you use ftp proxy, it doesn't have to pass along PASV mode option - in that case you will need to configure that proxy to work properly. But for to be sure, execute:

$ lftp dropbox.redhat.com -e 'set ftp:passive-mode `true'; set ftp:proxy `''

and after that proceed as showed in comment #23. And when you use command 'put name_of_coredump', that name needs to be unique (something like jhimpel20170210).

Comment 28 John Himpel 2017-02-10 17:21:51 UTC
Sorry,  I must be doing something wrong,

[jwhimpel@dubby ~]$ lftp dropbox.redhat.com -e "set ftp:passive-mode 'true'; set ftp:proxy ''"
lftp dropbox.redhat.com:~> cd /incoming
cd ok, cwd=/incoming                                                                                      
lftp dropbox.redhat.com:/incoming> put jhimpel20170210_coredump 
`jhimpel20170210_coredump' at 196608 (0%) [550 Permission denied.]

Comment 29 Zdenek Dohnal 2017-02-14 14:15:44 UTC
Would you mind adding 'debug 10;' into that lftp command and pasting output here?

Comment 30 John Himpel 2017-02-14 15:59:46 UTC
Zdenek,

My firewall blocks all incoming ftp connections (I think).

I do have the following in /etc/sysconfig/iptables:
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT

I don't have any proxies or anything fancy like that in my network.

This is what I am getting from lftp.


[jwhimpel@dubby ~]$ lftp dropbox.redhat.com -e "set ftp:passive-mode 'true'; set ftp:proxy ''"
lftp dropbox.redhat.com:~> debug 10
lftp dropbox.redhat.com:~> cd /incoming
---- dns cache hit
---- attempt number 1 (max_retries=1000)
---- Connecting to dropbox.redhat.com (209.132.183.100) port 21
<--- 220-+---------------------------------------------------------------+
<--- 220-|        Welcome to Red Hat Global Support Services FTP!        |
<--- 220-|                                                               |
<--- 220-|     Please note: the "ls" command is disabled by design.      |
<--- 220-|     You will receive this error if you attempt to run "ls":   |
<--- 220-|                                                               |
<--- 220-|      ls: 550 Permission denied.                               |
<--- 220-|                                                               |
<--- 220-|  If you are uploading a file for Technical Support, you       |
<--- 220-|  must include your support ticket number in the filename      |
<--- 220-|  and inform your technician of the upload. Files with names   |
<--- 220-|  that do not follow this convention, such as vmcore or        |
<--- 220-|  vmcore.gz will be deleted.                                   |
<--- 220-|                                                               |
<--- 220-|  To upload a core successfully, please do the following:      |
<--- 220-|                                                               |
<--- 220-|  ftp> cd incoming                                             |
<--- 220-|  ftp> put [casenumber]-[file]                                 |
<--- 220-|                                                               |
<--- 220-|     - Active and passive transfers are supported.             |
<--- 220-|     - Upload resume is supported.                             |
<--- 220-|     - Explicit SSL (FTPES) is supported.                      |
<--- 220-+---------------------------------------------------------------+
<--- 220 
---> FEAT
<--- 211-Features:                    
<---  AUTH SSL
<---  AUTH TLS
<---  EPRT
<---  EPSV
<---  MDTM                            
<---  PASV
<---  PBSZ
<---  PROT
<---  REST STREAM
<---  SIZE
<---  TVFS
<---  UTF8
<--- 211 End
---> OPTS UTF8 ON
<--- 200 Always in UTF8 mode.   
---> USER anonymous
<--- 331 Please specify the password.
---> PASS lftp@
<--- 230 Login successful.            
---> PWD
<--- 257 "/"                              
---- CWD path to be sent is `/incoming'
---> CWD /incoming
<--- 250 Directory successfully changed.  
cd ok, cwd=/incoming
lftp dropbox.redhat.com:/incoming> put jlhimpel20170210_coredump
put: /home/jwhimpel/jlhimpel20170210_coredump: No such file or directory
lftp dropbox.redhat.com:/incoming> put jhimpel20170210_coredump
---> TYPE I
<--- 200 Switching to Binary mode.                                   
---> EPSV
<--- 550 Permission denied.                                          
---- Switching passive mode off
---- Closing data socket
---- Closing control socket
Interrupt                                                             
lftp dropbox.redhat.com:/incoming> quit
[jwhimpel@dubby ~]$ tput clear

[jwhimpel@dubby ~]$ lftp dropbox.redhat.com -e "set ftp:passive-mode 'true'; set ftp:proxy ''"
lftp dropbox.redhat.com:~> debug 10
lftp dropbox.redhat.com:~> cd /incoming
---- dns cache hit
---- attempt number 1 (max_retries=1000)
---- Connecting to dropbox.redhat.com (209.132.183.100) port 21
<--- 220-+---------------------------------------------------------------+
<--- 220-|        Welcome to Red Hat Global Support Services FTP!        |
<--- 220-|                                                               |
<--- 220-|     Please note: the "ls" command is disabled by design.      |
<--- 220-|     You will receive this error if you attempt to run "ls":   |
<--- 220-|                                                               |
<--- 220-|      ls: 550 Permission denied.                               |
<--- 220-|                                                               |
<--- 220-|  If you are uploading a file for Technical Support, you       |
<--- 220-|  must include your support ticket number in the filename      |
<--- 220-|  and inform your technician of the upload. Files with names   |
<--- 220-|  that do not follow this convention, such as vmcore or        |
<--- 220-|  vmcore.gz will be deleted.                                   |
<--- 220-|                                                               |
<--- 220-|  To upload a core successfully, please do the following:      |
<--- 220-|                                                               |
<--- 220-|  ftp> cd incoming                                             |
<--- 220-|  ftp> put [casenumber]-[file]                                 |
<--- 220-|                                                               |
<--- 220-|     - Active and passive transfers are supported.             |
<--- 220-|     - Upload resume is supported.                             |
<--- 220-|     - Explicit SSL (FTPES) is supported.                      |
<--- 220-+---------------------------------------------------------------+
<--- 220 
---> FEAT
<--- 211-Features:                    
<---  AUTH SSL
<---  AUTH TLS
<---  EPRT
<---  EPSV
<---  MDTM                            
<---  PASV
<---  PBSZ
<---  PROT
<---  REST STREAM
<---  SIZE
<---  TVFS
<---  UTF8
<--- 211 End
---> OPTS UTF8 ON
<--- 200 Always in UTF8 mode.   
---> USER anonymous
<--- 331 Please specify the password.
---> PASS lftp@
<--- 230 Login successful.            
---> PWD
<--- 257 "/"                              
---- CWD path to be sent is `/incoming'
---> CWD /incoming
<--- 250 Directory successfully changed.  
cd ok, cwd=/incoming
lftp dropbox.redhat.com:/incoming> put jhimpel20170210_coredump
---> TYPE I
<--- 200 Switching to Binary mode.                                   
---> EPSV
<--- 550 Permission denied.                                          
---- Switching passive mode off
---- Closing data socket
---- Closing control socket
---- dns cache hit                                                         
---- attempt number 1 (max_retries=1000)
---- Connecting to dropbox.redhat.com (209.132.183.100) port 21
<--- 220-+---------------------------------------------------------------+
<--- 220-|        Welcome to Red Hat Global Support Services FTP!        |
<--- 220-|                                                               |
<--- 220-|     Please note: the "ls" command is disabled by design.      |
<--- 220-|     You will receive this error if you attempt to run "ls":   |
<--- 220-|                                                               |
<--- 220-|      ls: 550 Permission denied.                               |
<--- 220-|                                                               |
<--- 220-|  If you are uploading a file for Technical Support, you       |
<--- 220-|  must include your support ticket number in the filename      |
<--- 220-|  and inform your technician of the upload. Files with names   |
<--- 220-|  that do not follow this convention, such as vmcore or        |
<--- 220-|  vmcore.gz will be deleted.                                   |
<--- 220-|                                                               |
<--- 220-|  To upload a core successfully, please do the following:      |
<--- 220-|                                                               |
<--- 220-|  ftp> cd incoming                                             |
<--- 220-|  ftp> put [casenumber]-[file]                                 |
<--- 220-|                                                               |
<--- 220-|     - Active and passive transfers are supported.             |
<--- 220-|     - Upload resume is supported.                             |
<--- 220-|     - Explicit SSL (FTPES) is supported.                      |
<--- 220-+---------------------------------------------------------------+
<--- 220 
---> FEAT
<--- 211-Features:                                               
<---  AUTH SSL
<---  AUTH TLS
<---  EPRT
<---  EPSV
<---  MDTM                                                       
<---  PASV
<---  PBSZ
<---  PROT
<---  REST STREAM
<---  SIZE
<---  TVFS
<---  UTF8
<--- 211 End
---> OPTS UTF8 ON
<--- 200 Always in UTF8 mode.                              
---> USER anonymous
<--- 331 Please specify the password.                      
---> PASS lftp@
---- CWD path to be sent is `/incoming'
<--- 230 Login successful.                                                
---> CWD /incoming
<--- 250 Directory successfully changed.                                  
---> TYPE I
<--- 200 Switching to Binary mode.                                          
---> PORT 192,168,1,188,166,227
<--- 200 PORT command successful. Consider using PASV.                      
---> ALLO 566755328
<--- 202 ALLO command ignored.                                              
---> STOR jhimpel20170210_coredump

Comment 31 Zdenek Dohnal 2017-02-15 15:57:08 UTC
Only rules you have to have allowed are:

   Source_IP       Destinantion_IP 
1. your_IP	   dropbox.redhat.com:21	for FTP control channel
2. your_IP	   dropbox.redhat.com:1025-65535	for Passive Mode FTP Data transfer

, which should be allowed by default. For active mode it should use this rule:

3. dropbox.redhat.com	your_IP:1024-65535

You can try active mode (after entering 'lftp dropbox.redhat.com' and trying uploading file, it should try to use PORT mode), but before you need to allow in firewall that 3rd rule. There is command, which should do the trick:

$ sudo firewall-cmd --direct --add-rule ipv4 filter INPUT 0 -s dropbox.redhat.com -p tcp -j ACCEPT

Would you mind trying it, if it helps?

Comment 32 John Himpel 2017-02-19 23:58:09 UTC
Zdenek,

Opening ports 1025-65535 did the trick.  The file name is jlhimpel20170210_coredump.

Thanks for your patience so far.  It is really appreciated.

John

Comment 33 Fedora End Of Life 2017-11-16 19:49:13 UTC
This message is a reminder that Fedora 25 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 25. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '25'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 25 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 34 Fedora End Of Life 2017-12-12 10:26:38 UTC
Fedora 25 changed to end-of-life (EOL) status on 2017-12-12. Fedora 25 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.