Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-6132

ASAN test fails when trying to move/copy string created by kudu::EnvPosix::GetExecutablePath into InitAuth()

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • ghx-label-9

    Description

      Following from the code review: https://gerrit.cloudera.org/#/c/8412/

      After moving the string into InitAuth() and storing it in AuthManager (which is a global singleton), the ASAN error still kept showing up. I spent many hours trying to debug this problem and I have no understanding of why it happens. My inclination is that ASAN gets confused by how kudu::PosixEnv::GetExecutablePath() creates a string. It creates a unique_ptr<char[]> and then assign()'s it to a string.

      For some reason this is seen as a heap-use-after free if it is called multiple times.

      The only thing that works for now is to leave the code as is in this patch set.

      I have 2 attempts to move/copy the string into GetExecutablePath() and their corresponding errors here:
      https://github.com/smukil/incubator-impala/commit/d3fedb0d665def4870b787a586e922e361cac2dc (copy)
      https://github.com/smukil/incubator-impala/commit/c2e6ca8987054539be70e5ef7e3244c49df2ee40 (move)

      If anyone else is able to make progress on this, that would be great.

      Attachments

        Activity

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

          People

            sailesh Sailesh Mukil
            sailesh Sailesh Mukil
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment