3 ms·
File delete bugs are (obviously) dangerous and sometimes have surprising causes. A long time ago, we had a Java web application that we'd deploy, and after a c
by nl 11y ago
File delete bugs are (obviously) dangerous and sometimes have surprising causes.
A long time ago, we had a Java web application that we'd deploy, and after a couple of days would stop working. We'd investigate and find it hadn't been deployed properly, yell at the person who installed it and go on our way.
Until the day data disappeared. That was weird.
Then we saw files physically disappearing while we had Windows Explorer open in front of us.
So it turned out that a library we were using was using exception handling for flow control, and in a limited set of circumstances this meant a file wasn't closed. That was fine. Usually.
Except that Java 1.4.1_01 had a bug on Windows where if you opened more than 2036 files open THE NEXT FILE THAT WAS OPENED WOULD BE DELETED[1].
I'll never forget the pain.
[1] http://bugs.java.com/bugdatabase/view_bug.do?bug_id=4779905 http://bugs.java.com/bugdatabase/view_bug.do?bug_id=4779905