Possible Race Condition
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Facilidade para iniciantes
- 20/100
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- Ruby
- Estrelas
- 578
- Forks
- 285
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de rails/execjs
-
Runtime stderr is missing from ruby error messageTalvez já em andamento @arpitjain099 assumiu há 145 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 45/100
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 35/100
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 35/100
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 25/100
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 25/100
Todas as issues de rails/execjs
Issues semelhantes
-
documentation
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
alphagov/tech-docs-gem#580 ·
Mantenedores costumam responder em até 1 dia
-
Onboarding form: instructor radio never pre-selected "Yes" (permission vs permissions typo)Talvez já em andamento @ThakuraAnki assumiu hoje. Abertabug
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 72/100
WikiEducationFoundation/WikiEduDashboard#7235 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 86/100
zerocracy/judges-action#3021 ·
Mantenedores costumam responder em até 2 dias
-
Missing de translation: components/common/CommunitySolution.tsx:communitySolution.passesLatestTestsAberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 63/100
hitobito/hitobito_bdp#58 ·