restic / rest-server

Rest Server is a high performance HTTP server that implements restic's REST backend API.
BSD 2-Clause "Simplified" License
899 stars 139 forks source link

Segfault on 0.11.0 and 0.12.1 #289

Closed pclerie closed 3 weeks ago

pclerie commented 3 weeks ago

Output of rest-server --version

Segmentation fault (core dumped)

How did you run rest-server exactly?

From the command line as unprivileged user: rest-server --version

From the command line as root, the result is: Segmentation fault

What backend/server/service did you use to store the repository?

Directory: /var/lib/restic

Expected behavior

The version line.

Actual behavior

dmesg output:

[14157.815288] rest-server[5146]: segfault at 0 ip 0000000000471b04 sp 00007ffe3f573290 error 4 in rest-server[400000+4b1000] likely on CPU 0 (core 0, socket 0)
[14157.815302] Code: 24 10 48 8b 4c 24 08 48 8b 04 24 48 81 c4 70 01 00 00 9d 5d c3 cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc 48 8d 77 08 <48> 8b 3f e9 b4 c6 ff ff cc cc cc cc cc cc cc cc cc cc cc cc cc cc

Steps to reproduce the behavior

Do you have any idea what may have caused this?

Do you have an idea how to solve the issue?

Did rest-server help you today? Did it make you happy in any way?

I have version 0.11.0 running nicely at several sites, so I know that should work. I was trying 0.12.1 on a small Linode with a single core. When I got the segfault I tried 0.11.0 with the same result.

System is: Nanode (1 CPU, 1 GB RAM, 25G storage), Ubuntu 24.04

So far nothing shows up on Google and I am not sure how to proceed. Help!

rawtaz commented 3 weeks ago

Please update your initial post to be more specific. Show the exact and full commands that you ran and all of the output, for each of the two tests you performed. Also:

Restic does not have a --version option, at least as far as I know. That might suggest you are using another binary than the official one.

pclerie commented 3 weeks ago

Output of rest-server --version

Segmentation fault (core dumped)

I had hoped nobody had seen it yet! :-(

Anyway, my bad! I downloaded the wrong tarball. freebsd instead of linux. Can't believe I did that. I shall now go and commit seppuku.

Apologies and Best regards to all

rawtaz commented 3 weeks ago

I had hoped nobody had seen it yet! :-(

🤣

That's all fine! I was pondering that possibility, but (wrongly, I guess) presumed that you were running the very same binary, first as non-root and then as root. Did you run two different binaries?

I shall now go and commit seppuku.

Oh no, please don't do that! Your backups need you! ;-)