At 03:36 AM 2/25/2008, sam wrote:
>hi all
>links to similar problems:
> > bug (+fix) in getdents + readdir
> > o We're not sure what the Linux kernel intended to place in this field,
> > but our experience shows that on "real" file systems (that actually
> > reside on some disk) the offset seems to be a simple (not necessarily
> > continuous) counter: e.g. first entry may have d_off=1, second: d_off=2,
> > third: d_off=4096, fourth=d_off=4097 etc. We conjecture this is the
> > serial of the dirent record within the directory (and so, this is indeed
> > the "offset", but counted in records out of which some were already
> > removed).

> > - In such an "overflow" situation, getdents() tries to lseek (the
> > directory-fd) to the end of the last-legal-dirent that getdents()
> > has successfully read.
> > This offset is supposedly held by the local variable `last_offset'.
> > But, since `last_offset' is assigned with `d_off' on each iteration,
> > and since as mentioned above `d_off' usually holds an incorrect value,
> > the lseek is not performed to the correct place.
> > getdents() then returns the number of bytes successfully read.

I believe I have fixed this problem. I used a newer glibc version,
extracted it via cpio/rpm2cpio and it fixes it. It seems the version
of glibc that is installed with the fc6 port might have some
regression issues, I don't have a free machine to test my theory out.
I don't track the glibc changes, so it's rather difficult to say.
However, I think this change might have something to do with
(fixing?) the issue:

[root@swamp /usr/servers]# pkg_info|grep linux
linux_base-fc6-6_5 Base set of packages needed in Linux mode (for i386/amd64)

bash-3.1# uname -a
Linux swamp 2.6.16 FreeBSD 7.0-STABLE #2: Fri Feb 29 02:42:04 CST
2008 i686 i686 i386 GNU/Linux

bash-3.1# ./hlds_run -game cstrike +ip localhost -port 29999 +exec
server.cfg +map de_dust2
Auto detecting CPU
Using Pentium II Optimised binary.
Auto-restarting the server on crash

Console initialized.
scandir failed:/usr/servers/1.6/./valve/SAVE
scandir failed:/usr/servers/1.6/./platform/SAVE
Protocol version 47
Exe version (cstrike)
Exe build: 20:02:49 Oct 24 2006 (3651)
STEAM Auth Server
couldn't exec language.cfg
couldn't exec listip.cfg
couldn't exec banned.cfg
Server IP address
scandir failed:/usr/servers/1.6/./valve/SAVE
scandir failed:/usr/servers/1.6/./platform/SAVE
net.cpp (926) : Assertion Failed: 0 == iRet
net.cpp (928) : Assertion Failed: 0 == iRet

couldn't exec listip.cfg
couldn't exec banned.cfg
Adding master server
Adding master server
Connection to Steam servers successful.
VAC secure mode is activated.
hostname: Counter-Strike 1.6 Server
version : 47/ 3651 secure
tcp/ip :
map : de_dust2 at: 0 x, 0 y, 0 z
players : 0 active (6 max)

Anyway, here are some very brief instructions on how i fixed it:

"cd /compat/linux && fetch"
Then you do a simple "rpm2cpio glibc-2.7.90-7.i386.rpm | cpio -idvu"


_______________________________________________ mailing list
To unsubscribe, send any mail to ""