Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync Results in NPE #205

Closed
hraberg opened this issue May 9, 2019 · 6 comments
Closed

Sync Results in NPE #205

hraberg opened this issue May 9, 2019 · 6 comments
Assignees
Labels
1.x bug Something isn't working good first issue Good for newcomers

Comments

@hraberg
Copy link
Contributor

hraberg commented May 9, 2019

1. Unhandled java.lang.NullPointerException
   (No message)

                   RT.java: 1280  clojure.lang.RT/longCast
                    tx.clj:  406  crux.tx/await-no-consumer-lag/fn
                    io.clj:  117  crux.io/wait-while
                    io.clj:  114  crux.io/wait-while
                    tx.clj:  406  crux.tx/await-no-consumer-lag
                    tx.clj:  399  crux.tx/await-no-consumer-lag
             bootstrap.clj:  106  crux.bootstrap.CruxNode/sync
                   api.clj:  129  crux.api/eval47803/fn
                   api.clj:    9  crux.api/eval47628/fn/G
                      REPL:  214  poe-apps.store-manager.loader/eval66603
                      REPL:  214  poe-apps.store-manager.loader/eval66603
             [... repl stuff ...]

The root cause for this seems to be lack of merging in the crux.bootstrap/default-options in crux.bootstrap.standalone/start-standalone-system. See crux.bootstrap.cluster-node/start-cluster-node for reference.

@hraberg hraberg added bug Something isn't working good first issue Good for newcomers labels May 9, 2019
@hraberg hraberg added this to the Beta milestone May 9, 2019
@hraberg hraberg added this to To do in XTDB Development via automation May 9, 2019
@hraberg
Copy link
Contributor Author

hraberg commented May 9, 2019

Note that merging all the defaults might cause some unintended side-effect. Not saying it will, but worth being aware of. At times Crux uses the presence of config keys to decide which component to use etc.

@atamis
Copy link

atamis commented May 9, 2019

Hey, this is an potential bug I brought up on the Juxt Zulip board. This error actually occurred on a cluster system with an external Kafka service. You can see the code base that generated this error at atamis/poe-app, but that repo has a lot going on, so I'm working on a minimal example codebase.

Edit: I've uploaded a minimal reproduction of this bug at atamis/crux-reset-bug, however I succeeded too well. Originally, the crux system would work fine until the REPL got reloaded ((reset)), and then would error out. However, the linked repo features a set of reproduction steps that does not require any reloading.

@hraberg hraberg changed the title Standalone System Lacks Defaults, Results in NPE System Lacks Defaults, Results in NPE May 10, 2019
@hraberg hraberg changed the title System Lacks Defaults, Results in NPE Sync Results in NPE May 10, 2019
@hraberg
Copy link
Contributor Author

hraberg commented May 10, 2019

Thanks a lot for this @atamis. We'll have a look. Quick glance shows this happens even when providing a Duration to sync.

Note for anyone looking into this, my initial analysis is still valid even if it doesn't apply in this case, there are missing defaults in the standalone mode which could also result in NPE.

@megakorre megakorre self-assigned this May 10, 2019
@megakorre megakorre moved this from To do to In progress in XTDB Development May 10, 2019
@megakorre megakorre moved this from In progress to Done in XTDB Development May 10, 2019
@hraberg hraberg closed this as completed May 10, 2019
@hraberg
Copy link
Contributor Author

hraberg commented May 13, 2019

@atamis, while we closed this, which is related to the time out issue, there was also another sentence in the original bug report I now recall:

I'm not 100% sure how this happens, but basically I can start a Crux system, query it successfully once or twice, and then something happens, and all my queries act as though the database is empty, and return no results (including queries for all ids).

Is this issue related or reproducible via the above repo(s)? Thanks!

@atamis
Copy link

atamis commented May 13, 2019

Not sure what happened, but I can't reproduce the empty database issue any more; everything is working just fine. Which is good news, I guess. I'll let you know if I start having the issue again.

@hraberg
Copy link
Contributor Author

hraberg commented May 14, 2019

Great, thanks a lot for trying @atamis, and as you say, please shout if you see it again.

@jarohen jarohen removed this from the Beta milestone Nov 15, 2019
@jarohen jarohen added the 1.x label Apr 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.x bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants