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 122416 - [lame] Seg Fault when writing ID3 to MP3
[lame] Seg Fault when writing ID3 to MP3
Status: RESOLVED INVALID
Product: GStreamer
Classification: Platform
Component: gst-plugins
0.6.x
Other Linux
: Normal major
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 122432 122434 123388 123689 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2003-09-16 07:52 UTC by James Ogley
Modified: 2005-01-29 11:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
avoid crash when the prop isn't found (728 bytes, patch)
2003-09-16 09:08 UTC, Bastien Nocera
none Details | Review

Description James Ogley 2003-09-16 07:52:08 UTC
When ripping "Heathen" by David Bowie with s-j 0.5.2, I'd left s-j on a
different workspace, and it had probably come to the end of ripping track
one (judging by the backtrace) and was writing the ID3 tag, when it seg
faulted.

This has happened each time I've tried to rip this CD - I've not tried any
others yet...

Backtrace was generated from '/opt/gnome2/bin/sound-juicer'

[New Thread 16384 (LWP 18460)]
0x40926cf7 in waitpid () from /lib/libpthread.so.0

Thread 1 (Thread 16384 (LWP 18460))

  • #0 waitpid
    from /lib/libpthread.so.0
  • #1 libgnomeui_module_info_get
    from /opt/gnome2/lib/libgnomeui-2.so.0
  • #2 __pthread_sighandler
    from /lib/libpthread.so.0
  • #3 <signal handler called>
  • #4 id3tag_set_comment
    from /usr/lib/libmp3lame.so.0
  • #5 gst_lame_add_metadata
    at gstlame.c line 456
  • #6 gst_lame_setup
    at gstlame.c line 826
  • #7 gst_lame_sinkconnect
    at gstlame.c line 352
  • #8 gst_pad_try_set_caps_func
    at gstpad.c line 1381
  • #9 gst_pad_perform_negotiate
    at gstpad.c line 1692
  • #10 gst_element_negotiate_pads
    at gstelement.c line 2224
  • #11 gst_element_change_state
    at gstelement.c line 2311
  • #12 cdparanoia_change_state
    at gstcdparanoia.c line 760
  • #13 gst_element_set_state
    at gstelement.c line 2136
  • #14 gst_bin_change_state
    at gstbin.c line 657
  • #15 gst_pipeline_change_state
    at gstpipeline.c line 167
  • #16 gst_element_set_state
    at gstelement.c line 2136
  • #17 sj_extractor_extract_track
    at sj-extractor.c line 441
  • #18 pop_and_rip
    at sj-extracting.c line 193
  • #19 on_completion_cb
    at sj-extracting.c line 268
  • #20 g_cclosure_marshal_VOID__VOID
    from /usr/lib/libgobject-2.0.so.0
  • #21 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #22 signal_emit_unlocked_R
    from /usr/lib/libgobject-2.0.so.0
  • #23 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #24 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #25 eos_cb
    at sj-extractor.c line 214
  • #26 g_cclosure_marshal_VOID__VOID
    from /usr/lib/libgobject-2.0.so.0
  • #27 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #28 signal_emit_unlocked_R
    from /usr/lib/libgobject-2.0.so.0
  • #29 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #30 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #31 gst_element_set_eos
    at gstelement.c line 2697
  • #32 gst_lame_chain
    at gstlame.c line 772
  • #33 gst_pad_push
    at gstpad.c line 2271
  • #34 get_group_schedule_function
    at gstoptimalscheduler.c line 896
  • #35 schedule_group
    at gstoptimalscheduler.c line 779
  • #36 gst_opt_scheduler_schedule_run_queue
    at gstoptimalscheduler.c line 810
  • #37 schedule_chain
    at gstoptimalscheduler.c line 851
  • #38 gst_opt_scheduler_iterate
    at gstoptimalscheduler.c line 1837
  • #39 gst_scheduler_iterate
    at gstscheduler.c line 732
  • #40 gst_bin_iterate_func
    at gstbin.c line 902
  • #41 gst_bin_iterate
    at gstbin.c line 947
  • #42 g_idle_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #43 g_main_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #44 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #45 g_main_context_iterate
    from /usr/lib/libglib-2.0.so.0
  • #46 g_main_loop_run
    from /usr/lib/libglib-2.0.so.0
  • #47 gtk_main
    from /usr/lib/libgtk-x11-2.0.so.0
  • #48 main
    at sj-main.c line 791
  • #49 __libc_start_main
    from /lib/libc.so.6
  • #0 waitpid
    from /lib/libpthread.so.0

