First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 169590
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: media-video herd <media-video@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: DEMAINE Benoît-Pierre, aka DoubleHP <dhp_gentoo@doublehp.org>
Add CC:
CC:
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
media-video:kino-0.9.5:20070306-100347.log media-video:kino-0.9.5:20070306-100347.log text/plain DEMAINE Benoît-Pierre, aka DoubleHP 2007-03-06 10:21 0000 110.62 KB Details
strace /tmp/strace text/plain DEMAINE Benoît-Pierre, aka DoubleHP 2007-03-06 10:51 0000 32.63 KB Details
media-libs:libquicktime-0.9.10:20070209-164517.log media-libs:libquicktime-0.9.10:20070209-164517.log text/plain DEMAINE Benoît-Pierre, aka DoubleHP 2007-03-06 13:13 0000 193.24 KB Details
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 169590 depends on: Show dependency tree
Bug 169590 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   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".

------- Comment #1 From DEMAINE Benoît-Pierre, aka DoubleHP 2007-03-06 10:20:01 0000 -------
emerge --info: http://bugs.gentoo.org/attachment.cgi?id=111509&action=view

------- Comment #2 From DEMAINE Benoît-Pierre, aka DoubleHP 2007-03-06 10:21:32 0000 -------
Created an attachment (id=112273) [edit]
media-video:kino-0.9.5:20070306-100347.log

------- Comment #3 From Alexis Ballier 2007-03-06 10:30:35 0000 -------
Could you please read : 
http://www.gentoo.org/proj/en/qa/backtraces.xml

and post a more complete error ? 

------- Comment #4 From DEMAINE Benoît-Pierre, aka DoubleHP 2007-03-06 10:51:35 0000 -------
Created an attachment (id=112274) [edit]
/tmp/strace

By the mean time, here are bits of strace. Lot to compile before gdbing.

------- Comment #5 From Denis Dupeyron 2007-03-06 11:46:16 0000 -------
(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.

------- Comment #6 From DEMAINE Benoît-Pierre, aka DoubleHP 2007-03-06 12:11:34 0000 -------
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)

------- Comment #7 From Alexis Ballier 2007-03-06 12:29:02 0000 -------
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 ;) )

------- Comment #8 From Alexis Ballier 2007-03-06 12:32:37 0000 -------
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.

------- Comment #9 From DEMAINE Benoît-Pierre, aka DoubleHP 2007-03-06 13:11:18 0000 -------
(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 ?

------- Comment #10 From DEMAINE Benoît-Pierre, aka DoubleHP 2007-03-06 13:13:29 0000 -------
Created an attachment (id=112284) [edit]
media-libs:libquicktime-0.9.10:20070209-164517.log

------- Comment #11 From DEMAINE Benoît-Pierre, aka DoubleHP 2007-03-06 13:16:26 0000 -------
(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.

------- Comment #12 From Alexis Ballier 2007-03-06 13:18:08 0000 -------
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 ?

------- Comment #13 From DEMAINE Benoît-Pierre, aka DoubleHP 2007-03-06 13:22:08 0000 -------
(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 ?

------- Comment #14 From Alexis Ballier 2007-03-06 13:36:00 0000 -------
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.

------- Comment #15 From DEMAINE Benoît-Pierre, aka DoubleHP 2007-03-06 13:46:59 0000 -------
(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

------- Comment #16 From DEMAINE Benoît-Pierre, aka DoubleHP 2007-03-06 14:48:10 0000 -------
(In reply to comment #14)
> http://dev.gentoo.org/~aballier/kino-0.9.5-gthreads.patch

what should I do with it to get it applied ?

put in /usr/portage/media-video/kino/files/ did not do ...

------- Comment #17 From Alexis Ballier 2007-03-06 14:56:31 0000 -------
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 )

------- Comment #18 From DEMAINE Benoît-Pierre, aka DoubleHP 2007-03-06 15:54:12 0000 -------
Patch proposed at comments #14 and #17 allowed me to build a runnable program.

Waiting for merge, then I ll close.

------- Comment #19 From Alexis Ballier 2007-03-06 16:54:40 0000 -------
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.

------- Comment #20 From DEMAINE Benoît-Pierre, aka DoubleHP 2007-03-06 18:06:28 0000 -------
not how to export to this format. Exporting to 3GPP worked (using ffmpeg)

------- Comment #21 From Alexis Ballier 2007-03-07 08:13:23 0000 -------
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.

------- Comment #22 From Denis Dupeyron 2007-03-25 09:53:34 0000 -------
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.

First Last Prev Next    No search results available      Search page      Enter new bug