Bad thread interleaving may cause unexpected crash
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 45/100
Direzione di ricerca
Inizia esaminando la classe TestFluentLogger in corrispondenza della dichiarazione del contatore intorno alla riga 385 e dei relativi accessi intorno alle righe 403 e 461. Riproduci o esamina il test con l’interleaving di più thread nell’ambiente Java indicato, quindi verifica che gli accessi condivisi non consentano più un crash o un risultato incoerente.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Commit version - da14ec3
Describe the bug
It is possible to encounter an unexpected crash due to using the shared variable array in multiple locations (variable name is counters, in TestFluentLogger). In one place at Line 403 sets the value in this data-structure, whereas another location at Line 461 gets the value from this shared variable. However, there is no synchronization given between these accesses. As a result, anytime due to the existence of multiple threads, the program may crash.
Expected behavior
No crash is expected
Additional context
When I investigated the TestFluentLogger class, I found that the counters is a shared variable declared at Line 385 that is used at Line 403, Line 461. Here, the unexpected crash or inconsistency may occur if multiple threads interleave.
Environment:
I ran the test on an Ubuntu 20.04 LTS machine using OpenJDK 1.8.0_312.
- Lingua principale
- Java
- Stelle
- 210
- Fork
- 86
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di fluent/fluent-logger-java
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 15/100
fluent/fluent-logger-java#99 · 1 commento · 2 reazioni ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
fluent/fluent-logger-java#98 · 1 commento ·
-
Null Pointer Exception with slf4j-log4j12-1.7.30 (Fluent-logger incompatible with the new version) Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 42/100
fluent/fluent-logger-java#89 · 3 commenti ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 25/100
fluent/fluent-logger-java#88 · 1 commento ·
-
Conflict with Spring Webflux Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
fluent/fluent-logger-java#87 ·
Tutte le issue di fluent/fluent-logger-java
Issue simili
-
executions.Query — startDate and timeRange filters are sent with inverted comparison operators Apertaarea/plugin
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
kestra-io/plugin-kestra#190 ·
-
litertlm-android AAR ships no consumer ProGuard rules → "mid == null" SIGABRT in minified apps Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
google-ai-edge/LiteRT-LM#3739 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
integra-team-red/meet-map#249 ·
-
[Studio][Bug] Cancelled create-user dialog keeps the password and admin switch for the next attempt Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
apache/rocketmq-dashboard#5064 ·