Comment 1 Bastien Nocera 2003-09-16 09:08:11 UTC
Created attachment 19975 [details] [review]
avoid crash when the prop isn't found
Comment 2 Thomas Vander Stichele 2003-09-16 09:41:04 UTC
Hi.  We're suspecting this bug will also be in vorbisenc.  Can you
rerip the track, this time ripping to ogg, and file a new backtrace if
it breaks ? We'll work on this bug and put up a patch.
Comment 3 James Ogley 2003-09-16 09:43:16 UTC
Seg fault still happens with this patch, here's the trace:

Backtrace was generated from '/opt/gnome2/bin/sound-juicer'

[New Thread 16384 (LWP 2437)]
0x40926cf7 in waitpid () from /lib/libpthread.so.0

Thread 1 (Thread 16384 (LWP 2437))

  • #0 waitpid
    from /lib/libpthread.so.0
  • #1 libgnomeui_module_info_get
    from /opt/gnome2/lib/libgnomeui-2.so.0
  • #2 __pthread_sighandler
    from /lib/libpthread.so.0
  • #3 <signal handler called>
  • #4 id3tag_set_comment
    from /usr/lib/libmp3lame.so.0
  • #5 gst_lame_add_metadata
    at gstlame.c line 462
  • #6 gst_lame_setup
    at gstlame.c line 832
  • #7 gst_lame_sinkconnect
    at gstlame.c line 352
  • #8 gst_pad_try_set_caps_func
    at gstpad.c line 1381
  • #9 gst_pad_perform_negotiate
    at gstpad.c line 1692
  • #10 gst_element_negotiate_pads
    at gstelement.c line 2224
  • #11 gst_element_change_state
    at gstelement.c line 2311
  • #12 cdparanoia_change_state
    at gstcdparanoia.c line 760
  • #13 gst_element_set_state
    at gstelement.c line 2136
  • #14 gst_bin_change_state
    at gstbin.c line 657
  • #15 gst_pipeline_change_state
    at gstpipeline.c line 167
  • #16 gst_element_set_state
    at gstelement.c line 2136
  • #17 sj_extractor_extract_track
    at sj-extractor.c line 441
  • #18 pop_and_rip
    at sj-extracting.c line 193
  • #19 on_completion_cb
    at sj-extracting.c line 268
  • #20 g_cclosure_marshal_VOID__VOID
    from /usr/lib/libgobject-2.0.so.0
  • #21 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #22 signal_emit_unlocked_R
    from /usr/lib/libgobject-2.0.so.0
  • #23 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #24 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #25 eos_cb
    at sj-extractor.c line 214
  • #26 g_cclosure_marshal_VOID__VOID
    from /usr/lib/libgobject-2.0.so.0
  • #27 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #28 signal_emit_unlocked_R
    from /usr/lib/libgobject-2.0.so.0
  • #29 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #30 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #31 gst_element_set_eos
    at gstelement.c line 2697
  • #32 gst_lame_chain
    at gstlame.c line 778
  • #33 gst_pad_push
    at gstpad.c line 2271
  • #34 get_group_schedule_function
    at gstoptimalscheduler.c line 896
  • #35 schedule_group
    at gstoptimalscheduler.c line 779
  • #36 gst_opt_scheduler_schedule_run_queue
    at gstoptimalscheduler.c line 810
  • #37 schedule_chain
    at gstoptimalscheduler.c line 851
  • #38 gst_opt_scheduler_iterate
    at gstoptimalscheduler.c line 1837
  • #39 gst_scheduler_iterate
    at gstscheduler.c line 732
  • #40 gst_bin_iterate_func
    at gstbin.c line 902
  • #41 gst_bin_iterate
    at gstbin.c line 947
  • #42 g_idle_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #43 g_main_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #44 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #45 g_main_context_iterate
    from /usr/lib/libglib-2.0.so.0
  • #46 g_main_loop_run
    from /usr/lib/libglib-2.0.so.0
  • #47 gtk_main
    from /usr/lib/libgtk-x11-2.0.so.0
  • #48 main
    at sj-main.c line 791
  • #49 __libc_start_main
    from /lib/libc.so.6
  • #0 waitpid
    from /lib/libpthread.so.0

