Bad thread interleaving may cause unexpected crash
まだ誰も着手していません。
評価
調査の方向性
まず、385行目付近のカウンター宣言と、403行目および461行目付近のそのアクセスについて、TestFluentLoggerクラスを確認します。指定されたJava環境で複数スレッドのインターリービング下におけるテストを再現または調査し、その後、共有アクセスによってクラッシュや不整合な結果が発生しなくなっていることを確認します。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Java
- スター
- 210
- フォーク
- 86
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
fluent/fluent-logger-java のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 15/100
fluent/fluent-logger-java#99 · コメント 1 件 · リアクション 2 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
fluent/fluent-logger-java#98 · コメント 1 件 ·
-
Null Pointer Exception with slf4j-log4j12-1.7.30 (Fluent-logger incompatible with the new version) オープン
難易度 3/5 1〜2日 初心者へのやさしさ 42/100
fluent/fluent-logger-java#89 · コメント 3 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
fluent/fluent-logger-java#88 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
fluent/fluent-logger-java#87 ·
fluent/fluent-logger-java の issue をすべて見る
似ている issue
-
area/plugin
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
kestra-io/plugin-kestra#190 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
google-ai-edge/LiteRT-LM#3739 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
integra-team-red/meet-map#249 ·
-
[Studio][Bug] Cancelled create-user dialog keeps the password and admin switch for the next attempt オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
apache/rocketmq-dashboard#5064 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
wso2/dpdp-accelerator#287 ·