git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Link to the Sun JVM bug mentioned in OffsetCache

From
Shawn O. Pearce <spearce@spearce.org>
Date
May 6, 2009, 14:15 UTC
Message-ID
<20090506141526.GA28164@spearce.org>
In-Reply-To
<20090429171659.GF23604@spearce.org>

This bug has now been published by Sun. We should link to the database entry so we can find more detail later.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
---
  "Shawn O. Pearce" <spearce@spearce.org> wrote:
  > Robin Rosenberg <robin.rosenberg.lists@dewire.com> wrote:
  > > > diff --git a/org.spearce.jgit/src/org/spearce/jgit/lib/OffsetCache.java b/org.spearce.jgit/src/org/spearce/jgit/lib/OffsetCache.java
  > > > +	private void gc() {
  > > > +		R r;
  > > > +		while ((r = (R) queue.poll()) != null) {
  > > > +			// Sun's Java 5 and 6 implementation have a bug where a Reference
  > > > +			// can be enqueued and dequeued twice on the same reference queue
  > > > +			// due to a race condition within ReferenceQueue.enqueue(Reference).
  > > 
  > > Reference to the official Sun bug? Might help if someone wants to
  > > implement a flag to avoid this (if necessary...)
  > 
  > Actually, this is a new bug.  I tried looking through BugParade
  > but nobody has mentioned or discovered this before.
  > 
  > I submitted a bug report yesterday, but they have yet to publish it.
  And here it is.
 .../src/org/spearce/jgit/lib/OffsetCache.java      |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/org.spearce.jgit/src/org/spearce/jgit/lib/OffsetCache.java b/org.spearce.jgit/src/org/spearce/jgit/lib/OffsetCache.java
index a1cd4be..b81c7e0 100644
--- a/org.spearce.jgit/src/org/spearce/jgit/lib/OffsetCache.java
+++ b/org.spearce.jgit/src/org/spearce/jgit/lib/OffsetCache.java
@@ -414,6 +414,8 @@ private void gc() {
 			// can be enqueued and dequeued twice on the same reference queue
 			// due to a race condition within ReferenceQueue.enqueue(Reference).
 			//
+			// http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6837858
+			//
 			// We CANNOT permit a Reference to come through us twice, as it will
 			// skew the resource counters we maintain. Our canClear() check here
 			// provides a way to skip the redundant dequeues, if any.
-- 
1.6.3.rc4.206.g03e16
Previous: Ferry Huberts (Pelagic)
Message 8 of 8 in “Don't use ByteWindows when checking pack file headers/footers”
  1. 1/2 Don't use ByteWindows when checking pack file headers/footersShawn O. Pearce, Apr 28, 2009
  2. 2/2 Rewrite WindowCache to be easier to follow and maintainShawn O. Pearce, Apr 28, 2009
  3. Shawn O. PearceApr 28, 2009
  4. Robin RosenbergApr 28, 2009
  5. Shawn O. PearceApr 28, 2009
  6. Shawn O. PearceApr 29, 2009
  7. Ferry Huberts (Pelagic)Apr 30, 2009
  8. Link to the Sun JVM bug mentioned in OffsetCacheShawn O. Pearce, May 6, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.