Bug#456963: fontconfig: fc-cache segfaults on package install

2008-09-28 Thread Michael Deegan
Package: fontconfig
Version: 2.6.0-1
Followup-For: Bug #456963

After upgrading fontconfig from 2.4.2-1 to 2.6.0-1, I too got this same
error. After also upgrading libfontconfig1 the problem went away (with an
invalid cache file message). I did notice that the segfault occurs while
processing a differe cache file than the invalid one. I have attached the
invalid cache file. I'm thinking it's a case of 2.4.2 generates invalid
cache files, 2.6.0 (and probably 2.5 too) doesn't. Or there is an
incompatibility between the newer fontconfig and the older libfontconfig.

-- System Information:
Debian Release: lenny/sid
  APT prefers proposed-updates
  APT policy: (500, 'proposed-updates'), (500, 'testing'), (500, 'stable'), 
(496, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.16.39-thinkpad
Locale: LANG=en_AU, LC_CTYPE=en_AU (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash

Versions of packages fontconfig depends on:
ii  fontconfig-config 2.4.2-1generic font configuration library
ii  libc6 2.7-13 GNU C Library: Shared libraries
ii  libfontconfig12.4.2-1generic font configuration library

fontconfig recommends no packages.

Versions of packages fontconfig suggests:
ii  defoma0.11.10Debian Font Manager -- automatic f

-MD

-- 
---
Michael Deegan   Hugaholic  http://wibble.darktech.org/gallery/
- Nyy Tybel Gb Gur Ulcabgbnq! -


f71c1c7b3f795e5e20ad4a8800a9d397-x86.cache-2
Description: Binary data


Bug#456963: fontconfig: fc-cache segfaults on package install

2007-12-18 Thread Mark Whitis
Package: fontconfig
Version: 2.5.0-2
Severity: important

 apt-get install fontconfig
Reading package lists... Done
Building dependency tree... Done
The following packages will be upgraded:
  fontconfig
1 upgraded, 0 newly installed, 0 to remove and 1589 not upgraded.
Need to get 43.0kB of archives.
After unpacking 20.5kB disk space will be freed.
Get: 1 http://http.us.debian.org unstable/main fontconfig 2.5.0-2 [43.0kB]
Fetched 43.0kB in 18s (2273B/s)
(Reading database ... 447201 files and directories currently installed.)
Preparing to replace fontconfig 2.4.2-1.2 (using 
.../fontconfig_2.5.0-2_i386.deb) ...
Cleaning up font configuration of fontconfig...
Cleaning up category cid..
Cleaning up category truetype..
Cleaning up category type1..
Unpacking replacement fontconfig ...
Setting up fontconfig (2.5.0-2) ...
Updating font configuration of fontconfig...
Cleaning up category cid..
Cleaning up category truetype..
Cleaning up category type1..
Updating category type1..
Updating category truetype..
Updating category cid..
Updating fontconfig cache for /usr/share/fonts/truetype/dustin 
/usr/share/fonts/truetype/latex-xft-fonts 
/usr/share/fonts/truetype/ttf-bitstream-vera /usr/share/fonts/truetype/baekmuk 
/usr/share/fonts/type1/linux-libertine /usr/share/fonts/truetype/sjfonts 
/usr/share/fonts/truetype/ttf-dejavu /usr/share/fonts/truetype/freefont 
/usr/share/fonts/truetype/arphic /usr/share/fonts/truetype/thryomanes 
/usr/share/fonts/truetype/ttf-thryomanes /usr/share/fonts/truetype/kochi 
/usr/share/fonts/truetype/ttf-sil-padauk 
/usr/share/fonts/truetype/linux-libertine /usr/share/fonts/type1/gsfonts 
/usr/share/fonts/truetype/msttcorefonts
Updating fontconfig cache for /usr/share/fonts/truetype/dustin 
/usr/share/fonts/truetype/latex-xft-fonts 
/usr/share/fonts/truetype/ttf-bitstream-vera /usr/share/fonts/truetype/baekmuk 
/usr/share/fonts/type1/linux-libertine /usr/share/fonts/truetype/sjfonts 
/usr/share/fonts/truetype/ttf-dejavu /usr/share/fonts/truetype/freefont 
/usr/share/fonts/truetype/arphic /usr/share/fonts/truetype/thryomanes 
/usr/share/fonts/truetype/ttf-thryomanes /usr/share/fonts/truetype/kochi 
/usr/share/fonts/truetype/ttf-sil-padauk 
/usr/share/fonts/truetype/linux-libertine /usr/share/fonts/type1/gsfonts 
/usr/share/fonts/truetype/msttcorefonts
Regenerating fonts cache... /var/lib/dpkg/info/fontconfig.postinst: line 40: 
29397 Segmentation fault  fc-cache -s -f -v /var/log/fontconfig.log 21
failed.
See /var/log/fontconfig.log for more information.
done.



The last (and incomplete) line in /var/log/fontconfig.log) seems to indicate 
that it crashed while processing thryomanes.
/usr/share/fonts/truetype/thryomanes:
However, running it manually under gdb indicates that is not the case:
[...]
/usr/X11R6/lib/X11/fonts/Speedo: caching, new cache contents: 0 fonts, 0 dirs
/usr/X11R6/lib/X11/fonts/Type1: caching, new cache contents: 0 fonts, 0 dirs
/usr/X11R6/lib/X11/fonts/misc: caching, new cache contents: 0 fonts, 0 dirs
/usr/local/share/fonts: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/truetype/thryomanes: skipping, no such directory
/var/cache/fontconfig: cleaning cache directory
[New Thread 0xb7cb8aa0 (LWP 30411)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb7cb8aa0 (LWP 30411)]
0xb7d9cf69 in ?? () from /lib/libc.so.6
(gdb) where
#0  0xb7d9cf69 in ?? () from /lib/libc.so.6
#1  0xb7e18ff4 in ?? () from /lib/libc.so.6
#2  0x0006 in ?? ()
#3  0x in ?? ()



I was upgrading this package because emacs was unusable due to missing fonts.

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'testing'), (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.22-2-686 (SMP w/1 CPU core)
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash

Versions of packages fontconfig depends on:
ii  defoma  0.11.10-0.1  Debian Font Manager -- automatic f
ii  fontconfig-config   2.4.2-1.2generic font configuration library
ii  libc6   2.7-3GNU C Library: Shared libraries
ii  libexpat1   1.95.8-4 XML parsing C library - runtime li
ii  libfontconfig1  2.4.2-1.2generic font configuration library
ii  libfreetype62.3.5-1+b1   FreeType 2 font engine, shared lib
ii  zlib1g  1:1.2.3.3.dfsg-5 compression library - runtime

fontconfig recommends no packages.

-- debconf information:
* fontconfig/subpixel_rendering: Automatic
* fontconfig/enable_bitmaps: false
* fontconfig/hinting_type: Native



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#456963: fontconfig: fc-cache segfaults on package install

2007-12-18 Thread Keith Packard

On Tue, 2007-12-18 at 13:23 -0500, Mark Whitis wrote:

 /var/cache/fontconfig: cleaning cache directory

It looks like one of the old cache files is breaking fontconfig somehow,
but it's hard to know precisely where the issue is. If you could run
this under strace and see which file was failing, then carefully save
that file and send it along, I can see if that cache file causes
problems here.

Also, installing libfontconfig1-dbg should help generate a more useful
stack trace in any case.

-- 
[EMAIL PROTECTED]


signature.asc
Description: This is a digitally signed message part


Bug#456963: fontconfig: fc-cache segfaults on package install

2007-12-18 Thread Mark Whitis

Thanks for the quick reply.

On Tue, 18 Dec 2007, Keith Packard wrote:


It looks like one of the old cache files is breaking fontconfig somehow,
but it's hard to know precisely where the issue is. If you could run
this under strace and see which file was failing, then carefully save
that file and send it along, I can see if that cache file causes
problems here.



getdents(3, /* 39 entries */, 4096) = 2104
open(/var/cache/fontconfig/f71c1c7b3f795e5e20ad4a8800a9d397-x86.cache-2, 
O_RDONLY) = 4

fstat64(4, {st_mode=S_IFREG|0644, st_size=80, ...}) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++



Also, installing libfontconfig1-dbg should help generate a more useful
stack trace in any case.


with the debug libraries installed, the program doesn't crash but instead 
complains about an invalid cache file:


/var/cache/fontconfig: cleaning cache directory
/var/cache/fontconfig: invalid cache file: 
f71c1c7b3f795e5e20ad4a8800a9d397-x86.cache-2

/usr/bin/fc-cache: succeeded

so, apparently you have a sneaky bug that only fails when you don't have 
debugging enabled.


I then ran dpkg --reconfigure fontconfig

I would send you a copy of the file but it appears to have been deleted.

emacs is still broken, though.   Appears it is trying to get the nimbus 
mono l fonts (my message is at the bottom of the bug report).

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=352811




--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#456963: fontconfig: fc-cache segfaults on package install

2007-12-18 Thread Keith Packard

On Tue, 2007-12-18 at 16:30 -0500, Mark Whitis wrote:

 so, apparently you have a sneaky bug that only fails when you don't have 
 debugging enabled.

That's rather odd; the dbg package shouldn't have any effect on running
applications. But, having successfully run, it would have deleted the
cache file that was causing problems.

 I then ran dpkg --reconfigure fontconfig
 
 I would send you a copy of the file but it appears to have been deleted.

If you manage to recover it, let me know. I've not seen fc-cache crash
attempting to load an old cache file yet, so your bug report is unique.

 emacs is still broken, though.   Appears it is trying to get the nimbus 
 mono l fonts (my message is at the bottom of the bug report).
 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=352811

emacs doesn't use fontconfig to load fonts; it's still using core fonts,
which is why it is so broken.

-- 
[EMAIL PROTECTED]


signature.asc
Description: This is a digitally signed message part