Skip to content

Conversation

@emlun
Copy link
Member

@emlun emlun commented Jul 26, 2023

Purpose

Originally discovered on commit f71387c in PR #8757. Commit 855c6dc introduces a data race in TestCSRFRequired because of how the resp, err variables are reused between the parallel test routines.

Testing

  • Commit 2296c38 should fairly reliably reveal the data race. If not, increase the delay in dataRaceSleep and re-run the test.
  • Commit 96013c3 fixes the data race.
  • Commit 61c65ff removes the delays introduced in 2296c38.

Documentation

N/A

@emlun emlun changed the title Test csrf data race Fix data race in TestCSRFRequired Jul 26, 2023
@calmh
Copy link
Member

calmh commented Jul 26, 2023

D'oh 🤦

@calmh calmh enabled auto-merge (squash) July 26, 2023 21:22
@emlun
Copy link
Member Author

emlun commented Jul 26, 2023

No shade, it's a very easy mistake to make! 😄

@calmh calmh merged commit b08b99e into syncthing:main Jul 26, 2023
calmh added a commit to calmh/syncthing that referenced this pull request Jul 27, 2023
* main:
  cmd/strelaysrv: Handle accept error with debug set (fixes syncthing#9001) (syncthing#9004)
  lib/api: Fix data race in TestCSRFRequired (syncthing#9006)
  gui: Show full error for failed items (syncthing#9005)
  lib/api: Allow `Bearer` authentication style with API key (syncthing#9002)
@emlun emlun deleted the test-csrf-data-race branch July 27, 2023 14:37
@calmh calmh added this to the v1.23.7 milestone Jul 31, 2023
calmh added a commit to calmh/syncthing that referenced this pull request Aug 3, 2023
* main:
  build: Increase Go version to 1.20.7
  lib/config: Allow sharing already encrypted folder with untrusted devices (fixes syncthing#8965) (syncthing#9012)
  gui: Use case-insensive and backslash-agnostic versions filter (fixes syncthing#7973) (syncthing#8995)
  gui, man, authors: Update docs, translations, and contributors
  build: Run govulncheck (fixes syncthing#8983)
  build: Run build & tests on main branch nightly
  build: Send test logs to Grafana Loki for statistics
  all: Refactor the protocol/model interface a bit (ref syncthing#8981) (syncthing#9007)
  lib/connections: Fix building with `-tags noquic` (syncthing#9009)
  gui: Fix tooltips on buttons inside button groups (ref syncthing#7984) (syncthing#9008)
  cmd/strelaysrv: Handle accept error with debug set (fixes syncthing#9001) (syncthing#9004)
  lib/api: Fix data race in TestCSRFRequired (syncthing#9006)
  gui: Show full error for failed items (syncthing#9005)
  lib/api: Allow `Bearer` authentication style with API key (syncthing#9002)
@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 Jul 26, 2024
@syncthing syncthing locked and limited conversation to collaborators Jul 26, 2024
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.

3 participants