#488867 fontconfig: 2.11.0-2 segfaults

Package:
fontconfig
Source:
fontconfig
Description:
generic font configuration library - support binaries
Submitter:
"r.ductor"
Date:
2013-11-29 12:36:11 UTC
Severity:
important
#488867#5
Date:
2008-07-01 19:05:02 UTC
From:
To:
BUG:
# fc-cache -f
Segmentation fault

CONFIG:
# fc-cache -V
fontconfig version 2.6.0
# uname -a
Linux prozac 2.6.18-3-686 #1 SMP Mon Dec 4 16:41:14 UTC 2006 i686 GNU/Linux
# dpkg -s libc6 | grep ^Version
Version: 2.7-10

RELATED BUG:
Same behavior for fc-cache -f  from the testing version fontconfig_2.5.0-2_i386.deb
from the problem started. I installed fontconfig 2.6.0-1 hoping for the best but murphy's law is stronger!

IMPLICATIONS:
Those bugs imply that I cannot remove the package ttf-opensymbol because
ttf-opensymbol.postrm in  line 74 calls fc-chache -f.

# aptitude purge ttf-opensymbol
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Reading task descriptions... Done
The following packages will be REMOVED:
  ttf-opensymbol{p}
0 packages upgraded, 0 newly installed, 1 to remove and 806 not upgraded.
Need to get 0B of archives. After unpacking 467kB will be freed.
Do you want to continue? [Y/n/?] Y
Writing extended state information... Done
(Reading database ... 116873 files and directories currently installed.)
Removing ttf-opensymbol ...
Updating fontconfig cache...
/var/lib/dpkg/info/ttf-opensymbol.postrm: line 74: 17651 Segmentation fault      fc-cache -f
dpkg: error processing ttf-opensymbol (--purge):
 subprocess post-removal script returned error exit status 139
Errors were encountered while processing:
 ttf-opensymbol
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install.  Trying to recover:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Writing extended state information... Done
Reading task descriptions... Done

good luck
ric

#488867#10
Date:
2008-07-01 20:09:13 UTC
From:
To:
Any chance I could get a stack trace from this? The likely cause is a
crash in freetype from some other font on your system, and we need to
find out which font that is.

#488867#19
Date:
2013-11-29 12:32:00 UTC
From:
To:
found 488867 2.11.0-2
severity 488867 important
retitle 488867 fontconfig: 2.11.0-2 segfaults
thanks

Hi,

after an apt-get --purge dist-upgrade, I get the segfaults too.

Session of gdb for you:

tglase@tglase:~ $ sudo apt-get install libfontconfig1-dbg
Reading package lists... Done
Building dependency tree
Reading state information... Done
Starting pkgProblemResolver with broken count: 0
Starting 2 pkgProblemResolver with broken count: 0
Done
The following packages were automatically installed and are no longer required:
  libcglib-java libebml3 libkgapi1 libkipi10 libkwineffects1abi4 libkwinglutils1abi1 libmatroska5
  libmockito-java libmotif-common libnepomukwidgets4 libobjenesis-java libokularcore2 libplasmaclock4abi3
  libsolidcontrol4abi2 libsolidcontrolifaces4abi2 libxm4
