Share

Heritrix: Internet Archive Web Crawler

Tracker: Bugs

7 BDB Adler32 gc-lock OOME risk - ID: 1482761
Last Update: Comment added ( karl-ia )

See:

http://blog.sleepycat.com/2006/04/adler32-vs-gc.html

There's a risk of spurious OutOfMemoryError conditions
because the Sun JVM adler32 code temporarily locks GC,
and in a multi-threaded application, another thread
could need memory during that lock -- memory that would
be available if GC could occur, but isn't because of
the lock, throwing a OOME.

Using an optional BDB-JE flag can remove this risk for
BDB Adler32 operations. (There's still a risk elsewhere
because inflate/deflate native code does the same
thing... but there's no straightforward way to mitigate
that in the short term.)


Gordon Mohr ( gojomo ) - 2006-05-05 21:36

7

Closed

Fixed

Gordon Mohr

Memory

1.8.0

Public


Comments ( 3 )

Date: 2007-03-14 01:06
Sender: karl-ia


This issue is now discussed in the new JIRA tracker at
http://webteam.archive.org/jira/browse/HER-563 -- please add further
comments at that location.


Date: 2006-05-05 22:29
Sender: stack-sfProject Admin

Logged In: YES
user_id=924942

G and I agreed that instead we should commit this:

Index: heritrix
===================================================================
RCS file:
/cvsroot/archive-crawler/ArchiveOpenCrawler/src/scripts/heritrix,v
retrieving revision 1.20
diff -u -r1.20 heritrix
--- heritrix 21 Feb 2006 19:56:17 -0000 1.20
+++ heritrix 5 May 2006 22:25:35 -0000
@@ -75,7 +75,9 @@
if [ -z "$JAVACMD" ]
then
# It may be defined in env - including flags!!
- JAVACMD=$JAVA_HOME/bin/java
+ # See '[ 1482761 ] BDB Adler32 gc-lock OOME risk' for
why we include the
+ # 'je.disable.java.adler32'.
+ JAVACMD="$JAVA_HOME/bin/java -Dje.disable.java.adler32=true"
fi

I committed it. Giving issue back to G. Below is message:

* src/scripts/heritrix
Fix for '[ 1482761 ] BDB Adler32 gc-lock OOME risk'
Add system property that invokes the bdbje adler32
implementation rather than use the gc-locking JVMs
version. This commit was reviewed by Gordon.



Date: 2006-05-05 21:44
Sender: gojomoProject Admin

Logged In: YES
user_id=144912

Suggested fix is attached for review: add the necessary BDB
JE property flag to our default Java flags in the heritrix
launch script. Also will be adding a note to release notes
for people who set their own JAVA_FLAGS.

Igor has run with this in his IT test crawl; it restores the
same BDB behavior as was the default in je-2.0.90, or any
time a pre-1.5 JVM is detected -- so it should be a safe
change.


Attached File ( 1 )

Filename Description Download
heritrix-adler32-1482761-patch.txt Download

Changes ( 6 )

Field Old Value Date By
status_id Open 2006-05-05 22:37 gojomo
resolution_id None 2006-05-05 22:37 gojomo
close_date - 2006-05-05 22:37 gojomo
assigned_to stack-sf 2006-05-05 22:29 stack-sf
File Added 176982: heritrix-adler32-1482761-patch.txt 2006-05-05 21:44 gojomo
assigned_to gojomo 2006-05-05 21:44 gojomo