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 680495 - flacparse: seeking within some flac files hangs totem
flacparse: seeking within some flac files hangs totem
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: 0.11.x
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-07-23 23:08 UTC by Chris Fahlman
Modified: 2012-07-24 17:18 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Chris Fahlman 2012-07-23 23:08:44 UTC
When I try to seek within some particular flac files, totem freezes and uses 100% of a CPU.

totem 3.4.0


Link to an example flac file, for testing purposes:
https://docs.google.com/open?id=0B5FXtHrNOWfPa21paHhyLUkxNnM
Comment 1 Chris Fahlman 2012-07-23 23:17:05 UTC
Here is a bit of strace, while it was frozen:

fstat(35, {st_mode=S_IFREG|0644, st_size=112431924, ...}) = 0
mmap(NULL, 35721216, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc50ddee000
lseek(35, 2473596, SEEK_SET)            = 2473596
read(35, "\377\370Y\250\304\221\273\26\377\330\0[\0\313\r)+\301%\33a[\372U\375\375X\34@\321\314A"..., 35717120) = 35717120
munmap(0x7fc50ddee000, 35721216)        = 0
fstat(35, {st_mode=S_IFREG|0644, st_size=112431924, ...}) = 0
mmap(NULL, 35786752, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc50ddde000
lseek(35, 2473596, SEEK_SET)            = 2473596
read(35, "\377\370Y\250\304\221\273\26\377\330\0[\0\313\r)+\301%\33a[\372U\375\375X\34@\321\314A"..., 35782656) = 35782656
munmap(0x7fc50ddde000, 35786752)        = 0
fstat(35, {st_mode=S_IFREG|0644, st_size=112431924, ...}) = 0
mmap(NULL, 35852288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc50ddce000
lseek(35, 2473596, SEEK_SET)            = 2473596
read(35, "\377\370Y\250\304\221\273\26\377\330\0[\0\313\r)+\301%\33a[\372U\375\375X\34@\321\314A"..., 35848192) = 35848192
munmap(0x7fc50ddce000, 35852288)        = 0
fstat(35, {st_mode=S_IFREG|0644, st_size=112431924, ...}) = 0
mmap(NULL, 35917824, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc50ddbe000
lseek(35, 2473596, SEEK_SET)            = 2473596
read(35, "\377\370Y\250\304\221\273\26\377\330\0[\0\313\r)+\301%\33a[\372U\375\375X\34@\321\314A"..., 35913728) = 35913728
munmap(0x7fc50ddbe000, 35917824)        = 0
fstat(35, {st_mode=S_IFREG|0644, st_size=112431924, ...}) = 0
mmap(NULL, 35983360, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc50ddae000
lseek(35, 2473596, SEEK_SET)            = 2473596
read(35, "\377\370Y\250\304\221\273\26\377\330\0[\0\313\r)+\301%\33a[\372U\375\375X\34@\321\314A"..., 35979264) = 35979264
munmap(0x7fc50ddae000, 35983360)        = 0
fstat(35, {st_mode=S_IFREG|0644, st_size=112431924, ...}) = 0
mmap(NULL, 36048896, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc50dd9e000
lseek(35, 2473596, SEEK_SET)            = 2473596
read(35, "\377\370Y\250\304\221\273\26\377\330\0[\0\313\r)+\301%\33a[\372U\375\375X\34@\321\314A"..., 36044800) = 36044800
--- SIGTERM (Terminated) @ 0 (0) ---
+++ killed by SIGTERM +++
Comment 2 Tim-Philipp Müller 2012-07-24 08:53:56 UTC
Looks like flacparse is stuck in a loop going back to the same offset:


Thread 1 (Thread 0x7f46efea3980 (LWP 28852))

  • #0 read
    at ../sysdeps/unix/syscall-template.S line 82
  • #1 gst_file_src_fill
    at gstfilesrc.c line 354
  • #2 gst_base_src_default_create
    at gstbasesrc.c line 1390
  • #3 gst_base_src_get_range
    at gstbasesrc.c line 2313
  • #4 gst_base_src_getrange
    at gstbasesrc.c line 2469
  • #5 gst_pad_get_range_unchecked
    at gstpad.c line 3982
  • #6 gst_pad_pull_range
    at gstpad.c line 4212
  • #7 gst_pad_get_range_unchecked
    at gstpad.c line 3982
  • #8 gst_pad_pull_range
    at gstpad.c line 4212
  • #9 gst_pad_get_range_unchecked
    at gstpad.c line 3982
  • #10 gst_pad_pull_range
    at gstpad.c line 4212
  • #11 gst_base_parse_pull_range
    at gstbaseparse.c line 2639
  • #12 gst_base_parse_scan_frame
    at gstbaseparse.c line 2775
  • #13 gst_base_parse_find_frame
    at gstbaseparse.c line 3504
  • #14 gst_base_parse_locate_time
    at gstbaseparse.c line 3639
  • #15 gst_base_parse_handle_seek
    at gstbaseparse.c line 3878
  • #16 gst_base_parse_src_eventfunc
    at gstbaseparse.c line 1222
  • #17 gst_pad_send_event_unchecked
    at gstpad.c line 4745
  • #18 gst_pad_push_event_unchecked
    at gstpad.c line 4440
  • #19 gst_pad_push_event
    at gstpad.c line 4567
  • #20 gst_audio_decoder_src_eventfunc
    at gstaudiodecoder.c line 1809
  • #21 gst_audio_decoder_src_eventfunc
    at gstaudiodecoder.c line 1789
  • #22 gst_pad_send_event_unchecked
    at gstpad.c line 4745
  • #23 gst_pad_push_event_unchecked
    at gstpad.c line 4440
  • #24 gst_pad_push_event
    at gstpad.c line 4567
  • #25 event_forward_func
    at gstpad.c line 2666
  • #26 gst_pad_forward
    at gstpad.c line 2620
  • #27 gst_pad_event_default
    at gstpad.c line 2716
  • #28 gst_pad_send_event_unchecked
    at gstpad.c line 4745
  • #29 gst_pad_push_event_unchecked
    at gstpad.c line 4440
  • #30 gst_pad_push_event
    at gstpad.c line 4567
  • #31 event_forward_func
    at gstpad.c line 2666
  • #32 gst_pad_forward
    at gstpad.c line 2620
  • #33 gst_pad_event_default
    at gstpad.c line 2716
  • #34 gst_pad_send_event_unchecked
    at gstpad.c line 4745
  • #35 gst_pad_push_event_unchecked
    at gstpad.c line 4440
  • #36 gst_pad_push_event
    at gstpad.c line 4567
  • #37 gst_input_selector_event
    at gstinputselector.c line 1495
  • #38 gst_pad_send_event_unchecked
    at gstpad.c line 4745
  • #39 gst_pad_push_event_unchecked
    at gstpad.c line 4440
  • #40 gst_pad_push_event
    at gstpad.c line 4567
  • #41 event_forward_func
    at gstpad.c line 2666
  • #42 gst_pad_forward
    at gstpad.c line 2620
  • #43 gst_pad_event_default
    at gstpad.c line 2716
  • #44 gst_pad_send_event_unchecked
    at gstpad.c line 4745
  • #45 gst_pad_push_event_unchecked
    at gstpad.c line 4440
  • #46 gst_pad_push_event
    at gstpad.c line 4567
  • #47 event_forward_func
    at gstpad.c line 2666
  • #48 gst_pad_forward
    at gstpad.c line 2620
  • #49 gst_pad_event_default
    at gstpad.c line 2716
  • #50 gst_pad_send_event_unchecked
    at gstpad.c line 4745
  • #51 gst_pad_push_event_unchecked
    at gstpad.c line 4440
  • #52 gst_pad_push_event
    at gstpad.c line 4567
  • #53 gst_stream_synchronizer_src_event
    at gststreamsynchronizer.c line 232
  • #54 gst_pad_send_event_unchecked
    at gstpad.c line 4745
  • #55 gst_pad_push_event_unchecked
    at gstpad.c line 4440
  • #56 gst_pad_push_event
    at gstpad.c line 4567
  • #57 event_forward_func
    at gstpad.c line 2666
  • #58 gst_pad_forward
    at gstpad.c line 2620
  • #59 gst_pad_event_default
    at gstpad.c line 2716
  • #60 gst_pad_send_event_unchecked
    at gstpad.c line 4745
  • #61 gst_pad_push_event_unchecked
    at gstpad.c line 4440
  • #62 gst_pad_push_event
    at gstpad.c line 4567
  • #63 gst_pad_send_event_unchecked
    at gstpad.c line 4745
  • #64 gst_pad_push_event_unchecked
    at gstpad.c line 4440
  • #65 gst_pad_push_event
    at gstpad.c line 4567
  • #66 event_forward_func
    at gstpad.c line 2666
  • #67 gst_pad_forward
    at gstpad.c line 2620
  • #68 gst_pad_event_default
    at gstpad.c line 2716
  • #69 gst_pad_send_event_unchecked
    at gstpad.c line 4745
  • #70 gst_pad_push_event_unchecked
    at gstpad.c line 4440
  • #71 gst_pad_push_event
    at gstpad.c line 4567
  • #72 gst_base_transform_src_eventfunc
    at gstbasetransform.c line 1884
  • #73 gst_pad_send_event_unchecked
    at gstpad.c line 4745
  • #74 gst_pad_push_event_unchecked
    at gstpad.c line 4440
  • #75 gst_pad_push_event
    at gstpad.c line 4567
  • #76 gst_base_transform_src_eventfunc
    at gstbasetransform.c line 1884
  • #77 gst_pad_send_event_unchecked
    at gstpad.c line 4745
  • #78 gst_pad_push_event_unchecked
    at gstpad.c line 4440
  • #79 gst_pad_push_event
    at gstpad.c line 4567
  • #80 event_forward_func
    at gstpad.c line 2666
  • #81 gst_pad_forward
    at gstpad.c line 2620
  • #82 gst_pad_event_default
    at gstpad.c line 2716
  • #83 gst_pad_send_event_unchecked
    at gstpad.c line 4745
  • #84 gst_pad_push_event_unchecked
    at gstpad.c line 4440
  • #85 gst_pad_push_event
    at gstpad.c line 4567
  • #86 event_forward_func
    at gstpad.c line 2666
  • #87 gst_pad_forward
    at gstpad.c line 2620
  • #88 gst_pad_event_default
    at gstpad.c line 2716
  • #89 gst_pad_send_event_unchecked
    at gstpad.c line 4745
  • #90 gst_pad_push_event_unchecked
    at gstpad.c line 4440
  • #91 gst_pad_push_event
    at gstpad.c line 4567
  • #92 gst_base_transform_src_eventfunc
    at gstbasetransform.c line 1884
  • #93 gst_pad_send_event_unchecked
    at gstpad.c line 4745
  • #94 gst_pad_push_event_unchecked
    at gstpad.c line 4440
  • #95 gst_pad_push_event
    at gstpad.c line 4567
  • #96 event_forward_func
    at gstpad.c line 2666
  • #97 gst_pad_forward
    at gstpad.c line 2620
  • #98 gst_pad_event_default
    at gstpad.c line 2716
  • #99 gst_pitch_src_event
    at gstpitch.cc line 435
  • #100 gst_pad_send_event_unchecked
    at gstpad.c line 4745
  • #101 gst_pad_push_event_unchecked
    at gstpad.c line 4440
  • #102 gst_pad_push_event
    at gstpad.c line 4567
  • #103 event_forward_func
    at gstpad.c line 2666
  • #104 gst_pad_forward
    at gstpad.c line 2620
  • #105 gst_pad_event_default
    at gstpad.c line 2716
  • #106 gst_pad_send_event_unchecked
    at gstpad.c line 4745
  • #107 gst_pad_push_event_unchecked
    at gstpad.c line 4440
  • #108 gst_pad_push_event
    at gstpad.c line 4567
  • #109 gst_base_sink_send_event
    at gstbasesink.c line 4129
  • #110 gst_element_send_event
    at gstelement.c line 1540
  • #111 gst_bin_send_event
    at gstbin.c line 2792
  • #112 gst_element_send_event
    at gstelement.c line 1540
  • #113 gst_bin_send_event
    at gstbin.c line 2792
  • #114 gst_element_send_event
    at gstelement.c line 1540
  • #115 gst_bin_send_event
    at gstbin.c line 2792
  • #116 gst_element_send_event
    at gstelement.c line 1540
  • #117 gst_play_sink_send_event_to_sink
    at gstplaysink.c line 4326
  • #118 gst_play_sink_send_event_to_sink
    at gstplaysink.c line 4300
  • #119 gst_play_sink_send_event
    at gstplaysink.c line 4371
  • #120 gst_element_send_event
    at gstelement.c line 1540
  • #121 gst_bin_send_event
    at gstbin.c line 2792
  • #122 gst_element_send_event
    at gstelement.c line 1540
  • #123 gst_element_seek
    at gstelement.c line 1579
  • #124 bacon_video_widget_seek_time_no_lock
    at bacon-video-widget.c line 3616
  • #125 bacon_video_widget_seek_time_no_lock
    at bacon-video-widget.c line 3606
  • #126 bacon_video_widget_seek_time
    at bacon-video-widget.c line 3679
  • #127 bacon_video_widget_seek
    at bacon-video-widget.c line 3709
  • #128 totem_action_seek
    at totem-object.c line 1225
  • #129 g_closure_invoke
    at /tmp/buildd/glib2.0-2.32.3/./gobject/gclosure.c line 777
  • #130 signal_emit_unlocked_R
    at /tmp/buildd/glib2.0-2.32.3/./gobject/gsignal.c line 3547
  • #131 g_signal_emit_valist
    at /tmp/buildd/glib2.0-2.32.3/./gobject/gsignal.c line 3296
  • #132 g_signal_emit
    at /tmp/buildd/glib2.0-2.32.3/./gobject/gsignal.c line 3352
  • #133 gtk_adjustment_value_changed
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #134 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #135 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #136 g_closure_invoke
    at /tmp/buildd/glib2.0-2.32.3/./gobject/gclosure.c line 777
  • #137 signal_emit_unlocked_R
    at /tmp/buildd/glib2.0-2.32.3/./gobject/gsignal.c line 3585
  • #138 g_signal_emit_valist
    at /tmp/buildd/glib2.0-2.32.3/./gobject/gsignal.c line 3306
  • #139 g_signal_emit
    at /tmp/buildd/glib2.0-2.32.3/./gobject/gsignal.c line 3352
  • #140 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #141 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #142 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #143 _g_closure_invoke_va
    at /tmp/buildd/glib2.0-2.32.3/./gobject/gclosure.c line 840
  • #144 g_signal_emit_valist
    at /tmp/buildd/glib2.0-2.32.3/./gobject/gsignal.c line 3207
  • #145 g_signal_emit
    at /tmp/buildd/glib2.0-2.32.3/./gobject/gsignal.c line 3352
  • #146 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #147 ??
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #148 gtk_main_do_event
    from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
  • #149 ??
    from /usr/lib/x86_64-linux-gnu/libgdk-3.so.0
  • #150 g_main_dispatch
    at /tmp/buildd/glib2.0-2.32.3/./glib/gmain.c line 2539
  • #151 g_main_context_dispatch
    at /tmp/buildd/glib2.0-2.32.3/./glib/gmain.c line 3075
  • #152 g_main_context_iterate
    at /tmp/buildd/glib2.0-2.32.3/./glib/gmain.c line 3146
  • #153 g_main_context_iteration
    at /tmp/buildd/glib2.0-2.32.3/./glib/gmain.c line 3207
  • #154 g_application_run
    at /tmp/buildd/glib2.0-2.32.3/./gio/gapplication.c line 1507
  • #155 main
    at totem.c line 264


After enabling some debugging and contuing:


baseparse gstbaseparse.c:2831:gst_base_parse_scan_frame:<flacparse0> getting some more data
baseparse gstbaseparse.c:2773:gst_base_parse_scan_frame:<flacparse0> reading buffer size 3211264
baseparse gstbaseparse.c:1757:gst_base_parse_handle_buffer:<flacparse0> handling buffer of size 3211264 with ts 99:99:99.999999999, duration 99:99:99.999999999
baseparse gstbaseparse.c:1710:gst_base_parse_prepare_frame:<flacparse0> preparing frame at offset 7474748 (0x720e3c) of size 3211264
baseparse gstbaseparse.c:674:gst_base_parse_frame_new: created frame 0x7f46d84bd1e0
flacparse gstflacparse.c:800:gst_flac_parse_handle_frame:<flacparse0> Found sync code
flacparse gstflacparse.c:616:gst_flac_parse_frame_header_is_valid:<flacparse0> Parsed frame at offset 7474748:
Block size: 4096
Sample/Frame number: 753
flacparse gstflacparse.c:675:gst_flac_parse_frame_is_valid:<flacparse0> possible frame end at offset 10450
baseparse gstbaseparse.c:3160:gst_base_parse_set_min_frame_size:<flacparse0> set frame_min_size: 14
baseparse gstbaseparse.c:2143:gst_base_parse_finish_frame:<flacparse0> finished frame at offset 7474748, flushing size 10450
baseparse gstbaseparse.c:1775:gst_base_parse_handle_buffer:<flacparse0> handle_frame skipped 0, flushed 0
baseparse gstbaseparse.c:614:gst_base_parse_frame_free: freeing frame 0x7f46d84bd1e0
baseparse gstbaseparse.c:2831:gst_base_parse_scan_frame:<flacparse0> getting some more data
baseparse gstbaseparse.c:2773:gst_base_parse_scan_frame:<flacparse0> reading buffer size 3276800
baseparse gstbaseparse.c:1757:gst_base_parse_handle_buffer:<flacparse0> handling buffer of size 3276800 with ts 99:99:99.999999999, duration 99:99:99.999999999
baseparse gstbaseparse.c:1710:gst_base_parse_prepare_frame:<flacparse0> preparing frame at offset 7474748 (0x720e3c) of size 3276800
baseparse gstbaseparse.c:674:gst_base_parse_frame_new: created frame 0x7f46d8232680
flacparse gstflacparse.c:800:gst_flac_parse_handle_frame:<flacparse0> Found sync code
flacparse gstflacparse.c:616:gst_flac_parse_frame_header_is_valid:<flacparse0> Parsed frame at offset 7474748:
Block size: 4096
Sample/Frame number: 753
flacparse gstflacparse.c:675:gst_flac_parse_frame_is_valid:<flacparse0> possible frame end at offset 10450
baseparse gstbaseparse.c:3160:gst_base_parse_set_min_frame_size:<flacparse0> set frame_min_size: 14
baseparse gstbaseparse.c:2143:gst_base_parse_finish_frame:<flacparse0> finished frame at offset 7474748, flushing size 10450
baseparse gstbaseparse.c:1775:gst_base_parse_handle_buffer:<flacparse0> handle_frame skipped 0, flushed 0
baseparse gstbaseparse.c:614:gst_base_parse_frame_free: freeing frame 0x7f46d8232680
baseparse gstbaseparse.c:2831:gst_base_parse_scan_frame:<flacparse0> getting some more data
baseparse gstbaseparse.c:2773:gst_base_parse_scan_frame:<flacparse0> reading buffer size 3342336
baseparse gstbaseparse.c:1757:gst_base_parse_handle_buffer:<flacparse0> handling buffer of size 3342336 with ts 99:99:99.999999999, duration 99:99:99.999999999
baseparse gstbaseparse.c:1710:gst_base_parse_prepare_frame:<flacparse0> preparing frame at offset 7474748 (0x720e3c) of size 3342336
baseparse gstbaseparse.c:674:gst_base_parse_frame_new: created frame 0x29f5720
flacparse gstflacparse.c:800:gst_flac_parse_handle_frame:<flacparse0> Found sync code
flacparse gstflacparse.c:616:gst_flac_parse_frame_header_is_valid:<flacparse0> Parsed frame at offset 7474748:
Block size: 4096
Sample/Frame number: 753
flacparse gstflacparse.c:675:gst_flac_parse_frame_is_valid:<flacparse0> possible frame end at offset 10450
baseparse gstbaseparse.c:3160:gst_base_parse_set_min_frame_size:<flacparse0> set frame_min_size: 14
baseparse gstbaseparse.c:2143:gst_base_parse_finish_frame:<flacparse0> finished frame at offset 7474748, flushing size 10450
baseparse gstbaseparse.c:1775:gst_base_parse_handle_buffer:<flacparse0> handle_frame skipped 0, flushed 0
baseparse gstbaseparse.c:614:gst_base_parse_frame_free: freeing frame 0x29f5720
baseparse gstbaseparse.c:2831:gst_base_parse_scan_frame:<flacparse0> getting some more data
baseparse gstbaseparse.c:2773:gst_base_parse_scan_frame:<flacparse0> reading buffer size 3407872
baseparse gstbaseparse.c:1757:gst_base_parse_handle_buffer:<flacparse0> handling buffer of size 3407872 with ts 99:99:99.999999999, duration 99:99:99.999999999
baseparse gstbaseparse.c:1710:gst_base_parse_prepare_frame:<flacparse0> preparing frame at offset 7474748 (0x720e3c) of size 3407872
baseparse gstbaseparse.c:674:gst_base_parse_frame_new: created frame 0x2a46c50
flacparse gstflacparse.c:800:gst_flac_parse_handle_frame:<flacparse0> Found sync code
flacparse gstflacparse.c:616:gst_flac_parse_frame_header_is_valid:<flacparse0> Parsed frame at offset 7474748:
Block size: 4096
Sample/Frame number: 753
Comment 3 Mark Nauwelaerts 2012-07-24 11:55:58 UTC
commit 363293731e401fb7a37451048c517de9db0b21ff
Author: Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Date:   Tue Jul 24 13:49:36 2012 +0200

    baseparse: also account for frame size when merely scanning for frame
    
    Fixes https://bugzilla.gnome.org/show_bug.cgi?id=680495
Comment 4 Chris Fahlman 2012-07-24 17:18:07 UTC
Thank you. I verified, with totem, that the issue I had of seeking within flac files is fixed.