Possible PhysFS bug?

Jeremy jswigart at gmail.com
Sat May 5 13:26:29 EDT 2007

I just posted this on gamedev.net before I noticed there was a mailing list,
so here's a copy.

I have created a dll addon to a game(Enemy Territory). Inside that addon I
use the PhysFS file system. Great library btw. It recently came to my
attention that there appears to be a bug in linux with PhysFS.

Here's a rundown of how it works.

The game loads the dll newly every map change. Inside my dll I am mounting 3
folders for use in my file system. During unloading of the dll I call
PHYSFS_deinit, which should release all mounted assets, I have verified this
is all getting called as expected.

The problem is that every time the game re-loads the dll, despite the
previous load being PHYSFS_deinit'ed, it doesn't seem to free the handle to
those 3 folders. the lsof command shows handles building up and building up,
until some of our users recently started reporting an error with too many
files open after running for several days.

This seems like a PhysFS bug, as I would expect PHYSFS_deinit to free those
handles, as its documentation suggests as well. Anyone have any ideas of how
to fix this?

Another interesting thing, though currently I file this under differences in
the file system. If I run process explorer for the same process in windows,
those 3 folders don't show up under the handles for the process, so I'm sort
of assuming maybe the mounting process works differently between windows and

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://icculus.org/pipermail/physfs/attachments/20070505/d0271206/attachment.htm>

More information about the physfs mailing list