Avoid data loss when KDL suceed

Hello. Sometimes, when I get a KDL error, I found that some changes in files where lost. There are any way to prevent this?

The command ’ sync ’ can be usefull in this cases?

Thank you!!

IIRC the command “on_exit sync”, followed by exiting KDL is what I normally use.

sync is a cli command which is unavailable in KDL. If Haiku enters KDL it means that something went really wrong, so syncing the data might result in a FS corruption. Often ‘es’ (short for escape) can let you out of KDL, Sometimes you need to do it several times or with combination with ‘unreal’ command. Read more here https://www.haiku-os.org/documents/dev/welcome_to_kernel_debugging_land

Thanks for your answer!

If I use crontab and call the ‘sync’ command every 20 minutes, for example (I mean, using the ‘sync’ command before the KDL), could be a solution?

Thank you!!

I think Haiku syncs disk cache automatically more often than every 20 minutes. It’s better to open a ticket and attach a picture of KDL.

Thank you for your answers! If I found some “pattern” I will open a ticket. (until now, the KDL errors were random).