Bug 169590 - media-video/kino-0.9.5 seg faults
|
Bug#:
169590
|
Product: Gentoo Linux
|
Version: 2006.1
|
Platform: All
|
|
OS/Version: Linux
|
Status: RESOLVED
|
Severity: normal
|
Priority: P2
|
|
Resolution: FIXED
|
Assigned To: media-video@gentoo.org
|
Reported By: dhp_gentoo@doublehp.org
|
|
Component: Applications
|
|
|
URL:
|
|
Summary: media-video/kino-0.9.5 seg faults
|
|
Keywords:
|
|
Status Whiteboard:
|
|
Opened: 2007-03-06 10:18 0000
|
dhp@moon_gen_2:~$ kino
> help language code en
Kino experienced a segmentation fault.
Dumping stack from the offending thread
Obtained 10 stack frames.
kino [0x8074c71]
[0xffffe420]
/usr/lib/libgthread-1.2.so.0 [0xb7e7318d]
/usr/lib/libglib-2.0.so.0(g_slice_alloc+0x3c5) [0xb761a865]
/usr/lib/libglib-2.0.so.0(g_hash_table_new_full+0x29) [0xb75f6f59]
/usr/lib/libglib-2.0.so.0(g_hash_table_new+0x28) [0xb75f6fd8]
/usr/lib/libglib-2.0.so.0(g_intern_static_string+0x192) [0xb75f0532]
/usr/lib/libgobject-2.0.so.0(g_type_init_with_debug_flags+0x14f) [0xb768f65f]
/usr/lib/libgobject-2.0.so.0(g_type_init+0x12) [0xb768f7d2]
/usr/lib/libgdk-x11-2.0.so.0(gdk_pre_parse_libgtk_only+0x46) [0xb78a1ce6]
Done dumping - exiting.
dhp@moon_gen_2:~$
I dont have very much more to say ... never used it, wanted to try it, no clue
what should happen ... but is obviously "abnormal".
(In reply to comment #4)
> Lot to compile before gdbing.
Sure, thanks for your effort. I will look into it when you send us a backtrace.
Denis.
recompiled kino and =dev-libs/glib-1.2.10-r5 with added:
CFLAGS="-ggdb"
FEATURES="splitdebug"
dhp@moon_gen_2:~$ gdb kino
GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) run
Starting program: /usr/bin/kino
[Thread debugging using libthread_db enabled]
[New Thread -1232042320 (LWP 16311)]
> help language code en
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1232042320 (LWP 16311)]
0xb6ab9db0 in pthread_mutex_trylock () from /lib/libpthread.so.0
(gdb) q
The program is running. Exit anyway? (y or n) y
dhp@moon_gen_2:~$
shall I also recompile =dev-libs/glib-2.12.9 and libgtk+ ? (according to strace
glib-1.2 should be the bugging part)
seems to be due to the fact that it links with gthread 1.2, I grepper my kino
emerge logs and found only links to gthread 2 and found the offending line in
your emerge log :
-lgthread
Now we have to figure why it wants to link with gthread 1 ;)
(btw you forgot the "bt full" part in your previous post, which is the
interesting part ;) )
could you please post the output you get from :
pkg-config --cflags libquicktime
pkg-config --libs libquicktime
I think that libquicktime forces kino to link to gthread 1.
(In reply to comment #8)
root@moon_gen_2:~# pkg-config --cflags libquicktime
-I/usr/include/lqt
root@moon_gen_2:~# pkg-config --libs libquicktime
-lquicktime -lgthread -lm -lz -ldl
root@moon_gen_2:~# emerge -vp libquicktime
These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild R ] media-libs/libquicktime-0.9.10 USE="X aac alsa dv encode
ffmpeg gtk jpeg lame mmx opengl png vorbis x264" 0 kB
Total: 1 package (1 reinstall), Size of downloads: 0 kB
want emerge -vep libquicktime ?
(In reply to comment #7)
just ask ^^
dhp@moon_gen_2:~$ gdb kino
GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) bt full
No stack.
(gdb) run
Starting program: /usr/bin/kino
[Thread debugging using libthread_db enabled]
[New Thread -1231919440 (LWP 30898)]
> help language code en
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1231919440 (LWP 30898)]
0xb6ad7db0 in pthread_mutex_trylock () from /lib/libpthread.so.0
(gdb) bt full
#0 0xb6ad7db0 in pthread_mutex_trylock () from /lib/libpthread.so.0
No symbol table info available.
#1 0xb7e5818d in g_mutex_trylock_posix_impl (mutex=0x0) at gthread-posix.c:78
result = <value optimized out>
__PRETTY_FUNCTION__ = "g_mutex_trylock_posix_impl"
#2 0xb75fe865 in g_slice_alloc () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#3 0xb75daf59 in g_hash_table_new_full () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#4 0xb75dafd8 in g_hash_table_new () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#5 0xb75d4532 in g_intern_static_string () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#6 0xb767365f in g_type_init_with_debug_flags () from
/usr/lib/libgobject-2.0.so.0
No symbol table info available.
#7 0xb76737d2 in g_type_init () from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#8 0xb7886ce6 in gdk_pre_parse_libgtk_only () from
/usr/lib/libgdk-x11-2.0.so.0
No symbol table info available.
#9 0xb7a21fb1 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
No symbol table info available.
#10 0x00000006 in ?? ()
No symbol table info available.
#11 0xb75f47fa in g_option_context_parse () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#12 0xb7a21b5a in gtk_parse_args () from /usr/lib/libgtk-x11-2.0.so.0
No symbol table info available.
#13 0xb7a21bd4 in gtk_init_check () from /usr/lib/libgtk-x11-2.0.so.0
No symbol table info available.
#14 0xb7a21c14 in gtk_init () from /usr/lib/libgtk-x11-2.0.so.0
No symbol table info available.
#15 0x08074af0 in main (argc=1, argv=0xbfcaa3c4) at main.c:151
parts = (gchar **) 0x8460020
translations = (gchar **) 0x845e690
locales = (const gchar * const *) 0x8460000
(gdb)
Which to me looks pretty much like strace's output ...
Note that at a time, I thought it was a problem with my locale being
en_GB.ISO-8859-15 ... so, I do tests in a console where locale is C.
got that here :
$ pkg-config --libs libquicktime
-lquicktime -lpthread -lm -lz -ldl
while looking at your emerge log :
checking for library containing pthread_create... -lgthread
while for me it finds pthread, which seems more sane ;)
Could please attach libquicktime config.log ?
(In reply to comment #12)
cf comment #10 ? :D
ldd says both kino and libquicktime are linked to libgthread-1.2.so.0 and
libpthread.so.0
Kino is also additionnally linked to libgthread-2.0.so.0
want compleet outputs ?
yep libquicktime tries in its configure checks to look for pthread_create in
gthread 1. I dunno if it's really wrong, but you're the first person I see that
has it :)
Anyway, I've uploaded a hack :
http://dev.gentoo.org/~aballier/kino-0.9.5-gthreads.patch
could you try it ?
could you also post the output of emerge -pv =dev-libs/glib-yourglib1.2-version
?
Denis any thoughts about this ? It should be sane also to remove gthread from
libquicktime to prevent those kind of bugs, but as it's a lib I'd prefer to
keep in sync with upstream.
(In reply to comment #14)
> Anyway, I've uploaded a hack :
> http://dev.gentoo.org/~aballier/kino-0.9.5-gthreads.patch
later ... soon.
> could you try it ?
> could you also post the output of emerge -pv =dev-libs/glib-yourglib1.2-version
> ?
Calculating dependencies... done!
[ebuild R ] dev-libs/glib-1.2.10-r5 USE="-hardened" 0 kB
Total: 1 package (1 reinstall), Size of downloads: 0 kB
add this line at the end of src unpack :
epatch "${FILESDIR}/${P}-gthreads.patch"
and add :
inherit eutils
at the top of the ebuild
(note that if you don't copy the modified ebuild and the patch it will be lost
at the next emerge --sync )
Patch proposed at comments #14 and #17 allowed me to build a runnable program.
Waiting for merge, then I ll close.
Can you also test exporting/importing a quicktime video ?
If quicktime is compiled against gthread 1 and kino gives him gthread 2, this
will segfault also, and thus libquicktime will need to be fixed rather than
kino.
not how to export to this format. Exporting to 3GPP worked (using ffmpeg)
exporting to dv using dv quicktime should use libquicktime, for example in the
terminal output I get :
quicktime_encode_video_stub called
quicktime_delete_vcodec_stub called
which are from libquicktime.
The fix looks rather harmless to me, so I have just committed it to cvs. I've
used the following sed statement instead of Alexis' patch, but it does the same
thing:
sed -i \
-e '/\$(LIBQUICKTIME_LIBS) \\/d' \
-e '/^[[:space:]]*\$(SRC_LIBS)/ a\
\$(LIBQUICKTIME_LIBS) \\' \
src/Makefile.in
Thanks Benoît-Pierre for your bug report, and thanks Alexis for your solution.
Denis.