Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-8756

Fix SEGV when libsnappy is in java.library.path but not LD_LIBRARY_PATH

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0.2-alpha
    • 2.0.3-alpha
    • native
    • None
    • Reviewed

    Description

      We use System.loadLibrary("snappy") from the Java side. However in libhadoop, we use dlopen to open libsnappy.so dynamically. System.loadLibrary uses java.library.path to resolve libraries, and dlopen uses LD_LIBRARY_PATH and the system paths to resolve libraries. Because of this, the two library loading functions can be at odds.

      We should fix this so we only load the library once, preferably using the standard Java java.library.path.

      We should also log the search path(s) we use for libsnappy.so when loading fails, so that it's easier to diagnose configuration issues.

      Attachments

        1. HADOOP-8756.002.patch
          13 kB
          Colin McCabe
        2. HADOOP-8756.003.patch
          16 kB
          Colin McCabe
        3. HADOOP-8756.004.patch
          16 kB
          Colin McCabe

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            cmccabe Colin McCabe
            cmccabe Colin McCabe
            Votes:
            0 Vote for this issue
            Watchers:
            13 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment