smbfs is broken in head and stable/10

Hi.
I recently tried 10-ALPHA5 and found smbfs is broken.
After some builds and tests in VirtualBox, I could figure out it started broken until r255138 in head, and not fixed. (Also in recently branched stable/10)

After above commit, volumes mounted with smbfs is quite unstable in large directory.
(Mostly OK for small directory containing a few files and directories, but directories containing about 100 files and some directories, even ls does not shows its contents properly, accidentally traverses to subdirectories and drop many files):(

Reverting r255138 fixes the problem, but alternatively, it seems that applying attached diff mostly fixes the problem, too.
(Not mesasured but I feel the latter slower, but original 5 * hz should be 5 seconds)

Can someone confirm and send-pr? I currently have no disclosable email address.
 

Attachments

  • smb_trantcp.c.diff
    564 bytes · Views: 221
Posted, and registered as kern/182963.
As the email address I could disclose is regularly filled with SPAMs, replies there from non-white listed address should be surely missed.:(
 
No advance for kern/182963 until now. Can it be fixed in upcoming 10-RELEASE?
I read related sources a bit further, and confirmed that reverting r255138 is not needed.
My diff for sys/netsmb/smb_trantcp.c (attached in my first post) is sufficient to fix the issue. Without this, the timeout value should be too small (for sbintime_t type, time in seconds is stored in upper 32bits of 64bits and 5*tz should be usually too small).

By the way, another PR misc/183153 for smbfs is filed by Dominic Fandrey (I already mentioned in my forget-me-nots page).
This issue has another fix, setting
Code:
WITH_LIBICONV_COMPAT=YES
in /etc/src.cof and rebuild world. I think this should be default and opt-out if needed, as at least mount_smbfs in base requires libiconv.so (either base or converters/libiconv) if -E option is set.
Please note that I myself did NOT confirmed Dominic's patch, as I already have base libiconv.so installed (would need one more VM for clean testing).
 
My patch was committed to head as r257841, but MFC schedule is not shown in commit message.
Actually, it is needed for 10-RELEASE, too.
 
I confirm that FreeBSD 10.1-RELEASE-p5 still have a bug with mount_smbfs. any news about this ?

with FreeBSD 8.4-RELEASE-p23 (works perfectly)
Code:
root@hostA:/ # mount_smbfs -I 192.168.1.1 //guest@192.168.1.1/nas /mnt/nas
root@HostA:/ # ls /mnt/nas/
.DS_Store  audio.mp3
letter.pdf
root@HostA:/ #
with FreeBSD 10.1-RELEASE-p5 (not)
Code:
root@HostB:/ # mount_smbfs -I 192.168.1.1 //guest@192.168.1.1/nas /mnt/nas
root@HostB:/ # ls /mnt/nas/
root@HostB:/ #
root@HostB:/ # cd /mnt/nas/
root@HostB:/mnt/nas # mkdir tmp
mkdir: .: No such file or directory
root@HostB:/mnt/nas #
 
Well I don't know maybe I think that is a different issue, the problem is that mount_smbfs does not work, and works on my FreeBSD 8.4. Maybe it's broken again.
 
Looks like I have same problem. Mounts without errors but does not work

Code:
[root@localhost /mnt]# mount_smbfs -I 192.168.1.1 //dian@192.168.1.1/new /mnt/test
Password:
[root@localhost /mnt/test]# df -h
Filesystem  Size  Used  Avail Capacity  Mounted on
/dev/da0p2  222G  58G  146G  28%  /
devfs  1.0K  1.0K  0B  100%  /dev
//DIAN@192.168.1.1/NEW  300G  261G  39G  87%  /mnt/test
[root@localhost /mnt]# cd /mnt/test/
[root@localhost /mnt/test]# ls
[root@localhost /mnt/test]# mkdir 1
mkdir: .: No such file or directory
[root@localhost /mnt/test]# uname -a
FreeBSD localhost 10.2-RELEASE FreeBSD 10.2-RELEASE #0 r286666: Wed Aug 12 15:26:37 UTC 2015  root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
 
Back
Top