Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loadpoint: fix reentrant locks #18650

Merged
merged 2 commits into from
Feb 7, 2025
Merged

Loadpoint: fix reentrant locks #18650

merged 2 commits into from
Feb 7, 2025

Conversation

andig
Copy link
Member

@andig andig commented Feb 7, 2025

Fix #18603

/cc @GrimmiMeloni @naltatis Bisher bin ich davon ausgegangen, dass RLocks reentrant sind. Tatsächlich ist das nicht der Fall wie @GrimmiMeloni dankbarer Weise in #18603 (comment) heraus gefunden hat.
Wir müssen daher (leider) sehr vorsichtig sein, welche Funktionen mit Locks aufgerufen werden. Die Strategie hier ist jetzt:

  • RLocks nur einmalig in den API Funktionen zu nutzen (exportiert, groß geschrieben)
  • keine zusätzlichen RLocks in internen Funktionen (klein geschrieben)
  • Update verwendet nach Möglichkeit nur noch API Funktionen
  • Kleinschreibung einer Loadpoint Methode ist eine Indikation für fehlendes Locking, aber keine Garantie
  • Großschreibung SOLL Locking sicherstellen

Ich habe hier auf den großen Umbau verzichtet sondern nur punktuell offensichtliche Probleme angefasst. Leider gibt es kein Tooling das uns hier helfen kann.

TODO

@andig andig added the bug Something isn't working label Feb 7, 2025
@andig andig requested a review from naltatis February 7, 2025 08:11
@andig andig marked this pull request as ready for review February 7, 2025 08:11
@andig andig merged commit 04d310a into master Feb 7, 2025
6 checks passed
@andig andig deleted the fix/locks branch February 7, 2025 10:45
@jeffborg jeffborg mentioned this pull request Feb 7, 2025
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

deadlock in loadpoint api
1 participant