FS#59952 - [ghostscript] gsicc_open_search(): Could not find ps_gray.icc

Attached to Project: Arch Linux
Opened by Dan Anderson (mxork) - Wednesday, 05 September 2018, 22:08 GMT
Last edited by Andreas Radke (AndyRTR) - Saturday, 08 September 2018, 05:42 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 6
Private No

Details

Description:

Printing test page through CUPS has missing page content and in /var/log/cups/error_log:

```
D [05/Sep/2018:17:56:42 -0400] [Job 9] ./base/gsicc_manage.c:1244: gsicc_open_search(): Could not find ps_gray.icc
D [05/Sep/2018:17:56:42 -0400] [Job 9] + ./base/gsicc_manage.c:255: gsicc_initialize_iccsmask(): failed to load gray smask profile
```

Downgrading to ghostscript-9.23-2 fixes the issue.

Happy to provide additional info / open a bug upstream if necessary.

Pretty sure the CUPS indirection is unimportant; if someone dumps me a direct `gs`
command which does the same, I can post output.

Additional info:
* ghostscript-9.24-2


Steps to reproduce:

- add generic printer with cups.
- cupsctl --debug-logging
- print test page
- less /var/log/cups/error_log
This task depends upon

Closed by  Andreas Radke (AndyRTR)
Saturday, 08 September 2018, 05:42 GMT
Reason for closing:  Fixed
Comment by Meir Kriheli (mksoft) - Thursday, 06 September 2018, 07:40 GMT
Same here, different file not found though:

D [06/Sep/2018:10:23:04 +0300] [Job 380] ./base/gsicc_manage.c:1244: gsicc_open_search(): Could not find default_gray.icc
D [06/Sep/2018:10:23:04 +0300] [Job 380] | ./base/gsicc_manage.c:2025: gsicc_set_device_profile(): cannot find device profile
D [06/Sep/2018:10:23:04 +0300] [Job 380] PID 15070 (gs) stopped with status 1!

Same error with ghostscript-9.24-1 and ghostscript-9.24-2.

Just like the above, downgrading to ghostscript-9.23-2 fixed it.

Comment by Martin Pietsch (mpietsch) - Thursday, 06 September 2018, 11:47 GMT
The reason for this bug is the "--disable-compile-inits" option of the configure script within the build function of the ghostscript-PKGBUILD file. If you remove this option and rebuild the package, the bug seems to be fixed.
Comment by Pepe Gnu (pepegnu) - Thursday, 06 September 2018, 12:30 GMT
I filed precisely  FS#59959  addressing the same problem. Ghostscript exits with error on pdf -> ps conversion, which inhibits CUPS to print. Managed to reproduce on CL by:

pdf2ps somefile.pdf

This bug seems related to

https://bugs.ghostscript.com/show_bug.cgi?id=695873
Comment by Heinrich Siebmanns (Harvey) - Thursday, 06 September 2018, 14:16 GMT
seems to me like my bug (on several printers here). Excerpt from the log of 9.24-2:

D [05/Sep/2018:10:54:25 +0200] [Job 39] Started filter pstops (PID 1122)
D [05/Sep/2018:10:54:25 +0200] [Job 39] ./base/gsicc_manage.c:1244: gsicc_open_search(): Could not find ps_gray.icc
D [05/Sep/2018:10:54:25 +0200] [Job 39] + ./base/gsicc_manage.c:255: gsicc_initialize_iccsmask(): failed to load gray smask profile

Downgrade to 9.23-2 fixed this
Comment by Andreas Radke (AndyRTR) - Thursday, 06 September 2018, 15:25 GMT
Please try 9.24-4 in testing. If it keeps crashing please report it to the upstream bugtracker.
Comment by Heinrich Siebmanns (Harvey) - Friday, 07 September 2018, 07:50 GMT
Still failing with 9.24-4:

846:D [07/Sep/2018:09:43:54 +0200] [Job 611] Running command line for gs: gs -q -dNOPAUSE -dBATCH -dSAFER -dNOMEDIAATTRS -sDEVICE=ps2write -dShowAcroForm -sOUTPUTFILE=%stdout -dLanguageLevel=3 -r600 -dCompressFonts=false -dNoT3CCITT -dNOINTERPOLATE -c \'save pop\' -f /var/spool/cups/tmp/008d05b9d1bda
847:D [07/Sep/2018:09:43:54 +0200] [Job 611] Started filter gs (PID 2258)
848:D [07/Sep/2018:09:43:54 +0200] [Job 611] Started filter pstops (PID 2259)
849:D [07/Sep/2018:09:43:54 +0200] [Job 611] ./base/gsicc_manage.c:1244: gsicc_open_search(): Could not find ps_gray.icc
850:D [07/Sep/2018:09:43:54 +0200] [Job 611] + ./base/gsicc_manage.c:255: gsicc_initialize_iccsmask(): failed to load gray smask profile
Comment by Heinrich Siebmanns (Harvey) - Friday, 07 September 2018, 07:52 GMT Comment by Martin Pietsch (mpietsch) - Friday, 07 September 2018, 07:56 GMT
I have installed the new version from the testing repository, but the bug is still existing. So I have try to locate the code, which produces the bug. The function check_file_permissions_reduced in file psi/zfile.c is the reason, which is called by the function gs_check_file_permission within the function gsicc_open_search in file base/gsicc_manage.c. The return value of function check_file_permissions_reduced is -9 (gs_error_invalidfileaccess). It seems that the function can't validate the permissions of the given file in the correct way. Can anyone help to find the bug?
Comment by Herbert Valisik (valibert) - Friday, 07 September 2018, 08:08 GMT
Ghostscript Git from AUR works

GPL Ghostscript GIT PRERELEASE 9.25 (2018-09-03)
Comment by Martin Pietsch (mpietsch) - Friday, 07 September 2018, 09:31 GMT Comment by Andreas Radke (AndyRTR) - Friday, 07 September 2018, 15:46 GMT
Please try 9.24-5 in testing repo.
Comment by Herbert Valisik (valibert) - Friday, 07 September 2018, 20:39 GMT
9.24-5 in testing works thanks

Loading...