3 ms·
I remember crazy bug that happened in our system because of lots of files in one directory. We had a special directory for temporary files produced when genera
by ajuc 5y ago
I remember crazy bug that happened in our system because of lots of files in one directory.
We had a special directory for temporary files produced when generating labels for barcode printer, and as they were very small (and always caused problems) - we never removed them so we can check out later if something went wrong.
After a few years customer complained some barcodes doesn't print. The error message was "cannot create a file XYZ" or something similar.
I logged in, checked the disk usage (plenty of space), checked the privileges (correct), did a "touch random_file_name" in that directory - worked fine, copied a few files into this directory - still works fine. Then I did "touch XYZ" and it failed :) But the file XYZ didn't already existed in that directory.
I don't remember the exact case (I think it was problem with index growing too big and depending on filename it was assigned to different levels or sth similar). Or maybe it was a hash collision in the filesystem? I don't even remember what filesystem it was - probably reiserfs or ext3.
The solution was to remove files after printing them, obviously.