Use 'apt-get autoremove' to remove them.
The following NEW packages will be installed:
  libfontconfig1-dbg
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
1 not fully installed or removed.
Need to get 501 kB of archives.
After this operation, 567 kB of additional disk space will be used.
Get:1 http://http.debian.net/debian/ sid/main libfontconfig1-dbg i386 2.11.0-2 [501 kB]
Fetched 501 kB in 1s (306 kB/s)
Selecting previously unselected package libfontconfig1-dbg.
(Reading database ... 259680 files and directories currently installed.)
Unpacking libfontconfig1-dbg (from .../libfontconfig1-dbg_2.11.0-2_i386.deb) ...
Setting up fontconfig (2.11.0-2) ...
Regenerating fonts cache... failed.
See /var/log/fontconfig.log for more information.
dpkg: error processing fontconfig (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up libfontconfig1-dbg (2.11.0-2) ...
Errors were encountered while processing:
 fontconfig
E: Sub-process /usr/bin/dpkg returned an error code (1)
                                                       100|tglase@tglase:~ $
100|tglase@tglase:~ $ sudo gdb --args $(which fc-cache) -s -f -v
GNU gdb (GDB) 7.6.1 (Debian 7.6.1-1)
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/fc-cache...Reading symbols from /usr/lib/debug/.build-id/fb/9c878231f3fcaa257805bf9b94059e4d2e372b.debug...done.
done.
(gdb) r
Starting program: /usr/bin/fc-cache -s -f -v
warning: Could not load shared library symbols for linux-gate.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/i686/cmov/libthread_db.so.1".
/usr/share/fonts: caching, new cache contents: 0 fonts, 4 dirs
/usr/share/fonts/X11: caching, new cache contents: 0 fonts, 6 dirs
/usr/share/fonts/X11/100dpi: caching, new cache contents: 358 fonts, 0 dirs
/usr/share/fonts/X11/75dpi: caching, new cache contents: 358 fonts, 0 dirs
/usr/share/fonts/X11/Type1: caching, new cache contents: 43 fonts, 0 dirs
/usr/share/fonts/X11/encodings: caching, new cache contents: 0 fonts, 1 dirs
/usr/share/fonts/X11/encodings/large: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/X11/misc: caching, new cache contents: 61 fonts, 0 dirs
/usr/share/fonts/X11/util: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/cmap: caching, new cache contents: 0 fonts, 5 dirs
/usr/share/fonts/cmap/adobe-cns1: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/cmap/adobe-gb1: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/cmap/adobe-japan1: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/cmap/adobe-japan2: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/cmap/adobe-korea1: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/truetype: caching, new cache contents: 1 fonts, 17 dirs
/usr/share/fonts/truetype/arphic: caching, new cache contents: 8 fonts, 0 dirs
/usr/share/fonts/truetype/dejavu: caching, new cache contents: 21 fonts, 0 dirs
/usr/share/fonts/truetype/fonts-arabeyes: caching, new cache contents: 36 fonts, 0 dirs
/usr/share/fonts/truetype/freefont: caching, new cache contents: 12 fonts, 0 dirs
/usr/share/fonts/truetype/gentium: caching, new cache contents: 4 fonts, 0 dirs
/usr/share/fonts/truetype/gentium-basic: caching, new cache contents: 8 fonts, 0 dirs
/usr/share/fonts/truetype/kochi: caching, new cache contents: 4 fonts, 0 dirs
/usr/share/fonts/truetype/liberation: caching, new cache contents: 16 fonts, 0 dirs
/usr/share/fonts/truetype/openoffice: caching, new cache contents: 1 fonts, 0 dirs
/usr/share/fonts/truetype/tlwg: caching, new cache contents: 54 fonts, 0 dirs
/usr/share/fonts/truetype/ttf-ancient-scripts: caching, new cache contents: 23 fonts, 0 dirs
/usr/share/fonts/truetype/ttf-bitstream-vera: caching, new cache contents: 10 fonts, 0 dirs
/usr/share/fonts/truetype/ttf-dejavu: caching, new cache contents: 6 fonts, 0 dirs
/usr/share/fonts/truetype/ttf-msfonts:
Program received signal SIGSEGV, Segmentation fault.
0xf7efd653 in ?? () from /usr/lib/i386-linux-gnu/libfreetype.so.6
(gdb) bt
#0  0xf7efd653 in ?? () from /usr/lib/i386-linux-gnu/libfreetype.so.6
#1  0xf7f04e17 in ?? () from /usr/lib/i386-linux-gnu/libfreetype.so.6
#2  0xf7f05cca in ?? () from /usr/lib/i386-linux-gnu/libfreetype.so.6
#3  0xf7ef2b38 in FT_Load_Glyph () from /usr/lib/i386-linux-gnu/libfreetype.so.6
#4  0xf7f92212 in FcFreeTypeCheckGlyph (face=0x8070b70, ucs4=179, glyph=118, blanks=0x806b4d0,
    advance=0xffffd224, using_strike=0) at fcfreetype.c:2326
