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 741471 - gvfs-mount, Error creating proxy: The connection is closed (g-io-error-quark, 18)
gvfs-mount, Error creating proxy: The connection is closed (g-io-error-quark,...
Status: RESOLVED NOTABUG
Product: gvfs
Classification: Core
Component: general
1.22.x
Other Linux
: Normal normal
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2014-12-13 06:58 UTC by Chris Murphy
Modified: 2015-01-20 22:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
strace (59.57 KB, text/plain)
2014-12-13 06:58 UTC, Chris Murphy
Details
valgrind (57.65 KB, application/x-gzip)
2014-12-13 07:01 UTC, Chris Murphy
Details

Description Chris Murphy 2014-12-13 06:58:08 UTC
As root user, gvfs-mount fails.

[root@f21m ~]# gvfs-mount -l
Error creating proxy: The connection is closed (g-io-error-quark, 18)
Error creating proxy: The connection is closed (g-io-error-quark, 18)
Error creating proxy: The connection is closed (g-io-error-quark, 18)
Error creating proxy: The connection is closed (g-io-error-quark, 18)

Works with a regular user (in group wheel, but without sudo).

[chris@f21m ~]$ gvfs-mount -l
Drive(0): Samsung SSD 840 EVO 250GB
  Type: GProxyDrive (GProxyVolumeMonitorUDisks2)
Drive(1): MATSHITADVD-R   UJ-8A8
  Type: GProxyDrive (GProxyVolumeMonitorUDisks2)
Drive(2): SD16G
  Type: GProxyDrive (GProxyVolumeMonitorUDisks2)


Seems like it should work in any case.
Comment 1 Chris Murphy 2014-12-13 06:58:40 UTC
Created attachment 292653 [details]
strace
Comment 2 Chris Murphy 2014-12-13 07:01:47 UTC
Created attachment 292654 [details]
valgrind
Comment 3 Ross Lagerwall 2014-12-13 13:39:42 UTC
Running gvfs as the root user like this is not supported because a proper session is needed for dbus, etc.

See "Running applications under root" at https://wiki.gnome.org/Projects/gvfs/doc

Thanks
Comment 4 Ross Lagerwall 2014-12-15 16:34:41 UTC
As noted above, running gvfs as root during a normal session is not supported, however, I don't think the error message is correct. From https://bugzilla.gnome.org/show_bug.cgi?id=708786#c18 is there a segfault in the logs? Are you running the entire session as root?
Comment 5 Tomas Bzatek 2014-12-15 16:47:40 UTC
The crash is on the other side of the bus, i.e. debugging gvfs-mount is pointless. dmesg could show you any crashers or e.g. abrt can catch them. That way you'd discover names of the crashing processes and start debugging.
Comment 6 Chris Murphy 2014-12-15 19:11:08 UTC
(In reply to comment #4)
There's no segfault in the logs, the gnome-shell session is non-root user (who happens to be in group wheel). This is how to reproduce:
1. Boot
2. Login (as an admin user, haven't tested with non-admin)
3. Launch Terminal
4. su
5. gfvs-mount -li
Error creating proxy: The connection is closed (g-io-error-quark, 18)

No kernel messages, nothing reported in journalctl -f (while running that as root, so I should be seeing all possible messages).
Comment 7 Ross Lagerwall 2014-12-15 21:19:45 UTC
The problem here is that "su" leaves the environment as is, so gvfs-mount tries to connect to the admin user's dbus and dbus itself closes the connection.
Using "su -" or sudo is cleaner because it uses a fresh environment which means that gvfs-mount does not try to connect to another user's dbus.

The default dbus policy is to disallow connections from other users although I think this can be changed.

Each "connection closed" line comes from trying to connect to each volume monitor, and failing.


I don't think there's much that can be done here, gvfs is simply reporting the error that it gets... there's no segfault or anything.