Shirish Pargaonkar
2008-Jun-04 18:36 UTC
[Samba] multiple smb commands (some non AndX) in one packet
Does samba server handle multiple smb commands (not necessarily andx commands) within one packet? If a client were to send commands such as 0x2f, 0x32, 0x32 in one packet instead of three separate packets, does samba server handle it i.e. respond to each of the three requests?
Jeremy Allison
2008-Jun-04 18:42 UTC
[Samba] multiple smb commands (some non AndX) in one packet
On Wed, Jun 04, 2008 at 01:36:20PM -0500, Shirish Pargaonkar wrote:> Does samba server handle multiple smb commands (not necessarily andx commands) > within one packet? If a client were to send commands such as 0x2f, 0x32, 0x32 > in one packet instead of three separate packets, does samba server > handle it i.e. > respond to each of the three requests?Yes, we should do that. Of course there are earlier bugs in the implementation but I believe as of our latest code (3.0.30 and 3.2rc's) we handle this correctly. Jeremy.
Shirish Pargaonkar
2008-Jun-05 12:30 UTC
[Samba] multiple smb commands (some non AndX) in one packet
On Thu, Jun 5, 2008 at 1:34 AM, Volker Lendecke <Volker.Lendecke@sernet.de> wrote:> On Wed, Jun 04, 2008 at 03:28:31PM -0500, Shirish Pargaonkar wrote: >> cifs.ko. >> You mean 4-byte header FF 53 4D 42? >> In another recreate, tcp frame has two smb requests, >> close (0x4) and locking andx (0x24) each with this four byte header. > > Wait a second -- XP chokes on something that the Linux > cifsfs sends??? How can you reproduce this? > > Volker >Mounted a share and ran this command fsstress -d /mnt -l 0 -n 1000 -p 10 -r I also took out the code in connect.c where it sets send and receive buffer sizes of a socket to 200K and 140K respectively (thus letting tcp auto-tuning take care of socket buffer sizes). if ((*csocket)->sk->sk_sndbuf < (200 * 1024)) (*csocket)->sk->sk_sndbuf = 200 * 1024; if ((*csocket)->sk->sk_rcvbuf < (140 * 1024)) (*csocket)->sk->sk_rcvbuf = 140 * 1024; You will start getting messages like server not responding and No response to/for cmd
Volker Lendecke
2008-Jun-05 13:57 UTC
[Samba] multiple smb commands (some non AndX) in one packet
On Thu, Jun 05, 2008 at 07:29:49AM -0500, Shirish Pargaonkar wrote:> Mounted a share and ran this command > > fsstress -d /mnt -l 0 -n 1000 -p 10 -rgoogle points at quite a few sites when asking it for "fsstress". What particular tool is that? And, this is definitely a cifsfs bug. Volker -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://lists.samba.org/archive/samba/attachments/20080605/8221a0f2/attachment.bin
Shirish Pargaonkar
2008-Jun-05 15:09 UTC
[Samba] multiple smb commands (some non AndX) in one packet
On Thu, Jun 5, 2008 at 8:58 AM, Volker Lendecke <Volker.Lendecke@sernet.de> wrote:> On Thu, Jun 05, 2008 at 07:29:49AM -0500, Shirish Pargaonkar wrote: >> Mounted a share and ran this command >> >> fsstress -d /mnt -l 0 -n 1000 -p 10 -r > > google points at quite a few sites when asking it for > "fsstress". What particular tool is that? > > And, this is definitely a cifsfs bug. > > Volker >I downloaded ltp-full-20080131.tgz few months back and built it and using network/nfs/nfs_fsstress/fsstress. I just recreated the problem a while ago against XP server, this time there were single commands per tcp packet. So I think the problem is server at some point just does not respond to cifs client in time (for whatever reasons) for cifs client to decide to reconnect declaring server not responding. I suspect the same for samba server. In case of samba server, I had turned on log level to 3 to see whether any messages are logged by samba server as to why it is not responding to cifs client smb requests but found nothing significant in the log file that was generated.