Skip to content

Child is unexpectedly nil during stress test. #13

@whilo

Description

@whilo

While stress testing datahike distribution I ran into this error earlier against version 0.3.0. I cannot make sense yet of where it is coming from, it only happened once so far during many load tests. The process run is external to any REPL and run as a dedicated server (transactor). I will investigate it further and put this here to keep a handle on the issue.

{:type java.lang.NullPointerException
   :message "Cannot invoke \"me.tonsky.persistent_sorted_set.ANode.store(me.tonsky.persistent_sorted_set.IStorage)\" because \"this._children[<local2>]\" is null"
   :at [me.tonsky.persistent_sorted_set.Branch store "Branch.java" 621]}]
 :trace
 [[me.tonsky.persistent_sorted_set.Branch store "Branch.java" 621]
 176].tonsky.persistent_sorted_set.PersistentSortedSet store "PersistentSortedSet.java"
  [me.tonsky.persistent_sorted_set$store invokeStatic "persistent_sorted_set.clj" 185]
  [me.tonsky.persistent_sorted_set$store invoke "persistent_sorted_set.clj" 180]
  ...

(stacktrace printing was interleaved for some reason)

There are assertions before line 621 that should blow up before. My understanding is also that nodes that are newly created (and hence don't have an address) cannot be soft references (which I use currently), so I am not sure how this child can be nil here.

Edit: Maybe one of the addresses is accidentally nulled somehow while its child is actually pointing to an already stored SoftReference.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions