Re: Bus Error in fontconfig on running many application instances simultaneously



OK, I got a bit further with this one. It seems that my application is
now rebuilding its fontconfig cache files (in ~/.fontconfig) somewhat
regularly since I upgraded (I was forced to upgrade fontconfig also,
otherwise pango refused to compile) and having several processes doing
so at the same time seems likely to be the cause of these bus errors.

The question is: why would it be doing this now when it wasn't with
the older version? And does anyone have any suggestions for how to
debug it?

Thanks for any help,

Geoff

On Mon, Jun 14, 2010 at 2:41 PM, Geoff Bache <geoff bache gmail com> wrote:
> Hi all,
>
> I have an automated test suite for my PyGTK application that runs many
> tests in parallel. After recently building GTK+ 2.18 I am finding that
> these tests randomly fail with a "Bus Error" in the fontconfig
> package. The stack is always the same (see below) and no amount of
> running individual tests on their own in series seems to reproduce the
> problem. I built everything myself from source so it's possible there
> is some incompatibility somewhere due to the wrong versions or
> something.
>
> I also wonder if there is some file that could be being written by
> some tests while it is read by others, especially as the stack trace
> hints it might be caching stuff from the file system. I have pointed
> XDG_CONFIG_HOME to a test-dependent location, and also patched GTK+ so
> that the recently-used file list refers to a test-dependent location.
> Are there any other locations I need to do this with?
>
> I built the following packages on my RHEL5 linux system, in this order:
> glib-2.22.5
> atk-1.28.0
> fontconfig-2.8.0
> pixman-0.16.6
> cairo-1.8.10
> pango-1.26.2
> gtk+-2.18.9
>
> Thanks in advance,
>
> Geoff Bache
>
> Stack trace follows. Note the "<Address out of bounds>" line, which
> always looks like this with different too-small pointer values each
> time.
>
> Program terminated with signal 7, Bus error.
> [New process 28542]
> #0  FcDirCacheMapFd (fd=53, fd_stat=0x7fff3bff0200,
> dir_stat=0x7fff3bff0170) at fccache.c:587
> 587         if (cache->magic != FC_CACHE_MAGIC_MMAP ||
> (gdb) bt
> #0  FcDirCacheMapFd (fd=51, fd_stat=0x7ffff87b2dd0,
> dir_stat=0x7ffff87b2d40) at fccache.c:587
> #1  0x00002ac601122859 in FcDirCacheMapHelper (fd=0, fd_stat=0x3c58,
> dir_stat=0x1, closure=0xffffffffffffffff) at fccache.c:631
> #2  0x00002ac6011223bb in FcDirCacheProcess (config=<value optimized
> out>, dir=<value optimized out>, callback=0x2ac601122850
> <FcDirCacheMapHelper>,
>    closure=0x7ffff87b2ee0, cache_file_ret=0x0) at fccache.c:252
> #3  0x00002ac60112247a in IA__FcDirCacheLoad (dir=0x3c58 <Address
> 0x3c58 out of bounds>, config=0x2ac603b1e000, cache_file=0x33) at
> fccache.c:644
> #4  0x00002ac601128700 in IA__FcDirCacheRead (dir=0x16266960
> "/usr/share/fonts/default/ghostscript", force=0, config=0x162632e0) at
> fcdir.c:312
> #5  0x00002ac601124d19 in FcConfigAddDirList (config=0x162632e0,
> set=FcSetSystem, dirSet=0x162633c0) at fccfg.c:355
> #6  0x00002ac601124f86 in IA__FcConfigBuildFonts (config=0x162632e0)
> at fccfg.c:388
> #7  0x00002ac60112d2fb in IA__FcInitLoadConfigAndFonts () at fcinit.c:106
> #8  0x00002ac60112d3bd in IA__FcInit () at fcinit.c:124
> #9  0x00002ac601124242 in IA__FcConfigGetCurrent () at fccfg.c:415
> #10 0x00002ac601124950 in IA__FcConfigSubstituteWithPat (config=0x0,
> p=0x1625d3f0, p_pat=0x0, kind=FcMatchPattern) at fccfg.c:1361
> #11 0x00002ac6005d6bf0 in
> pango_cairo_fc_font_map_fontset_key_substitute (fcfontmap=<value
> optimized out>, fontkey=0x7ffff87b3120, pattern=0x1625d3f0)
>    at pangocairo-fcfontmap.c:87
> #12 0x00002ac6007e4483 in pango_fc_font_map_load_fontset
> (fontmap=0x161bc8a0, context=<value optimized out>, desc=<value
> optimized out>,
>    language=<value optimized out>) at pangofc-fontmap.c:1641
> #13 0x00002ac600eeb6bd in itemize_state_process_run
> (state=0x7ffff87b3240) at pango-context.c:1349
> #14 0x00002ac600eeba8d in pango_itemize_with_base_dir (context=<value
> optimized out>, base_dir=<value optimized out>, text=<value optimized
> out>,
>    start_index=<value optimized out>, length=<value optimized out>,
> attrs=<value optimized out>, cached_iter=0x161a05a0) at
> pango-context.c:1527
> #15 0x00002ac600ef42ed in pango_layout_check_lines (layout=0x1625c800)
> at pango-layout.c:3818
> #16 0x00002ac600ef6eb6 in pango_layout_get_unknown_glyphs_count
> (layout=0x1625c800) at pango-layout.c:1199
> #17 0x00002ac5ff71f4ff in find_invisible_char (widget=<value optimized
> out>) at gtkentry.c:2240
> #18 0x00002ac5ff72ce60 in gtk_entry_init (entry=0x16254010) at gtkentry.c:2263
> #19 0x00002ac5fe8a79b6 in IA__g_type_create_instance (type=371534816)
> at gtype.c:1674
> #20 0x00002ac5fe88c09d in g_object_constructor (type=0,
> n_construct_properties=15448, construct_params=0x1) at gobject.c:1383
> #21 0x00002ac5fe88c6b9 in IA__g_object_newv (object_type=364038240,
> n_parameters=371489568, parameters=0x0) at gobject.c:1252
> #22 0x00002ac5fefd5d81 in pygobject_constructv (self=0x161e4be0,
> n_parameters=1, parameters=0x16252990) at gobjectmodule.c:2257
> #23 0x00002ac5fefd60f2 in pygobject_construct (self=0x161e4be0,
> first_property_name=0x0) at gobjectmodule.c:2329
> #24 0x00002ac5ff297e84 in _wrap_gtk_entry_new (self=0x161e4be0,
> args=<value optimized out>, kwargs=<value optimized out>) at
> ./gtk.override:5450
> #25 0x000000381a898308 in ?? () from /usr/lib64/libpython2.6.so.1.0
> #26 0x000000381a843bc8 in PyObject_Call () from /usr/lib64/libpython2.6.so.1.0
> ... python part of the stack truncated
>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]