Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-14168

Managed Memory Leak Msg Should Only Be a Warning

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete CommentsDelete
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Duplicate
    • 1.6.1
    • None
    • Spark Core
    • None

    Description

      When a task is completed, executors check to see if all managed memory for the task was correctly released, and logs an error when it wasn't. However, it turns out its OK for there to be memory that wasn't released when an Iterator isn't read to completion, eg., with rdd.take(). This results in a scary error msg in the executor logs:

      16/01/05 17:02:49 ERROR Executor: Managed memory leak detected; size = 16259594 bytes, TID = 24
      

      Furthermore, if tasks fails for any reason, this msg is also triggered. This can lead users to believe that the failure was from the memory leak, when the root cause could be entirely different. Eg., the same error msg appears in executor logs with this clearly broken user code run with spark-shell --master 'local-cluster[2,2,1024]'

      sc.parallelize(0 to 10000000, 2).map(x => x % 10000 -> x).groupByKey.mapPartitions { it => throw new RuntimeException("user error!") }.collect
      

      We should downgrade the msg to a warning and link to a more detailed explanation.

      See https://issues.apache.org/jira/browse/SPARK-11293 for more reports from users (and perhaps a true fix)

      Attachments

        Issue Links

        Activity

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

          People

            irashid Imran Rashid Assign to me
            irashid Imran Rashid
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment