pavlos
2020-May-09 07:38 UTC
[Samba] Win7 clients problem after upgrading samba file server to 4.12 on Arch
Hi Volker, Jermey, and the Community, To be clear: I didn't analyze your code, I don't know structures of Samba, definitely I am not a person to judge and blame anybody :) I am sure that there were reasons, you wanted to clarify some issues around controlling share mode flags. And it's rather everything OK with your code. Even more: most probably your change revealed a bug in Win7, that has been fixed by Microsoft in later Win editions. Because I have no problems when accessing my Samba shares from Win10 computer, android devices or other linux systems. My recommendation is as follows: after you double check your code, please make it user-configurable - I mean a configuration parameter dedicated to people using Win7-like versions in their networks, the parameter which by default uses your enhancements, but may be switched off to bypass your code in such special cases like mine. I will be more than happy to help you in testing any change you decide to apply. Kind regards, Pawel. sob., 9 maj 2020 o 07:15 Andrew Bartlett <abartlet at samba.org> napisa?(a):> G'Day Volker and Jermey, > > Can you take a look at Pavlos's analysis and see if you can work out > why he has been having trouble with Samba since this commit? > > Pavlos, > > That is an incredible effort, and so very, very much appreciated! > > Thanks, > > Andrew Bartlett > > On Sat, 2020-05-09 at 06:08 +0200, pavlos wrote: > > Hi All, > > > > It's already 6am at my side. After the whole night of bisecting, > compiling and testing I think I have nailed it: > > > > > fd61e550acec6e9924a71712eef739b58c7d68e8 is the first bad commit > > > commit fd61e550acec6e9924a71712eef739b58c7d68e8 > > > Author: Volker Lendecke <vl at samba.org> > > > Date: Mon Sep 16 16:16:40 2019 -0700 > > > > > > smbd: Don't always walk the share mode array in open_mode_check() > > > > > > share_mode_data->flags contains the "most restrictive" share mode > of > > > the whole array. This is maintained lazily: Whenever > set_share_mode() > > > is called, d->flags is updated if the new share mode got more > > > restrictive. It is not updated when a file is closed, as this would > > > mean we would have to walk the whole array, making sure that the > > > closed handle was indeed the only most restrictive one. Instead, we > > > walk the share mode array only when a conflict happens: Then we > need > > > to know "the truth" and recalculate it by walking the share mode > > > array. > > > > > > Signed-off-by: Volker Lendecke <vl at samba.org> > > > Reviewed-by: Jeremy Allison <jra at samba.org> > > > > > > Autobuild-User(master): Jeremy Allison <jra at samba.org> > > > Autobuild-Date(master): Wed Sep 18 00:07:13 UTC 2019 on > sn-devel-184 > > > > > > source3/smbd/open.c | 217 > ++++++++++++++++++++++++++++++++++++++++++++++++---- > > > 1 file changed, 200 insertions(+), 17 deletions(-) > > > > Why do I think so? > > Because: > > I did a reset my current Samba master - my last clone was about 10 hours > ago. > > It is version 4.13.0pre1-GIT-e907f002a7f > > Then I have carefuly edited the file 'source3/smbd/open.c' and withdrawn > all changes > > Saved, compiled, installed, started services, tested different scenarios > and it works PROPERLY. > > For the first time in any version greater that 4.11 > > Yes, it's magic :) > > > > Please, be so kind and check - everybody who suffers this bug, and, of > course, the author of this change - and let me know whether my night was > worth spending in front of my computer. > > > > Looking forward to hearing from you. > > Pawel. > > > > .. > > > > > > ?r., 6 maj 2020 o 00:06 pavlos <pavlos.audiofreak at gmail.com> napisa?(a): > > > Andrew, please forget about mu dumb question. > > > Nice tutorial here: https://flaviocopes.com/git-bisect/ > > > I know how to proceed and what is the 'git clean...' for. > > > > > > Will come back :) > > > Pawel > > > > > > wt., 5 maj 2020 o 23:43 pavlos <pavlos.audiofreak at gmail.com> > napisa?(a): > > > > 'git checkout' in your first sentence- please be more detailed. > > > > And please remember where I start - I am just after 'git clone' and > build of 4.13.x > > > > > > > > Pawel > > > > > > > > wt., 5 maj 2020 o 23:28 Andrew Bartlett <abartlet at samba.org> > napisa?(a): > > > > > On Tue, 2020-05-05 at 22:32 +0200, pavlos wrote: > > > > > > Hi Andrew et al, > > > > > > > > > > > > Now is the time to come back to my leisure... > > > > > > > > > > > > Preparing the environment to the 'git bisect' surgery: > > > > > > Got a clone of the last VM with 4.12.2 installed from > > > > > > https://download.samba.org/pub/samba/samba-latest.tar.gz > > > > > > Stopped smb/nmb services and uninstalled 'sudo make uninstall' > within > > > > > > the directory 4.12.2. > > > > > > Got the current master with 'git clone > > > > > > https://gitlab.com/samba-team/samba/' - it's version is > 4.13.0pre1. > > > > > > From inside the directory: './confugure', 'make' and 'sudo make > > > > > > install'. No issues. > > > > > > Started smb/nmb services. No issues, as all configuration was > adapted > > > > > > to different directories layout and missing packages installed > during > > > > > > previous attempt. > > > > > > # smbstatus --version > > > > > > Version 4.13.0pre1-GIT-f80c97cb8da > > > > > > Stubborn problems with multiple Win7 clients do persist, > > > > > > unfortunately. > > > > > > > > > > > > Now we have to move backwards till the last commit when it was > > > > > > working properly. > > > > > > We already know that 4.12.x is hopeless and we have to find last > > > > > > working commit within 4.11.x branch. > > > > > > For instance, the 4.11.3 - the last provided by Arch packagers - > was > > > > > > working. > > > > > > But there were many other patches published by samba, the > current one > > > > > > is 4.11.9. > > > > > > > > > > > > Would it be possible to perform 'git bisect' between different > > > > > > branches? > > > > > > > > > > Yes, it can do that, in the git checkout. Because of the different > > > > > branches it will do an extra at the point they diverge. > > > > > > > > > > > Please give me some instructions as I am new in this school :) > > > > > > > > > > git bisect good samba-4.11.2 > > > > > (say yes to starting the bisect) > > > > > git bisect bad samba-4.12.2 > > > > > > > > > > Then it will move to various points it needs to test, counting > down the > > > > > bisect revisions. > > > > > > > > > > Between each one, do a 'git clean -x -f -d && ./configure && make > -j && > > > > > sudo make install' > > > > > > > > > > Finally, first install ccache if you can, it will be much faster. > > > > > > > > > > Andrew Bartlett > > > > > > > > > > > Regards, Pawel. > > > > > > > > > > > > wt., 5 maj 2020 o 11:50 Andrew Bartlett <abartlet at samba.org> > > > > > > napisa?(a): > > > > > > > On Tue, 2020-05-05 at 11:08 +0200, pavlos wrote: > > > > > > > > My plans are as follows, step by step: > > > > > > > > - clone the VM, clean and build the newest from gitlab, I > can see > > > > > > > it > > > > > > > > is 4.13.0pre1 > > > > > > > > - clone the VM. clean and build the latest supported 4.11.8 > > > > > > > > - create a new fresh VM with another distro, not Arch or > Arch- > > > > > > > based, > > > > > > > > build the official 4.12.2 - to check/confirm that it is not > > > > > > > distro- > > > > > > > > related > > > > > > > > > > > > > > Thanks. Even if it is distro-related, the bisect between the > two > > > > > > > versions will be helpful. > > > > > > > > > > > > > > Andrew Bartlett > > > > > > > > > > > > > > > I will start playing in couple of hours, now I am at work... > > > > > > > > > > > > > > > > Pawel. > > > > > > > > > > > > > > > > wt., 5 maj 2020 o 03:33 Andrew Bartlett <abartlet at samba.org> > > > > > > > > napisa?(a): > > > > > > > > > On Tue, 2020-05-05 at 03:05 +0200, pavlos wrote: > > > > > > > > > > @Andrew > > > > > > > > > > Unfortunately I didn't make notes on exact time of errors > > > > > > > when > > > > > > > > > doing > > > > > > > > > > my tests... > > > > > > > > > > > > > > > > > > > > But, I've spend last couple of hours on building samba > from > > > > > > > > > master: > > > > > > > > > > Have made a clone of the virtual machine, with new name > and > > > > > > > > > network > > > > > > > > > > interface mac address, and a new dynamic IP assigned by > my > > > > > > > > > router. > > > > > > > > > > Uninstalled Arch packages: samba, smbclient and > cifs-tools > > > > > > > > > (depending > > > > > > > > > > on smbclient) > > > > > > > > > > As 'ala' downloaded > > > > > > > > > > https://download.samba.org/pub/samba/samba-latest.tar.gz > and > > > > > > > > > unpacked > > > > > > > > > > it, obtaining 'samba-4.12.2' directory > > > > > > > > > > > > > > > > > > Thanks. This gives you Samba 4.12.2. However our > development > > > > > > > > > branch, > > > > > > > > > master is newer. Could you try that? > > > > > > > > > > > > > > > > > > git clone https://gitlab.com/samba-team/samba/ > > > > > > > > > > > > > > > > > > That can be downloaded from > > > > > > > > > > > > > > > > > > > > > > https://gitlab.com/samba-team/samba/-/archive/master/samba-master.tar.bz2 > > > > > > > > > > > > > > > > > > but if you use git, then you can really help us with the > > > > > > > bisect. > > > > > > > > > > > > > > > > > > But the rest of your steps look good. > > > > > > > > > > > > > > > > > > The next step, assuming master still fails, is to do a > bisect. > > > > > > > > > http://webchick.net/node/99 > > > > > > > > > > > > > > > > > > You may need to run 'git clean -x -f -d' between steps. > > > > > > > > > > > > > > > > > > This will be slow, particularly as you can't automate it > (need > > > > > > > test > > > > > > > > > with the client), but it is a very good way to find what > the > > > > > > > issue > > > > > > > > > is. > > > > > > > > > > > > > > > > > > Thanks, > > > > > > > > > > > > > > > > > > Andrew Bartlett > > > > > > > > > > -- > Andrew Bartlett http://samba.org/~abartlet/ > Authentication Developer, Samba Team http://samba.org > Samba Developer, Catalyst IT > http://catalyst.net.nz/services/samba > > >
Rowland penny
2020-May-09 08:00 UTC
[Samba] Win7 clients problem after upgrading samba file server to 4.12 on Arch
On 09/05/2020 08:38, pavlos via samba wrote:> Hi Volker, Jermey, and the Community, > > To be clear: I didn't analyze your code, I don't know structures of Samba, > definitely I am not a person to judge and blame anybody :) > I am sure that there were reasons, you wanted to clarify some issues around > controlling share mode flags. And it's rather everything OK with your code. > > Even more: most probably your change revealed a bug in Win7, that has been > fixed by Microsoft in later Win editions. > Because I have no problems when accessing my Samba shares from Win10 > computer, android devices or other linux systems. > > My recommendation is as follows: after you double check your code, please > make it user-configurable - I mean a configuration parameter dedicated to > people using Win7-like versions in their networks, the parameter which by > default uses your enhancements, but may be switched off to bypass your code > in such special cases like mine. > > I will be more than happy to help you in testing any change you decide to > apply. > > Kind regards, > Pawel.I cannot see making it user configurable for Window 7 happening, mainly because Windows 7 is EOL and Windows wants you to upgrade. Not that this has anything to do with us, but do we really want to fix this, when, by your own admission, it is fixed in supported versions of Windows ? Rowland
Andrew Bartlett
2020-May-09 09:06 UTC
[Samba] Win7 clients problem after upgrading samba file server to 4.12 on Arch
On Sat, 2020-05-09 at 09:38 +0200, pavlos wrote:> Hi Volker, Jermey, and the Community, > > To be clear: I didn't analyze your code, I don't know structures of Samba, definitely I am not a person to judge and blame anybody :) > I am sure that there were reasons, you wanted to clarify some issues around controlling share mode flags. And it's rather everything OK with your code.G'Day Pavlos, You appear to have identified a regression. We take these very seriously, even if only exposed by older clients. You have done us an incredible service in identifying the faulty patch. It is much easier to fix what things once we know how they were broken. I notice Ralph has picked this up, which is awesome, and while I can't speak for his eventual patch, for something like this a smb.conf option or client OS detection isn't normally required, we are pretty good at just fixing it to always 'just work'. But none of this would even be a conversation without your diligent efforts, and I hope you can get a good sleep after such an exhausting chase. You have met the same standard a Samba developer would take, to bisect, then revert and prove the issue goes away. Don't doubt yourself! Thank you. Andrew Bartlett -- Andrew Bartlett http://samba.org/~abartlet/ Authentication Developer, Samba Team http://samba.org Samba Developer, Catalyst IT http://catalyst.net.nz/services/samba
pavlos
2020-May-09 12:38 UTC
[Samba] Win7 clients problem after upgrading samba file server to 4.12 on Arch
sob., 9 maj 2020 o 10:01 Rowland penny via samba <samba at lists.samba.org> napisa?(a):> I cannot see making it user configurable for Window 7 happening, mainly > because Windows 7 is EOL and Windows wants you to upgrade. Not that this > has anything to do with us, but do we really want to fix this, when, by > your own admission, it is fixed in supported versions of Windows ? > > Rowland >Thanks, Rowland. Of course, fixing that "once and done" is always the best. Please treat my suggestions of placing a config parameter in smb.conf as a backup solution, a workaround. Regarding Windows versions - I have only Win7 32- and 64-bits and Win10 64-bits available at home. Only Win7 - both architectures - are suffering because of this problem. Win10 as well as other operating systems work OK. In other posts and forums I have also found some issues around 2008 Server editions having troubles with Samba recently - they share the same code with Win7. I know that if this is a Windows bug - it will never be fixed in Win7 / Win2008. But there is a lot of hardware with Win7 embedded, with no upgrade path available. Why should I dispose a good and functioning equipment? Especially when it is not exposed to the Internet, working in private networks, where security vulnerability is not an issue at all?... Regards, Pawel
Reasonably Related Threads
- Win7 clients problem after upgrading samba file server to 4.12 on Arch
- Win7 clients problem after upgrading samba file server to 4.12 on Arch
- Win7 clients problem after upgrading samba file server to 4.12 on Arch
- Win7 clients problem after upgrading samba file server to 4.12 on Arch
- Win7 clients problem after upgrading samba file server to 4.12 on Arch