Page MenuHome GnuPG

Trustdb corrupted after fresh install of Gpg4win
Closed, ResolvedPublic


It has been reported in T3814 and now again by another Gpg4win user. Fresh install, they try to generate a key and it fails with general error, where the underlying cause is a trustdb corruption.

Here is such a trustdb:

Werner do you have any idea how this can happen or advice how to further debug this? I don't see a 0d0a in the file so I don't think its a textmode problem this time ;-)



Event Timeline

aheinecke raised the priority of this task from Normal to High.Mar 15 2018, 6:17 PM

I give this high priority as I would love to have this fixed for the next release.

This is a killer bug, blocking users from utilizing Gpg4win at all. We had two reporters of this and I think it's save to assume that for these two reporters there were many many people that just threw away Gpg4win after this happened to them.

What about doing the recovery that the error message suggests automatically? The problem for me is that on the higher levels I just see "General Error" and can't handle that properly.

My test case is to import my pubkey and then run:

$ gpg -ver  </etc/motd >/dev/null --debug trust
[  ...]
gpg: lookup_hashtable failed: Unknown system error
gpg: trustdb: searching trust record failed: Unknown system error
gpg: Error: The trustdb is corrupted.
werner changed the task status from Open to Testing.Mar 26 2018, 6:30 PM

I pushed two fixes. One which hopefully avoids the corrupted trustdbs and a second one to repair a version-record-only trustdb (the example file).

I was not able to replicate a broken trustdb so I set this bug to testing for now.

3.1.0 is released and this issue is to our knowledge fixed.