Factual/skuld

Random test failure: claim: NullPointerException in task/merge-claims

Closed this issue · 1 comments

eric commented

Here's a link to the failure: https://travis-ci.org/eric/skuld/jobs/30227839#L406

2014-07-18T01:27:12.328 INFO  skuld.node: 127.0.0.1:13002: claim-local: claiming id from queue: #<Bytes 00000147471482a3800000010000000000000844>
2014-07-18T01:27:12.338 INFO  skuld.node: 127.0.0.1:13002: claim-local: claim from 127.0.0.1:13002/skuld_0 returned task: {:data sup, :id #<Bytes 00000147471482a3800000010000000000000844>, :claims [{:start 1405646832328, :end 1405646832329, :completed nil}]}
2014-07-18T01:27:12.358 INFO  skuld.node: 127.0.0.1:13002: get-task: ({:request-id #<byte[] [B@1ac56014>, :task {:data sup, :id #<Bytes 00000147471482a3800000010000000000000844>, :claims [{:start 1405646832328, :end 1405646832329, :completed nil}]}} {:request-id #<byte[] [B@1426cec7>, :task {:data sup, :id #<Bytes 00000147471482a3800000010000000000000844>, :claims []}})
2014-07-18T01:27:12.387 INFO  skuld.node: 127.0.0.1:13000: get-task: ({:request-id #<byte[] [B@4a34ddc9>, :task {:data sup, :id #<Bytes 00000147471482a3800000010000000000000844>, :claims [{:start 1405646832329, :end 1405646832330, :completed 1405646832366}]}} {:request-id #<byte[] [B@54ccdd2e>, :task {:data sup, :id #<Bytes 00000147471482a3800000010000000000000844>, :claims [{:completed 1405646832366}]}})
Node handler caught:
java.lang.NullPointerException
    at clojure.lang.Numbers.ops(Numbers.java:942)
    at clojure.lang.Numbers.lt(Numbers.java:219)
    at clojure.lang.Numbers.min(Numbers.java:4007)
    at skuld.task$merge_claims$fn__2192$combine__2193.invoke(task.clj:136)
    at clojure.core.protocols$fn__6034.invoke(protocols.clj:143)
    at clojure.core.protocols$fn__6005$G__6000__6014.invoke(protocols.clj:19)
    at clojure.core.protocols$seq_reduce.invoke(protocols.clj:31)
    at clojure.core.protocols$fn__6026.invoke(protocols.clj:54)
    at clojure.core.protocols$fn__5979$G__5974__5992.invoke(protocols.clj:13)
    at clojure.core$reduce.invoke(core.clj:6177)
    at skuld.task$merge_claims$fn__2192.invoke(task.clj:132)
    at clojure.core$mapv$fn__6258.invoke(core.clj:6241)
    at clojure.lang.ArrayChunk.reduce(ArrayChunk.java:58)
    at clojure.core.protocols$fn__6041.invoke(protocols.clj:98)
    at clojure.core.protocols$fn__6005$G__6000__6014.invoke(protocols.clj:19)
    at clojure.core.protocols$seq_reduce.invoke(protocols.clj:31)
    at clojure.core.protocols$fn__6026.invoke(protocols.clj:54)
    at clojure.core.protocols$fn__5979$G__5974__5992.invoke(protocols.clj:13)
    at clojure.core$reduce.invoke(core.clj:6177)
    at clojure.core$mapv.invoke(core.clj:6241)
    at skuld.task$merge_claims.invoke(task.clj:127)
    at skuld.task$merge.doInvoke(task.clj:151)
    at clojure.lang.RestFn.invoke(RestFn.java:421)
    at clojure.core.protocols$fn__6034.invoke(protocols.clj:143)
    at clojure.core.protocols$fn__6005$G__6000__6014.invoke(protocols.clj:19)
    at clojure.core.protocols$seq_reduce.invoke(protocols.clj:27)
    at clojure.core.protocols$fn__6026.invoke(protocols.clj:53)
    at clojure.core.protocols$fn__5979$G__5974__5992.invoke(protocols.clj:13)
    at clojure.core$reduce.invoke(core.clj:6175)
    at skuld.node$get_task.invoke(node.clj:168)
    at skuld.node$handler$handler__4959.invoke(node.clj:427)
    at skuld.net$compile_handler$compiled_handler__4084.invoke(net.clj:302)
    at skuld.net$handler$fn__4027$fn__4028$fn__4029.invoke(net.clj:110)
    at skuld.net$handler$fn__4027$fn__4028.invoke(net.clj:110)
    at clojure.core$binding_conveyor_fn$fn__4107.invoke(core.clj:1836)
    at clojure.lang.AFn.call(AFn.java:18)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:744)
eric commented

It appears that one of the claims doesn't have a :start and :end only a :completed:

{:request-id #<byte[] [B@4a34ddc9>, :task {:data sup, :id #<Bytes 00000147471482a3800000010000000000000844>, :claims [{:start 1405646832329, :end 1405646832330, :completed 1405646832366}]}} 
{:request-id #<byte[] [B@54ccdd2e>, :task {:data sup, :id #<Bytes 00000147471482a3800000010000000000000844>, :claims [{:completed 1405646832366}]}}