cli icon indicating copy to clipboard operation
cli copied to clipboard

[Bug]: Value log truncate required to run DB

Open lordrak007 opened this issue 1 year ago • 1 comments

Steps to Reproduce

Download windows binary file: Run step-ca without config. All another runs shows this error. OR for example initialize step-ca using step.exe. During starting step-ca enter wrong password for CA or cancel startup. Every next start result in badger 2024/10/14 14:16:12 INFO: All 1 tables opened in 1ms badger 2024/10/14 14:16:12 INFO: Replaying file id: 0 at offset: 2923 badger 2024/10/14 14:16:12 WARNING: Truncate Needed. File C:\Users\marek.anyz.step\db\000000.vlog size: 2147483646 Endoffset: 3535 Error opening database of Type badgerv2: error opening Badger database: During db.vlog.open: Value log truncate required to run DB. This might result in data loss

Your Environment

  • OS -Windows server 2022
  • step CLI Version - Smallstep CLI/0.27.2 (windows/amd64) Release Date: 2024-07-18T18:15:09Z

Expected Behavior

Runc without error and have change to run truncate for badgerv2

Actual Behavior

step-ca does not start and prevent use step-ca

Additional Context

No response

Contributing

Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

lordrak007 avatar Oct 14 '24 14:10 lordrak007

Hey, thanks for opening the issue!

It seems like the database is being corrupted by the early exit - it's possible it's not being closed properly on Windows. Unfortunately, our engineering team is compromised entirely of Mac and Linux users. We don't have folks readily available to debug Windows inter operability issues.

If theres a Windows user from the community who is able to reproduce the issue and would like to assist in debugging, please let us know.

cheers!

dopey avatar Nov 08 '24 07:11 dopey