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 359133 - [gnomevfssrc] smb:// - could not read from (valid) resource
[gnomevfssrc] smb:// - could not read from (valid) resource
Status: RESOLVED WONTFIX
Product: gnome-vfs
Classification: Deprecated
Component: Module: smb
2.16.x
Other All
: Normal normal
: ---
Assigned To: gnome-vfs maintainers
gnome-vfs maintainers
gnome[unmaintained]
: 536949 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-10-02 21:50 UTC by j_greenhouse
Modified: 2018-08-17 13:50 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16


Attachments
Result of player media from share (21.56 KB, image/png)
2006-10-02 21:51 UTC, j_greenhouse
Details
Debug information (3.71 KB, application/x-bzip)
2006-10-07 19:12 UTC, j_greenhouse
Details
GST_DEBUG=*:5 gst-launch-0.10 playbin uri="smb://finalbeta@192.... (214.33 KB, application/x-bzip)
2006-10-07 20:43 UTC, j_greenhouse
Details
debug info from gst-launch (206.03 KB, application/x-bzip)
2006-10-14 21:12 UTC, Greg Michalec
Details

Description j_greenhouse 2006-10-02 21:50:23 UTC
Please describe the problem:
Totem Gstreamer no longer plays media (avi/mp3) from samba shares. Totem passes the user an error dialog stating:

Totem could not play "smb://url.."
Could not read from resource.

(tested only with .avi (Divx etc) .mp3 on ubuntu Edgy)
The previous totem version the came with ubuntu dapper played the files fine. 

This bug was reported downstream : https://launchpad.net/distros/ubuntu/+source/totem/+bug/61147

Steps to reproduce:
1. Play avi/mp3 from a Samba share
2. 
3. 


Actual results:
Error dialog:
Totem could not play: "smb://url..."
Could not read from resource

Expected results:
Play the file.

Does this happen every time?
yes

Other information:
Comment 1 j_greenhouse 2006-10-02 21:51:44 UTC
Created attachment 73903 [details]
Result of player media from share
Comment 2 j_greenhouse 2006-10-07 15:50:32 UTC
This is seriously crippling for me. 
And it's now confirmed to be the same with the totem version that ships with GNOME 2.14. One of the updates must have broken it, because when I used GNOME 2.14 it did work.
Comment 3 Tim-Philipp Müller 2006-10-07 17:59:18 UTC
Could you run totem like this:

 $ export GST_DEBUG_NO_COLOR=1
 $ GST_DEBUG=gnomevfssrc:5,totem:5  totem smb://..rest.of.your.uri  2>dbg.log
  .. wait until the error comes up, then close totem ...
 $ bzip2 dbg.log

and attach the dbg.log.bz2 please?
Comment 4 j_greenhouse 2006-10-07 19:12:35 UTC
Created attachment 74239 [details]
Debug information

Attached output from:

finalbeta@finalbeta-laptop:~$ export GST_DEBUG_NO_COLOR=1
finalbeta@finalbeta-laptop:~$ GST_DEBUG=gnomevfssrc:5,totem:5  totem 'smb://finalbeta@192.168.20.2/finalbeta/hdb5/episode.avi' 2>dbg.log
finalbeta@finalbeta-laptop:~$ bzip2 dbg.log
Comment 5 Tim-Philipp Müller 2006-10-07 20:06:32 UTC
Odd, gnome_vfs_src_start() is called 4 times within 2 seconds, that doesn't look right.

Do you get the same issue with

 $ gst-launch-0.10 playbin uri="smb://..."

?

If yes, could you create another (full) log like this

 $ export GST_DEBUG_NO_COLOR=1
 $ GST_DEBUG=*:5 gst-launch-0.10 playbin uri="smb://...."  2>dbg.log
 $ bzip2 dbg.log

please?

Comment 6 j_greenhouse 2006-10-07 20:43:39 UTC
Created attachment 74247 [details]
GST_DEBUG=*:5 gst-launch-0.10 playbin uri="smb://finalbeta@192....

finalbeta@finalbeta-laptop:~$ gst-launch-0.10 playbin uri="smb://finalbeta@192.168.20.2/finalbeta/hdb5/Series/Dark Angel/Season1/S1 - E01 - Pilot.avi"
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
ERROR: from element /playbin0/source: Could not read from resource.
Additional debug info:
gstgnomevfssrc.c(692): gst_gnome_vfs_src_create (): /playbin0/source:
Failed to read data: Internal error
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
FREEING pipeline ...


Attached the output from :

finalbeta@finalbeta-laptop:~$ export GST_DEBUG_NO_COLOR=1
finalbeta@finalbeta-laptop:~$ GST_DEBUG=*:5 gst-launch-0.10 playbin uri="smb://finalbeta@192.168.20.2/finalbeta/hdb5/Series/Dark Angel/Season1/S1 - E01 - Pilot.avi" 2>dbg.log
ERROR: from element /playbin0/source: Could not read from resource.
Additional debug info:
gstgnomevfssrc.c(692): gst_gnome_vfs_src_create (): /playbin0/source:
Failed to read data: Internal error
finalbeta@finalbeta-laptop:~$ bzip2 dbg.log
Comment 7 Greg Michalec 2006-10-14 21:12:31 UTC
Created attachment 74721 [details]
debug info from gst-launch

Here's another debug log, in case this helps. Please let me know if there's anything else that I can do to help debug this - It'd be a shame if this didn't get fixed in time for Ubuntu Edgy. 

greg@lappy486:~$ export GST_DEBUG_NO_COLOR=1
greg@lappy486:~$ GST_DEBUG=*:5 gst-launch-0.10 playbin uri="smb://nopants/drop/test.avi" 2>gst-debug.log
ERROR: from element /playbin0/source: Could not read from resource.
Additional debug info:
gstgnomevfssrc.c(692): gst_gnome_vfs_src_create (): /playbin0/source:
Failed to read data: Internal error
greg@lappy486:~$ bzip2 gst-debug.log

Versions:
libgstreamer0.10-0 = 0.10.10-1ubuntu2
totem-gstreamer = 2.16.2-0ubuntu1
Comment 8 John Stowers 2006-10-18 10:38:15 UTC
Confirmed on a fresh ubuntu edgy install.
Comment 9 Bastien Nocera 2006-10-27 09:34:44 UTC
Same problem on FC6:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=212311
Comment 10 René Stadler 2006-10-28 10:14:29 UTC
gnomevfssrc relies on gnome-vfs to work correctly in the first place, but I have serious doubts that it does on Edgy.  It seems to have really bad problems with smb URIs.
Comment 11 René Stadler 2006-10-28 14:39:36 UTC
(In reply to comment #5)
> Odd, gnome_vfs_src_start() is called 4 times within 2 seconds, that doesn't
> look right.
>
... 

If I compare the debug output (with gnomevfssrc:5) on Dapper vs. Edgy, the only difference (aside from the error occuring) is that the Edgy side has two extra lines like:

 ... gst_gnome_vfs_src_check_get_range:<source> undecided about URI 'smb://...', let base class handle it
Comment 12 Tim-Philipp Müller 2006-10-28 15:20:48 UTC
> If I compare the debug output (with gnomevfssrc:5) on Dapper vs. Edgy, the only
> difference (aside from the error occuring) is that the Edgy side has two extra
> lines like:
> 
>  ... gst_gnome_vfs_src_check_get_range:<source> undecided about URI
> 'smb://...', let base class handle it

This shouldn't make a difference in this case (I think). At some point we introduced some code to white-list and black-list certain protocols/URIs for random access (get_range), to keep the base class from unnecessarily doing a start()/stop() cycle just to check whether random access is possible in this case. The 'undecided' code path should be the one that was always used before AFAIK.
Comment 13 René Stadler 2006-10-28 17:01:56 UTC
This regression is not caused by GStreamer.  I just built core and base plugins as shipped by Edgy on Dapper, which works like a charm.  I suggest looking at libsmbclient or gnome-vfs next.
Comment 14 René Stadler 2006-10-29 00:00:21 UTC
Here is a trivial python program, triggering the problem and not using GStreamer at all:

import sys, threading
h = gnomevfs.open (sys.argv[1], gnomevfs.OPEN_READ)
class T (threading.Thread):
    def run (self):
        h.read (4096)
        print "Success!"
t = T ()
t.start ()
t.join ()

Calling this with a smb:// URI raises "InternalError: Internal error" on read.  These are basically the steps that GStreamer's gnomevfssrc performs (leaving out getting of the file info and the no-op seek).  In gnomevfssrc, the vfs open is done in the "start" vfunc, which is called from the main thread.  Data is read in the "create" vfunc, called from the streaming thread.

If using gnome-vfs that way is supposed to work, the regression is there (it's just gnomevfssrc that triggers it).  Otherwise, gnomevfssrc was broken _all the time_, it's just that the new gnome-vfs shows it.
Comment 15 René Stadler 2006-10-30 15:34:51 UTC
Digging a bit in gnome-vfs shows that the internal error is generated in daemon/daemon-connection.c:connection_handle_read (line 778).  The internal handle is not associated with the connection that the read () is coming through.  Apparently the client side starts another connection to the daemon for the read () because it is done in another thread.

SMB is the only affected method because it is the only one that is run in the daemon at all (using the [daemon]-option in the module configuration).

I need to investigate further to find out if this is really supposed to be like that, meaning applications are supposed to call vfs functions only from one thread (and it only worked using bonobo by chance).  Otherwise, it is a regression introduced with replacing bonobo usage by DBus.  In that case, either the client side should reuse the connection for other threads or the daemon has to try to look at other connections if the handle is not found.
Comment 16 Sebastien Bacher 2006-10-31 15:10:35 UTC
that looks like the same issue than bug #351322
Comment 17 René Stadler 2006-10-31 17:17:22 UTC
A GnomeVFS(Method)Handle given out for the daemon method is only useable in the thread that created it.  This seems to be the whole problem, I'm pretty confident that this is unintended.  I think it makes sense to change the summary to reflect that (sth. like "Daemon method handles only useable in one thread").

Bug #351322 looks indeed like a duplicate (although I have no explanation for ftp failing).  This bug tells me that the issue is known since even longer.  Is there any reason the bugs are still in the UNCONFIRMED state?
Comment 18 Tino Meinen 2006-10-31 19:02:27 UTC
As I mentioned in bug #351322, downgrading gnome-vfs back from a 2.16.x to a
2.14.x version solved the problem. (well at least for me it did). 

I can play mp3, ogg, wav.
I haven't tried avi or other video-formats but I'm convinced they'll play fine
as well.
Comment 19 René Stadler 2006-11-03 22:33:57 UTC
Looks like this also causes Ubuntu bug
  https://launchpad.net/distros/ubuntu/+source/nautilus/+bug/67289
  ([Nautilus] SMB network browse failing [in Edgy])

While experimenting with possible solutions, I found that the problem stated in above downstream bug also went away.

Tino: Downgrading to 2.14 works, as the bug was introduced by the migration to DBus.
Comment 20 Sebastien Bacher 2006-11-03 23:09:34 UTC
a patch has been commited to the gnome-vfs CVS for the smb browser bug
Comment 21 René Stadler 2006-11-03 23:30:24 UTC
Indeed, it's supposed to be fixed on 2006-11-02:

        Allow operations on file handles that were created in another
        DaemonConnection. This can happen if another thread in the client
        than the one that called open does an operation.

Unfortunately, it does not work as advertised.  While it fixes the problem that Nautilus triggers, the issue outlined on this bug persists (the simple test program from comment #14, which replicates GStreamer's usage of gnome-vfs, still fails).
Comment 22 David Klotz 2006-11-23 14:06:37 UTC
This is pretty serious, since it seems to break streaming media playback on all remote files accessed through gnome-vfs. I also think #351322 is describing the same issue as this bug.
Comment 23 Mikko Ohtamaa 2007-04-29 14:47:56 UTC
Confirmed with Ubuntu Feisty.

Possible workaround: Use another music player. Rhytmbox seems to read SMB fine.
Comment 24 Bastien Nocera 2008-06-21 12:39:29 UTC
*** Bug 536949 has been marked as a duplicate of this bug. ***
Comment 25 Josselin Mouette 2008-07-22 11:37:56 UTC
The original reporter of http://bugs.debian.org/484703 claims this is fixed now, maybe that’s gst-plugins-base 0.10.20. Is it still happening for other people?
Comment 26 Heidi 2009-10-16 19:57:47 UTC
Hi, I just downloaded Ubuntu and I'm a previous Windows User. I am having problems with this issue and all that you've said is greek to me. Is there a certain attachment or plugin I need to resolve this issue? I'd like to be able to resolve this in the next few days. Thanks much! :)
Comment 27 Mikko Ohtamaa 2009-10-17 12:22:33 UTC
Hi Heidi,

This is a bug tracker for persons with insight about the issue.

If you need help please try

http://www.ubuntuforums.org

https://answers.launchpad.net/ubuntu
Comment 28 André Klapper 2018-08-17 13:50:58 UTC
gnome-vfs got deprecated in 2008.

gnome-vfs is not under active development anymore and had its last code changes
in 2011. Its codebase has been archived:
https://gitlab.gnome.org/Archive/gnome-vfs/commits/master

gio (in glib) and gvfs are its successors. See https://developer.gnome.org/gio/stable/ch33.html and https://people.gnome.org/~gicmo/gio-migration-guide/ for porting info.

Closing this report as WONTFIX as part of Bugzilla Housekeeping to reflect
reality. Feel free to open a task in GNOME Gitlab if the issue described in this task still applies to a recent + supported version of glib/gio/gvfs. Thanks!