{"record":{"id":"56de154c33aa28e3","repo":"wailsapp/wails","slug":"error-fixing-handler-for-signal-d-please-report-56de15","errorCode":null,"errorMessage":"error fixing handler for signal %d, please report this issue to https://github.com/wailsapp/wails: %s\\n","messagePattern":"error fixing handler for signal (.+?), please report this issue to https://github\\.com/wailsapp/wails: (.+?)\\\\n","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"v3/pkg/application/linux_cgo_gtk3.go","lineNumber":210,"sourceCode":"// This is a fundamental Go runtime limitation that cannot be fully resolved here.\n#include <errno.h>\n#include <signal.h>\n#include <stdio.h>\n#include <string.h>\n\nstatic void fix_signal(int signum) {\n    struct sigaction st;\n\n    if (sigaction(signum, NULL, &st) < 0) {\n        goto fix_signal_error;\n    }\n    st.sa_flags |= SA_ONSTACK;\n    if (sigaction(signum, &st,  NULL) < 0) {\n        goto fix_signal_error;\n    }\n    return;\nfix_signal_error:\n        fprintf(stderr, \"error fixing handler for signal %d, please \"\n                \"report this issue to \"\n                \"https://github.com/wailsapp/wails: %s\\n\",\n                signum, strerror(errno));\n}\n\nstatic void install_signal_handlers() {\n\t#if defined(SIGCHLD)\n\t\tfix_signal(SIGCHLD);\n\t#endif\n\t#if defined(SIGHUP)\n\t\tfix_signal(SIGHUP);\n\t#endif\n\t#if defined(SIGINT)\n\t\tfix_signal(SIGINT);\n\t#endif\n\t#if defined(SIGQUIT)\n\t\tfix_signal(SIGQUIT);\n\t#endif","sourceCodeStart":192,"sourceCodeEnd":228,"githubUrl":"https://github.com/wailsapp/wails/blob/0e754b1b40ba9044c2a1460e23b7c3de20fc5cf3/v3/pkg/application/linux_cgo_gtk3.go#L192-L228","documentation":"Same fix_signal/SA_ONSTACK routine, compiled into Wails v3's GTK3-legacy Linux path (linux_cgo_gtk3.go): it rewrites handlers for SIGCHLD, SIGHUP, and friends so handlers run on an alternate signal stack, needed because Go's small stacks cannot host C handlers. The stderr message means sigaction failed for one signal and includes errno; the process continues.","triggerScenarios":"sigaction returning EPERM/EINVAL under a restrictive sandbox (Docker seccomp, gVisor, Android-likes); building with a toolchain/kernel combination where a listed signal constant exists at compile time but is invalid at runtime; running under ptrace-based supervisors.","commonSituations":"v3 apps packaged into distroless/minimal containers; CI smoke tests under constrained runners; the message appearing at every startup without other symptoms.","solutions":["Confirm it is benign: the app continues; only the alternate-stack behavior for that one signal is lost","Adjust the sandbox/seccomp policy to permit sigaction for the process","Build with the default GTK4 stack (linux_cgo.c path) or a newer v3 version where the signal-fix logic is shared and hardened","Capture the full line (signal number + errno) and report to https://github.com/wailsapp/wails if it correlates with missing crash stacks"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Run once outside the sandbox to confirm the environment causes the sigaction failure","Migrate off the legacy GTK3 build (-tags gtk3) to the default GTK4 path","Preserve the full stderr line (signal + errno) when reporting upstream"],"tags":["linux","signals","gtk3","cgo","startup"],"backgroundTag":null,"analyzedSha":"0e754b1b40ba9044c2a1460e23b7c3de20fc5cf3","analyzedAt":"2026-08-15T14:17:36.034Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}