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

Snapshotting malfunctioning #25

Open
lucventurini opened this issue Nov 29, 2017 · 2 comments
Open

Snapshotting malfunctioning #25

lucventurini opened this issue Nov 29, 2017 · 2 comments

Comments

@lucventurini
Copy link

Whenever I try to have ktserver create a snapshot after its run, ktserver completes normaly but does not create a snapshot. When I delved a bit further, and modified a bit the code to provide the error message, I got this:

2017-11-29T12:57:28.292423Z: [ERROR]: database error: 8: logical inconsistency: hanging

Is there any particular reason this should be happening? I have tried with multiple versions from this repository and the CloudFlare version, to no avail.

Command lines are as follows:

$ ktserver -port 27732 -ls -tout 200000 -th 64 -bgs /tmp/kt/snapshot -bgsc lzo -bgsi 1000000 -log /tmp/kt/log :#opts=ls#bnum=30m#msiz=50g#ktopts=p &
$ ktremotemgr set -host localhost -port 27732 japan tokyo
$ ktremotemgr get -host localhost -port 27732 japan
tokyo
$ kill -SIGINT $(pgrep ktserver)

Thank you for your kind help.

@carlosefr
Copy link
Contributor

carlosefr commented Nov 30, 2017

How are you telling ktserver to do a snapshot? From your configuration it will only create a snapshot 11 days after being started (-bgsi 1000000). But it should write one on exit, right.

Have you tried removing those parameters one at a time to see which one may be causing the issue? Or terminating ktserver with SIGTERM instead?

@lucventurini
Copy link
Author

Hello,
sorry for the late reply. ktserver is used inside a program (cactus) to keep temporary information in memory and save it to disk only at the end of a particular step. Hence the long bgsi value.

I found the trigger of the problem, which is, the fact that the database was initialised in RAM rather than on the disk (":" at the beginning of the parameters section). So for example:

$ ktserver -port 27732 -ls -tout 200000 -th 64 -bgs /tmp/kt/snapshot -bgsc lzo -bgsi 1000000 -log /tmp/kt/log :#opts=ls#bnum=30m#msiz=50g#ktopts=p

will fail to snapshot, but

$ ktserver -port 27732 -ls -tout 200000 -th 64 -bgs /tmp/kt/snapshot -bgsc lzo -bgsi 1000000 -log /tmp/kt/log /tmp/kt.iwch#opts=ls#bnum=30m#msiz=50g#ktopts=p

will. I am still unsure about why this is happening, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants