cmd/syncthing: Explain corruption panics (fixes #3689)
This commit is contained in:
committed by
Jakob Borg
parent
d7d5687faa
commit
9e7d50bc76
@@ -202,8 +202,24 @@ func copyStderr(stderr io.Reader, dst io.Writer) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
l.Warnf("Panic detected, writing to \"%s\"", panicFd.Name())
|
l.Warnf("Panic detected, writing to \"%s\"", panicFd.Name())
|
||||||
l.Warnln("Please check for existing issues with similar panic message at https://github.com/syncthing/syncthing/issues/")
|
if strings.Contains(line, "leveldb") && strings.Contains(line, "corrupt") {
|
||||||
l.Warnln("If no issue with similar panic message exists, please create a new issue with the panic log attached")
|
l.Warnln(`
|
||||||
|
*********************************************************************************
|
||||||
|
* Crash due to corrupt database. *
|
||||||
|
* *
|
||||||
|
* This crash usually occurs due to one of the following reasons: *
|
||||||
|
* - Syncthing being stopped abruptly (killed/loss of power) *
|
||||||
|
* - Bad hardware (memory/disk issues) *
|
||||||
|
* - Software that affects disk writes (SSD caching software and simillar) *
|
||||||
|
* *
|
||||||
|
* Please see the following URL for instructions on how to recover: *
|
||||||
|
* https://docs.syncthing.net/users/faq.html#my-syncthing-database-is-corrupt *
|
||||||
|
*********************************************************************************
|
||||||
|
`)
|
||||||
|
} else {
|
||||||
|
l.Warnln("Please check for existing issues with similar panic message at https://github.com/syncthing/syncthing/issues/")
|
||||||
|
l.Warnln("If no issue with similar panic message exists, please create a new issue with the panic log attached")
|
||||||
|
}
|
||||||
|
|
||||||
stdoutMut.Lock()
|
stdoutMut.Lock()
|
||||||
for _, line := range stdoutFirstLines {
|
for _, line := range stdoutFirstLines {
|
||||||
|
|||||||
Reference in New Issue
Block a user