#5  0xf7f92966 in FcFreeTypeCharSetAndSpacingForSize (face=0x8070b70, blanks=0x806b4d0,
    spacing=0xffffd358, strike_index=-1) at fcfreetype.c:2462
#6  0xf7f944af in IA__FcFreeTypeQueryFace (face=0x8070b70,
    file=file@entry=0x804f338 "/usr/share/fonts/truetype/ttf-msfonts/ahronbd.ttf", id=id@entry=0,
    blanks=blanks@entry=0x806b4d0) at fcfreetype.c:1711
#7  0xf7f94d9c in IA__FcFreeTypeQuery (
    file=file@entry=0x804f338 "/usr/share/fonts/truetype/ttf-msfonts/ahronbd.ttf", id=id@entry=0,
    blanks=blanks@entry=0x806b4d0, count=count@entry=0xffffd54c) at fcfreetype.c:1818
#8  0xf7f8fd3d in FcFileScanFontConfig (config=0x804d008,
    file=0x804f338 "/usr/share/fonts/truetype/ttf-msfonts/ahronbd.ttf", blanks=0x806b4d0, set=0x8064308)
    at fcdir.c:85
#9  FcFileScanConfig (set=set@entry=0x8064308, dirs=dirs@entry=0x804f750, blanks=blanks@entry=0x806b4d0,
    file=0x804f338 "/usr/share/fonts/truetype/ttf-msfonts/ahronbd.ttf", config=config@entry=0x804d008)
    at fcdir.c:133
#10 0xf7f90095 in FcDirScanConfig (set=0x8064308, dirs=0x804f750, blanks=0x806b4d0,
    dir=0x805a150 "/usr/share/fonts/truetype/ttf-msfonts", force=1, config=0x804d008) at fcdir.c:231
#11 0xf7f901e3 in FcDirCacheScan (dir=0x805a150 "/usr/share/fonts/truetype/ttf-msfonts", config=0x804d008)
    at fcdir.c:286
#12 0xf7f902b7 in IA__FcDirCacheRead (dir=dir@entry=0x805a150 "/usr/share/fonts/truetype/ttf-msfonts",
    force=134533128, force@entry=1, config=config@entry=0x804d008) at fcdir.c:323
#13 0x080495a5 in scanDirs (list=list@entry=0x805abf8, config=config@entry=0x804d008, force=force@entry=1,
    really_force=really_force@entry=0, verbose=verbose@entry=1, recursive=recursive@entry=1,
    changed=changed@entry=0xffffd86c) at fc-cache.c:188
#14 0x0804968c in scanDirs (list=list@entry=0x8060650, config=config@entry=0x804d008, force=force@entry=1,
    really_force=really_force@entry=0, verbose=verbose@entry=1, recursive=recursive@entry=1,
    changed=changed@entry=0xffffd86c) at fc-cache.c:241
---Type <return> to continue, or q <return> to quit---
#15 0x0804968c in scanDirs (list=list@entry=0x80504b0, config=config@entry=0x804d008, force=force@entry=1,
    really_force=really_force@entry=0, verbose=verbose@entry=1, recursive=recursive@entry=1,
    changed=changed@entry=0xffffd86c) at fc-cache.c:241
#16 0x0804905d in main (argc=4, argv=0xffffd924) at fc-cache.c:374
(gdb)

tglase@tglase:~ $ ll /usr/share/fonts/truetype/ttf-msfonts/ahronbd.ttf
-rw-r--r-- 1 root root 50468 Jun 10  2009 /usr/share/fonts/truetype/ttf-msfonts/ahronbd.ttf
tglase@tglase:~ $ sha256sum /usr/share/fonts/truetype/ttf-msfonts/ahronbd.ttf
195519d5ae4ee05e3482e2b9279c3edb3cdbc6ced594827fe601eff77aa6e34a  /usr/share/fonts/truetype/ttf-msfonts/ahronbd.ttf

I can provide the file privately, if needed.

bye,
//mirabilos