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

Bug#635724: vlc: FTBFS (kfreebsd-i386) Segmentation fault (core dumped) ../bin/vlc-cache-gen .



On Wed, Aug 03, 2011 at 09:10:10 (CEST), Modestas Vainius wrote:

> Hello,
>
> On trečiadienis 03 Rugpjūtis 2011 00:04:34 Reinhard Tartler wrote:
>> reassign 635724 libqt4-gui,vlc
>> stop
>> 
>> On Tue, Aug 02, 2011 at 20:14:21 (CEST), Rémi Denis-Courmont wrote:
>> > 	Hello,
>> 
>> [...]
>> 
>> > I rather suspect the debug information are corrupted by compiler
>> > optimizations at this point. Otherwise, DeleteModule() would crash
>> > before module_Unload() gets to invoke dlclose(), as it dereferences
>> > p_module.
>> > 
>> > To me, it looks more like Qt4 has (yet another) bug in its static object
>> > destructors, which makes it crash dlclose(). VLC may be the only
>> > application dlopen()'ing -a shared object that links with- Qt4. And if
>> > it's not, it might still well be the only one that does so during as
>> > part of its build process.
>> 
>> Sounds plausible to me. Qt4 maintainers, could you please comment on this?
>
> I don't see how Qt4 can be at fault here. vlc 1.1.10-1+b1 [1] has built fine 
> with libqt4-dev 4:4.7.3-4. Current qt4-x11 4:4.7.3-5 do not have such changes 
> which could have caused this. So I suspect changes in the toolchain or broken 
> gcc which was used to compile qt4-x11 4:4.7.3-5 with. By the way, the 
> backtrace from [2] is not very useful since it was generated without libqt4-
> dbg installed.

Here is a backtrace with libqt4-dbg installed:

(gdb) bt full
#0  count (func=0, interpolationType=67) at ../../include/QtCore/../../src/corelib/tools/qvector.h:246
No locals.
#1  QVariantAnimation::registerInterpolator (func=0, interpolationType=67) at animation/qvariantanimation.cpp:437
        interpolators = 0x0
        locker = {val = 0}
#2  0x2b67c5e3 in qRegisterAnimationInterpolator<QColor> (this=0x2bfe88e8, __in_chrg=<value optimized out>)
    at ../../include/QtCore/../../src/corelib/animation/qvariantanimation.h:121
No locals.
#3  qUnregisterGuiGetInterpolator (this=0x2bfe88e8, __in_chrg=<value optimized out>) at animation/qguivariantanimation.cpp:82
No locals.
#4  qUnregisterGuiGetInterpolator__dest_class__::~qUnregisterGuiGetInterpolator__dest_class__ (this=0x2bfe88e8,
    __in_chrg=<value optimized out>) at animation/qguivariantanimation.cpp:94
No locals.
#5  0x281e0f88 in __cxa_finalize () from /lib/i386-kfreebsd-gnu/libc.so.0.1
No symbol table info available.
#6  0x2b6726b4 in __do_global_dtors_aux () from /usr/lib/libQtGui.so.4
        qt_resource_data = "\000\000\v\257\211PNG\r\n\032\n\000\000\000\rIHDR\000\000\000@\000\000\000@\b\006\000\000\000\252iq\336\000\000\000\004sBIT\b\b\b\b|\bd\210\000\000\000\tpHYs\000\000\000\377\000\000\000\377\001\235\205@\032\000\000\000\031tEXtSoftware\000www.inkscape.org\233\356<\032\000\000\v,IDATx\234\345[{pT\325\035\376\356\276\263\233\315;$!\217\r$\306\000!\001*/\t\004\024J\203\370\266>(v\324\216:\255\265c\213\332j\333\221G\265Z;\323\241\316\024\307\a\266\276F\031\352\v\024!\022\205\220\030\f \t\ty\001\t\230\220\220\204\274v\357\336\347\271\247\177l\022\211{\357f\303\336\215q\372\315\060\303\071\277o\317\371\335/\347\234{\316\357\374.C)\305Xp\026\273\254\000\n\001\254\006\060\333hb\342g\024\070\\\311i\226\030\223\211\061\231\314\fe\030\206\360^\322\313\363J\213\310\323jIR\312e\211~Z\276\271\256g\314\016\276G0"...
        qt_resource_struct = "\000\000\000\000\000\002\000\000\000\001\000\000\000\001\000\000\000\000\000\002\000\000\000\001\000\000\000\002\000\000\000\030\000\002\000\000\000\001\000\000\000\003\000\000\000\064\000\002\000\000\000\001\000\000\000\004\000\000\000F\000\000\000\000\000\001\000\000\000"
        qInitResources_qmessagebox__init_variable__ = 1
        qt_resource_name = "\000\t\006\063\\\270\000t\000r\000o\000l\000l\000t\000e\000c\000h\000\v\t\215\300(\000q\000m\000e\000s\000s\000a\000g\000e\000b\000o\000x\000\006\a\003}\303\000i\000m\000a\000g\000e\000s\000\r\001\361\351g\000q\000t\000l\000o\000g\000o\000-\000\066\000\064\000.\000p\000n\000g"
        qCleanupResources_qmessagebox__dest_instance__ = {<No data fields>}
