Bug 1258 - Samba 3.0.2a and smbfs (2.4.21) sometimes missing files
Summary: Samba 3.0.2a and smbfs (2.4.21) sometimes missing files
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: smbclient (show other bugs)
Version: 3.0.2a
Hardware: All Linux
: P3 critical
Target Milestone: none
Assignee: Samba Bugzilla Account
QA Contact:
Depends on:
Reported: 2004-04-11 12:42 UTC by Pasi Sjöholm
Modified: 2004-09-15 05:58 UTC (History)
0 users

See Also:

Syslog messages for CIFS usage and machine HANG (66.98 KB, text/plain)
2004-05-12 06:05 UTC, Alastair Sherringham
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pasi Sjöholm 2004-04-11 12:42:21 UTC

I'm using the newest Samba 3.0.2a and smbfs which comes in 2.4.21 kernel.
Sometimes or actually always when I copy, rsync or even list files from a
share which resides on NT4 server all the files don't show up (only in
directories which have lots of files >1000 files..)

First I noticed this when I was rsyncing a "mirror" of this share to an
another machine and rsync was deleting some files which still existed in
the NT4-server. After some debugging I made a little test with 'ls -l
/mnt/point/manyfiles | wc -l' and these was the results (no one was using
the share at that time):


This is quite annoying bug. Same thing happens when using smbclient for
example: 'smbclient //$ -U username%password -c "ls
directory/*"|wc -l'

It's quite random which files are missing when doing directory listing. I
also tried to google problem down but nothing more than some random
questions about the same problem without a solution. So could we
investigate this problem more?
Comment 1 Alastair Sherringham 2004-05-11 08:25:27 UTC
Just like to say that we have this problem as well. Our application
loads images and tries to sort each sequence for selection and load.
When using a Samba server mounted under Linux (SMBFS), our file
browser cannot work out the sequences because the number of files
returned changes all the time. Our sequences are 2000 to 3000 (or
more) image files.


Samba 2.2.7
Samba 3.0.0
Samba 3.0.4 (downloaded/compiled 2004-05-10)

Linux kernel smbfs

Tested mounts to ;
Windows XP service pack 1
Windows 2000 service pack 3

Using smbmount from above samba versions.

Directory mounted (/mnt/demo/images) contains 3122 image files.
Doing a ;

while [ true ]; do
   ls -l /mnt/demo/images | wc -l
   sleep 1

returns inconsistent numbers of files e.g.


I have tried playing around with the "sockopt" option to smbmount but
could not get this to work properly.

So basically, we cannot really use SMBFS linux -> windows mounts.

However, CIFS seems to work properly - 1.0.2b on 2.4.25 kernel and
built in 2.6.5. A CIFS mount always returns the correct file listing
(3122 files in the above case).
Comment 2 Alastair Sherringham 2004-05-12 06:02:44 UTC
Addendum to my bug report above.

CIFS 1.0.2b does NOT work properly on linux kernel 2.4.25 for us.

test machine ;

2x Xeon P4 2.80 GHz
2 GB RAM (highmem on)

I downloaded and installed cifs 1.0.2b. I can mount and list files in a console
but if I use Nautilus to navigate to a CIFS mounted directory the whole machine
will lock up/hang (mouse locked,no ping). Our application also locks up the
whole machine navigating through these directories. Maybe thread related? Only
seems to happen if a GUI browser is used e.g. nautilus, our application (which
is multithreaded).

The share mounted is from Windows XP service pack 1.

However, CIFS CVS checkout today (2004-05-12) seems to work (so far) with
2.4.25. Kernel 2.6.5/2.6.6 also seems OK so far.

I turned on "cifsFYI" and "traceSMB" and attach the syslog output (if it helps -
I cannot decode much).
Comment 3 Alastair Sherringham 2004-05-12 06:05:38 UTC
Created attachment 508 [details]
Syslog messages for CIFS usage and machine HANG

Running on 2 separate days - marked where hang/lockup occurs.
Comment 4 Gerald (Jerry) Carter (dead mail address) 2004-09-15 05:58:07 UTC
for bugs with smbfs, you have to contact the 
maintainer directly via the lkml.  For bugs in 
the cifsvfs, please report them using the cifsvfs 
component in bugzilla.