Commit ef782b7
fix(linux): stop forcing SA_ONSTACK on SIGUSR1 to prevent WebKit freeze (#5530)
WebKit's JavaScriptCore uses SIGUSR1 to suspend/resume threads for
conservative GC stack scanning. The signal-handler fix added in
alpha.97 (#5507) re-applied SA_ONSTACK to every signal it touched,
including SIGUSR1. Once JSC installs its own SIGUSR1 handler it owns the
signal (Go no longer handles it), so forcing SA_ONSTACK makes that
handler run on Go's alternate signal stack, breaking GC thread
synchronisation. This froze the WebKit UI during idle garbage
collection (most visibly with the inspector open) while the Go backend
kept running.
Remove fix_signal(SIGUSR1) from install_signal_handlers in v3 (GTK4 +
GTK3) and v2. The genuine #5506 fix for SIGSEGV/SIGBUS (which Go needs
SA_ONSTACK for) is unaffected.
Fixes #5527
https://claude.ai/code/session_01AtT1CjDNRArXv1eddXte2a
Co-authored-by: Claude <noreply@anthropic.com>1 parent 37ec248 commit ef782b7
4 files changed
Lines changed: 19 additions & 9 deletions
File tree
- v2/internal/frontend/desktop/linux
- v3
- pkg/application
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
69 | | - | |
70 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
71 | 74 | | |
72 | 75 | | |
73 | 76 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
118 | | - | |
119 | | - | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
120 | 123 | | |
121 | 124 | | |
122 | 125 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
225 | | - | |
226 | | - | |
227 | | - | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
228 | 231 | | |
229 | 232 | | |
230 | 233 | | |
| |||
0 commit comments