Segmentation fault on TrueNAS Core Jail after an update (and how I solved it)

Since a couple of days, I get a persistent segmentation fault on a TrueNAS Core Jail when running “urbackupsrv run”, immediately after the HTTP server was started. Apparently, this happened after some update.

urbackup version used: 2.5.26.0

This is how it looked in the shell:

2022-10-29 18:19:34: HTTP: Server started up successfully!
Segmentation fault

This is what I tried to fix it, which all didn’t work:

  • reinstalling urbackup-server via pkg
  • downgrading sqlite3 to a previous version (and locked that verion in pkg)
  • downgrading cryptopp to a previous version (and locked that verion pkg)
  • wiped the mounted backup dataset (approx. 10TB)
  • installed urbackup in a fresh, 13.1 Jail

The segmentation fault persisted.

This is how I fixed it:

  • Built urbackup from source within the Jail using these instructions: UrBackup - Install UrBackup server from sources
  • However, I had to run ./configure like this, otherwise it wouldn’t work:
    ./configure --enable-embedded-cryptopp
  • replaced the following binaries in /usr/local/bin (which were installed using pkg via the community urbackup TrueNAS plugin) by those which were just built from source:
    • urbackupsrv
    • urbackup_snapshot_helper
    • urbackup_mount_helper
  • When starting “urbackupsrv run”, it complained it couldn’t change the working directory to /usr/local/var, which didn’t exist. I fixed this by creating a symbolic link from /usr/local/var to my mounted dataset (that is exactly the Backup storage path in the server settings) like this:
    • ln -s /mnt/backups/urbackup /usr/local/var

Especially the last step with /usr/local/var is pretty strange to me and of course you’d need to point it to your specific Backup storage path.

Finally, when running urbackupsrv run, it printed that it had found two new clients. Also strange, because these clients are still connected.

So everything seems to be up and running again, administrator account, clients with their configuration, older backups. Now catching up a couple of days worth of missed backup schedules…

This is the bug ticket btw. 266531 – archivers/urbackup-server: UrBackup Server doesn’t startup after update to 2.5.26_1 on TrueNAS (FreeBSD 13.1)

1 Like

Don’t try the following. It stupidly makes the database directory and it’s backup directory be the same, giving bizarre effects.

Instead, do this:

  • mkdir /usr/local/var
  • mkdir /usr/local/var/urbackup
  • cp <your database backup folder, eg. /mnt/backups/urbackup/urbackup>/* /usr/local/var/urbackup
  • chown -R urbackup:urbackup /usr/local/var/urbackup

This way it now really works for me.