This happened to me a couple months ago; I screwed up a logrotate entry on some of our servers (thankfully, mostly in the dev dc) and ended up with log.txt.0, log.txt.0.0, log.txt.0.0.0.0, &c &c. If your CWD was the directory with those files, anything you did that called readdir just hung. I ended up having to write a tiny program that looped getdents, and was surprised at how poorly documented/integrated it was with the rest of the API.