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 603059 - Totem crashes when DVD is encrypted but libdvdcss isn't available
Totem crashes when DVD is encrypted but libdvdcss isn't available
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: 0.10.26
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-11-26 15:43 UTC by Bastien Nocera
Modified: 2009-12-04 13:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
log (4.66 KB, text/plain)
2009-11-26 17:15 UTC, Bastien Nocera
  Details
basesrc: Shut down the pad task when the initial seek fails. (1.88 KB, patch)
2009-11-28 19:34 UTC, Jan Schmidt
none Details | Review

Description Bastien Nocera 2009-11-26 15:43:31 UTC
gstreamer-plugins-bad-0.10.16-1.fc12.x86_64

$ ./totem
libdvdread: Encrypted DVD support unavailable.
libdvdnav: Using dvdnav version 4.1.4
libdvdread: Encrypted DVD support unavailable.
libdvdnav: DVD Title: THE_NAME_OF_THE_ROSE
libdvdnav: DVD Serial Number: 308E5252
libdvdnav: DVD Title (Alternative): THE_NAME_OF_THE_ROSE
libdvdnav: Unable to find map file '/home/hadess/.dvdnav/THE_NAME_OF_THE_ROSE.map'
libdvdnav: DVD disk reports itself with Region mask 0x00ed0000. Regions: 2 5
libdvdnav: Language 'en' not found, using '��' instead
libdvdnav: Menu Languages available: �� 
libdvdnav: Language 'en' not found, using '��' instead
libdvdnav: Menu Languages available: �� 
libdvdnav: Language 'en' not found, using '��' instead
libdvdnav: Menu Languages available: �� 
0:00:13.338753443  7642      0x24c7100 ERROR                basesrc rsnbasesrc.c:2261:rsn_base_src_activate_push:<dvdsrc> Failed to perform initial seek
Segmentation fault (core dumped)

It doesn't core dump every time, every now and then the error message appears...

