GNOME Bugzilla – Bug 603059
Totem crashes when DVD is encrypted but libdvdcss isn't available
Last modified: 2009-12-04 13:00:36 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.
Could you also add the backtrace from the core dump?
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.
+ Trace 219307
Thread 1 (Thread 0x7ffff7fc0800 (LWP 16352))
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.
Created attachment 148543 [details] log
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?
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.
Proposed patch - fixes things for me
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.