When server receives 2 simultaneous requests from different clients (different IP) to create same name directory in same share sometimes server responds to second client with weird error code STATUS_NOT_A_DIRECTORY. Pcap attached showing bad and good behavior Here is table to easy understand problem (it includes packet #s to easy much pcap): First Pair | Second Pair Client 1 | Client 2 | Client 3 | Client 4 ------------------------+------------------------+------------------------+------------------------ | |44 > TreeConnect ivan1 | 46 > TreeConnect ivan01 | | | |50 > TreeConnect ivan01 | | | | |53 > TreeConnect ivan1 55 < TreeConnect SUCCESS| | | 56 > Create | | | | |58 < TreeConnect SUCCESS| | |59 > Create | |61 < TreeConnect SUCCESS| | |62 > Create | | | | |64 < TreeConnect SUCCESS | | |65 > Create |67 < Create ERROR | | 70 < Create SUCCESS | | | | |76 < Create SUCCESS | | | |79 < Create SUCCESS Format: Packet# Direction Command [parameters/response code] Please note First Pair and second Pair are using different shares but order of commands is same except server responds to Client 2 Create File request faster with ERROR Test executed against FreeNAS box with Samba 4.1.8 inside
Created attachment 11396 [details] Shorted version of pcap Cannot upload full pcap. So here is a short version.
In short pcap version all packets shifted by 2 so here is new table. First Pair | Second Pair Client 1 | Client 2 | Client 3 | Client 4 ------------------------+------------------------+------------------------+------------------------ | |42 > TreeConnect ivan1 | 44 > TreeConnect ivan01 | | | |48 > TreeConnect ivan01 | | | | |51 > TreeConnect ivan1 53 < TreeConnect SUCCESS| | | 54 > Create | | | | |56 < TreeConnect SUCCESS| | |57 > Create | |59 < TreeConnect SUCCESS| | |60 > Create | | | | |62 < TreeConnect SUCCESS | | |63 > Create |65 < Create ERROR | | 68 < Create SUCCESS | | | | |74 < Create SUCCESS | | | |77 < Create SUCCESS
(In reply to Max (LoadDynamix) from comment #2) Can you get us a debug level 10 log of smbd together with a fresh network trace? Ideally, we would prefer a separate log per smbd process, for example set log file = /var/log/samba/log.smbd.%d
Sorry, I do not have idea how to access our FreeNAS and how to control samba there. Scenario is simple and should be easy to reproduce. If you will see problem with reproduction yourself I have attached test for our appliance (LoadDynamiX) which was used to catch this bug. Samba has our appliance in the lab so it'll be question to get access to our box and run the test. You can contact Jeremy Allison, Ira Cooper or Jose Rivera they should know where our box is.
Created attachment 11409 [details] LoadDynamiX test to reproduce problem
(In reply to Max (LoadDynamix) from comment #5) Hi! I'm surprised FreeNAS is so locked down that it won't even let you ssh into it. Thats bad. Can you contact your FreeNAS supplier for assistance how to get Samba logfiles out of the box? It might be trivial for you to reproduce, but I am not in the position to run a LoadDynamics box every day. Is LoadDynamics (formerly SwiftTest, right?) at SDC again? We could ask them to run this against a Samba box.
Max, I'm local to you. So if you want this looked at before SNIA SDC ping me and I can come visit and take a look. Cheers, Jeremy.
Volker, Jeremy, To be clear. This problem is not bothering us at all. We just found it and reported. Now about FreeNAS box from which problem was caught: This FreeNAS box used in out QA process. As I have mentioned before I do not have access to this FreeNAS. Out admin this weekend left for vacation for 2 weeks. I have asked him to do level 10 log when he was in office. He said no. I think he did not like to mess with this FreeNAS box before vacation. Any case I do not have access. So you have to find way to setup environment Samba or FreeNAS somewhere. I can help with our box setup. Jeremy, If you can bring some Samba/FreeNAS box with you then you are welcome to visit us any time. Just let me know when it convenient to you. Or if it can wait we can do tests during SDC Plugfest. Regards, Max
(In reply to Max (LoadDynamix) from comment #8) Max, I can certainly bring in a generic 'latest' Samba build on my Linux laptop, but can't guarantee it'll reproduce the problem. As SDC is only a few weeks away let's table this to the plugfest, and see if we can reproduce there. Cheers, Jeremy.
Works for me.
Created attachment 11456 [details] git-am fix for master
Created attachment 11459 [details] Updated git-am patch for master Adds Samba4 knownfail.
Created attachment 11464 [details] git-am fix for 4.3.next, 4.2.next Cherry-picked from master.
Reassigning to Karolin for inclusion in 4.3.next, 4.2.next.
(In reply to Jeremy Allison from comment #14) Pushed to autobuild-v4-[3|2]-test.
(In reply to Karolin Seeger from comment #15) Pushed to both branches. Closing out bug report. Thanks!