Skip to content

Missing lock in DeviceStatistics ("fatal error: concurrent map read and map write") #9274

Closed

Description

@syncthing-sentry
INFO: syncthing v1.27.1-rc.1 "Gold Grasshopper" (go1.21.5 linux-amd64) [email protected] 2023-12-08 06:13:09 UTC
Panic at 2023-12-11T07:54:04+01:00
fatal error: concurrent map read and map write

goroutine 39 [running]:
github.com/syncthing/syncthing/lib/model.(*model).DeviceStatistics(0xc000002000)
	github.com/syncthing/syncthing/lib/model/model.go:821 +0x1c5
github.com/syncthing/syncthing/lib/connections.(*service).dialDevices(_, {_, _}, {_, _, _}, {0x25, {0xc00056f900, 0x3, 0x3}, ...}, ...)
	github.com/syncthing/syncthing/lib/connections/service.go:561 +0x142
github.com/syncthing/syncthing/lib/connections.(*service).connect(0xc00027d2c0, {0x1327f00, 0xc000362140})
	github.com/syncthing/syncthing/lib/connections/service.go:489 +0x22e
github.com/syncthing/syncthing/lib/svcutil.(*service).Serve(0xc000034740, {0x1327f00, 0xc000362140})
	github.com/syncthing/syncthing/lib/svcutil/svcutil.go:130 +0x85
github.com/thejerf/suture/v4.(*Supervisor).runService.func2()
	github.com/thejerf/suture/[email protected]/supervisor.go:565 +0xe6
created by github.com/thejerf/suture/v4.(*Supervisor).runService in goroutine 93
	github.com/thejerf/suture/[email protected]/supervisor.go:539 +0x1ca

//@calmh

Activity

  1. added this to the v1.27.1 milestone on Dec 11, 2023
  2. added 2 commits that reference this issue on Dec 11, 2023
    48883e0
    768fd6b
  3. added
    bug
    on Dec 11, 2023
  4. modified the milestones: v1.27.1, v1.27.2 on Dec 11, 2023
  5. added 2 commits that reference this issue on Dec 11, 2023
    e44b2e2
    64aa109
  6. MaxXor commented on Dec 19, 2023

    @MaxXor

    Can you please release the update? @calmh It's crashing every day for me... and I don't want to disable usage survey (if that's related to the DeviceStatistics??)

  7. calmh commented on Dec 19, 2023

    @calmh
    Member

    @MaxXor excellent opportunity to check that the RC resolves it! https://github.com/syncthing/syncthing/releases/tag/v1.27.2-rc.1

    (it's not the usage survey, so disabling that wouldn't help unfortunately)

  8. added a commit that references this issue on Jan 14, 2024
    f701994
  9. added a commit that references this issue on Jan 28, 2024
    30fe2cf
  10. added
    frozen-due-to-age
    on Apr 9, 2025
  11. locked and limited conversation to collaborators on Apr 9, 2025
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