Github user willb commented on a diff in the pull request:

    https://github.com/apache/spark/pull/1413#discussion_r14916362
  
    --- Diff: core/src/main/scala/org/apache/spark/util/Utils.scala ---
    @@ -809,7 +809,11 @@ private[spark] object Utils extends Logging {
        */
       def getCallSite: CallSite = {
         val trace = Thread.currentThread.getStackTrace()
    -      .filterNot(_.getMethodName.contains("getStackTrace"))
    +      .filterNot((ste:StackTraceElement) => 
    +        // When running under some profilers, the current stack trace 
might contain some bogus 
    +        // frames. This Try is intended to ensure that we don't crash in 
these situations by
    +        // ignoring any frames that we can't examine.
    +        Try(ste.getMethodName.contains("getStackTrace")).getOrElse(true))
    --- End diff --
    
    So I was thinking that either `ste` or the result of `ste.getMethodName` 
could be `null` when running under instrumentation.  I'll rewrite to use checks 
instead of `Try`, though.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to