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 747718 - Unable to access location Failed to mount Windows share: Invalid argument
Unable to access location Failed to mount Windows share: Invalid argument
Status: RESOLVED NOTGNOME
Product: gvfs
Classification: Core
Component: smb backend
1.22.x
Other Linux
: Normal normal
: ---
Assigned To: gvfs-maint
gvfs-maint
https://bugs.launchpad.net/ubuntu/+so...
Depends on:
Blocks:
 
 
Reported: 2015-04-11 21:46 UTC by Christopher M. Penalver
Modified: 2015-05-13 21:44 UTC
See Also:
GNOME target: ---
GNOME version: 3.13/3.14


Attachments
log.txt (154.35 KB, text/plain)
2015-04-12 11:39 UTC, Christopher M. Penalver
Details
smb.conf (9.31 KB, text/plain)
2015-04-12 11:46 UTC, Christopher M. Penalver
Details
smb.conf (9.32 KB, text/plain)
2015-04-12 11:48 UTC, Christopher M. Penalver
Details
log.txt (162.00 KB, text/plain)
2015-05-07 10:37 UTC, Christopher M. Penalver
Details
log for a failed attempt (2.57 KB, text/plain)
2015-05-13 21:31 UTC, Ross Lagerwall
Details
log for a successful attempt (15.31 KB, text/plain)
2015-05-13 21:31 UTC, Ross Lagerwall
Details

Description Christopher M. Penalver 2015-04-11 21:46:55 UTC
Downstream report:
https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/1442972

When attempting to mount a Ubuntu samba share via Nautilus, it notes:
Unable to access location
Failed to mount Windows share: Invalid argument

However, mounting via smbclient works fine. Hence, this would be an issue with Nautilus/backend.
Comment 1 Cosimo Cecchi 2015-04-11 22:27:52 UTC
-> gvfs

Sounds like a problem with the gvfs samba backend.
Comment 2 Ross Lagerwall 2015-04-12 07:08:45 UTC
Thanks for the report.

Please run the following in a terminal:
pkill gvfs; GVFS_DEBUG=all GVFS_SMB_DEBUG=10 `find /usr/lib* -name 'gvfsd'` &> ~/log.txt

Then reproduce the problem and upload log.txt in your home directory so we can see a log of what is happening.

Please also upload your smb.conf.
Comment 3 Ross Lagerwall 2015-04-12 07:13:19 UTC
(In reply to Ross Lagerwall from comment #2)
> Please also upload your smb.conf.

Both client and server smb.conf, if possible.
Comment 4 Christopher M. Penalver 2015-04-12 11:39:57 UTC
Created attachment 301409 [details]
log.txt

Ross Lagerwall, thanks for your quick response.

I get one of the following outcomes when I test to this in order of likelihood most to least:
1) Nautilus crashes as per https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/1438216 .
2) When I click on the share folder (not a file) I want to access and ghex editor opens for some strange reason.
3) It works as expected.
4) The issue originally reported against.

The log file is when 1) occurred. I had 4) happen once in ~15 minutes of clicking nautilus, it crashing, re-opening, etc. and unfortunately, I did not have the logging up.
Comment 5 Christopher M. Penalver 2015-04-12 11:46:42 UTC
Created attachment 301410 [details]
smb.conf

Client file.
Comment 6 Christopher M. Penalver 2015-04-12 11:48:34 UTC
Created attachment 301411 [details]
smb.conf

Server file.
Comment 7 Ross Lagerwall 2015-04-12 13:44:16 UTC
(In reply to Christopher M. Penalver from comment #4)
> I get one of the following outcomes when I test to this in order of
> likelihood most to least:
> 1) Nautilus crashes as per
> https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/1438216 .
> 2) When I click on the share folder (not a file) I want to access and ghex
> editor opens for some strange reason.
> 3) It works as expected.
> 4) The issue originally reported against.
> 
> The log file is when 1) occurred. I had 4) happen once in ~15 minutes of
> clicking nautilus, it crashing, re-opening, etc. and unfortunately, I did
> not have the logging up.

1) I presume this is a separate Nautilus bug (although the link seems dead).

2) No idea...

3) :-)

4) It sounds like the error is coming from the underlying Samba library, libsmbclient, but I need to see the logs to determine that. If you manage to capture the logs for this error, please upload it.

Thanks
Comment 8 Christopher M. Penalver 2015-05-06 22:55:17 UTC
Ross Lagerwall, please advise on how precisely one would capture such a log.
Comment 9 Ross Lagerwall 2015-05-07 05:47:32 UTC
Close all Nautilus windows.
Open a terminal (e.g. gnome-terminal).
Enter the following into the terminal as one line:
pkill gvfs; GVFS_DEBUG=all GVFS_SMB_DEBUG=10 /usr/lib/gvfs/gvfsd &> ~/log.txt
Then try and reproduce the "Invalid argument" problem by opening Nautilus, etc.

You should find a log file in your home directory, log.txt, and upload it here.

Thanks
Comment 10 Christopher M. Penalver 2015-05-07 10:37:16 UTC
Created attachment 303029 [details]
log.txt

Ross Lagerwall, please see attached. I was able to connect twice successively after running the command, and then it failed the third time.
Comment 11 Ross Lagerwall 2015-05-13 21:31:31 UTC
Created attachment 303334 [details]
log for a failed attempt
Comment 12 Ross Lagerwall 2015-05-13 21:31:49 UTC
Created attachment 303335 [details]
log for a successful attempt
Comment 13 Ross Lagerwall 2015-05-13 21:44:23 UTC
For a successful connection, the Samba library looks up the name:
parse_nmb: packet id = 14196
nmb packet from 192.168.1.15(35072) header: id=14196 opcode=Query(0) response=Yes
    header: flags: bcast=No rec_avail=Yes rec_des=Yes trunc=No auth=Yes
    header: rcode=0 qdcount=0 ancount=1 nscount=0 arcount=0
    answers: nmb_name=PC<20> rr_type=32 rr_class=1 ttl=259200
    answers   0 char ......   hex 0000C0A8010F
Got a positive name query response from 192.168.1.15 ( 192.168.1.15 )
remove_duplicate_addrs2: looking for duplicate address/port pairs
namecache_store: storing 1 address for pc#20: 192.168.1.15
Adding cache entry with key=[NBT/PC#20] and timeout=[Thu May  7 05:43:56 AM 2015 CDT] (660 seconds ahead)
internal_resolve_name: returning 1 addresses: 192.168.1.15:0 
Connecting to 192.168.1.15 at port 445

For a failed connection, the Samba library seems to get EBADF on a file descriptor and gets an error:
samba_tevent: EPOLL_CTL_DEL EBADF for fde[0x7f97b000c6f0] mpx_fde[(nil)] fd[12] - disabling
map_errno_from_nt_status: 32 bit codes: code=c0000001
### SMB: do_mount - [smb://pc/share; 0] res = -1, cancelled = 0, errno = [22] 'Invalid argument' 
### SMB: do_mount - (errno != EPERM && errno != EACCES), cancelled = 0, breaking


This seems to be a bug in the Samba library. I've opened https://bugzilla.samba.org/show_bug.cgi?id=11274 for it.

Thanks