[linux-cifs-client] CIFS mounted share: scandir returns incomplete
list
Sam Liddicott
sam at liddicott.com
Mon Sep 1 08:44:03 GMT 2008
* Hervé Fache wrote, On 01/09/08 08:43:
> In my case there are 677 files in the DOS file name format in that
> directory...
I think the problem shows up when more than once SMB packet is used to
contain the responses, it may occur on a smaller number of files,
depending on the negotiated max-xmit.
>
> Could you let me know how to log packets for this machine ('abrolhos')
> and protocol? I could leave the backup server logging all the time
> until the problem happens again and send you the relevant log when it
> does then...
something like: tcpdump -n -i eth0 -w dump.pcap -s 1500 port 445
but if you can run wireshark directly on the machine, or a machine on
that switch segment you can use a capture filter like:
host SERVER.IP and port 445
Once you have a capture you can open it with wireshark and use a display
filter:
smb and (smb.trans2.cmd == 0x1 or smb.trans2.cmd == 0x2)
and then export the filtered packets.
>
> Also, isn't there a way maybe to send the number of entries as read on
> the CIFS server so we can at least detect the inconsistency? Or does
> it break the protocol?
The number of returned entries is part of the response in the first
nttrans response packet.
Somehow the re-combined nttrans response isn't correctly read; wireshark
doesn't seem to manage to properly re-constitute nttrans responses either.
Sam
>
> Hervé
>
> 2008/8/31 Sam Liddicott <sam at liddicott.com <mailto:sam at liddicott.com>>
>
> I've noticed similar behavior on samba4 with vfs-cifs. By
> modifying the request to reduce the number of entries that
> find-first or find-next require I can make the problem "go away".
>
> I think the problem is related to the encoding or decoding of
> multi-part nttrans requests.
>
> I believe that Stefan Metzemacher is aware of alignment issues in
> the packing of large nttrans responses; your experience suggest a
> problem also in unpacking large response.
>
> I've been to busy to follow this up, having to make do with the
> workaround I mention, but hope to spend time on it the latter part
> of this week.
>
> However if you bring it up on irc when I'm online (samjam) and
> metze (I can't really speak for him) we may get somewhere. If you
> have some packet dumps that can be put through wireshark it may help.
>
> The problem occurs for me when there are more than a thousand
> longish filenames in a directory.
>
> sam
>
> ------------------------------------------------------------------------
> From: Hervé Fache <Herve at lucidia.net <mailto:Herve at lucidia.net>>
> Sent: 31 August 2008 13:51
> To: linux-cifs-client at lists.samba.org
> <mailto:linux-cifs-client at lists.samba.org>
> Subject: [linux-cifs-client] CIFS mounted share: scandir returns
> incomplete list
>
>
> Hello there,
>
> I have a backup system on my Linux server which mounts shares to
> back them up. To backup Windows shares, I use the CIFS mount type.
>
> Every so often (hadn't happened in a few weeks until today),
> scandir returns an incomplete list of contents, without any error
> code being returned. Also, errno is not set. The problem happens
> on a machine connected via WiFi (Intel 2200BG).
>
> If you have any clues or if I can turn on some debug to track the
> issue, please let me know.
>
> Also, if you have ideas on how I could work around this issue, all
> ideas are welcome!
> Hervé
>
>
-------------- next part --------------
HTML attachment scrubbed and removed
More information about the linux-cifs-client
mailing list