Bug 8063 - fc-cache hangs/uses lots of memory
Summary: fc-cache hangs/uses lots of memory
Status: RESOLVED NOTOURBUG
Alias: None
Product: fontconfig
Classification: Unclassified
Component: fc-cache (show other bugs)
Version: 2.3
Hardware: SPARC Solaris
: high normal
Assignee: Keith Packard
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 8100
  Show dependency treegraph
 
Reported: 2006-08-29 10:43 UTC by Anil Jangity
Modified: 2006-09-04 14:39 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
the font that is causing fc-cache to fail (305.53 KB, application/octet-stream)
2006-09-04 12:32 UTC, Anil Jangity
Details

Description Anil Jangity 2006-08-29 10:43:39 UTC
I was able to install this on Solaris in the past. Not sure if something had
changed on my system since then or not.

When I do a make install it hangs and starts to use up *lots* of memory:

# make install
....
/data/Source/fontconfig-2.3.95/fc-cache/.libs/fc-cache:
"/usr/openwin/lib/X11/fonts/Xt+": caching, 0 fonts, 0 dirs
/data/Source/fontconfig-2.3.95/fc-cache/.libs/fc-cache:
"/usr/openwin/lib/X11/fonts/encodings": caching, 0 fonts, 0 dirs
/data/Source/fontconfig-2.3.95/fc-cache/.libs/fc-cache:
"/usr/openwin/lib/X11/fonts/misc": ^C 

fc-cache fails for that last directory.

Here is a pstack of a manual run of that same command:

root@sr1-sjc-01:/tmp# pstack core.24342
core 'core.24342' of 24342:     /opt/Xfce-beta/bin/fc-cache --verbose
/usr/X11R6/lib/X11/fonts/misc
 d26105b5 _brk_unlocked (0, e087940, 80dca68, d2639000, 8047498, d25b3079) + 15
 d25fe6c1 sbrk     (0) + 29
 d25b3079 realloc  (80dca70, e087940, d500, d26d6af5) + 118
 d26d6b03 ft_realloc (8064648, 95afb7a, e08793b, 80dca70) + 2d
 d26d727f ft_mem_qrealloc (8064648, 1, 95afb7a, e08793b, 80dca70, 8047510) + dd
 d26d7159 ft_mem_realloc (8064648, 1, 95afb7a, e08793b, 80dca70, 8047558) + 41
 d272dc35 ft_lzwstate_stack_grow (807379c, 9, 807379c, d272df0e) + 9c
 d272e1cd ft_lzwstate_io (807379c, 0, 1000, d272d647) + 2df
 d272d6d4 ft_lzw_file_skip_output (8073790, 3fd4c, e, d272d732) + ac
 d272d7e4 ft_lzw_file_io (8073790, 9cd4c, 0, 0) + d2
 d272d94f ft_lzw_stream_io (8077fc4, 9cd4c, 0, 0) + 39
 d26d787d FT_Stream_Seek (8077fc4, 9cd4c, d25b3847, d26d78c6) + 4a
 d26d78db FT_Stream_Skip (8077fc4, 8a8a8, 80476d8, d2706048) + 34
 d27060bc pcf_seek_to_table_type (8077fc4, 806ca00, 9, 20, 8047730, 804772c) + 94
 d2706c6e pcf_get_encodings (8077fc4, 8077f40, 9, 100) + 5f
 d2707714 pcf_load_font (8077fc4, 8077f40, 80477d8, d2708014) + 103
 d27080dd PCF_Face_Init (8077fc4, 8077f40, 0, 0, 0, 34) + e8
 d26dc8ee open_face (8064998, 8065be8, 0, 0, 0, 8047890) + c5
 d26dd78d FT_Open_Face (8075f48, 80478d0, 0, 80479ec) + 1d2
 d26dc9dc FT_New_Face (8075f48, 8066750, 0, 80479ec) + 4d
 d27856a6 FcFreeTypeQuery (8066750, 0, 806a050, 8047a14) + b3
 d27845f1 FcFileScanConfig (8062818, 80627b8, 0, 806a050, 8066750, 0) + cc
 d2784a9a FcDirScanConfig (8062800, 80627b8, 0, 806a050, 8063a88, 0) + 36f
 080515a1 scanDirs (8069cb0, 8062690, 8047cf4, 0, 0, 1) + 31e
 080519f7 main     (3, 8047c28, 8047c38) + 264
 08050f90 _start   (3, 8047cf4, 8047d10, 8047d1a, 0, 8047d38) + 80


Do you see anything wrong there?


Thanks.
Comment 1 Keith Packard 2006-09-01 13:04:11 UTC
Can you run fc-cache just on that directory with FC_DEBUG set to 128?
Comment 2 Anil Jangity 2006-09-04 12:32:31 UTC
Created attachment 6808 [details]
the font that is causing fc-cache to fail
Comment 3 Anil Jangity 2006-09-04 12:33:14 UTC
root@sr1-sjc-01:/etc/default# export FC_DEBUG=128
root@sr1-sjc-01:/etc/default# /opt/Xfce-beta/bin/fc-cache --verbose
/usr/X11R6/lib/X11/fonts/misc
FC_DEBUG=128
/opt/Xfce-beta/bin/fc-cache: "/usr/X11R6/lib/X11/fonts/misc":   Scanning dir
/usr/X11R6/lib/X11/fonts/misc
        Scanning file /usr/X11R6/lib/X11/fonts/misc/10x20.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/12x24.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/12x24rk.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/5x7.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/5x8.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/6x10.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/6x12.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/6x13.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/6x13B.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/6x9.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/7x13.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/7x13B.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/7x14.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/7x14B.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/7x14rk.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/8x13.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/8x13B.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/8x16.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/8x16rk.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/9x15.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/9x15B.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/Cmr-Bold14.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/Cmr14.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/Gallant19.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/Screen-Bold12.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/Screen-Bold14.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/Screen-Bold16.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/Screen11.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/Screen12.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/Screen14.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/Screen16.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/Screen6.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/Screen7.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/Serif10.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/Serif11.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/Serif12.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/Serif14.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/Serif16.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/clB6x10.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/clB6x12.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/clB8x10.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/clB8x12.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/clB8x13.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/clB8x14.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/clB8x16.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/clB8x8.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/clB9x15.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/clI6x12.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/clI8x8.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/clR4x6.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/clR5x10.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/clR5x6.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/clR5x8.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/clR6x10.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/clR6x12.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/clR6x13.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/clR6x6.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/clR6x8.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/clR7x10.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/clR7x12.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/clR7x14.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/clR7x8.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/clR8x10.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/clR8x12.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/clR8x13.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/clR8x14.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/clR8x16.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/clR8x8.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/clR9x15.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/cursor.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/deccurs.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/decsess.pcf.Z...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/fonts.alias...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/fonts.alias.all...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/fonts.cache-1...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/fonts.cache-csw-1...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/fonts.dir...done
        Scanning file /usr/X11R6/lib/X11/fonts/misc/hanglg16.pcf.Z...^C
root@sr1-sjc-01:/etc/default# 
Comment 4 Keith Packard 2006-09-04 14:39:27 UTC
Looks like FreeType cannot decompress this file for some reason. The good news
is that the font isn't useful anyway; it's not unicode encoded and we haven't
any way to decode its charset.

Please file a bug with the FreeType folks and pass them the font file; when
decompressed FreeType opens it quite happily, when compressed, the LZW code gets
wedged.

To work around this bug, just decompress the file. Note that you can use gzip to
recompress it; FreeType appears happy enough to decode that compression scheme.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.