Comment 4 James Ogley 2003-09-16 09:46:25 UTC
D'oh!  Didn't see the rerip request in time...

Ok, re-ripping to OGG...

Doesn't crash.
Comment 5 James Ogley 2003-09-16 09:47:58 UTC
A bit more information, I just noticed that it when it crashed ripping
to MP3, it had started the second track - created the file, but it's
of zero length.  Hope that helps.
Comment 6 Ronald Bultje 2003-09-16 10:01:59 UTC
Can you attach a debugger and do "frame 5" and then "print *caps" on
the crashing thread? caps = 0xfffffe00 does not look good, I'm
suspecting memory corruption elsewhere.
Comment 7 James Ogley 2003-09-16 10:08:46 UTC
Program received signal SIGSEGV, Segmentation fault.

Thread 16384 (LWP 3193)

  • #5 gst_pad_perform_negotiate
    at gstpad.c line 1692
No symbol "caps" in current context.
Comment 8 Ronald Bultje 2003-09-16 11:06:13 UTC
Not that one. ;).

[New Thread 16384 (LWP 2437)]
0x40926cf7 in waitpid () from /lib/libpthread.so.0
  • #0 waitpid
    from /lib/libpthread.so.0
  • #1 libgnomeui_module_info_get
    from /opt/gnome2/lib/libgnomeui-2.so.0
  • #2 __pthread_sighandler
    from /lib/libpthread.so.0
  • #3 <signal handler called>
  • #4 id3tag_set_comment
    from /usr/lib/libmp3lame.so.0
  • #5 gst_lame_add_metadata
    at gstlame.c line 462

There, in this trace, I need the value of the symbol caps plus its
contents in #5.
Comment 9 James Ogley 2003-09-16 12:19:58 UTC
Sorry, I'm not a gdb guru - a quick guide to how to isolate that would
be appreciated :)
Comment 10 Bastien Nocera 2003-09-16 12:40:18 UTC
*** Bug 122432 has been marked as a duplicate of this bug. ***
Comment 11 Bastien Nocera 2003-09-16 12:40:53 UTC
*** Bug 122432 has been marked as a duplicate of this bug. ***
Comment 12 Bastien Nocera 2003-09-16 13:07:48 UTC
*** Bug 122434 has been marked as a duplicate of this bug. ***
Comment 13 Ronald Bultje 2003-09-16 13:15:36 UTC
First, start gd and attach to the crashing process. Then, use "up" and
"down" to find the appropriate frame, then use "print *caps" to print
the properties of the values in caps.
Comment 14 Frederic Crozat 2003-09-24 15:23:07 UTC
I've having a different backtrace when ripping to mp3 with sound-juicer :

