Discussion:
[gs-bugs] [Bug 698709] - Ghostscript - ghostscript is hardcoding a useless path variable and the names of files which it does not install
b***@artifex.com
2017-10-27 20:18:32 UTC
Permalink
http://bugs.ghostscript.com/show_bug.cgi?id=698709

Bug ID: 698709
Summary: ghostscript is hardcoding a useless path variable and
the names of files which it does not install
Product: Ghostscript
Version: master
Hardware: PC
OS: Linux
Status: UNCONFIRMED
Severity: normal
Priority: P4
Component: Resource
Assignee: ghostpdl-***@artifex.com
Reporter: ***@nurealm.net
QA Contact: gs-***@ghostscript.com
Word Size: ---

ghostscript master 20171027

While mucking about with a broken postscript file, I notice from strace that
ghostscript is searching for files from the ghostpdl/Resource/ directory which
are not installed. This does not appear to cause a problem, per se, but it
also does seem very odd.

Even more odd, ghostscript is hardcoding a long Path variable which would NOT
find these files, even if the Resource directory itself *were* installed.

For instance, consider the file "ghostpdl/Resource/Decoding/StandardEncoding".

The hardcoded Path is:
/usr/share/ghostscript/9.23/Resource/Init:/usr/share/ghostscript/9.23/lib:/usr/share/ghostscript/9.23/Resource/Font:/usr/share/ghostscript/fonts:/usr/share/fonts/default/ghostscript:/usr/share/fonts/default/Type1:/usr/share/fonts/default/TrueType:/usr/lib/DPS/outline/base:/usr/openwin/lib/X11/fonts/Type1:/usr/openwin/lib/X11/fonts/TrueType:/usr/share/cups/fonts

And, strace sees:
29478 openat(AT_FDCWD,
"/usr/share/ghostscript/9.23/Resource/Init/Decoding/StandardEncoding",
O_RDONLY) = -1 ENOENT (No such file or directory)
29478 openat(AT_FDCWD,
"/usr/share/ghostscript/9.23/lib/Decoding/StandardEncoding", O_RDONLY) = -1
ENOENT (No such file or directory)
29478 openat(AT_FDCWD,
"/usr/share/ghostscript/9.23/Resource/Font/Decoding/StandardEncoding",
O_RDONLY) = -1 ENOENT (No such file or directory)
29478 openat(AT_FDCWD,
"/usr/share/ghostscript/fonts/Decoding/StandardEncoding", O_RDONLY) = -1 ENOENT
(No such file or directory)
29478 openat(AT_FDCWD,
"/usr/share/fonts/default/ghostscript/Decoding/StandardEncoding", O_RDONLY) =
-1 ENOENT (No such file or directory)
29478 openat(AT_FDCWD,
"/usr/share/fonts/default/Type1/Decoding/StandardEncoding", O_RDONLY) = -1
ENOENT (No such file or directory)
29478 openat(AT_FDCWD,
"/usr/share/fonts/default/TrueType/Decoding/StandardEncoding", O_RDONLY) = -1
ENOENT (No such file or directory)
29478 openat(AT_FDCWD, "/usr/lib/DPS/outline/base/Decoding/StandardEncoding",
O_RDONLY) = -1 ENOENT (No such file or directory)
29478 openat(AT_FDCWD,
"/usr/openwin/lib/X11/fonts/Type1/Decoding/StandardEncoding", O_RDONLY) = -1
ENOENT (No such file or directory)
29478 openat(AT_FDCWD,
"/usr/openwin/lib/X11/fonts/TrueType/Decoding/StandardEncoding", O_RDONLY) = -1
ENOENT (No such file or directory)
29478 openat(AT_FDCWD, "/usr/share/cups/fonts/Decoding/StandardEncoding",
O_RDONLY) = -1 ENOENT (No such file or directory)
29478 openat(AT_FDCWD,
"/usr/share/ghostscript/9.23/Resource/Init/Decoding/StandardEncoding",
O_RDONLY) = -1 ENOENT (No such file or directory)
29478 openat(AT_FDCWD,
"/usr/share/ghostscript/9.23/lib/Decoding/StandardEncoding", O_RDONLY) = -1
ENOENT (No such file or directory)
29478 openat(AT_FDCWD,
"/usr/share/ghostscript/9.23/Resource/Font/Decoding/StandardEncoding",
O_RDONLY) = -1 ENOENT (No such file or directory)
29478 openat(AT_FDCWD,
"/usr/share/ghostscript/fonts/Decoding/StandardEncoding", O_RDONLY) = -1 ENOENT
(No such file or directory)
29478 openat(AT_FDCWD,
"/usr/share/fonts/default/ghostscript/Decoding/StandardEncoding", O_RDONLY) =
-1 ENOENT (No such file or directory)
29478 openat(AT_FDCWD,
"/usr/share/fonts/default/Type1/Decoding/StandardEncoding", O_RDONLY) = -1
ENOENT (No such file or directory)
29478 openat(AT_FDCWD,
"/usr/share/fonts/default/TrueType/Decoding/StandardEncoding", O_RDONLY) = -1
ENOENT (No such file or directory)
29478 openat(AT_FDCWD, "/usr/lib/DPS/outline/base/Decoding/StandardEncoding",
O_RDONLY) = -1 ENOENT (No such file or directory)
29478 openat(AT_FDCWD,
"/usr/openwin/lib/X11/fonts/Type1/Decoding/StandardEncoding", O_RDONLY) = -1
ENOENT (No such file or directory)
29478 openat(AT_FDCWD,
"/usr/openwin/lib/X11/fonts/TrueType/Decoding/StandardEncoding", O_RDONLY) = -1
ENOENT (No such file or directory)
29478 openat(AT_FDCWD, "/usr/share/cups/fonts/Decoding/StandardEncoding",
O_RDONLY) = -1 ENOENT (No such file or directory)

A similar issue was reported a couple of years ago -
Bug 695873 - ghostscript can't find the Resource directory and the ICC profiles
director
- but there does not seem to have been any resolution from back then.

This seems like an issue that somebody should look into. I don't know that
there is any reason for the ghostscript process to be engaging in futile
"busywork", searching for many files which it will never find.
--
You are receiving this mail because:
You are the QA Contact for the bug.
b***@artifex.com
2017-10-27 21:00:38 UTC
Permalink
http://bugs.ghostscript.com/show_bug.cgi?id=698709

--- Comment #1 from James <***@nurealm.net> ---
See also:
Bug 690229 - HEAD still tries to open some Resource files
from 2009.
--
You are receiving this mail because:
You are the QA Contact for the bug.
b***@artifex.com
2017-10-28 08:28:59 UTC
Permalink
http://bugs.ghostscript.com/show_bug.cgi?id=698709

Ken Sharp <***@artifex.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |DUPLICATE
Status|UNCONFIRMED |RESOLVED

--- Comment #2 from Ken Sharp <***@artifex.com> ---
See comment #1 this bug appears to me to be a duplicate.

*** This bug has been marked as a duplicate of bug 690229 ***
--
You are receiving this mail because:
You are the QA Contact for the bug.
Loading...