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 722481 - gvfs smb problems on xstreamos / illumos based
gvfs smb problems on xstreamos / illumos based
Status: RESOLVED NOTABUG
Product: gvfs
Classification: Core
Component: smb backend
1.16.x
Other Solaris
: Normal critical
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2014-01-18 08:10 UTC by Gabriele Bulfon
Modified: 2014-01-23 20:16 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Gabriele Bulfon 2014-01-18 08:10:08 UTC
Hi,

we're experiencing problems with gnome-gvfs built from sources on our illumos based distro, XStreamOS Desktop.

We built 1.16.4, and sftp or ftp urls work fine, also integrated with keyring.
We've setup the component build to see smbclient and configure builds with samba enabled correctly.
But smb urls don't work.

If I try this:

dbus-launch gvfs-mount smb://gbulfon@pgbulfon/Users

this is what I receive:

(gvfs-mount:1256): GLib-GObject-WARNING **: Two different plugins tried to register 'GProxyDrive'.

(gvfs-mount:1256): GLib-GObject-CRITICAL **: g_type_add_interface_dynamic: assertion `G_TYPE_IS_INSTANTIATABLE (instance_type)' failed

(gvfs-mount:1256): GLib-GObject-WARNING **: Two different plugins tried to register 'GProxyMount'.

(gvfs-mount:1256): GLib-GObject-CRITICAL **: g_type_add_interface_dynamic: assertion `G_TYPE_IS_INSTANTIATABLE (instance_type)' failed

(gvfs-mount:1256): GLib-GObject-WARNING **: Two different plugins tried to register 'GProxyShadowMount'.

(gvfs-mount:1256): GLib-GObject-CRITICAL **: g_type_add_interface_dynamic: assertion `G_TYPE_IS_INSTANTIATABLE (instance_type)' failed

(gvfs-mount:1256): GLib-GObject-WARNING **: Two different plugins tried to register 'GProxyVolume'.

(gvfs-mount:1256): GLib-GObject-CRITICAL **: g_type_add_interface_dynamic: assertion `G_TYPE_IS_INSTANTIATABLE (instance_type)' failed

(gvfs-mount:1256): GLib-GObject-WARNING **: Two different plugins tried to register 'GProxyVolumeMonitor'.

(gvfs-mount:1256): GLib-GObject-WARNING **: Two different plugins tried to register 'GConfSettingsBackend'.

(gvfs-mount:1256): GLib-GIO-WARNING **: Tried to register an extension of the type (null) to extension point gsettings-backend. Expected type is GObject.

(gvfs-mount:1256): GLib-GObject-WARNING **: Two different plugins tried to register 'GDaemonVfs'.

(gvfs-mount:1256): GLib-GObject-WARNING **: Two different plugins tried to register 'GDaemonVolumeMonitor'.

(gvfs-mount:1256): GLib-GIO-WARNING **: Tried to register an extension of the type (null) to extension point gio-volume-monitor. Expected type is GVolumeMonitor.

(gvfs-mount:1256): GLib-GObject-WARNING **: cannot add interface type `GLoadableIcon' to type `GVfsIcon', since type `GVfsIcon' already conforms to interface

(gvfs-mount:1256): GLib-GIO-WARNING **: Tried to register an extension of the type (null) to extension point gio-vfs. Expected type is GVfs.

(gvfs-mount:1256): GLib-GObject-WARNING **: Two different plugins tried to register 'GVfsUriMapper'.

(gvfs-mount:1256): GLib-GObject-WARNING **: Two different plugins tried to register 'GVfsUriMapperSmb'.

(gvfs-mount:1256): GLib-GObject-WARNING **: Two different plugins tried to register 'GVfsUriMapperHttp'.

(gvfs-mount:1256): GLib-GObject-WARNING **: Two different plugins tried to register 'GVfsUriMapperAfp'.

(gvfs-mount:1256): GLib-GObject-WARNING **: invalid cast from `GDaemonVfs' to `<invalid>'

(gvfs-mount:1256
): GLib-GObject-WARNING **: invalid cast from `GDaemonVfs' to `<invalid>'

Error mounting location: No server specified for smb-server share

This also happens with an smb:/// URI.

I also tried with "gvfsd -r" with debug environment, but I never see any debug output.
I tried going back to older versions with no luck.
Anyone can help me how to solve this?
The error looks like it actually doesn't receive a correct URI.
Also, I can't say what all those WARNING are trying to tell me.

Please help! ;)
Gabriele.
Comment 1 Gabriele Bulfon 2014-01-20 18:22:48 UTC
I added some debugs of my own from the source code.
Looks like "try_mount" fails, with "server"=NULL and "share"=NULL.
I got the code write out the complete mount_spec:

smb-share:host=pgbulfon,user=gbulfon,prefix=0.000000Users0.000000gbulfon

....code is looking for "server", while mount_spec contains "host".
And what is that prefix???
Comment 2 Gabriele Bulfon 2014-01-23 12:17:54 UTC
I suspect that the problem arises because of this:

GLib-GObject-WARNING **: Two different plugins tried to
register 'GVfsUriMapperSmb'

so maybe a wrong object is taken to parse the URI?
How can this happen?

Also, I cannot find any way to run gvfsd and see its stderr.
Even running "/usr/lib/gvfsd -r", it just stays there with no message,
not even trying mount.

Please help me to find a reason for this!

Gabriele
Comment 3 Gabriele Bulfon 2014-01-23 12:23:40 UTC
For some reasons I don't know, the error trying mount changed:

Error mounting location: Invalid mount spec

and in fact this is what happens when server and share are NULL...

Is there any way to force glib-gobject to tell me who is trying to register
GVfsUriMapperSmb two times?
Comment 4 Tomas Bzatek 2014-01-23 13:14:21 UTC
(In reply to comment #0)
> (gvfs-mount:1256): GLib-GObject-WARNING **: Two different plugins tried to
> register 'GProxyDrive'.

This indicates a problem where duplicit gvfs modules are loaded. Check e.g. /usr/lib64/gio/modules and look for duplicates. I.e. a mixture of prefixes and installed libraries.
Comment 5 Ondrej Holy 2014-01-23 13:25:47 UTC
FYI: You could try environment variables (e.g. GVFS_DEBUG, GVFS_SMB_DEBUG) to print some useful debug info, see:
https://wiki.gnome.org/Projects/gvfs/doc
Comment 6 Gabriele Bulfon 2014-01-23 13:54:48 UTC
(In reply to comment #4)
> (In reply to comment #0)
> > (gvfs-mount:1256): GLib-GObject-WARNING **: Two different plugins tried to
> > register 'GProxyDrive'.
> 
> This indicates a problem where duplicit gvfs modules are loaded. Check e.g.
> /usr/lib64/gio/modules and look for duplicates. I.e. a mixture of prefixes and
> installed libraries.

Thanks Tomas,
I already investigated this.
At the moment, I'm still just using a 32 build, and this is what I have:

gbulfon@xstream:/usr/lib/gio/modules$ ls
libdconfsettings.so             libgsettingsgconfbackend.a      libgvfsdbus.so
libgioremote-volume-monitor.so  libgsettingsgconfbackend.so

gbulfon@xstream:/usr/lib/amd64/gio/modules$ ls
libdconfsettings.so

actually the fact that "-r" doesn't reveal any stderr, let me think that the library is actually instantiating more gvfsd instead of reusing them.
Once I get into the desktop, one gvfsd is already running (probably spawn by lxpanel or cairo-dock, or pcmanfm).
Running the cmd line mount shows those warnings, and then I get more gvfsd 
each time.
Comment 7 Gabriele Bulfon 2014-01-23 13:57:35 UTC
(In reply to comment #5)
> FYI: You could try environment variables (e.g. GVFS_DEBUG, GVFS_SMB_DEBUG) to
> print some useful debug info, see:
> https://wiki.gnome.org/Projects/gvfs/doc

Thanks Ondrej,

I tried also this, in many different ways, but no debug is ever output.
I believe the problem is really before smb is ever spwan.

The GVfsUriMapperSmb warning, let me think that the URI is actually paresed badly, and then sent to gvfsd with wrong prams (as for host instead of server, and that prefix containing double numbers!), so the gvfsd-smb is never even
launched.
Comment 8 Gabriele Bulfon 2014-01-23 15:03:03 UTC
What I also noticed is:

- I enter the desktop, and I have one gvfsd process, with parent=1
- I run /usr/lib/gvfsd -r, stays there, and the previous process is still there
- I run another /usr/lib/gvfsd -r, and the first one quit saying his name is taken
- When I run successive "dbus-launch gvfs-mount smb:...." I get one new gvfs process with parent=1

Maybe the problem is when gvfsd is spawned?
Dbus is not able to get the running instance and spawn another one?
How can I let the dbus service file run gvfsd with stderr on a file?
Comment 9 Tomas Bzatek 2014-01-23 15:11:42 UTC
(In reply to comment #8)
> - I enter the desktop, and I have one gvfsd process, with parent=1

What desktop? Does it start session bus itself? Check the UID of the process, there may be leftovers from login manager (gdm).

> - I run /usr/lib/gvfsd -r, stays there, and the previous process is still there

That should not happen if both processes are sharing the same session bus. Before doing this, check what's running on the bus, e.g. use d-feet.

> - When I run successive "dbus-launch gvfs-mount smb:...." I get one new gvfs
> process with parent=1

dbus-launch will start new session, isolated from others, available only to parents withing the same shell (the command it starts).
Comment 10 Ondrej Holy 2014-01-23 15:23:16 UTC
(In reply to comment #7)
> (In reply to comment #5)
> The GVfsUriMapperSmb warning, let me think that the URI is actually paresed
> badly, and then sent to gvfsd with wrong prams (as for host instead of server,
> and that prefix containing double numbers!), so the gvfsd-smb is never even
> launched.

You could try to run the daemon manually and show what happens:
e.g. GVFS_DEBUG=1 /usr/libexec/gvfsd-smb user=gbulfon server=pgbulfon share=Users
Comment 11 Gabriele Bulfon 2014-01-23 15:28:15 UTC
(In reply to comment #9)
> (In reply to comment #8)
> > - I enter the desktop, and I have one gvfsd process, with parent=1
> 
> What desktop? Does it start session bus itself? Check the UID of the process,
> there may be leftovers from login manager (gdm).

it's our own build of lxdm login manager, going on with lxde+cairo-dock+pcmanfm,
running on illumos kernel.
I checked that when not yet logged in, no gvfs process is running.
Once entered, one is spawn by some desktop component, and it has my uid,
but parent=1.

> 
> > - I run /usr/lib/gvfsd -r, stays there, and the previous process is still there
> 
> That should not happen if both processes are sharing the same session bus.
> Before doing this, check what's running on the bus, e.g. use d-feet.
> 

I'll check for d-feet

> > - When I run successive "dbus-launch gvfs-mount smb:...." I get one new gvfs
> > process with parent=1
> 
> dbus-launch will start new session, isolated from others, available only to
> parents withing the same shell (the command it starts).

Anyway, I believe we're going wrong direction, because other URIs work correctly (sftp, ftp, file), only the ones warned by glib-gobject end up with "Invalid spec", as if they not even can parse correctly.

Is there any way to check what glib is doing there? Who is registering twice?
Comment 12 Gabriele Bulfon 2014-01-23 15:36:31 UTC
(In reply to comment #10)
> (In reply to comment #7)
> > (In reply to comment #5)
> > The GVfsUriMapperSmb warning, let me think that the URI is actually paresed
> > badly, and then sent to gvfsd with wrong prams (as for host instead of server,
> > and that prefix containing double numbers!), so the gvfsd-smb is never even
> > launched.
> 
> You could try to run the daemon manually and show what happens:
> e.g. GVFS_DEBUG=1 /usr/libexec/gvfsd-smb user=gbulfon server=pgbulfon
> share=Users

This shows some SMB debug, trying to mount correctly, but then fails "Not owner" becuase it can't ask for a password.
This is not even reached when I do gvfs-mount, becasue parsing of the URI looks wrong. Look at this output I added in the source on "try_mount" from smb backend,
the mount_spec contains wrong keys:

smb-share:host=pgbulfon,user=gbulfon,prefix=0.000000Users

host, instead of server
prefix instead of share, and with numbers
Comment 13 Gabriele Bulfon 2014-01-23 20:14:41 UTC
Looks like I solved it :)

A wrong patch was in glib, adding an additional fixed "/usr/lib/gio/modules"
search path to the first build env GIO_MODULE_DIR.
This was thought for multi arch (like mine), but actually breaks the system:

- 64 binaries will also look in 32 dir, causing many warning logs
- 32 binaries will look twice in 32 dir, causing the problem I had!

I still can't browse the network, with another error, but smb URLS works great!
Solving the browse problem will not be hard ;)


Thanx guys!
Gabriele
Comment 14 Gabriele Bulfon 2014-01-23 20:15:44 UTC
I'll mark this as solved.
And it's not a gvfs problem.
Thanks again.

Gabriele.
Comment 15 Gabriele Bulfon 2014-01-23 20:16:39 UTC
Anyway, maybe there should be a way for gvfs to help debugging situations like this :)