Program received signal SIGSEGV, Segmentation fault.
0x410b8567 in id3tag_set_title () from
/home/gnome/prefix//lib/libmp3lame.so.0
(gdb) bt
  • #0 id3tag_set_title
    from /home/gnome/prefix//lib/libmp3lame.so.0
  • #1 gst_lame_add_metadata
    at gstlame.c line 462
  • #2 gst_lame_setup
    at gstlame.c line 826
  • #3 gst_lame_sinkconnect
    at gstlame.c line 352
  • #4 gst_pad_try_set_caps_func
    at gstpad.c line 1381
  • #5 gst_pad_perform_negotiate
    at gstpad.c line 1693
  • #6 gst_element_negotiate_pads
    at gstelement.c line 2224
  • #7 gst_element_change_state
    at gstelement.c line 2311
  • #8 cdparanoia_change_state
    at gstcdparanoia.c line 760
  • #9 gst_element_set_state
    at gstelement.c line 2136
  • #10 gst_bin_change_state
    at gstbin.c line 657
  • #11 gst_pipeline_change_state
    at gstpipeline.c line 167
  • #12 gst_element_set_state
    at gstelement.c line 2136
  • #13 sj_extractor_extract_track
    at sj-extractor.c line 447
  • #14 pop_and_rip
    at sj-extracting.c line 193
  • #15 on_completion_cb
    at sj-extracting.c line 268
  • #16 g_cclosure_marshal_VOID__VOID
    at gmarshal.c line 77
  • #17 g_closure_invoke
    at gclosure.c line 437
  • #18 signal_emit_unlocked_R
    at gsignal.c line 2822
  • #19 g_signal_emit_valist
    at gsignal.c line 2554
  • #20 g_signal_emit
    at gsignal.c line 2612
  • #21 eos_cb
    at sj-extractor.c line 216
  • #22 g_cclosure_marshal_VOID__VOID
    at gmarshal.c line 77
  • #23 g_closure_invoke
    at gclosure.c line 437
  • #24 signal_emit_unlocked_R
    at gsignal.c line 2822
  • #25 g_signal_emit_valist
    at gsignal.c line 2554
  • #26 g_signal_emit
    at gsignal.c line 2612
  • #27 gst_element_set_eos
    at gstelement.c line 2697
  • #28 gst_lame_chain
    at gstlame.c line 772
  • #29 gst_pad_push
    at gstpad.c line 2272
  • #30 get_group_schedule_function
    at gstoptimalscheduler.c line 896
  • #31 schedule_group
    at gstoptimalscheduler.c line 779
  • #32 gst_opt_scheduler_schedule_run_queue
    at gstoptimalscheduler.c line 810
  • #33 schedule_chain
    at gstoptimalscheduler.c line 851
  • #34 gst_opt_scheduler_iterate
    at gstoptimalscheduler.c line 1837
  • #35 gst_scheduler_iterate
    at gstscheduler.c line 732
  • #36 gst_bin_iterate_func
    at gstbin.c line 902
  • #37 gst_bin_iterate
    at gstbin.c line 947
  • #38 g_idle_dispatch
    at gmain.c line 3272
  • #39 g_main_dispatch
    at gmain.c line 1751
  • #40 g_main_context_dispatch
    at gmain.c line 2299
  • #41 g_main_context_iterate
    at gmain.c line 2380
  • #42 g_main_loop_run
    at gmain.c line 2600
  • #43 gtk_main
    at gtkmain.c line 1129
  • #44 main
    at sj-main.c line 914
  • #45 __libc_start_main
    from /lib/i686/libc.so.6
  • #4 gst_pad_try_set_caps_func
    at gstpad.c line 1381
$1 = {name = 0x81f47f8 "intersect", id = 2, flags = 1, refcount = 2,
  properties = 0x80e6f54, next = 0x0}

Comment 15 Bastien Nocera 2003-09-27 20:59:11 UTC
*** Bug 123388 has been marked as a duplicate of this bug. ***
Comment 16 Bastien Nocera 2003-09-30 10:12:40 UTC
The problem seems to be with using the same pipeline for 2 different
tracks, probably memory corruption. Is there a way to disable the
MMX/SSE/whatever extensions in GST to debug it using valgrind or similar?
Comment 17 Ronald Bultje 2003-09-30 10:33:02 UTC
--disable-cpu-opt, but that's only available in 0.6.x CVS (and HEAD
CVS), not in 0.6.3.
Comment 18 Bastien Nocera 2003-10-02 08:23:38 UTC
*** Bug 123689 has been marked as a duplicate of this bug. ***
Comment 19 David Schleef 2004-03-18 21:37:19 UTC
Can this bug be reproduced in 0.8.0?
Comment 20 Ronald Bultje 2005-01-29 11:47:48 UTC
This code no longer exists. I've had a small look back at the 0.6 code, and from
what I can see, memory for metadata was shared between app and plugin. This
means that if SJ would rip a next track after having free'ed its previous
metadata, the data would still be in the plugin and it'd access invalid memory.

This is no longer the case in 0.8, we now use proper memory referencing to
prevent this. Therefore, this probably doesn't occur in 0.8 anymore. I'll close
it as INVALID since I don't know what else to do with it.