at_exit hook sometimes freeze forever when a rails application executes test codes
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 30/100
Direzione di ricerca
Start by tracing the debug gem's at_exit hook and its behavior after a fork, using the Rails test-code sequence described in the issue as the reproduction context. Check how it waits for non-Ruby child processes and verify that the process finishes successfully without waiting indefinitely.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Your environment
- ruby 3.4.1 (2024-12-25 revision 48d4efcb85) +PRISM [x86_64-linux]
- rdbg 1.11.0
Describe the bug
This issue is related to https://github.com/ruby/debug/issues/1113.
Since the at_exit hook waits for all child processes other than the Ruby process, it leads to the following problem in the test code of a real Rails application.
- Load the debug gem
- The capybara-playwright-driver starts Playwright as a child process
- The capybara-playwright-driver registers an at_exit hook to terminate Playwright when the test ends
- During test code execution, when a fork occurs, the debug gem registers the at_exit hook
- After all test cases have finished, the debug gem's at_exit hook executes first and waits for the child process to terminate, but since the at_exit hook to terminate Playwright does not execute, it continues to wait indefinitely
This can occur normally if the debug gem is required.
If it happens in a CI execution environment, it could result in unnecessary costs by holding computing resources for a long time.
I believe that waiting for all child processes(including not Ruby process) after a fork occurs is a significant issue.
To Reproduce
I described above.
Expected behavior
process finishes successfully.
- Lingua principale
- Ruby
- Stelle
- 1.3k
- Fork
- 146
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Apri la guida per i contributori
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 ruby/debug
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
-
Support exceptionOptions in setExceptionBreakpoints to catch arbitrary exception classes via DAP Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
バグ
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
-
Version bump for OpenVox 9 Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
voxpupuli/puppet-epel#186 · 1 commento ·
-
external_created_at is no longer used for the message timestamp since the new message UI (v4.4.0) ApertaBug Frontend
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100