1
0
mirror of https://github.com/rclone/rclone.git synced 2025-01-29 21:04:23 +02:00
Michał Matczuk eb10ac346f fs/accounting: Added StatsInfo locking in statsGroups sum function (#3844)
Without the fix we can have a race, example:

```
Write at 0x00c000432039 by goroutine 187:
  github.com/rclone/rclone/fs/accounting.(*StatsInfo).Error()
      fs/accounting/stats.go:495 +0x3f1
  github.com/rclone/rclone/fs/accounting.(*StatsInfo).Error-fm()
      fs/accounting/stats.go:477 +0x55
  github.com/rclone/rclone/fs/walk.listRwalk.func1()
      fs/walk/walk.go:162 +0xd2
  github.com/rclone/rclone/fs/walk.walk.func2()
      fs/walk/walk.go:402 +0x30f

Previous read at 0x00c000432039 by goroutine 184:
  github.com/rclone/rclone/fs/accounting.(*statsGroups).sum()
      fs/accounting/stats_groups.go:351 +0xcae
  github.com/rclone/rclone/fs/accounting.rcTransferredStats()
      fs/accounting/stats_groups.go:132 +0x1f4
```

Fixes #3844
2020-01-04 16:45:24 +00:00
..
2019-12-10 12:12:29 +00:00
2019-10-05 10:22:43 +01:00
2019-11-18 14:13:02 +00:00
2019-06-19 11:59:46 +01:00
2019-02-07 16:42:26 +00:00
2019-06-19 11:59:46 +01:00
2019-04-30 14:12:18 +02:00
2019-11-19 16:51:32 +00:00
2019-09-04 10:23:48 +01:00