#7  0x2bda33c0 in _fini () from /usr/lib/libQtGui.so.4
No symbol table info available.
#8  0x2805af5e in ?? () from /lib/ld.so.1
No symbol table info available.
#9  0x2805ba07 in ?? () from /lib/ld.so.1
No symbol table info available.
#10 0x28337c44 in ?? () from /lib/i386-kfreebsd-gnu/libdl.so.2
No symbol table info available.
#11 0x2805602b in ?? () from /lib/ld.so.1
No symbol table info available.
#12 0x2833803c in ?? () from /lib/i386-kfreebsd-gnu/libdl.so.2
No symbol table info available.
#13 0x28337c7a in dlclose () from /lib/i386-kfreebsd-gnu/libdl.so.2
No symbol table info available.
#14 0x281249cb in module_Unload (handle=0x812da78) at modules/os.c:236
No locals.
#15 0x2811ee25 in DeleteModule (p_bank=<value optimized out>, p_module=0x111) at modules/modules.c:1167
        pp_self = <value optimized out>
#16 0x2811f0e7 in module_EndBank (p_this=0x804a004, b_plugins=true) at modules/modules.c:191
        p_bank = <value optimized out>
#17 0x2809a636 in libvlc_InternalCleanup (p_libvlc=0x804a004) at libvlc.c:1060
        p_playlist = <value optimized out>
        psz_pidfile = <value optimized out>
#18 0x2806ef46 in libvlc_release (p_instance=0x8049f08) at control/core.c:107
        lock = 0x8049f20
        refs = 0
#19 0x08048861 in main (argc=2, argv=0xbfbfe720) at cachegen.c:113
        vlc_argv = {0x8048afd "--ignore-config", 0x8048b0d "--quiet", 0x8048b15 "--no-media-library", 0x8049f70 "--plugin-path=.",
          0x8048b3e "--", 0x0,
          0xbfbfe72c "\374\350\277\277\f\351\277\277\030\351\277\277)\351\277\277\064\351\277\277B\351\277\277\062\356\277\277B\356\277\277W\356\277\277m\356\277\277\232\356\277\277\275\356\277\277\311\356\277\277\340\356\277\277\364\356\277\277\374\356\277\277\023\357\277\277$\357\277\277D\357\277\277Z\357\277\277"}
        vlc = <value optimized out>
        path = 0xbfbfe8fa "."
        arg = 0x8049f70 "--plugin-path=."
        vlc_argc = <value optimized out>
        i = 1
        opts = {{name = 0x8048b53 "force", has_arg = 0, flag = 0x0, val = 102}, {name = 0x8048b59 "help", has_arg = 0, flag = 0x0,
            val = 104}, {name = 0x8048b5e "version", has_arg = 0, flag = 0x0, val = 86}, {name = 0x0, has_arg = 0, flag = 0x0,
            val = 0}}
        c = <value optimized out>
        force = <value optimized out>
(gdb)              


This seems a bit more enlightning. In
animation/qvariantanimation.cpp:437, the function
QVariantAnimation::registerInterpolator is defined as follows:

430     void QVariantAnimation::registerInterpolator(QVariantAnimation::Interpolator func, int interpolationType)
431     {
432         // will override any existing interpolators
433         QInterpolatorVector *interpolators = registeredInterpolators();
434         QMutexLocker locker(QMutexPool::globalInstanceGet(interpolators));
435         if (int(interpolationType) >= interpolators->count())
436             interpolators->resize(int(interpolationType) + 1);
437         interpolators->replace(interpolationType, func);
438     }

>From frame #1, we see that the local variable "interpolators" has the
value '0x0'. This pointer is dereferenced in lines 435 and 437. I'm
still not sure why this happens only on kfreebsd-i386, but I guess the
problem is in this area.

Doing some more web research, I believe this bug has been reported here:

https://bugs.launchpad.net/ubuntu/+source/qt4-x11/+bug/785318
and https://bugreports.qt.nokia.com//browse/QTBUG-7564

Not sure what is the right thing to do here. Maybe there was indeed
recently some change in the toolchain, as Petr suggests, that affects
the order of execution of global destructors and causes this
segfault. OTOH, maybe the function registeredInterpolators should just
return if registeredInterpolators() returns a 0 pointer.

-- 
Gruesse/greetings,
Reinhard Tartler, KeyID 945348A4



Reply to: