Skip to content

Panic due to internal folder context used on exported methods  #6664

Closed

Description

@syncthing-sentry

Sentry Issue: SYNCTHING-211

  File "/tmp/sync/lib/model/folder.go", line 243, in doInSync
    case <-f.ctx.Done():
  File "/tmp/sync/lib/model/folder_recvonly.go", line 67, in Revert
    f.doInSync(func() error { f.revert(); return nil })
  File "/tmp/sync/lib/model/model.go", line 2264, in Revert
    runner.Revert()

panic: runtime error: invalid memory address or nil pointer dereference

Since we get the context as an argument to serve, using that context in any exported method is racy. We should probably have a second context/channel for folder lifetime created in the constructor and cancelled in Stop, in addition to the current one for "serve lifetime".

Activity

  1. added
    bug
    on May 19, 2020
  2. added a commit that references this issue on Nov 6, 2020
    8181490
  3. added a commit that references this issue on Nov 9, 2020
    a4fb013
  4. added this to the v1.12.0 milestone on Nov 9, 2020
  5. added a commit that references this issue on Nov 11, 2020
    fcd80c1
  6. added
    frozen-due-to-age
    on Nov 10, 2021
  7. locked and limited conversation to collaborators on Nov 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugfrozen-due-to-age

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions