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

Divide by zero exception in stats

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.0, 2.0.0
    • Fix Version/s: 2.0.0, 1.0.1
    • Component/s: storm-core
    • Labels:
      None

      Description

      Since uptime can be 0, this will cause ArithmeticException: Divide by zero in compute-agg-capacity.

      This will happen for both stats.clj in 1.x and StatsUtil.java in master (2.0).

      java.lang.ArithmeticException: Divide by zero
      at clojure.lang.Numbers.divide(Numbers.java:156)
      at clojure.core$SLASH.invoke(core.clj:986)
      at clojure.lang.AFn.applyToHelper(AFn.java:156)
      at clojure.lang.RestFn.applyTo(RestFn.java:132)
      at clojure.core$apply.invoke(core.clj:626)
      at backtype.storm.util$div.doInvoke(util.clj:355)
      at clojure.lang.RestFn.invoke(RestFn.java:423)
      at backtype.storm.stats$compute_agg_capacity$fn__2249.invoke(stats.clj:409)
      at backtype.storm.stats$compute_agg_capacity.invoke(stats.clj:404)
      at backtype.storm.stats$agg_pre_merge_topo_page_bolt.invoke(stats.clj:555)
      at backtype.storm.stats$agg_topo_exec_stats_STAR_.invoke(stats.clj:724)
      at backtype.storm.stats$fn__2319.invoke(stats.clj:772)
      at clojure.lang.MultiFn.invoke(MultiFn.java:241)
      at clojure.lang.AFn.applyToHelper(AFn.java:165)
      at clojure.lang.AFn.applyTo(AFn.java:144)
      at clojure.core$apply.invoke(core.clj:628)
      at clojure.core$partial$fn__4230.doInvoke(core.clj:2470)
      at clojure.lang.RestFn.invoke(RestFn.java:421)
      at clojure.core.protocols$fn__6086.invoke(protocols.clj:143)
      at clojure.core.protocols$fn_6057$G6052_6066.invoke(protocols.clj:19)
      at clojure.core.protocols$seq_reduce.invoke(protocols.clj:31)
      at clojure.core.protocols$fn__6078.invoke(protocols.clj:54)
      at clojure.core.protocols$fn_6031$G6026_6044.invoke(protocols.clj:13)
      at clojure.core$reduce.invoke(core.clj:6289)
      at backtype.storm.stats$aggregate_topo_stats.invoke(stats.clj:854)
      at backtype.storm.stats$agg_topo_execs_stats.invoke(stats.clj:1008)
      at backtype.storm.daemon.nimbus$fn_5838$exec_fn1478auto$reify_5862.getTopologyPageInfo(nimbus.clj:1729)
      at backtype.storm.generated.Nimbus$Processor$getTopologyPageInfo.getResult(Nimbus.java:3651)
      at backtype.storm.generated.Nimbus$Processor$getTopologyPageInfo.getResult(Nimbus.java:3635)
      at org.apache.thrift7.ProcessFunction.process(ProcessFunction.java:39)
      at org.apache.thrift7.TBaseProcessor.process(TBaseProcessor.java:39)
      at backtype.storm.security.auth.SaslTransportPlugin$TUGIWrapProcessor.process(SaslTransportPlugin.java:143)
      at org.apache.thrift7.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:286)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)
      
      
      

        Attachments

          Activity

            People

            • Assignee:
              zhuoliu Zhuo Liu
              Reporter:
              zhuoliu Zhuo Liu
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: