jotta / jotta-cli-issues

45 stars 1 forks source link

Jotta-cli crashing adding folder on FreeBSD #187

Closed SuperFlue closed 1 year ago

SuperFlue commented 1 year ago

jotta-cli release (jotta-cli version): jotta-cli-0.15.75988_freebsd_amd64

Description of problem: Jottad crashes while trying to add a folder to backup. I.e. running jotta-cli add <path to folder>

Expected: Not crashing really.

jotta-cli status (jotta-cli status):

root@jottacloud[~]# jotta-cli status
Error: Could not connect to jottad. Is it running on 127.0.0.1:14443 ?
Usage:
  jotta-cli status
  jotta-cli status [command]

Available Commands:
  log         See the -n last backup changes

Flags:
  -h, --help      help for status
      --json      output status in json
  -v, --verbose   verbose output for status. includes a full list of file errors

Global Flags:
      --host string   the ip address of the host jottad is running on (default "127.0.0.1")
      --port string   the port jottad is listening on (default "14443")

Use "jotta-cli status [command] --help" for more information about a command.

Relevant logs for the issue (~/.jottad/jottabackup.log or /var/lib/jotta/jottabackup.log )

pid:32265 2023/03/19 11:42:05 Detected panic:  runtime error: invalid memory address or nil pointer dereference goroutine 24 [running]:
runtime/debug.Stack()
        /usr/local/go/src/runtime/debug/stack.go:24 +0x65
git.jotta.us/jotta/desktop/client/exe/jottad/daemon.(*Daemon).loop.func1()
        /builds/jotta/desktop/client/exe/jottad/daemon/daemon.go:1021 +0x45
panic({0xcd8f20, 0x19fe4d0})
        /usr/local/go/src/runtime/panic.go:884 +0x212
git.jotta.us/jotta/desktop/client/exe/jottad/daemon/filesysteminfo.(*Filesystem).String(0x0)
        /builds/jotta/desktop/client/exe/jottad/daemon/filesysteminfo/mount.go:57 +0x23
git.jotta.us/jotta/desktop/client/exe/jottad/daemon.(*Daemon).stat(0x1?, {{0xc0003760a8?, 0x9e2085?}}, 0x0?)
        /builds/jotta/desktop/client/exe/jottad/daemon/stat.go:35 +0x8a
git.jotta.us/jotta/desktop/client/exe/jottad/daemon.(*Daemon).Stat(0xc000723538?, {{0xc0003760a8?, 0xc0003760a8?}}, 0x5?)
        /builds/jotta/desktop/client/exe/jottad/daemon/stat.go:81 +0x2f
git.jotta.us/jotta/desktop/client/exe/jottad/daemon.(*Daemon).validateRoot(0xc0001c1b00?, {{{0xc0003760a8, 0x12}}, {0x0, 0x0}, 0x0, 0x0, 0xc0004b6780})
        /builds/jotta/desktop/client/exe/jottad/daemon/addbackup.go:60 +0x3ed
git.jotta.us/jotta/desktop/client/exe/jottad/daemon.(*Daemon).handleAddBackupRequest(0xc0001c1b00, {{{0xc0003760a8, 0x12}}, {0x0, 0x0}, 0x0, 0x0, 0xc0004b6780})
        /builds/jotta/desktop/client/exe/jottad/daemon/addbackup.go:71 +0x98
git.jotta.us/jotta/desktop/client/exe/jottad/daemon.(*Daemon).loop(0xc0001c1b00)
        /builds/jotta/desktop/client/exe/jottad/daemon/daemon.go:1230 +0x18bd
created by git.jotta.us/jotta/desktop/client/exe/jottad/daemon.(*Daemon).Start
        /builds/jotta/desktop/client/exe/jottad/daemon/daemon.go:905 +0x385

Traceback

Additional info: This is running in a FreeBSD 13.1 Jail running on TrueNAS Core 13.0-U3.1. The the files are in a ZFS File dataset using these settings: image

Kimbsen commented 1 year ago

Hi.

Thanks for the report. We released 0.15.78571 which should resolve the crash. It happened due to a error when adding the folder to backup, and i don't know what that error was. But you should be able to find that out with the new version.