Skip to content

lib/db: Log context on panic - #6872

Merged
imsodin merged 1 commit into
syncthing:mainfrom
imsodin:db/panicContext
Aug 1, 2020
Merged

imsodin merged 1 commit into
syncthing:mainfrom
imsodin:db/panicContext

Conversation

@imsodin

@imsodin imsodin commented Aug 1, 2020

Copy link
Copy Markdown
Member

Right now the only thing we know on panicking is that it panics, not on what. The function is clear from the traces, but not the file it panics on. Maybe that would show a pattern. May become obsolete by the next release depending on how fast the suture error handling and the subsequent db error handling comes to pass (unless there's another reason for an RC bump, then I'd propose also adding this commit (which I don't hope happens)).

@AudriusButkevicius

Copy link
Copy Markdown
Member

So if we panic, we have the stacktrace. What's the value in the warn before the panic?

@imsodin

imsodin commented Aug 1, 2020

Copy link
Copy Markdown
Member Author

The function arguments (file, folder, device, ...).

@AudriusButkevicius

Copy link
Copy Markdown
Member

If we think that is important, why we are not including that in the panic message itself?

@imsodin

imsodin commented Aug 1, 2020

Copy link
Copy Markdown
Member Author

Because we don't want personal info in the panic messages, as they get reported (there was even quite some cleanup on that part a while ago). This is just for debugging/supporting when a user asks about the panic. It's also not like I know it's important, but there's some chance that the file involved is somehow "special" or changed in some weird way or whatever.

@imsodin
imsodin merged commit bbf25e2 into syncthing:main Aug 1, 2020
@imsodin
imsodin deleted the db/panicContext branch August 1, 2020 15:32
@calmh calmh added this to the v1.9.0 milestone Aug 18, 2020
calmh added a commit to calmh/syncthing that referenced this pull request Aug 19, 2020
* main: (368 commits)
  build: We now target Go 1.14
  lib/fs: Disable ioctl on ppc (fixes syncthing#6898) (syncthing#6901)
  gui, man, authors: Update docs, translations, and contributors
  lib/dialer: Try dialing without reuse in parallel (fixes syncthing#6892) (syncthing#6893)
  cmd/stcrashreceiver: Don't crash on nil err
  all: Remove need to restart syncthing (syncthing#6883)
  lib/db: Don't put truncated files (ref syncthing#6855, ref syncthing#6501) (syncthing#6888)
  lib/osutil: Check returned error instead of info (ref syncthing#6885) (syncthing#6887)
  gui, man, authors: Update docs, translations, and contributors
  lib/osutil: Preserve perms in AtomicWriter (fixes #tbd) (syncthing#6885)
  lib/fs: Fix WatchRename test for FreeBSD (fixes syncthing#6613)
  lib/fs: Unwrap mtimeFile, get fd the "correct" way (ref syncthing#6875) (syncthing#6877)
  lib/model: Don't close file early (fixes syncthing#6875) (syncthing#6876)
  lib/fs: Unwrap mtimeFile, get fd the "correct" way (ref syncthing#6875) (syncthing#6877)
  gui, man, authors: Update docs, translations, and contributors
  lib/fs: Fix WatchRename test for FreeBSD (fixes syncthing#6613)
  lib/model: Don't close file early (fixes syncthing#6875) (syncthing#6876)
  lib/db: Log context on panic (syncthing#6872)
  gui: Don't show pull order on SO folders (ref syncthing#6807) (syncthing#6871)
  lib/model: Check folder error before sync-waiting (fixes syncthing#6793) (syncthing#6847)
  ...
@st-review st-review added the frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion label Aug 2, 2021
@syncthing syncthing locked and limited conversation to collaborators Aug 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants