GNOME Bugzilla – Bug 747718
Unable to access location Failed to mount Windows share: Invalid argument
Last modified: 2015-05-13 21:44:23 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.
-> gvfs Sounds like a problem with the gvfs samba backend.
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.
(In reply to Ross Lagerwall from comment #2) > Please also upload your smb.conf. Both client and server smb.conf, if possible.
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.
Created attachment 301410 [details] smb.conf Client file.
Created attachment 301411 [details] smb.conf Server file.
(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
Ross Lagerwall, please advise on how precisely one would capture such a log.
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
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.
Created attachment 303334 [details] log for a failed attempt
Created attachment 303335 [details] log for a successful attempt
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