Repo disconnect throws panic error

After verifying a and disconnecting from a repo the following happened. Anybody has an idea why?

Kopia 12.1

Finished verifying 310222 contents, found 0 errors.

kopia repository disconnect

panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x0 pc=0x8bf1cf]

goroutine 1 [running]:
github.com/danieljoos/wincred.(*GenericCredential).Delete(...)
        C:/Users/runneradmin/go/pkg/mod/github.com/danieljoos/wincred@v1.1.2/wincred.go:49
github.com/zalando/go-keyring.windowsKeychain.Delete({}, {0xc0000aa060?, 0xc00057e170?}, {0xc00003b794?, 0xc0000a4630?})
        C:/Users/runneradmin/go/pkg/mod/github.com/zalando/go-keyring@v0.2.1/keyring_windows.go:42 +0x8f
github.com/zalando/go-keyring.Delete(...)
        C:/Users/runneradmin/go/pkg/mod/github.com/zalando/go-keyring@v0.2.1/keyring.go:37
github.com/kopia/kopia/internal/passwordpersist.keyringStrategy.DeletePassword({}, {0x1bfc238, 0xc0002e3170}, {0xc0000be060, 0x2c})
        D:/a/kopia/kopia/internal/passwordpersist/passwordpersist_keyring.go:59 +0x9a
github.com/kopia/kopia/internal/passwordpersist.Multiple.DeletePassword({0xc00008e5e0?, 0x2, 0xc00050f958?}, {0x1bfc238, 0xc0002e3170}, {0xc0000ae060, 0x2c})
        D:/a/kopia/kopia/internal/passwordpersist/passwordpersist_multiple.go:55 +0xb1
github.com/kopia/kopia/cli.(*commandRepositoryDisconnect).run(0xc0001bc290, {0x1afc238, 0xc0002d3170})
        D:/a/kopia/kopia/cli/command_repository_disconnect.go:29 +0xc8
github.com/kopia/kopia/cli.(*App).noRepositoryAction.func1.1.1()
        D:/a/kopia/kopia/cli/app.go:389 +0x89
github.com/kopia/kopia/cli.(*profileFlags).withProfiling(0x0?, 0x0?)
        D:/a/kopia/kopia/cli/profile.go:45 +0x32d
github.com/kopia/kopia/cli.(*App).noRepositoryAction.func1.1({0x1bfc238?, 0xc0002e3170?})
        D:/a/kopia/kopia/cli/app.go:384 +0x68
github.com/kopia/kopia/cli.(*App).runAppWithContext.func1({0x1bfc238, 0xc0002e3140}, 0xc0002e3140?, 0xc0002ba500, 0xc00025fd40)
        D:/a/kopia/kopia/cli/app.go:495 +0x191
github.com/kopia/kopia/cli.(*App).runAppWithContext(0xc0002ba500, 0x0?, 0x0?)
        D:/a/kopia/kopia/cli/app.go:496 +0x178
github.com/kopia/kopia/cli.(*App).noRepositoryAction.func1(0x4bbd54?)
        D:/a/kopia/kopia/cli/app.go:383 +0x51
github.com/alecthomas/kingpin.(*actionMixin).applyActions(0xc00027eac8?, 0x1522920?)
        C:/Users/runneradmin/go/pkg/mod/github.com/alecthomas/kingpin@v1.3.8-0.20220615105907-eae6867f4166/actions.go:28 +0x5c
github.com/alecthomas/kingpin.(*Application).applyActions(0xc000510200?, 0xc0001963f0)
        C:/Users/runneradmin/go/pkg/mod/github.com/alecthomas/kingpin@v1.3.8-0.20220615105907-eae6867f4166/app.go:560 +0xed
github.com/alecthomas/kingpin.(*Application).execute(0xc000510200, 0xc0001963f0?, {0xc000308600, 0x2, 0x2})
        C:/Users/runneradmin/go/pkg/mod/github.com/alecthomas/kingpin@v1.3.8-0.20220615105907-eae6867f4166/app.go:398 +0x66
github.com/alecthomas/kingpin.(*Application).Parse(0xc000510200, {0xc0000d4010?, 0xc000510200?, 0x1beb3ec?})
        C:/Users/runneradmin/go/pkg/mod/github.com/alecthomas/kingpin@v1.3.8-0.20220615105907-eae6867f4166/app.go:230 +0x14f
main.main()
        D:/a/kopia/kopia/main.go:77 +0x1dd

Hi,

it is hard to tell what actually went wrong. I am not a contributor but tried to track down the exception. Kopia incorporates the zalando-keyring lib which itself is based on a library for managing windows credentials ( danieljoos/wincred: Go wrapper around the Windows Credential Manager API functions (github.com)).

So the exception is basically thrown there. I am assuming your running kopia with the cli on windows right? What did you do exactly? Are you using the cli only? Have you tried to reconnect to the repository and disconnect afterwards?

Cheers,

I just did a full content verify and disconnected (as shown in my previous) post. There are no follow-up issues. Connecting and disconnecting works fine (and snapshots too …). It seems like Kopia used a lot of memory during the disconnect (which took a while) and crashed?

It is hard to identify the cause of the exception - especially if it is working right now :slight_smile:

Can you post some details about your repository? What is the size or the general setup? Are you running a repository server etc.?

Cheers,

It is a small repo (filesystem, 130gb, compressed). It is just a test repo. I only use Kopia for testing. I believe Kopia has still “reliability issues” especially with compression enabled, so I do a content verify --full after every snapshot (for testing). That is probably what the “cloud backup folks” here don’t do that often :wink: My main backup tool is restic (and finally restic supports compression too …).

What makes you think, that Kopia has issues with compression? All my repos have compression enabled and none has any issues with it.

Just based on my experience.

Example (of a well understood compression issue).