Seems to work fine under valgrind, or with gst-launch with only those messages:
==7902== Conditional jump or move depends on uninitialised value(s)
==7902==    at 0x3C59004A87: ??? (in /usr/lib64/libdvdread.so.4.1.4)
==7902==    by 0x3C59005015: DVDOpenFile (in /usr/lib64/libdvdread.so.4.1.4)
==7902==    by 0x3C53C05AC9: dvdnav_open (dvdnav.c:112)
==7902==    by 0x1249F124: rsn_dvdsrc_start (resindvdsrc.c:366)
==7902==    by 0x12498190: rsn_base_src_start (rsnbasesrc.c:2081)
==7902==    by 0x1249B1C7: rsn_base_src_activate_push (rsnbasesrc.c:2217)
==7902==    by 0x3BA325F362: gst_pad_activate_push (gstpad.c:915)
==7902==    by 0x3BA325FEE6: gst_pad_set_active (gstpad.c:671)
==7902==    by 0x3BA3241BAA: activate_pads (gstelement.c:2632)
==7902==    by 0x3BA3253205: gst_iterator_fold (gstiterator.c:545)
==7902==    by 0x3BA3241B15: iterator_activate_fold_with_resync (gstelement.c:2664)
==7902==    by 0x3BA3243EFE: gst_element_pads_activate (gstelement.c:2701)
==7902==  Uninitialised value was created by a heap allocation
==7902==    at 0x4A0515D: malloc (vg_replace_malloc.c:195)
==7902==    by 0x3C590038F3: ??? (in /usr/lib64/libdvdread.so.4.1.4)
==7902==    by 0x3C590055DC: DVDOpen (in /usr/lib64/libdvdread.so.4.1.4)
==7902==    by 0x3C53C0D07C: vm_reset (vm.c:356)
==7902==    by 0x3C53C05A3F: dvdnav_open (dvdnav.c:99)
==7902==    by 0x1249F124: rsn_dvdsrc_start (resindvdsrc.c:366)
==7902==    by 0x12498190: rsn_base_src_start (rsnbasesrc.c:2081)
==7902==    by 0x1249B1C7: rsn_base_src_activate_push (rsnbasesrc.c:2217)
==7902==    by 0x3BA325F362: gst_pad_activate_push (gstpad.c:915)
==7902==    by 0x3BA325FEE6: gst_pad_set_active (gstpad.c:671)
==7902==    by 0x3BA3241BAA: activate_pads (gstelement.c:2632)
==7902==    by 0x3BA3253205: gst_iterator_fold (gstiterator.c:545)
==7902== 
libdvdnav: Language 'en' not found, using '��' instead
libdvdnav: Menu Languages available: �� 
libdvdnav: Language 'en' not found, using '��' instead
libdvdnav: Menu Languages available: �� 
libdvdnav: Language 'en' not found, using '��' instead
libdvdnav: Menu Languages available: �� 
==7902== Conditional jump or move depends on uninitialised value(s)
==7902==    at 0x3C59004A87: ??? (in /usr/lib64/libdvdread.so.4.1.4)
==7902==    by 0x3C59005015: DVDOpenFile (in /usr/lib64/libdvdread.so.4.1.4)
==7902==    by 0x3C53C050B6: dvdnav_get_next_cache_block (dvdnav.c:560)
==7902==    by 0x3C53C05657: dvdnav_get_next_block (dvdnav.c:379)
==7902==    by 0x124A0B77: rsn_dvdsrc_step (resindvdsrc.c:883)
==7902==    by 0x124A3E97: rsn_dvdsrc_do_seek (resindvdsrc.c:1219)
==7902==    by 0x1249A8B0: rsn_base_src_perform_seek (rsnbasesrc.c:781)
==7902==    by 0x1249B252: rsn_base_src_activate_push (rsnbasesrc.c:2231)
==7902==    by 0x3BA325F362: gst_pad_activate_push (gstpad.c:915)
==7902==    by 0x3BA325FEE6: gst_pad_set_active (gstpad.c:671)
==7902==    by 0x3BA3241BAA: activate_pads (gstelement.c:2632)
==7902==    by 0x3BA3253205: gst_iterator_fold (gstiterator.c:545)
==7902==  Uninitialised value was created by a heap allocation
==7902==    at 0x4A0515D: malloc (vg_replace_malloc.c:195)
==7902==    by 0x3C590038F3: ??? (in /usr/lib64/libdvdread.so.4.1.4)
==7902==    by 0x3C590055DC: DVDOpen (in /usr/lib64/libdvdread.so.4.1.4)
==7902==    by 0x3C53C0D07C: vm_reset (vm.c:356)
==7902==    by 0x3C53C05A3F: dvdnav_open (dvdnav.c:99)
==7902==    by 0x1249F124: rsn_dvdsrc_start (resindvdsrc.c:366)
==7902==    by 0x12498190: rsn_base_src_start (rsnbasesrc.c:2081)
==7902==    by 0x1249B1C7: rsn_base_src_activate_push (rsnbasesrc.c:2217)
==7902==    by 0x3BA325F362: gst_pad_activate_push (gstpad.c:915)
==7902==    by 0x3BA325FEE6: gst_pad_set_active (gstpad.c:671)
==7902==    by 0x3BA3241BAA: activate_pads (gstelement.c:2632)
==7902==    by 0x3BA3253205: gst_iterator_fold (gstiterator.c:545)
==7902== 
No accelerated IMDCT transform found
** Message: no file info
0:02:48.847142550  7902      0x4c45270 ERROR                  totem bacon-video-widget-gst-0.10.c:387:bvw_error_msg: message = Could not read from resource.
0:02:49.053816706  7902      0x4c45270 ERROR                  totem bacon-video-widget-gst-0.10.c:389:bvw_error_msg: domain  = 3650 (gst-resource-error-quark)
0:02:49.056231836  7902      0x4c45270 ERROR                  totem bacon-video-widget-gst-0.10.c:390:bvw_error_msg: code    = 9
0:02:49.058048840  7902      0x4c45270 ERROR                  totem bacon-video-widget-gst-0.10.c:391:bvw_error_msg: debug   = resindvdsrc.c(1104): rsn_dvdsrc_step (): /GstPlayBin2:play/GstURIDecodeBin:uridecodebin0/RsnDvdBin:source/resinDvdSrc:dvdsrc:
Failed to read next DVD block. Error: Error reading from DVD.
0:02:49.060078199  7902      0x4c45270 ERROR                  totem bacon-video-widget-gst-0.10.c:392:bvw_error_msg: source  = <dvdsrc>
0:02:49.096026368  7902      0x4c45270 ERROR                  totem bacon-video-widget-gst-0.10.c:393:bvw_error_msg: uri     = dvd://
** Message: Error: Could not read from resource.
resindvdsrc.c(1104): rsn_dvdsrc_step (): /GstPlayBin2:play/GstURIDecodeBin:uridecodebin0/RsnDvdBin:source/resinDvdSrc:dvdsrc:
Failed to read next DVD block. Error: Error reading from DVD.
Comment 1 Jan Schmidt 2009-11-26 16:01:05 UTC
Could you also add the backtrace from the core dump?
Comment 2 Bastien Nocera 2009-11-26 16:29:06 UTC
0:00:02.704018589 16352       0x67b100 ERROR                basesrc rsnbasesrc.c:2261:rsn_base_src_activate_push:<dvdsrc> Failed to perform initial seek

Program received signal SIGSEGV, Segmentation fault.

Thread 1 (Thread 0x7ffff7fc0800 (LWP 16352))

  • #0 __poll
    at ../sysdeps/unix/sysv/linux/poll.c line 87
  • #1 socket_do_iteration
    at dbus-transport-socket.c line 1066
  • #2 _dbus_transport_do_iteration
    at dbus-transport.c line 956
  • #3 _dbus_connection_do_iteration_unlocked
    at dbus-connection.c line 1163
  • #4 _dbus_connection_block_pending_call
    at dbus-connection.c line 2328
  • #5 dbus_g_proxy_end_call_internal
    at dbus-gproxy.c line 2272
  • #6 dbus_g_proxy_call
    at dbus-gproxy.c line 2601
  • #7 screensaver_inhibit_dbus
    at totem-scrsaver.c line 117
  • #8 totem_screensaver_update_from_state
    at totem-screensaver.c line 124
  • #9 IA__g_closure_invoke
    at gclosure.c line 767
  • #10 signal_emit_unlocked_R
    at gsignal.c line 3247
  • #11 IA__g_signal_emit_valist
    at gsignal.c line 2980
  • #12 IA__g_signal_emit
    at gsignal.c line 3037
  • #13 g_object_dispatch_properties_changed
    at gobject.c line 796
  • #14 g_object_notify_queue_thaw
    at gobjectnotifyqueue.c line 120
  • #15 IA__g_object_notify
    at gobject.c line 883
  • #16 totem_action_play
    at totem-object.c line 1050
  • #17 totem_action_play_pause
    at totem-object.c line 1353
  • #18 main
    at totem.c line 262

Comment 3 Jan Schmidt 2009-11-26 16:34:51 UTC
OK. How about a debug log from GST_DEBUG=rsndvdsrc:5 ?

I suspect it's failing to open dvdnav somewhere, and/or closing it due to a failure, then it somehow ends up in rsn_dvdsrc_step with a NULL dvdnav instance and crashes.
Comment 4 Bastien Nocera 2009-11-26 17:15:06 UTC
Created attachment 148543 [details]
log
Comment 5 Jan Schmidt 2009-11-27 09:21:08 UTC
OK, the problem seems to be that when basesrc starts up, the pad activation fails, and gst_base_src_stop is called, because the initial seek fails.

Nevertheless - the seek function in basesrc starts the pad task, which then starts calling into the create() function.

I could work around it in resin, but fundamentally this is a basesrc bug.

I think the correct fix is for the seek function to check the RUNNING flag before it restarts basesrc.

Wim?
Comment 6 Jan Schmidt 2009-11-28 19:34:13 UTC
Created attachment 148666 [details] [review]
basesrc: Shut down the pad task when the initial seek fails.

Set the pad flushing and stop the pad task when the initial seek fails
during activation. Avoids racy calls into the _create() function when
BaseSrc::stop() has already run.

Fixes: #603059

Also, fix some misspelled comments.
Comment 7 Jan Schmidt 2009-11-28 19:39:38 UTC
Proposed patch - fixes things for me
Comment 8 Jan Schmidt 2009-12-04 13:00:36 UTC
commit f49050849061c39dce2635a216c087599c2ab9b5
Author: Jan Schmidt <thaytan@noraisin.net>
Date:   Fri Nov 27 20:16:15 2009 +0100

    basesrc: Shut down the pad task when the initial seek fails.
    
    Set the pad flushing and stop the pad task when the initial seek fails
    during activation. Avoids racy calls into the _create() function when
    BaseSrc::stop() has already run.
    
    Fixes: #603059
    
    Also, fix some misspelled comments.