From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10092 invoked by alias); 10 Aug 2004 18:30:06 -0000 Mailing-List: contact java-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-prs-owner@gcc.gnu.org Received: (qmail 10067 invoked by uid 48); 10 Aug 2004 18:30:05 -0000 Date: Tue, 10 Aug 2004 18:30:00 -0000 Message-ID: <20040810183005.10066.qmail@sourceware.org> From: "Hans dot Boehm at hp dot com" To: java-prs@gcc.gnu.org In-Reply-To: <20040721214713.16662.mckinlay@redhat.com> References: <20040721214713.16662.mckinlay@redhat.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug libgcj/16662] IllegalMonitorStateException in EventQueue.getNextEvent(): possible hash synchronization bug? X-Bugzilla-Reason: CC X-SW-Source: 2004-q3/txt/msg00207.txt.bz2 List-Id: ------- Additional Comments From Hans dot Boehm at hp dot com 2004-08-10 18:30 ------- I managed to get a run with logging to fail. I believe the failure scenario is the following: 1) _Jv_MonitorEnter initially sees an address field which is locked. This causes the (address & ~(HEAVY | REQUEST_CONVERSION) == addr) test to fail. 2) In the meantime another thread unlocks the address field. 3) _Jv_MonitorEnter's compare_and_swap to acquire the LOCKED bit succeeds (unexpectedly). 4) The following code assumes incorrectly that the address corresponds to a different object and acquires the heavyweight lock. 5) The lightweight lock is still held by another thread. bad. I'll post a patch once I've done a bit of testing. Hans -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16662