Possible Race Condition
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 20/100
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- Ruby
- Sterne
- 578
- Forks
- 285
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus rails/execjs
-
Runtime stderr is missing from ruby error messageEvtl. vergeben @arpitjain099 hat das vor 145 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 45/100
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 35/100
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 25/100
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 25/100
Ähnliche Issues
-
Missing de translation: components/common/CommunitySolution.tsx:communitySolution.passesLatestTestsOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 63/100
hitobito/hitobito_bdp#58 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
Maintainer antworten meist innerhalb von 10 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
Maintainer antworten meist innerhalb von 2 Tagen
-
area: devops area: integration help wanted lane: free-agent roadmap size: S type: fixture
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 87/100
arminazimi/evergreen#1505 ·
Maintainer antworten meist innerhalb von 1 Tag