Weird samba issue on FreeBSD 11.1-R

Hi,

I got the weirdest thing here. Yesterday I updated my home server from 10.3-p7 to 11.1-R. Its an atom box, 8GB Ram and some ZFS FS. Its my server from a long time. Runs amd64 FreeBSD.

Then I have an Ubuntu box and virtualbox on it, where I use Windows 7 amd64. And here is the issue.

Just as I rebooted from 10.3-p7 to 11.1-R my Windows vm can't read a byte from samba shares. I can see all files, slow as never was. But if I try to copy, stalls and get error message.

I tried a notebook running Windows 7 amd64, all is fine. No VM here.

I got the idea that my issue was the VM and installed another Windows from scratch. Same issue on it.

As the FreeBSD server was too old, I figured it could be old packages. Updated samba to 4.6.6. Same problem.

I got no log messages, no issues all places I look for it. And see no one talking about this issue.

I begun to imagine something on networking that 11.1 has and 10.3 has not, or the other way around.

Can anyone tell any leads here? My Sunday is gone now and the problem is still there :(

thanks,

none
 
After you upgraded to 11.1, did you rebuild/reinstall all ports/packages?
 
Hi,

the problem was there just after the upgrade to 11.1-R. I then thought about reinstalling all the packages. But the machines that was not running on the Virtualbox had no issues.

Yesterday I got the samba package reinstalled, rebuilt from ports. The issue was still there.

Yet I get no issues on the notebook running windows on bare metal.

thanks,

none
 
After a major upgrade (from 10.x to 11.x for example) you need to rebuild/reinstall every port/package.
 
After a major upgrade (from 10.x to 11.x for example) you need to rebuild/reinstall every port/package.
Its done. And even before that was over, I tested.

I have a Raspberry Pi2 running Kodi and using smb to access files. That is working fine, and was when FreeBSD 11.1 had old ports.

I got to a dead end here :(

none
 
When you say you upgraded Samba, was it a major or minor upgrade?
Windows shares wouldn't work for me at first after my upgrade to Samba 4 due to not having "ntlm auth = yes" in my config.
 
When you say you upgraded Samba, was it a major or minor upgrade?
Windows shares wouldn't work for me at first after my upgrade to Samba 4 due to not having "ntlm auth = yes" in my config.

Well, do you have any auth using ntlm?

My security is user for this samba server, and even trying this line I got the same old error.

But other clients that are not on VirtualBox VM's do work. That's what makes me more lost about this.

Thanks for your input :)
 
Hi, some news,

I got and i386 netbook to work using 4.4 samba and FreeBSD hetchet 11.0-RELEASE-p1 FreeBSD 11.0-RELEASE-p1 #0 r306420: Thu Sep 29 03:40:55 UTC 2016 root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC i386. The vm could copy files from it.

Then I compiled the samba port on the Atom amd64 machine, same problem.
I got to know the amd64 machine has custom kernel conf, but mostly just pf stuff:

Code:
diff GENERIC FreeBSD-11-amd64-PF
19c19
< # $FreeBSD: releng/11.1/sys/amd64/conf/GENERIC 318763 2017-05-24 00:00:55Z jhb $
---
> # $FreeBSD: releng/11.0/sys/amd64/conf/GENERIC 302410 2016-07-08 00:22:14Z gjb $
22c22
< ident         GENERIC
---
> ident         FreeBSD-11-amd64-PF
88d87
< options       EARLY_AP_STARTUP
360a360,378
> 
> # pf
> 
> device pf
> device pflog
> device pfsync
> 
> options ALTQ
> options ALTQ_CBQ # Class Bases Queuing (CBQ)
> options ALTQ_RED # Random Early Detection (RED)
> options ALTQ_RIO # RED In/Out
> options ALTQ_HFSC # Hierarchical Packet Scheduler (HFSC)
> options ALTQ_PRIQ # Priority Queuing (PRIQ)
> 
> device carp
> 
> # device polling
> options DEVICE_POLLING

I just got all ports rebuilt after the upgrade to 11.1-R, so should I do it all again? No forget, just machines under Virtualbox suffer, all other work fine.

thanks,

none
 
I just got all ports rebuilt after the upgrade to 11.1-R, so should I do it all again?
For minor upgrades (10.2 -> 10.3 or 11.0 -> 11.1 for example) you typically don't require rebuilding/reinstalling all ports/packages. It can happen though as there's a chance there are some minor changes that would require a rebuild of a port that uses it. But as far as I know this isn't the case for 11.0 to 11.1. It doesn't hurt though, some people just enjoy watching compiler output :D
 
For minor upgrades (10.2 -> 10.3 or 11.0 -> 11.1 for example) you typically don't require rebuilding/reinstalling all ports/packages. It can happen though as there's a chance there are some minor changes that would require a rebuild of a port that uses it. But as far as I know this isn't the case for 11.0 to 11.1. It doesn't hurt though, some people just enjoy watching compiler output :D
as far as I like recompiling everything, I just do it when I have to. Ports are more painfull to do it, need to click "yes" several times, and some backups. But the AMD64 Atom machine the upgrade was from 10.3 to 11.1, so that was needed.

But what hurts the most is that just the VM windows clients suffer, others don't.

I will try to delete all ports and build them from scratch, like a freshly installed 11.1 box. I have no other box that could be my home server, this one must be able to do it.

thanks,

none
 
Hi again,

just here to inform that it is still a problem. I have two small file servers at home, one running 11.1 and other running 10.4. The second was updated to 11.1 early this week, and then my windows VM couldn't read a file from it, just in the first post. I don't know what to do here :(

Use FreeBSD 10.4 till its end and pray 11.x will fix this issue no one else knows, or look for another SO for file server.

Was a brand new machine, more powerful, more RAM, more CPU, and the same problem. No log activity though.

Running freebsd-update to 10.4 right now.
 
You said originally that you were able to browse the samba share on 11.1. Is that still the case? What is the error when you try to read from it? Is there a similar error when you try to write? Also, is there any error in the samba server logs?
Can you post your samba config?

For your reference, here is my config which includes all my global settings, and my most permissive share definition:
Code:
# Samba Configuration
#
#======================= Global Settings =====================================
[global]

   bind interfaces only = yes
   disable netbios = yes
   dns proxy = no
   encrypt passwords = yes
   hosts allow = 10.0.0.
   interfaces = 10.0.0.22/24
   log file = /var/log/samba4/%m.log
   max log size = 10
   ntlm auth = yes
   security = user
   server string = samba
   smb ports = 445
   time server = no
   workgroup = WORKGROUP

#============================ Share Definitions ==============================

[share]
hosts allow = 10.0.0., 10.0.1., 10.0.2
path = /data/share
public = yes
read only = no
available = yes
writeable = yes
browsable = yes
force user = share
force group = share
force directory mode = 2777
create mask = 0777
directory mask = 0777
guest ok = yes
hide files = /desktop.ini/RECYCLER/Thumbs.db/$RECYCLE.BIN/
 
metsuke,

You said originally that you were able to browse the samba share on 11.1. Is that still the case? What is the error when you try to read from it? Is there a similar error when you try to write? Also, is there any error in the samba server logs?

I can still browse, its a bit slow but I can. folders with larger number of folders are slower. large here is around 30.

The error is from windows, I tries to read and displays the file copy dialog, but all rates are zero, not a byte is copied. I get time out then.
I never tried to write, I may try when I get home later. and log files tell nothing usable (at least for me). I tried increasing verbose level, no good.

Can you post your samba config?

my smb4.conf:

Code:
#======================= Global Settings =====================================
[global]

# workgroup = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH
   workgroup = Apartnet

# server string is the equivalent of the NT Description field
   server string = The Dark Side of the Sun

# Security mode. Defines in which mode Samba will operate. Possible
# values are share, user, server, domain and ads. Most people will want
# user level security. See the Samba-HOWTO-Collection for details.
   security = user
#ntlm auth = yes


# this tells Samba to use a separate log file for each machine
# that connects
   log file = /var/log/samba4/log.%m
   log level = 2

# Put a capping on the size of the log files (in Kb).
   max log size = 50



# Backend to store user information in. New installations should
# use either tdbsam or ldapsam. smbpasswd is available for backwards
# compatibility. tdbsam requires no further configuration.
   passdb backend = tdbsam:/usr/local/etc/samba/passdb.tdb

# Configure Samba to use multiple interfaces
# If you have multiple network interfaces then you must list them
# here. See the man page for details.
;   interfaces = 192.168.12.2/24 192.168.13.2/24
   interfaces = 10.1.1.88
bind interfaces only = YES


# Browser Control Options:
# set local master to no if you don't want Samba to become a master
# browser on your network. Otherwise the normal election rules apply
   local master = no

# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names
# via DNS nslookups. The default is NO.
   dns proxy = no






#============================ Share Definitions ==============================
[homes]
   comment = Home Directories
   browseable = no
   writable = yes

[share]
    path = /zfsjbod
    comment = BJ-Share share
    valid users = matheus samba
    public = no
    writable = yes

[nope]
    path = /nope
    comment = Nope
    valid users = matheus samba
    public = no
    writable = yes

[no]
    path = /no
    comment = No
    valid users = matheus samba
    public = no
    writable = yes

[null]
    path = /mnt/null
    comment = Null
    valid users = matheus samba
    public = no
    writable = yes

;[FreeBSD-Wifi]
;    path = /none/FreeBSD/tftpboot
;    comment = FreeBSD Wifi Builds
;    valid users = matheus samba
;    public = no
;    writable = yes

;[FreeBSD-Raspberry]
;    path = /usr/raspi/svn/crochet.git/trunk/work
;    comment = FreeBSD Raspi Builds
;    valid users = matheus samba
;    public = no
;    writable = yes
 
I would try both using 'ntlm auth = yes' to employ the workaround, and also having a share that is very open to test, like the one in my example.
 
I would try both using 'ntlm auth = yes' to employ the workaround, and also having a share that is very open to test, like the one in my example.

even if I have no ntlm infrastructure?

As this is a home network, I just have a simple auth and that is enough.
 
I do not know whether this applies to your problem.

But on my (atm defunct) notebook I found that at some time the internet access rate appeared to go down more or less quickly after a while of surfing.

This appeared to happen particularly fast at sites that constantly open new connections etc. (liveuamap dot com is a particularly bad one. Some suspect it CIA related, for various reasons, not only because of their geographical neigborship. If you open that site with third party cookies enabled and without adblocker, your computer is permanently busy connecting dozens or hundreds of tracker sites. A few minutes of that was able to bog down the internet stack of the virtualbox permanently until I physically rebooted the notebook. Closing the browser or even restarting Vbox was not sufficient to "unblock" that thing...)

I remember that got noticeably better when I switched the virtualbox from, I think, NAT to bridged.
Just in case you didn't try such already...
 
For the record, I changed the VM to an i7 4770 running VirtualBox and the issue was solved, using the same FreeBSD 11.1-R amd64 and samba 4.x as server. Then I changed the OS on the initial desktop machine (Intel NUC i5) to Windows and used the same VM on it over VirtualBox and all fine. I just don't get it, but it is fine now.

thanks,

none
 
Back
Top