Forum Stats

  • 3,769,974 Users
  • 2,253,040 Discussions
  • 7,875,255 Comments

Discussions

NullPointerException in <DaemonThread name="Cleaner-1"/> (BDB Java Edition 5.0.73)

2659311
2659311 Member Posts: 7
edited Apr 29, 2014 7:12PM in Berkeley DB Java Edition

Has anyone come accross the following error:

SEVERE: <DaemonThread name="Cleaner-1"/> caught exception, java.lang.NullPointerException Continuing
java.lang.NullPointerException
        at com.sleepycat.je.cleaner.FileProcessor.processFile(FileProcessor.java:669)
        at com.sleepycat.je.cleaner.FileProcessor.doClean(FileProcessor.java:289)
        at com.sleepycat.je.cleaner.FileProcessor.onWakeup(FileProcessor.java:148)
        at com.sleepycat.je.utilint.DaemonThread.run(DaemonThread.java:163)
        at java.lang.Thread.run(Thread.java:679)

I am using BDB Java Edition 5.0.73.

Answers

  • Greybird-Oracle
    Greybird-Oracle Member Posts: 2,690

    No, we haven't seen this.  And when I look at the 5.0.73 source code, I don't see how this could happen.

    Did you build the je.jar from sources?  If so could you please confirm that in your sources, FileProcessor.java line 669 is the following?:

                        lookAheadCache.add

                            (Long.valueOf(DbLsn.getFileOffset(logLsn)),

                             new LNInfo(targetLN, dbId, key));

    The lookAheadCache variable cannot be null at this point, which is why I say I don't understand how it could happen.

    Thanks,

    --mark

  • 2659311
    2659311 Member Posts: 7
    edited Apr 29, 2014 5:33PM

    No, we did not build it from sources. We used the binary distribution. We have seen this error just a few times. Is it something we should worry about?

    Here is the code you requested:

                        lookAheadCache.add

                            (Long.valueOf(DbLsn.getFileOffset(logLsn)),

                             new LNInfo(targetLN, dbId, key));

  • Greybird-Oracle
    Greybird-Oracle Member Posts: 2,690

    As I say, we've never seen it before.  Since it "should never happen" if the JVM is working correctly, I'm not sure what we should do about it.

    What JVM and version are you using?

    The impact is that the cleaner won't finish cleaning that particular file, but will try again later.  So as long as the cleaner continues, and disk space is reclaimed as normal, then you may be able to get away with ignoring it.  I suppose it depends on how often it happens.

    --mark

  • 2659311
    2659311 Member Posts: 7

    We are using Azul Zing 5.7.1. It has happened a few times (2 or 3). We have a heavily loaded prod environment that handles 400MM - 500MM messages daily. We will contact Azul for support...

  • 2659311
    2659311 Member Posts: 7

    BTW, what is the default value of lookAheadCacheSize?

  • Greybird-Oracle
    Greybird-Oracle Member Posts: 2,690

    I see.  As you probably know, we haven't qualified JE against the Azul JVM.

  • Greybird-Oracle
    Greybird-Oracle Member Posts: 2,690

    The FileProcessor.process file method looks something like this (see src/com/sleepycat/je/cleaner/FileProcessor.java for the full method):

        private boolean processFile(...boolean calcUtilizationOnly...) {

    ...

            final LookAheadCache lookAheadCache = calcUtilizationOnly ?

                null : new LookAheadCache(lookAheadCacheSize);

    ...

                while (...) {

    ...

                    if (calcUtilizationOnly) {

                        continue;

                    }

    ...

                        lookAheadCache.add

                            (Long.valueOf(DbLsn.getFileOffset(logLsn)),

                             new LNInfo(targetLN, dbId, key));

    The NullPointerException occurs when lookAheadCache is referenced above, so it must be null.  But it cannot be null at that point, if the JVM is working correctly, because of the 'continue' statement above it.

    --mark

This discussion has been closed.