4 ms·
This was my worst bug, in the JVM(!) back in 2002: https://www.artima.com/forums/flat.jsp?forum=121&thread=10119 https://www.artima.com/forums/flat.jsp?forum=12
by nl 4y ago
This was my worst bug, in the JVM(!) back in 2002: https://www.artima.com/forums/flat.jsp?forum=121&thread=10119 https://www.artima.com/forums/flat.jsp?forum=121&thread=1011...
> under JDK1.4.1 once 2036 files are open any subsequent opens will delete the file that was supposed to be opened.
Obviously this is bad.
It was worse to debug. "Opening files" includes opening Java class files or JARs, so we'd see a system with some class files or jars missing and spent ages trying to work out why deployment was failing.
Then I saw files class files disappear in front of me while I was using the system. That was one of the biggest WTF moments of my career. I assumed someone else was on the computer, then I assumed a virus, then hardware corruption.
It didn't occur to us to think the JVM would delete files instead of opening them for a long time.
Here's the reference in the Java bug database: https://bugs.java.com/bugdatabase/view_bug.do?bug_id=4779905 https://bugs.java.com/bugdatabase/view_bug.do?bug_id=4779905
- chasd00 4y agoGod the JVM deleting files on its own must have been surreal to figure out. I would have taken the rest of the day off haha
- nl 4y agoAnd worse, since it was only once 2036 files were open at once it would stop happening if file handles got closed it would stop happening!
- temp2022account 4y agoGarbage collection at its finest