Accumulo
  1. Accumulo
  2. ACCUMULO-721

Reloading of lib/ext classloader causes LinkageError

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: None
    • Fix Version/s: 1.5.0
    • Component/s: tserver
    • Labels:
      None

      Description

      I was writing an iterator that takes advantage of some classes in Google's guava-libraries. I placed my jar and the guava-13.0-rc2.jar into lib/ext.

      I then ran a simple Java class which opened a Scanner to a table with my customer Iterator in Eclipse. The first attempt succeeded. I then changed my iterator, recompiled the jar, and placed it in lib/ext. The AccumuloClassLoader message said it picked up the changes. Then, trying to run my class in the same manner, I got a java.lang.LinkageError relating to the classloader having two different Class objects for a class defined in the guava jar (which hadn't changed).

      Moving the guava jar from lib/ext to lib/ and retrying this experiment did not net the same LinkageError.

      I'll attach full stack traces and the output of `accumulo classpath`

      1. ACCUMULO-721-tserver.debug.log
        5 kB
        Josh Elser
      2. ACCUMULO-721-classpath
        4 kB
        Josh Elser

        Activity

        Hide
        Josh Elser added a comment -

        For those with sharp eyes, two things that should stand out:

        In the attached ACCUMULO-721-tserver.debug.log, you'll notice that it lists commons-lang-2.4.jar in lib/ext which is also in lib according to the attached classpath. I realized this, retested, and it made no difference. I'm being lazy.

        Second, you might notice the guava-r09-jarjar.jar in /opt/hadoop/current/lib. This was rebundled by Hadoop, and while it is an old copy of guava, the package names are all prefixed with /org/apache/hadoop/thirdparty. So, unless the classloader isn't properly using full package name, the point should be moot.

        If someone is curious enough to re-test themselves, I'd be happy to throw the actual code up. I was working it for another ticket anyways...

        Show
        Josh Elser added a comment - For those with sharp eyes, two things that should stand out: In the attached ACCUMULO-721 -tserver.debug.log, you'll notice that it lists commons-lang-2.4.jar in lib/ext which is also in lib according to the attached classpath. I realized this, retested, and it made no difference. I'm being lazy. Second, you might notice the guava-r09-jarjar.jar in /opt/hadoop/current/lib. This was rebundled by Hadoop, and while it is an old copy of guava, the package names are all prefixed with /org/apache/hadoop/thirdparty. So, unless the classloader isn't properly using full package name, the point should be moot. If someone is curious enough to re-test themselves, I'd be happy to throw the actual code up. I was working it for another ticket anyways...
        Hide
        Christopher Tubbs added a comment -

        Which released versions are affected by this bug?

        Show
        Christopher Tubbs added a comment - Which released versions are affected by this bug?
        Hide
        Christopher Tubbs added a comment -

        1.5.0 isn't a released version. It can't have things wrong with it because it doesn't technically exist (yet). If the version(s) affected are only current working branches, an "affected version" tag isn't necessary, and might be confusing. If older, released versions are affected by this bug, that would be useful to tag for documentation/search, even if we don't fix it until 1.5.0.

        At least, that's what I seem to understand is a reasonable thing to do from talking to Billie and Keith. Maybe I'm wrong?

        Show
        Christopher Tubbs added a comment - 1.5.0 isn't a released version. It can't have things wrong with it because it doesn't technically exist (yet). If the version(s) affected are only current working branches, an "affected version" tag isn't necessary, and might be confusing. If older, released versions are affected by this bug, that would be useful to tag for documentation/search, even if we don't fix it until 1.5.0. At least, that's what I seem to understand is a reasonable thing to do from talking to Billie and Keith. Maybe I'm wrong?
        Hide
        Dave Marion added a comment -

        Curious is this issue is OBE due to ACCUMULO-708. Can you try with the new classloader?

        Show
        Dave Marion added a comment - Curious is this issue is OBE due to ACCUMULO-708 . Can you try with the new classloader?
        Hide
        Josh Elser added a comment -

        Eh, I'm apt to just call it a day with this ticket. I only ever saw it under one extremely specific of circumstances that I don't even recall. It's probably just for the best to close it as "can't reproduce" and reopen if anyone ever runs into this again.

        Show
        Josh Elser added a comment - Eh, I'm apt to just call it a day with this ticket. I only ever saw it under one extremely specific of circumstances that I don't even recall. It's probably just for the best to close it as "can't reproduce" and reopen if anyone ever runs into this again.

          People

          • Assignee:
            Keith Turner
            Reporter:
            Josh Elser
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development