andrewchambers / bupstash

Easy and efficient encrypted backups.

Home Page:https://bupstash.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Attach path to failed put errors

piegamesde opened this issue · comments

My backup fails after some time with "bupstash put: Resource temporarily unavailable (os error 11)". This is not enough information for me to successfully debug the cause. I'd need to know which file it failed on, and during which operation.

Yeah, at the very least it should be mentioning the path.

Any chance of getting an strace log to help track down the cause?

My initial debugging plan rested on the assumption that this is some IO error, in which case knowing the file and maybe also the operation in code that failed should be enough to debug it. However, it looks like this error may also come from different operations, for example spawning threads, in which case I'll probably have to do some strace inspection. I'd like to avoid it if possible though, especially since I think that we should have those error messages anyways.

Interesting, it could be hitting some resource limits.

For the error handling, it looks like enabling the "backtrace" feature on the anyhow crate and then RUST_BACKTRACE=1 should be enough to get source information from all errors. Only thing left to test is if the error printing at the bottom of the main function also automatically makes use of that information.

For better or for worse, I can't reproduce my original error which prompted this investigation on master anymore. So it must have been fixed between 0.12 and 7082d77 somehow.