bugGnash - The GNU Flash player - Bugs: bug #23697, Crash in fontconfig

 
 

bug #23697: Crash in fontconfig

Submitted by:  Ed Martin <edman007>
Submitted on:  Tue 24 Jun 2008 07:40:03 PM UTC  
 
Category: coreSeverity: 3 - Normal
Release: NoneStatus: Fixed
Privacy: PublicAssigned to: Sandro Santilli <strk>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Wed 25 Jun 2008 12:45:35 PM UTC, comment #10:

Committed in trunk.

Sandro Santilli <strk>
Project MemberIn charge of this item.
Wed 25 Jun 2008 11:05:36 AM UTC, comment #9:

That patch fixed it.

Ed Martin <edman007>
Wed 25 Jun 2008 10:50:01 AM UTC, comment #8:

The attached patch moves ftconfig use to methods that I belive
are only invoked in the main thread. Please test.

(file #15941)

Sandro Santilli <strk>
Project MemberIn charge of this item.
Wed 25 Jun 2008 09:51:21 AM UTC, comment #7:

That appears to be it, in this backtrace one thread is working with fontconfig directly from gnash the other is working with it as a result of gtk/pango and whatever else it calls

(file #15940)

Ed Martin <edman007>
Wed 25 Jun 2008 09:42:11 AM UTC, comment #6:

Note that GTK will independently do Fontconfig calls. So even if you mutex-protect FreetypeGlyphsProvider, there can still be race (=crash) between FreetypeGlyphsProvider and GTK.

Bastiaan Jacques <bjacques>
Project Member
Wed 25 Jun 2008 09:18:05 AM UTC, comment #5:

Attached is a patch that protects fontconfig lib use with a mutex.
See if it makes a difference.

(file #15939)

Sandro Santilli <strk>
Project MemberIn charge of this item.
Wed 25 Jun 2008 09:16:07 AM UTC, comment #4:

It does not segfault with #define LOAD_MOVIES_IN_A_SEPARATE_THREAD commented out, the backtraces are with the macro in place

and i'm using fontconfig 2.4.2

Ed Martin <edman007>
Wed 25 Jun 2008 08:56:34 AM UTC, comment #3:

"often like this" means it still segfaults ?
is gnash linked to multiple different versions of fontconfig ?
what version of fontconfig ?

Sandro Santilli <strk>
Project MemberIn charge of this item.
Wed 25 Jun 2008 03:59:45 AM UTC, comment #2:

disabling threading stops gnash from crashing often like this, so i suppose this is a threading issue. I'm attaching 4 detailed backtraces.

(file #15934, file #15935, file #15936, file #15937)

Ed Martin <edman007>
Tue 24 Jun 2008 09:06:42 PM UTC, comment #1:

Ed, can you reproduce with threading disabled ?
The only thread is on SWF loading for a simple SWF movie
(say, gravity.swf under testsuite/movies.all/).
You can disable SWF loading thread by commenting out
the LOAD_MOVIES_IN_A_SEPARATE_THREAD macro in server/parser/movie_def_impl.cpp

Sandro Santilli <strk>
Project MemberIn charge of this item.
Tue 24 Jun 2008 07:40:03 PM UTC, original submission:

When running gnash it crashes in fontconfig (often) when starting.

here are some sample backtraces

(gdb) bt
#0 0x00002b587b1cb890 in ?? () from /usr/lib64/../lib64/libfontconfig.so.1
#1 0x00002b587b1cbcf4 in FcFontSetSort () from /usr/lib64/../lib64/libfontconfig.so.1
#2 0x00002b587b1cc1e5 in FcFontSort () from /usr/lib64/../lib64/libfontconfig.so.1
#3 0x00002b587cce7037 in ?? () from /usr/lib64/../lib64/libpangoft2-1.0.so.0
#4 0x00002b587b60acdd in ?? () from /usr/lib64/../lib64/libpango-1.0.so.0
#5 0x00002b587b60b03c in pango_itemize_with_base_dir () from /usr/lib64/../lib64/libpango-1.0.so.0
#6 0x00002b587b61318e in ?? () from /usr/lib64/../lib64/libpango-1.0.so.0
#7 0x00002b587b614351 in ?? () from /usr/lib64/../lib64/libpango-1.0.so.0
#8 0x00002b5876125c96 in ?? () from /usr/lib64/../lib64/libgtk-x11-2.0.so.0
#9 0x00002b5876a5825c in g_closure_invoke () from /usr/lib64/../lib64/libgobject-2.0.so.0
#10 0x00002b5876a6bb2e in ?? () from /usr/lib64/../lib64/libgobject-2.0.so.0
#11 0x00002b5876a6d8b5 in g_signal_emit_valist () from /usr/lib64/../lib64/libgobject-2.0.so.0
#12 0x00002b5876a6dbaf in g_signal_emit_by_name () from /usr/lib64/../lib64/libgobject-2.0.so.0
#13 0x00002b58761993cf in ?? () from /usr/lib64/../lib64/libgtk-x11-2.0.so.0
#14 0x00002b5876075f02 in ?? () from /usr/lib64/../lib64/libgtk-x11-2.0.so.0
#15 0x00002b5876a5825c in g_closure_invoke () from /usr/lib64/../lib64/libgobject-2.0.so.0
#16 0x00002b5876a6bb2e in ?? () from /usr/lib64/../lib64/libgobject-2.0.so.0
#17 0x00002b5876a6d8b5 in g_signal_emit_valist () from /usr/lib64/../lib64/libgobject-2.0.so.0
#18 0x00002b5876a6dbaf in g_signal_emit_by_name () from /usr/lib64/../lib64/libgobject-2.0.so.0
#19 0x00002b58761993cf in ?? () from /usr/lib64/../lib64/libgtk-x11-2.0.so.0
#20 0x00002b587624d2d8 in ?? () from /usr/lib64/../lib64/libgtk-x11-2.0.so.0
#21 0x00002b5876a5818f in g_closure_invoke () from /usr/lib64/../lib64/libgobject-2.0.so.0
#22 0x00002b5876a6bb2e in ?? () from /usr/lib64/../lib64/libgobject-2.0.so.0
#23 0x00002b5876a6d8b5 in g_signal_emit_valist () from /usr/lib64/../lib64/libgobject-2.0.so.0
#24 0x00002b5876a6dbaf in g_signal_emit_by_name () from /usr/lib64/../lib64/libgobject-2.0.so.0
#25 0x00002b58761993cf in ?? () from /usr/lib64/../lib64/libgtk-x11-2.0.so.0
#26 0x00002b587624d673 in ?? () from /usr/lib64/../lib64/libgtk-x11-2.0.so.0
#27 0x00002b5876254d60 in ?? () from /usr/lib64/../lib64/libgtk-x11-2.0.so.0
#28 0x00002b5876a5818f in g_closure_invoke () from /usr/lib64/../lib64/libgobject-2.0.so.0
#29 0x00002b5876a6c238 in ?? () from /usr/lib64/../lib64/libgobject-2.0.so.0
#30 0x00002b5876a6d8b5 in g_signal_emit_valist () from /usr/lib64/../lib64/libgobject-2.0.so.0
#31 0x00002b5876a6dca3 in g_signal_emit () from /usr/lib64/../lib64/libgobject-2.0.so.0
#32 0x00002b58760aa390 in ?? () from /usr/lib64/../lib64/libgtk-x11-2.0.so.0
#33 0x00002b58765b92fe in ?? () from /usr/lib64/../lib64/libgdk-x11-2.0.so.0
#34 0x00002b5876cbc8d4 in g_main_context_dispatch () from /usr/lib64/../lib64/libglib-2.0.so.0
#35 0x00002b5876cbfbbd in ?? () from /usr/lib64/../lib64/libglib-2.0.so.0
#36 0x00002b5876cbfeb7 in g_main_loop_run () from /usr/lib64/../lib64/libglib-2.0.so.0
#37 0x00002b5876133853 in gtk_main () from /usr/lib64/../lib64/libgtk-x11-2.0.so.0
#38 0x00000000004317a2 in gnash::GtkGui::run ()
#39 0x00000000004295aa in gnash::Player::run ()
#40 0x00000000004156ca in main ()

(gdb) bt
#0 0x00002ad37fab6c1f in ?? () from /usr/lib64/../lib64/libfontconfig.so.1
#1 0x00002ad37fab717e in ?? () from /usr/lib64/../lib64/libfontconfig.so.1
#2 0x00002ad37fab71f9 in ?? () from /usr/lib64/../lib64/libfontconfig.so.1
#3 0x00002ad37fab6f21 in ?? () from /usr/lib64/../lib64/libfontconfig.so.1
#4 0x00002ad37fab6ffa in FcDirCacheLoad () from /usr/lib64/../lib64/libfontconfig.so.1
#5 0x00002ad37fabcf00 in FcDirCacheRead () from /usr/lib64/../lib64/libfontconfig.so.1
#6 0x00002ad37fab96f9 in ?? () from /usr/lib64/../lib64/libfontconfig.so.1
#7 0x00002ad37fab9966 in FcConfigBuildFonts () from /usr/lib64/../lib64/libfontconfig.so.1
#8 0x00002ad37fac038b in FcInitLoadConfigAndFonts () from /usr/lib64/../lib64/libfontconfig.so.1
#9 0x00002ad37fac044d in FcInit () from /usr/lib64/../lib64/libfontconfig.so.1
#10 0x00002ad37fab8c82 in FcConfigGetCurrent () from /usr/lib64/../lib64/libfontconfig.so.1
#11 0x00002ad37fab938d in FcConfigSubstituteWithPat () from /usr/lib64/../lib64/libfontconfig.so.1
#12 0x00002ad37fce8e70 in ?? () from /usr/lib64/../lib64/libpangocairo-1.0.so.0
#13 0x00002ad3815de019 in ?? () from /usr/lib64/../lib64/libpangoft2-1.0.so.0
#14 0x00002ad37ff01cdd in ?? () from /usr/lib64/../lib64/libpango-1.0.so.0
#15 0x00002ad37ff0203c in pango_itemize_with_base_dir () from /usr/lib64/../lib64/libpango-1.0.so.0
#16 0x00002ad37ff0a18e in ?? () from /usr/lib64/../lib64/libpango-1.0.so.0
#17 0x00002ad37ff0b351 in ?? () from /usr/lib64/../lib64/libpango-1.0.so.0
#18 0x00002ad37aa1cc96 in ?? () from /usr/lib64/../lib64/libgtk-x11-2.0.so.0
#19 0x00002ad37b34f25c in g_closure_invoke () from /usr/lib64/../lib64/libgobject-2.0.so.0
#20 0x00002ad37b362b2e in ?? () from /usr/lib64/../lib64/libgobject-2.0.so.0
#21 0x00002ad37b3648b5 in g_signal_emit_valist () from /usr/lib64/../lib64/libgobject-2.0.so.0
#22 0x00002ad37b364baf in g_signal_emit_by_name () from /usr/lib64/../lib64/libgobject-2.0.so.0
#23 0x00002ad37aa903cf in ?? () from /usr/lib64/../lib64/libgtk-x11-2.0.so.0
#24 0x00002ad37a96cf02 in ?? () from /usr/lib64/../lib64/libgtk-x11-2.0.so.0
#25 0x00002ad37b34f25c in g_closure_invoke () from /usr/lib64/../lib64/libgobject-2.0.so.0
#26 0x00002ad37b362b2e in ?? () from /usr/lib64/../lib64/libgobject-2.0.so.0
#27 0x00002ad37b3648b5 in g_signal_emit_valist () from /usr/lib64/../lib64/libgobject-2.0.so.0
#28 0x00002ad37b364baf in g_signal_emit_by_name () from /usr/lib64/../lib64/libgobject-2.0.so.0
#29 0x00002ad37aa903cf in ?? () from /usr/lib64/../lib64/libgtk-x11-2.0.so.0
#30 0x00002ad37ab442d8 in ?? () from /usr/lib64/../lib64/libgtk-x11-2.0.so.0
#31 0x00002ad37b34f18f in g_closure_invoke () from /usr/lib64/../lib64/libgobject-2.0.so.0
#32 0x00002ad37b362b2e in ?? () from /usr/lib64/../lib64/libgobject-2.0.so.0
#33 0x00002ad37b3648b5 in g_signal_emit_valist () from /usr/lib64/../lib64/libgobject-2.0.so.0
#34 0x00002ad37b364baf in g_signal_emit_by_name () from /usr/lib64/../lib64/libgobject-2.0.so.0
#35 0x00002ad37aa903cf in ?? () from /usr/lib64/../lib64/libgtk-x11-2.0.so.0
#36 0x00002ad37ab44673 in ?? () from /usr/lib64/../lib64/libgtk-x11-2.0.so.0
#37 0x00002ad37ab4bd60 in ?? () from /usr/lib64/../lib64/libgtk-x11-2.0.so.0
#38 0x00002ad37b34f18f in g_closure_invoke () from /usr/lib64/../lib64/libgobject-2.0.so.0
#39 0x00002ad37b363238 in ?? () from /usr/lib64/../lib64/libgobject-2.0.so.0
#40 0x00002ad37b3648b5 in g_signal_emit_valist () from /usr/lib64/../lib64/libgobject-2.0.so.0
#41 0x00002ad37b364ca3 in g_signal_emit () from /usr/lib64/../lib64/libgobject-2.0.so.0
#42 0x00002ad37a9a1390 in ?? () from /usr/lib64/../lib64/libgtk-x11-2.0.so.0
#43 0x00002ad37aeb02fe in ?? () from /usr/lib64/../lib64/libgdk-x11-2.0.so.0
#44 0x00002ad37b5b38d4 in g_main_context_dispatch () from /usr/lib64/../lib64/libglib-2.0.so.0
#45 0x00002ad37b5b6bbd in ?? () from /usr/lib64/../lib64/libglib-2.0.so.0
#46 0x00002ad37b5b6eb7 in g_main_loop_run () from /usr/lib64/../lib64/libglib-2.0.so.0
#47 0x00002ad37aa2a853 in gtk_main () from /usr/lib64/../lib64/libgtk-x11-2.0.so.0
#48 0x00000000004317a2 in gnash::GtkGui::run ()
#49 0x00000000004295aa in gnash::Player::run ()
#50 0x00000000004156ca in main ()

Ed Martin <edman007>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #15941:  ftconfigInMainThread.patch added by strk (3KiB - application/octet-stream)
file #15940:  gnash-fontconfig-bt5 added by edman007 (11KiB - application/octet-stream)
file #15939:  fontconfigMutex.patch added by strk (571B - application/octet-stream)
file #15934:  gnash-fontconfig-bt1 added by edman007 (18KiB - application/octet-stream)
file #15935:  gnash-fontconfig-bt3 added by edman007 (15KiB - application/octet-stream)
file #15936:  gnash-fontconfig-bt2 added by edman007 (2KiB - application/octet-stream)
file #15937:  gnash-fontconfig-bt4 added by edman007 (14KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by strk (Posted a comment)
  • -unavailable- added by bjacques (Updated the item)
  • -unavailable- added by edman007 (Submitted the item)
  • -unavailable- added by edman007
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 12 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 25 Jun 2008 12:45:35 PM UTCstrkStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Wed 25 Jun 2008 10:50:01 AM UTCstrkAttached File-=>Added ftconfigInMainThread.patch, #15941
    Wed 25 Jun 2008 09:51:21 AM UTCedman007Attached File-=>Added gnash-fontconfig-bt5, #15940
    Wed 25 Jun 2008 09:18:05 AM UTCstrkAttached File-=>Added fontconfigMutex.patch, #15939
    Wed 25 Jun 2008 03:59:45 AM UTCedman007Attached File-=>Added gnash-fontconfig-bt1, #15934
      Attached File-=>Added gnash-fontconfig-bt3, #15935
      Attached File-=>Added gnash-fontconfig-bt2, #15936
      Attached File-=>Added gnash-fontconfig-bt4, #15937
    Tue 24 Jun 2008 07:43:05 PM UTCbjacquesCategoryNone=>core
      Assigned toNone=>strk
    Tue 24 Jun 2008 07:40:03 PM UTCedman007Carbon-Copy-=>Added strk

    Back to the top


    Powered by Savane 3.1-cleanup1