After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 634934 - Crash under NP_GetMIMEDescription () from /usr/lib/mozilla/plugins/libtotem-cone-plugin.so
Crash under NP_GetMIMEDescription () from /usr/lib/mozilla/plugins/libtotem-c...
Status: RESOLVED DUPLICATE of bug 621771
Product: totem
Classification: Core
Component: Browser plugin (obsolete)
unspecified
Other Linux
: High critical
: ---
Assigned To: totem-browser-maint
totem-browser-maint
Depends on:
Blocks:
 
 
Reported: 2010-11-15 19:51 UTC by cdleary
Modified: 2010-11-16 13:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
backtrace (7.92 KB, text/plain)
2010-11-16 00:13 UTC, cdleary
Details
IA__g_content_type_get_description state at point of signal (4.84 KB, text/plain)
2010-11-16 01:22 UTC, cdleary
Details

Description cdleary 2010-11-15 19:51:55 UTC
See https://bugzilla.mozilla.org/show_bug.cgi?id=611954 -- while enumerating plugin information for libtotem-cone-plugin.so we hit a segfault (observed on x64 Ubuntu).

STR:

1. Create a debug Firefox build. ( https://developer.mozilla.org/En/Simple_Firefox_build )
2. Have libtotem-cone-plugin.so as a plugin.
3. Run, from the top-level directory, "make -C objdir-ff-debug xpcshell-tests" -- I see 31 failures, as given by the gzipped log file in the Mozilla bug.
4. Isolate any given test with "TEST_PATH=$PATH_SUFFIX make -C objdir-ff-debug xpcshell-tests", where $PATH_SUFFIX is given by the part of the path following /_tests/, for example: xpcshell/modules/plugin/test/unit/test_bug471245.js
Comment 1 Bastien Nocera 2010-11-15 20:01:04 UTC
Thanks for taking the time to report this bug.
Without a stack trace from the crash it's very hard to determine what caused it.
Can you get us a stack trace? Please see http://live.gnome.org/GettingTraces for more information on how to do so. Thanks in advance!
Comment 2 Christian Persch 2010-11-15 20:03:41 UTC
The backtrace in the linked bug is missing debug symbols for totem and glib/gio. Please install them, and get a new backtrace, and also paste any console output created before the crash. (For future reference, please always copy all the relevant info from other bug trackers, instead of just linking.)
Comment 3 cdleary 2010-11-15 21:19:02 UTC
(In reply to comment #2)

Will get those to you soon. (Not sure that this is really sev:critical, since I've only seen the crash during our debug tests.)
Comment 4 cdleary 2010-11-16 00:13:59 UTC
Created attachment 174575 [details]
backtrace

Got one more frame for you!

  • #0 ??
  • #1 IA__g_content_type_get_description
    at /build/buildd/glib2.0-2.24.1/gio/gcontenttype.c line 700
  • #2 NP_GetMIMEDescription
    at totemPluginGlue.cpp line 361
  • #3 nsPluginFile::GetPluginInfo
    at /home/cdleary/sm/tm-to-commit/modules/plugin/base/src/nsPluginsDirUnix.cpp line 361

Comment 5 Christian Persch 2010-11-16 00:25:17 UTC
700 G_LOCK (gio_xdgmime);

Looks unlikely to crash... unless... is xpcshell intialising gthread and gobject (ie calling g_type_init() somewhere) ?
Comment 6 cdleary 2010-11-16 01:22:41 UTC
Created attachment 174579 [details]
IA__g_content_type_get_description state at point of signal

Looks like it's calling an uninitialized local (at [rbp+8]).
Comment 7 cdleary 2010-11-16 01:25:37 UTC
(In reply to comment #6)
> Looks like it's calling an uninitialized local (at [rbp+8]).

(Er sorry, first function arg.)
Comment 8 cdleary 2010-11-16 01:31:50 UTC
(In reply to comment #5)
> Looks unlikely to crash... unless... is xpcshell intialising gthread and
> gobject (ie calling g_type_init() somewhere) ?

Uh oh, when I set a breakpoint on g_type_init the segfault disappears!
Comment 9 cdleary 2010-11-16 01:35:34 UTC
(In reply to comment #8)
> Uh oh, when I set a breakpoint on g_type_init the segfault disappears!

Nevermind, that was an artifact of the test. If I break on main, then on g_type_init, it never hits. I'll build a debug version of the plugin later to see if it repros there.
Comment 10 Christian Persch 2010-11-16 12:58:21 UTC
Right, so gobject is not initialised, and thus calling gio functions is not allowed.

However, totem's NP_Initalize() implementation does call g_type_init() already. So how comes gecko calls NP_GetMIMEDescription() without first initialising the module through NP_Initialize() ?
Comment 11 Christian Persch 2010-11-16 13:00:20 UTC
Oh, and NP_GetMIMEDescription() *also* calls g_type_init(). So I really don't see how you cannot hit g_type_init()...

Actually I now see it was only added recently (bug 621771), so you just need to upgrade.

*** This bug has been marked as a duplicate of bug 621771 ***