Uploaded image for project: 'Apache Storm'
  1. Apache Storm
  2. STORM-3166

Utils.threadDump does not account for dead threads

    XMLWordPrintableJSON

Details

    Description

      Saw this test failure

      classname: integration.org.apache.storm.integration-test / testname: test-validate-topology-structure
      Uncaught exception, not in assertion.
      expected: nil
        actual: java.lang.NullPointerException: null
       at org.apache.storm.utils.Utils.threadDump (Utils.java:1191)
          org.apache.storm.Testing.whileTimeout (Testing.java:107)
          org.apache.storm.Testing.completeTopology (Testing.java:437)
          integration.org.apache.storm.integration_test$try_complete_wc_topology.invoke (integration_test.clj:247)
          integration.org.apache.storm.integration_test/fn (integration_test.clj:259)
          clojure.test$test_var$fn__7670.invoke (test.clj:704)
          clojure.test$test_var.invoke (test.clj:704)
          clojure.test$test_vars$fn__7692$fn__7697.invoke (test.clj:722)
          clojure.test$default_fixture.invoke (test.clj:674)
          clojure.test$test_vars$fn__7692.invoke (test.clj:722)
          clojure.test$default_fixture.invoke (test.clj:674)
          clojure.test$test_vars.invoke (test.clj:718)
          clojure.test$test_all_vars.invoke (test.clj:728)
          clojure.test$test_ns.invoke (test.clj:747)
          clojure.core$map$fn__4553.invoke (core.clj:2624)
          clojure.lang.LazySeq.sval (LazySeq.java:40)
          clojure.lang.LazySeq.seq (LazySeq.java:49)
          clojure.lang.Cons.next (Cons.java:39)
          clojure.lang.RT.boundedLength (RT.java:1735)
          clojure.lang.RestFn.applyTo (RestFn.java:130)
          clojure.core$apply.invoke (core.clj:632)
          clojure.test$run_tests.doInvoke (test.clj:762)
          clojure.lang.RestFn.invoke (RestFn.java:408)
          org.apache.storm.testrunner$eval5125$iter__5126__5130$fn__5131$fn__5132$fn__5133.invoke (test_runner.clj:107)
          org.apache.storm.testrunner$eval5125$iter__5126__5130$fn__5131$fn__5132.invoke (test_runner.clj:53)
          org.apache.storm.testrunner$eval5125$iter__5126__5130$fn__5131.invoke (test_runner.clj:52)
          clojure.lang.LazySeq.sval (LazySeq.java:40)
          clojure.lang.LazySeq.seq (LazySeq.java:49)
          clojure.lang.RT.seq (RT.java:507)
          clojure.core/seq (core.clj:137)
          clojure.core$dorun.invoke (core.clj:3009)
          org.apache.storm.testrunner$eval5125.invoke (test_runner.clj:52)
          clojure.lang.Compiler.eval (Compiler.java:6782)
          clojure.lang.Compiler.load (Compiler.java:7227)
          clojure.lang.Compiler.loadFile (Compiler.java:7165)
          clojure.main$load_script.invoke (main.clj:275)
          clojure.main$script_opt.invoke (main.clj:337)
          clojure.main$main.doInvoke (main.clj:421)
          clojure.lang.RestFn.invoke (RestFn.java:421)
          clojure.lang.Var.invoke (Var.java:383)
          clojure.lang.AFn.applyToHelper (AFn.java:156)
          clojure.lang.Var.applyTo (Var.java:700)
          clojure.main.main (main.java:37)
      

      Utils.threadDump needs to check whether ThreadInfo objects are null before trying to dereference them, since the ThreadMxBean.getThreadInfo method will return null for threads that are dead.

      Attachments

        Activity

          People

            srdo Stig Rohde Døssing
            srdo Stig Rohde Døssing
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 50m
                50m