This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

hash synchronization on linux


I've suspected a problem with the hash synchronization for some time now
and decided that I might be able to reproduce the problem with a unit
test, and think that I have stumbled onto something. 

I've attached two classes that can be run against gcc-3.1 and very
quickly deadlock. To make this happen you must rebuild with a changed
hash_entry table size of 2. I suspected a race with bucket access (heavy
lock chain) so reducing the size increased the likelihood that I would
be able to reproduce this easily. This is being run on Linux SMP 2.4.18
(machine has two procs).

I've also included the backtrace of all the threads in this state. No
threads ever return from _Jv_MonitorEnter. I know the 3.1 release is
pretty old at this point, but I'm in the middle of building 3.4.1 with
the hash_entry table size shrunk to 2 and am going to see if it behaves
the same. I was also under the impression that the hash_synchronization
code has basically been untouched for a while.


Thanks
Jake

Attachment: deadlock_stack.txt
Description: Text document

Attachment: VectorThrasher.java
Description: Binary data

Attachment: HashSyncMadness.java
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]