Is it possible for competing file access to cause deadlock in Java?
Posted
by BlairHippo
on Stack Overflow
See other posts from Stack Overflow
or by BlairHippo
Published on 2010-04-08T18:25:51Z
Indexed on
2010/04/08
18:43 UTC
Read the original article
Hit count: 394
I'm chasing a production bug that's intermittent enough to be a real bastich to diagnose properly but frequent enough to be a legitimate nuisance for our customers. While I'm waiting for it to happen again on a machine set to spam the logfile with trace output, I'm trying to come up with a theory on what it could be.
Is there any way for competing file read/writes to create what amounts to a deadlock condition? For instance, let's say I have Thread A that occasionally writes to config.xml, and Thread B that occasionally reads from it. Is there a set of circumstances that would cause Thread B to prevent Thread A from proceeding?
My thanks in advance to anybody who helps with this theoretical fishing expedition.
Edit: To answer Pyrolistical's questions: the code isn't using Filelock, and is running on a WinXP machine.
© Stack Overflow or respective owner