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 571409 - vlc segfaults at startup
vlc segfaults at startup
Status: RESOLVED NOTGNOME
Product: libxml2
Classification: Platform
Component: general
git master
Other Linux
: Normal critical
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2009-02-12 08:36 UTC by Götz Waschk
Modified: 2009-02-21 09:16 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26


Attachments
vlc backtrace from gdb (23.84 KB, text/plain)
2009-02-12 08:37 UTC, Götz Waschk
Details
XML playlist file from vlc (365 bytes, application/xspf+xml)
2009-02-12 08:37 UTC, Götz Waschk
Details

Description Götz Waschk 2009-02-12 08:36:27 UTC
This bug was originally reported here:
https://qa.mandriva.com/show_bug.cgi?id=47169

On Mandriva Cooker, vlc 0.9.8a crashes on startup with libxml2 2.7.3. This happens only if the xml file ~/.local/share/vlc/ml.xspf exists. It is loaded on startup.

The crash disappears after downgrading libxml2 to 2.7.2.
Comment 1 Götz Waschk 2009-02-12 08:37:04 UTC
Created attachment 128533 [details]
vlc backtrace from gdb
Comment 2 Götz Waschk 2009-02-12 08:37:52 UTC
Created attachment 128534 [details]
XML playlist file from vlc
Comment 3 Daniel Veillard 2009-02-20 08:02:02 UTC
Sorry, I can't find anything related to libxml2 in the stack trace,
none of the threads involved at crash time have any code in libxml2
or called from libxml2.
The XML itself is trivial libxml2 2.7.3 can parse it in all modes
without any trouble and nobody else reported anything similar though
2.7.3 has been pushed to the current Fedora versions. So I have really
no idea what is happening with vlc there, but I have no way to link this
to libxml2 myself. I will need more info to correlate the crash you're
seeing ans any libxml2 code change between the two versions.

Daniel
Comment 4 Götz Waschk 2009-02-20 08:13:30 UTC
What more info do you need? It simply does work fine with libxml2 2.7.2. Please test it yourself.
Comment 5 Daniel Veillard 2009-02-20 10:43:42 UTC
No, sorry that's not the way. Fred Crozat looked and it's vlc which is
at fault calling xmlParserCleanup while Qt is using it too apparently.
Problem is in vlc code !

Daniel
Comment 6 Frederic Crozat 2009-02-20 13:35:10 UTC
after analysis of this bug with Daniel over irc, it appears vlc code is broken, calling xmlCleanupThreads while libxml2 might be used by another thread (ie Qt4) at the same time, and recent changes in libxml threads.c highlighed the issue.

closing this bug as NOTGNOME, I've opened a bug on vlc bug database : https://trac.videolan.org/vlc/ticket/2541
Comment 7 Daniel Veillard 2009-02-21 09:16:56 UTC
I added the following comment to the pair of functions raised in this
analysis to make the problem even more explicit than with current documentation

 * WARNING: if your application is multithreaded or has plugin support
 *          calling this may crash the application if another thread or
 *          a plugin is still using libxml2. It's sometimes very hard to
 *          guess if libxml2 is in use in the application, some libraries
 *          or plugins may use it without notice. In case of doubt abstain
 *          from calling this function or do it just before calling exit()
 *          to avoid leak reports from valgrind ! 

Daniel