Possible Race Condition
まだ誰も着手していません。
評価
調査の方向性
Start with lib/execjs/external_runtime.rb lines 137-144 and the exec_runtime method shown in the issue. Reproduce or trace the reported error, then compare this implementation with the later gem version mentioned in the report. Done means establishing whether the exit-status check is racy and whether upgrading resolves the errors.
索引モデルが issue の本文から書いたものです。
説明
I'm looking at an error thrown in a Rails application which uses v2.0.2 of execjs. I think it may be due to a potential race condition in this method, but I want to
- validate my understanding of the error thrown
- check, if my understanding is correct and this has been repaired in a later version of the gem, whether a simple upgrade may resolve the errors
For completeness, the method body (which no longer exists in this manner on most recent version) is
def exec_runtime(filename)
output = sh("#{shell_escape(*(binary.split(' ') << filename))} 2>&1")
if $?.success?
output
else
raise RuntimeError, output
end
end
My understanding so far is that, if the most recent exit code is non-zero, the runtime will raise RuntimeError with the shell output even if the shell script executed successfully. The most recent exit code would not have been from the shell script supplying the output -- i.e. a race condition in examining $?
Thank you for your help.
- 主要言語
- Ruby
- スター
- 578
- フォーク
- 285
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
rails/execjs のほかの issue
-
Runtime stderr is missing from ruby error message対応中かも @arpitjain099 が 145 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
似ている issue
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
alphagov/tech-docs-gem#580 ·
メンテナーはふだん 1 日以内に返信
-
Onboarding form: instructor radio never pre-selected "Yes" (permission vs permissions typo)対応中かも @ThakuraAnki が今日担当しました。 オープンbug
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
WikiEducationFoundation/WikiEduDashboard#7235 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
enhancement priority: low
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
davidteren/mutineer#361 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
zerocracy/judges-action#3021 ·
メンテナーはふだん 2 日以内に返信