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 766671 - gst_segment_to_running_time: assertion 'segment->format == format' failed if souphttpsrc gets error 416 while seeking
gst_segment_to_running_time: assertion 'segment->format == format' failed if ...
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
1.8.0
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-05-19 15:43 UTC by Marcin Lewandowski
Modified: 2017-11-10 09:39 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Marcin Lewandowski 2016-05-19 15:43:47 UTC
I am doing seek exactly as specified here (https://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/section-eventsseek.html) on pipeline that fetches data from souphttpsrc.

If server returns error 416 (Requested Range Not Satisfiable) GStreamer crashes with the following error:

GStreamer-CRITICAL **: gst_segment_to_running_time: assertion 'segment->format == format' failed
2016-05-19 17:40:21.531 [libradiokit-common APPTHREAD WARN] [Media.Pipeline.Base] Element /GstPipeline:pipeline0/GstSoupHTTPSrc:source: Error Requested Range Not Satisfiable (gstsouphttpsrc.c(1640): gst_soup_http_src_parse_status (): /GstPipeline:pipeline0/GstSoupHTTPSrc:source:
Requested Range Not Satisfiable (416), URL: https://storage.gra1.cloud.ovh.net/v1/AUTH_xxxxxxxxxxxxxxxxxxxxxxxxx/vault/Data.Record.File_ed4929ab-8abe-4a85-8536-510e77db5b94?temp_url_expires=xxxxxxxxx&temp_url_sig=9fd398044e0883b4357f40bfb07f78915195c4a6, Redirect to: (NULL))
Comment 1 Sebastian Dröge (slomo) 2016-05-20 06:38:40 UTC
Can you get a backtrace of the assertion (set G_DEBUG=fatal_warnings to let it break there)? And ideally a testcase to reproduce it :)
Comment 2 Marcin Lewandowski 2016-05-20 20:40:52 UTC
* thread #1: tid = 0, 0x00007f16e6ae19eb libglib-2.0.so.0`g_logv + 683, name = 'lt-myapp-plu', stop reason = signal SIGTRAP
  * frame #0: 0x00007f16e6ae19eb libglib-2.0.so.0`g_logv + 683
    frame #1: 0x00007f16e6ae1b5f libglib-2.0.so.0`g_log + 143
    frame #2: 0x00007f16e5f62e9e libgstreamer-1.0.so.0`gst_segment_to_running_time + 62
    frame #3: 0x00007f16dc0e2451 libgstlevel.so
    frame #4: 0x00007f16dc0e2b1a libgstlevel.so

  thread #2: tid = 1, 0x00007f16e65abc19 libc.so.6`syscall + 25 at syscall.S:38, stop reason = signal SIGTRAP
    frame #0: 0x00007f16e65abc19 libc.so.6`syscall + 25 at syscall.S:38
    frame #1: 0x00007f16e6b1fcca libglib-2.0.so.0`g_cond_wait_until + 170
    frame #2: 0x00007f16e6aaf929 libglib-2.0.so.0`??? + 89
    frame #3: 0x00007f16e6b024b6 libglib-2.0.so.0`??? + 118
    frame #4: 0x00007f16e6b01b45 libglib-2.0.so.0`??? + 85
    frame #5: 0x00007f16e687b6fa libpthread.so.0`start_thread + 202
    frame #6: 0x00007f16e65b1b5d libc.so.6`__clone + 109 at clone.S:109

  thread #3: tid = 2, 0x00007f16e65a5e8d libc.so.6`__GI___poll + 45 at syscall-template.S:84, stop reason = signal SIGTRAP
    frame #0: 0x00007f16e65a5e8d libc.so.6`__GI___poll + 45 at syscall-template.S:84
    frame #1: 0x00007f16e6adb31c libglib-2.0.so.0`??? + 380
    frame #2: 0x00007f16e6adb42c libglib-2.0.so.0`g_main_context_iteration + 44
    frame #3: 0x00007f16e6adb469 libglib-2.0.so.0`??? + 25
    frame #4: 0x00007f16e6b01b45 libglib-2.0.so.0`??? + 85
    frame #5: 0x00007f16e687b6fa libpthread.so.0`start_thread + 202
    frame #6: 0x00007f16e65b1b5d libc.so.6`__clone + 109 at clone.S:109

  thread #4: tid = 3, 0x00007f16e6883a55 libpthread.so.0`do_futex_wait + 69, stop reason = signal SIGTRAP
    frame #0: 0x00007f16e6883a55 libpthread.so.0`do_futex_wait + 69
    frame #1: 0x00007f16e6883b1f libpthread.so.0`__new_sem_wait_slow + 95
    frame #2: 0x00007f16e6883bd2 libpthread.so.0`sem_timedwait + 66
    frame #3: 0x00007f16cf97b1ce libjack.so.0`??? + 302
    frame #4: 0x00007f16cf963b0d libjack.so.0`??? + 45
    frame #5: 0x00007f16cf962bcf libjack.so.0`??? + 95
    frame #6: 0x00007f16cf962058 libjack.so.0`??? + 184
    frame #7: 0x00007f16cf97a680 libjack.so.0`??? + 160
    frame #8: 0x00007f16e687b6fa libpthread.so.0`start_thread + 202
    frame #9: 0x00007f16e65b1b5d libc.so.6`__clone + 109 at clone.S:109

  thread #5: tid = 4, 0x00007f16e65abc19 libc.so.6`syscall + 25 at syscall.S:38, stop reason = signal SIGTRAP
    frame #0: 0x00007f16e65abc19 libc.so.6`syscall + 25 at syscall.S:38
    frame #1: 0x00007f16e6b1fbaf libglib-2.0.so.0`g_cond_wait + 47
    frame #2: 0x00007f16e5f71ebd libgstreamer-1.0.so.0`??? + 813
    frame #3: 0x00007f16e6b024de libglib-2.0.so.0`??? + 158
    frame #4: 0x00007f16e6b01b45 libglib-2.0.so.0`??? + 85
    frame #5: 0x00007f16e687b6fa libpthread.so.0`start_thread + 202
    frame #6: 0x00007f16e65b1b5d libc.so.6`__clone + 109 at clone.S:109

  thread #6: tid = 5, 0x00007f16e65abc19 libc.so.6`syscall + 25 at syscall.S:38, stop reason = signal SIGTRAP
    frame #0: 0x00007f16e65abc19 libc.so.6`syscall + 25 at syscall.S:38
    frame #1: 0x00007f16e6b1fbaf libglib-2.0.so.0`g_cond_wait + 47
    frame #2: 0x00007f16e5f71ebd libgstreamer-1.0.so.0`??? + 813
    frame #3: 0x00007f16e6b024de libglib-2.0.so.0`??? + 158
    frame #4: 0x00007f16e6b01b45 libglib-2.0.so.0`??? + 85
    frame #5: 0x00007f16e687b6fa libpthread.so.0`start_thread + 202
    frame #6: 0x00007f16e65b1b5d libc.so.6`__clone + 109 at clone.S:109

  thread #7: tid = 6, 0x00007f16e65abc19 libc.so.6`syscall + 25 at syscall.S:38, stop reason = signal SIGTRAP
    frame #0: 0x00007f16e65abc19 libc.so.6`syscall + 25 at syscall.S:38
    frame #1: 0x00007f16e6b1fbaf libglib-2.0.so.0`g_cond_wait + 47
    frame #2: 0x00007f16cdb60163 libgstogg.so
    frame #3: 0x00007f16e6b01b45 libglib-2.0.so.0`??? + 85
    frame #4: 0x00007f16e687b6fa libpthread.so.0`start_thread + 202
    frame #5: 0x00007f16e65b1b5d libc.so.6`__clone + 109 at clone.S:109

  thread #8: tid = 7, 0x00007f16e68813a0 libpthread.so.0`__pthread_cond_wait + 192, stop reason = signal SIGTRAP
    frame #0: 0x00007f16e68813a0 libpthread.so.0`__pthread_cond_wait + 192
    frame #1: 0x00007f16cf97b6ac libjack.so.0`??? + 44
    frame #2: 0x00007f16cf972a48 libjack.so.0`??? + 40
    frame #3: 0x00007f16cf97a680 libjack.so.0`??? + 160
    frame #4: 0x00007f16e687b6fa libpthread.so.0`start_thread + 202
    frame #5: 0x00007f16e65b1b5d libc.so.6`__clone + 109 at clone.S:109

  thread #9: tid = 8, 0x00007f16e65a5e8d libc.so.6`__GI___poll + 45 at syscall-template.S:84, stop reason = signal SIGTRAP
    frame #0: 0x00007f16e65a5e8d libc.so.6`__GI___poll + 45 at syscall-template.S:84
    frame #1: 0x00007f16e6adb31c libglib-2.0.so.0`??? + 380
    frame #2: 0x00007f16e6adb42c libglib-2.0.so.0`g_main_context_iteration + 44
    frame #3: 0x00007f16e175028d libdconfsettings.so`??? + 29
    frame #4: 0x00007f16e6b01b45 libglib-2.0.so.0`??? + 85
    frame #5: 0x00007f16e687b6fa libpthread.so.0`start_thread + 202
    frame #6: 0x00007f16e65b1b5d libc.so.6`__clone + 109 at clone.S:109

  thread #10: tid = 9, 0x00007f16e688455d libpthread.so.0`__libc_read + 45, stop reason = signal SIGTRAP
    frame #0: 0x00007f16e688455d libpthread.so.0`__libc_read + 45
    frame #1: 0x00007f16cf97c065 libjack.so.0`??? + 21
    frame #2: 0x00007f16cf97ed9b libjack.so.0`??? + 107
    frame #3: 0x00007f16cf97a680 libjack.so.0`??? + 160
    frame #4: 0x00007f16e687b6fa libpthread.so.0`start_thread + 202
    frame #5: 0x00007f16e65b1b5d libc.so.6`__clone + 109 at clone.S:109

  thread #11: tid = 10, 0x00007f16e65a5e8d libc.so.6`__GI___poll + 45 at syscall-template.S:84, stop reason = signal SIGTRAP
    frame #0: 0x00007f16e65a5e8d libc.so.6`__GI___poll + 45 at syscall-template.S:84
    frame #1: 0x00007f16e6adb31c libglib-2.0.so.0`??? + 380
    frame #2: 0x00007f16e6adb6a2 libglib-2.0.so.0`g_main_loop_run + 194
    frame #3: 0x00007f16e73b8a7a libmyapp-common-1.0.so.4`myapp_common_app_base_start_real(self=0x00000000006fb850) + 634 at base.c:514
    frame #4: 0x00000000004030e8 lt-myapp-player-media-input-file-myapp-vault-1.0`myapp_player_media_input_file_rk_vault_main(argv=0x00007fffd5dbb758, argv_length1=1) + 40 at main.c:37
    frame #5: 0x00007f16e64cb830 libc.so.6`__libc_start_main(main=(lt-myapp-player-media-input-file-myapp-vault-1.0`main at main.c:44), argc=1, argv=0x00007fffd5dbb758, init=<unavailable>, fini=<unavailable>, rtld_fini=<unavailable>, stack_end=0x00007fffd5dbb748) + 240 at libc-start.c:291
    frame #6: 0x0000000000402fe9 lt-myapp-player-media-input-file-myapp-vault-1.0`_start + 41
Comment 3 Tim-Philipp Müller 2016-05-20 20:56:23 UTC
And what does the pipeline look like?
Comment 4 Marcin Lewandowski 2016-05-20 21:02:52 UTC
souphttpsrc location=... automatic-redirect=false is-live=false keep-alive=false ssl-strict=true ssl-use-system-ca-file=false tls-database=... iradio-mode=false user-agent=... timeout=10 ! queue ! decodebin caps=audio/x-raw expose-all-streams=false ! audioconvert ! audioresample quality=5 ! level post-messages=true interval=40000000 peak-falloff=16 peak-ttl=200000000 ! capsfilter caps=audio/x-raw,channels=2 ! jackaudiosink connect=0 client-name=...

Sorry for typos, I am interpreting this from my code.

I am accessing file that is hosted on OpenStack Swift, so Range headers etc. work according to the HTTP RFC for sure.

I am trying to isolate a test case, no success yet.
Comment 5 Marcin Lewandowski 2016-06-08 22:17:35 UTC
It seems that the  scenario is the following:

1. Set state to PAUSED 
2. Wait for state changed message on the bus
3. Issue a seek
4. Immediately, before seek was complete set state to PLAYING

Still working on the test case.
Comment 6 Tim-Philipp Müller 2016-11-11 14:59:14 UTC
Any luck with the test case?

The state change to PLAYING should only affect the sink.

Probably best to stick to alsasink/pulsesink for debugging if it happens with those too (avoid road less travelled etc.).
Comment 7 Edward Hervey 2017-11-10 09:39:10 UTC
No feedback in a year. Closing. Please reopen if the issue still happens with current GStreamer.