Database errors after install

Basically I’ve run the install script and I get errors reading or writing history that look like this:

Error: error returned from database: (code: 5386) disk I/O error

Caused by:
(code: 5386) disk I/O error

Location:
crates/atuin/src/command/client/history.rs:564:18

I’ve tried wiping the ~/.local/share/atuin and ~/.config/atuin and ~/.atuin folders multiple times, I’ve tried zsh instead of bash. I’ve also coincidently completely replaced the hard drive it’s using too. This is on a standard user account. I’ve installed it for root user and it works perfectly.

Hey!

Are you able to share the output of atuin doctor please?

For the account it fails on:

~$ atuin doctor
Error: error returned from database: (code: 5386) disk I/O error

Caused by:
(code: 5386) disk I/O error

Location:
crates/atuin/src/command/client.rs:126:18

And for the one that works:

$atuin doctor
Atuin Doctor
Checking for diagnostics

Please include the output below with any bug reports or issues

{
“atuin”: {
“version”: “18.3.0”,
“sync”: null,
“sqlite_version”: “3.44.0”
},
“shell”: {
“name”: “bash”,
“default”: “bash”,
“plugins”: [
“atuin”,
“bash-preexec”
],
“preexec”: “bash-preexec”
},
“system”: {
“os”: “Debian GNU/Linux”,
“arch”: “x86_64”,
“version”: “12”,
“disks”: [
{
“name”: “/dev/nvme0n1p2”,
“filesystem”: “ext4”
},
{
“name”: “/dev/nvme0n1p1”,
“filesystem”: “vfat”
},
{
“name”: “mergerfs”,
“filesystem”: “fuse.mergerfs”
},
{
“name”: “/dev/sdj”,
“filesystem”: “ext4”
},
{
“name”: “/dev/sdp”,
“filesystem”: “ext4”
},
{
“name”: “/dev/sdi”,
“filesystem”: “ext4”
},
{
“name”: “/dev/sdh”,
“filesystem”: “ext4”
},
{
“name”: “/dev/sdd”,
“filesystem”: “ext4”
},
{
“name”: “/dev/sdc”,
“filesystem”: “ext4”
},
{
“name”: “/dev/sde”,
“filesystem”: “ext4”
},
{
“name”: “/dev/sdf”,
“filesystem”: “ext4”
},
{
“name”: “/dev/sdk”,
“filesystem”: “ext4”
},
{
“name”: “/dev/sdo”,
“filesystem”: “ext4”
},
{
“name”: “/dev/sdl”,
“filesystem”: “ext4”
},
{
“name”: “/dev/sdg”,
“filesystem”: “ext4”
},
{
“name”: “/dev/sdb”,
“filesystem”: “ext4”
},
{
“name”: “/dev/sda”,
“filesystem”: “ext4”
},
{
“name”: “/dev/sdn”,
“filesystem”: “ext4”
},
{
“name”: “overlay”,
“filesystem”: “overlay”
},
{
“name”: “/dev/sdm”,
“filesystem”: “ext4”
},
{
“name”: “/dev/sdq”,
“filesystem”: “ext4”
}
]
}
}

Can you tell me as much as possible about the disk and filesystem for the one that fails?

It’s on a brand new 12 tb ext4 formatted drive (it failed similarly on a smaller drive formatted the same way) that is accessed as part of a mergerfs pool. The working account home folder is not being access via mergerfs.

The fstab entry for the pool looks like:

# mergerfs pool
/mnt/disk* /srv/storage fuse.mergerfs direct_io,defaults,allow_other,minfreespace=50G,fsname=mergerfs,cache.files=off,dropcacheonclose=true,category.create=mfs 0 0

Are you able to try without mergerfs? From a brief look at their repo, there can be perf and other issues with sqlite

Mergerfs does indeed seem to be the culprit, moving the home folder else where allows it to work.

Ok, so with a bit of experimenting I’ve manged to get it to work. For anyone in the future that has this problem cache.files=off was causing my issue, setting it to partial instead of off makes atuin work correctly. I guess this is an sqlite3/mmap issue.

thanks for the help ellie

2 Likes