Bug 1653706
| Summary: | ps2pdf fails after fontconfig upgrade in RHEL 7.6 | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Rik Theys <rik.theys> | ||||||
| Component: | ghostscript | Assignee: | Martin Osvald 🛹 <mosvald> | ||||||
| Status: | CLOSED ERRATA | QA Contact: | Petr Sklenar <psklenar> | ||||||
| Severity: | unspecified | Docs Contact: | |||||||
| Priority: | unspecified | ||||||||
| Version: | 7.6 | CC: | ajschorr, Bert.Deknuydt, cromptonra, mosvald, psklenar, rik.theys, thozza | ||||||
| Target Milestone: | rc | Keywords: | Patch | ||||||
| Target Release: | --- | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | ghostscript-9.25-2.el7 | Doc Type: | If docs needed, set a value | ||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | 2019-08-06 13:12:44 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
Rik Theys
2018-11-27 13:20:05 UTC
Can you provide a test case? Created attachment 1509447 [details]
test case
Hi,
I've further debugged the issue and the broken package is not fontconfig but freetype.
Steps to reproduce:
1. Install fontawesome-fonts-web from EPEL, this include a .woff file
2. On an updated 7.6, run:
fc-cache -f
ps2pdf testcase.ps
This throws an error about /typecheck in /findfont
3. Downgrade freetype, pango and fontconfig packages to the 7.5 version
fc-cache -f
ps2pdf testcase.ps
it works now!
It's important to run fc-cache as otherwise it sometimes keeps on breaking/working.
4. Upgrade only freetype to the 7.6 version
fc-cache -f
ps2pdf testcase.ps
-> broken again.
This can also explain other broken font behaviour we're seeing on 7.6 but I have yet to verify that.
FYI, tried this on f29: $ rpm -q freetype fontconfig ghostscript freetype-2.9.1-6.fc29.x86_64 fontconfig-2.13.1-3.fc29.x86_64 ghostscript-9.25-1.fc29.x86_64 $ gs GPL Ghostscript 9.25 (2018-09-13) Copyright (C) 2018 Artifex Software, Inc. All rights reserved. This software comes with NO WARRANTY: see the file PUBLIC for details. GS>/Times-Roman findfont Loading NimbusRoman-Regular font from /usr/share/ghostscript/Resource/Font/NimbusRoman-Regular... 4511208 2915215 2752200 1462198 1 done. GS<1> $ ls -l /usr/share/ghostscript/Resource/Font/NimbusRoman-Regular lrwxrwxrwx. 1 root root 50 Sep 17 10:19 /usr/share/ghostscript/Resource/Font/NimbusRoman-Regular -> /usr/share/fonts/urw-base35/NimbusRoman-Regular.t1 $ rpm -qf /usr/share/ghostscript/Resource/Font/NimbusRoman-Regular libgs-9.25-1.fc29.x86_64 $ rpm -qf /usr/share/fonts/urw-base35/NimbusRoman-Regular.t1 urw-base35-nimbus-roman-fonts-20170801-11.fc29.noarch Maybe good to try what fonts were picked up with the previous version of packages. and on RHEL7: $ rpm -q freetype fontconfig ghostscript freetype-2.8-12.el7.x86_64 fontconfig-2.13.0-4.3.el7.x86_64 ghostscript-9.07-31.el7.x86_64 $ gs GPL Ghostscript 9.07 (2013-02-14) Copyright (C) 2012 Artifex Software, Inc. All rights reserved. This software comes with NO WARRANTY: see the file PUBLIC for details. GS>/Times-Roman findfont Can't find (or can't open) font file /usr/share/ghostscript/9.07/Resource/Font/NimbusRomNo9L-Regu. Can't find (or can't open) font file NimbusRomNo9L-Regu. Can't find (or can't open) font file /usr/share/ghostscript/9.07/Resource/Font/NimbusRomNo9L-Regu. Can't find (or can't open) font file NimbusRomNo9L-Regu. Querying operating system for font files... DEBUG: FC_WEIGHT didn't match Can't find (or can't open) font file /usr/share/ghostscript/9.07/Resource/Font/NimbusRomNo9L-Regu. Can't find (or can't open) font file NimbusRomNo9L-Regu. Didn't find this font on the system! Substituting font Courier for NimbusRomNo9L-Regu. Can't find (or can't open) font file /usr/share/ghostscript/9.07/Resource/Font/NimbusMonL-Regu. Can't find (or can't open) font file NimbusMonL-Regu. Can't find (or can't open) font file /usr/share/ghostscript/9.07/Resource/Font/NimbusMonL-Regu. Can't find (or can't open) font file NimbusMonL-Regu. Didn't find this font on the system! Unable to substitute for font. Error: /invalidfont in /findfont Operand stack: Times-Roman Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- %loop_continue --nostringval-- --nostringval-- false 1 %stopped_push .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- 1836 1 3 %oparray_pop Dictionary stack: --dict:1163/1684(ro)(G)-- --dict:0/20(G)-- --dict:77/200(L)-- Current allocation mode is local Last OS error: Not a directory Current file position is 22 GS<1> That looks like something wrong on ghostscript to me though... Hi It's correct that F29 does not have this issue. Did you also have fontawesome-fonts-web installed on both F29 and RHEL7 (available in EPEL for RHEL)? I don't think this is only ghostscript, as other bugs are also resolved by downgrading freetype (and running fc-cache -f). An example of an issue we're having that is also not present with the previous version freetype: https://bugzilla.redhat.com/show_bug.cgi?id=1653300 Are you able to reproduce the issue with the instructions I provided in comment 4? Regards, Rik (In reply to Rik Theys from comment #6) > Did you also have fontawesome-fonts-web installed on both F29 and RHEL7 > (available in EPEL for RHEL)? Yes but this happens without that font installed on rhel7. so that should be irrelevant. if you can't see the issue without that font, please provide a log of gs for that. that would helps to understand what happened on gs. > An example of an issue we're having that is also not present with the > previous version freetype: > > https://bugzilla.redhat.com/show_bug.cgi?id=1653300 Added my comment there. that is different issue. Hi, I don't have the problem when the font is not installed. I've run the following three tests from a remote SSH session (with X forwarding enabled to have the gs window come up). Don't know if that influences the test. 1. Updated system with font installed: [root@vierre64 ~]# rpm -q fontconfig freetype fontawesome-fonts-web fontconfig-2.13.0-4.3.el7.x86_64 fontconfig-2.13.0-4.3.el7.i686 freetype-2.8-12.el7.x86_64 freetype-2.8-12.el7.i686 fontawesome-fonts-web-4.1.0-2.el7.noarch [root@vierre64 ~]# gs GPL Ghostscript 9.07 (2013-02-14) Copyright (C) 2012 Artifex Software, Inc. All rights reserved. This software comes with NO WARRANTY: see the file PUBLIC for details. GS>/Times-Roman findfont Can't find (or can't open) font file /usr/share/ghostscript/9.07/Resource/Font/NimbusRomNo9L-Regu. Can't find (or can't open) font file NimbusRomNo9L-Regu. Can't find (or can't open) font file /usr/share/ghostscript/9.07/Resource/Font/NimbusRomNo9L-Regu. Can't find (or can't open) font file NimbusRomNo9L-Regu. Querying operating system for font files... Error: /typecheck in /findfont Operand stack: Times-Roman Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- %loop_continue --nostringval-- --nostringval-- false 1 %stopped_push .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- 1836 1 3 %oparray_pop Dictionary stack: --dict:1166/1684(ro)(G)-- --dict:0/20(G)-- --dict:77/200(L)-- Current allocation mode is local Current file position is 22 GS<1>[root@vierre64 ~]# 2. Upgraded system without font installed [root@vierre64 ~]# fc-cache -f [root@vierre64 ~]# rpm -q fontconfig freetype fontawesome-fonts-web fontconfig-2.13.0-4.3.el7.x86_64 fontconfig-2.13.0-4.3.el7.i686 freetype-2.8-12.el7.x86_64 freetype-2.8-12.el7.i686 package fontawesome-fonts-web is not installed [root@vierre64 ~]# gs GPL Ghostscript 9.07 (2013-02-14) Copyright (C) 2012 Artifex Software, Inc. All rights reserved. This software comes with NO WARRANTY: see the file PUBLIC for details. GS>/Times-Roman findfont Can't find (or can't open) font file /usr/share/ghostscript/9.07/Resource/Font/NimbusRomNo9L-Regu. Can't find (or can't open) font file NimbusRomNo9L-Regu. Can't find (or can't open) font file /usr/share/ghostscript/9.07/Resource/Font/NimbusRomNo9L-Regu. Can't find (or can't open) font file NimbusRomNo9L-Regu. Querying operating system for font files... Loading NimbusRomNo9L-Regu font from /usr/share/fonts/default/Type1/n021003l.pfb... 3580792 2140746 5555232 4231634 1 done. 3. Font installed but freetype and fontconfig downgraded: [root@vierre64 ~]# fc-cache -f [root@vierre64 ~]# rpm -q fontconfig freetype fontawesome-fonts-web fontconfig-2.10.95-11.el7.x86_64 fontconfig-2.10.95-11.el7.i686 freetype-2.4.11-15.el7.x86_64 freetype-2.4.11-15.el7.i686 fontawesome-fonts-web-4.1.0-2.el7.noarch [root@vierre64 ~]# gs GPL Ghostscript 9.07 (2013-02-14) Copyright (C) 2012 Artifex Software, Inc. All rights reserved. This software comes with NO WARRANTY: see the file PUBLIC for details. GS>/Times-Roman findfont Can't find (or can't open) font file /usr/share/ghostscript/9.07/Resource/Font/NimbusRomNo9L-Regu. Can't find (or can't open) font file NimbusRomNo9L-Regu. Can't find (or can't open) font file /usr/share/ghostscript/9.07/Resource/Font/NimbusRomNo9L-Regu. Can't find (or can't open) font file NimbusRomNo9L-Regu. Querying operating system for font files... Loading NimbusRomNo9L-Regu font from /usr/share/fonts/default/Type1/n021003l.pfb... 3580792 2141041 5571988 4245142 1 done. Regards, Rik Hmm, I don't still understand how it is related to this and I can't reproduce 2) here. as the above logs says, gs picks up a font in urw-fonts. if I used same fontawesome-fonts packages, apparently there are no files contained modifying something related to urw-fonts. or do you have your own config for that? Hi, I've noticed that it's important that I run 'fc-cache -f' between each step otherwise I can not reproduce it. Did you run it between your tests? Also, I believe the issue is that fontawesome-fonts-web contains a .woff file, which is what breaks it all. Maybe you have some other .woff file in /usr/share/fonts? Regards, Rik (In reply to Rik Theys from comment #10) > Hi, > > I've noticed that it's important that I run 'fc-cache -f' between each step > otherwise I can not reproduce it. Did you run it between your tests? Yes. I did. but gs still fails without fontawesome-fonts-web. > Also, I believe the issue is that fontawesome-fonts-web contains a .woff > file, which is what breaks it all. Maybe you have some other .woff file in > /usr/share/fonts? No. no woff fonts installed other than it. Hi,
I've been trying to reproduce it in a container so you can reproduce my issue. Doing this I've discovered that this fontawesome-fonts package history is painful.
At some point fontawesome-fonts{,-web} was not in RHEL, so it was added to EPEL as 4.1.0-1. Since the woff files were needed to build some -doc packages, the version in EPEL was updated to 4.1.0-2 to include the woff files.
We synchronized that 4.1.0-2 version to our local repo, and that's what our clients install.
When building the container with EPEL enabled I noticed that the package was no longer in EPEL.
It seems that in RHEL 7.x, the package was added to RHEL but version 4.1.0-1 (without the woff file). Our systems did not downgrade to this version as it's older. Since EPEL can not replace packages from RHEL, they removed it from EPEL.
In RHBA-2018:3217, RHEL has now updated their package, but _also_ versioned it 4.1.0-2, which means systems that once had it from EPEL will still not replace it with this version. In this version they include the .woff file.
By installing this version, I can also reproduce the issue in the container.
My Dockerfile:
FROM centos:centos7
RUN yum --enablerepo cr -y update ; yum -y --enablerepo cr install freetype fontconfig ghostscript
RUN yum --enablerepo cr -y install fontawesome-fonts-web ; yum clean all
CMD ["/bin/bash"]
[root@lucifer e]# podman run -it localhost/bug
[root@1b565efb580b /]# rpm -q fontawesome-fonts-web ghostscript freetype fontconfig
fontawesome-fonts-web-4.1.0-2.el7.noarch
ghostscript-9.07-31.el7.x86_64
freetype-2.8-12.el7.x86_64
fontconfig-2.13.0-4.3.el7.x86_64
[root@1b565efb580b /]# gs -sDEVICE=jpeg
GPL Ghostscript 9.07 (2013-02-14)
Copyright (C) 2012 Artifex Software, Inc. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
GS>/Times-Roman findfont
Can't find (or can't open) font file /usr/share/ghostscript/9.07/Resource/Font/NimbusRomNo9L-Regu.
Can't find (or can't open) font file NimbusRomNo9L-Regu.
Can't find (or can't open) font file /usr/share/ghostscript/9.07/Resource/Font/NimbusRomNo9L-Regu.
Can't find (or can't open) font file NimbusRomNo9L-Regu.
Querying operating system for font files...
Error: /typecheck in /findfont
Operand stack:
Times-Roman
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- %loop_continue --nostringval-- --nostringval-- false 1 %stopped_push .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- 1836 1 3 %oparray_pop
Dictionary stack:
--dict:1164/1684(ro)(G)-- --dict:0/20(G)-- --dict:77/200(L)--
Current allocation mode is local
Current file position is 22
GS<1>
When I remove the font package from the container, it works:
[root@1b565efb580b /]# rpm -e fontawesome-fonts-web-4.1.0-2.el7.noarch
[root@1b565efb580b /]# fc-list |grep -i awesome
/usr/share/fonts/fontawesome/FontAwesome.otf: FontAwesome:style=Regular
/usr/share/fonts/fontawesome/fontawesome-webfont.ttf: FontAwesome:style=Regular
[root@1b565efb580b /]# gs -sDEVICE=jpeg
GPL Ghostscript 9.07 (2013-02-14)
Copyright (C) 2012 Artifex Software, Inc. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
GS>/Times-Roman findfont
Can't find (or can't open) font file /usr/share/ghostscript/9.07/Resource/Font/NimbusRomNo9L-Regu.
Can't find (or can't open) font file NimbusRomNo9L-Regu.
Can't find (or can't open) font file /usr/share/ghostscript/9.07/Resource/Font/NimbusRomNo9L-Regu.
Can't find (or can't open) font file NimbusRomNo9L-Regu.
Querying operating system for font files...
Loading NimbusRomNo9L-Regu font from /usr/share/fonts/default/Type1/n021003l.pfb... 3551552 2099425 4126524 2827072 1 done.
GS<1>
If I install the 4.1.0-1 package, it also works as the .woff file is not included in that package:
[root@1b565efb580b /]# fc-list |grep -i awesome
/usr/share/fonts/fontawesome/FontAwesome.otf: FontAwesome:style=Regular
/usr/share/fonts/fontawesome/fontawesome-webfont.ttf: FontAwesome:style=Regular
[root@1b565efb580b /]# rpm -q fontawesome-fonts-web
fontawesome-fonts-web-4.1.0-1.el7.noarch
[root@1b565efb580b /]# gs -sDEVICE=jpeg
GPL Ghostscript 9.07 (2013-02-14)
Copyright (C) 2012 Artifex Software, Inc. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
GS>/Times-Roman findfont
Can't find (or can't open) font file /usr/share/ghostscript/9.07/Resource/Font/NimbusRomNo9L-Regu.
Can't find (or can't open) font file NimbusRomNo9L-Regu.
Can't find (or can't open) font file /usr/share/ghostscript/9.07/Resource/Font/NimbusRomNo9L-Regu.
Can't find (or can't open) font file NimbusRomNo9L-Regu.
Querying operating system for font files...
Loading NimbusRomNo9L-Regu font from /usr/share/fonts/default/Type1/n021003l.pfb... 3551552 2099425 4126524 2827072 1 done.
I hope you will be able to reproduce the issue by building a container using the above dockerfile.
Regards,
Rik
This is a ghostscript bug. they try to open WOFF fonts even if they don't support it. see https://bugs.ghostscript.com/show_bug.cgi?id=695031 and http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=f4584b0e fixes this issue as mentioned there. reassigning. Created attachment 1510834 [details] backported patch TEMPORARY WORKAROUND: - apply the attached backported patch: ~~~ # patch -d /usr/share/ghostscript/9.07/Resource/Init/ < bz1653706.patch ~~~ Note: You can revert the patch any time by running the same patch command again: ~~~ # patch -d /usr/share/ghostscript/9.07/Resource/Init/ < bz1653706.patch patching file gs_fonts.ps Reversed (or previously applied) patch detected! Assume -R? [n] y # ~~~ removing keyword Regression, this behavior was in Ghostscript 9.07 already Hello Rik, please, could you test the steps from comment 14, whether they fix your problem? Thank you and regards, -Martin Hi Martin, I've tested the patch and I can confirm it works with the patch applied. Regards, Rik (In reply to Rik Theys from comment #17) > I've tested the patch and I can confirm it works with the patch applied. Thanks a lot for testing it so quickly! I will try to get it into RHEL7.7. Hi, Is it possible to also have it fixed in 7.6? Rik > Is it possible to also have it fixed in 7.6?
I am sorry, but I am not the one who decides whether it will get to RHEL7.6.z, but our Product Management.
Currently, from what I see it doesn't meet the criteria for inclusion in 7.6.z, because it is not a security-related problem, has no customer attached case and has a temporary workaround.
In case you have an active RHEL subscription I would recommend to contact our support to create a support case and share a Business Impact. This can help with getting this fixed in 7.6.z.
Hi Martin, It seems a ghostscript update will be released for bug 165404 (tagged urgent, regression)? Would you mind checking if it's possible to include the fix for this bug in that upload? Regards, Rik (In reply to Rik Theys from comment #21) > It seems a ghostscript update will be released for bug 165404 (tagged > urgent, regression)? Would you mind checking if it's possible to include the > fix for this bug in that upload? Hi Rik, that isn't/wasn't possible even if this BZ had all the ACKs granted (pm,dev,qa,rhel-7.6.z) due to the nature of the release process (time needed for QA and tests) - ghostscript-9.07-31.el7_6.3 was released just today. Again, for this to be included in any later releases for 7.6.z it would need to have all the mentioned ACKs granted and for this, it needs to meet the criteria for inclusion mentioned in comment 20. If this had a customer case attached with a Business Impact, it would be much easier to get them. With everything being said I will keep this on my radar and if anything changes, I will be more than happy to fix this. I am sorry for any inconvenience, but I have a limited ability to influence what will get fixed and when. *** Bug 1660610 has been marked as a duplicate of this bug. *** Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2019:2281 |