Fantom's tester prints no stack when it crashes: it installs no failure signal handler, and its glog config.h compiles the handler and the symbolizer out
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 70/100
Research direction
Start from private/react-native-fantom/tester/src/main.cpp and packages/react-native/ReactAndroid/src/main/jni/third-party/glog/config.h where the issue supplies exact diffs. Apply the three hunks, then rebuild with yarn workspace @react-native/fantom build and ./gradlew :private:react-native-fantom:buildFantomTester --rerun. Done when a SIGSEGV crash prints named frames such as faultOnNullWrite().
Written by the indexing model from the issue text.
Description
Description
When Fantom's tester crashes in native code, the runner reports Command failed (status code: (empty), signal: SIGSEGV) with empty stdout and stderr, so nothing says where it died.
The tester's main initializes glog but never calls google::InstallFailureSignalHandler() (main.cpp L20-L24). Adding the call alone changes nothing: the tester builds glog with the Android config.h (config.h), which never defines HAVE_SIGACTION, and glog 0.3.5's InstallFailureSignalHandler is empty without it (signalhandler.cc L354-L366).
With HAVE_SIGACTION defined, the handler prints the signal, but every frame reads (unknown). The same config.h ends with #undef OS_LINUX (L178-L181). glog's utilities.h defines OS_LINUX from __linux__ (L42), then includes config.h (L81), then defines HAVE_SYMBOLIZE only #if defined(__ELF__) && defined(OS_LINUX) (L125-L126), so Symbolize compiles to its stub on a Linux host.
Defining HAVE_SIGACTION and keeping OS_LINUX (and the syscall headers) when __ANDROID__ is not defined, plus the one call in main, gives a crash report naming each frame's function. The patches in the reproducer show each step:
--- a/private/react-native-fantom/tester/src/main.cpp
+++ b/private/react-native-fantom/tester/src/main.cpp
@@ -21,6 +21,7 @@
google::InitGoogleLogging("react-native-fantom");
FLAGS_logtostderr = true;
FLAGS_minloglevel = AppSettings::minLogLevel;
+ google::InstallFailureSignalHandler();
}
static void setUpFeatureFlags() {
--- a/packages/react-native/ReactAndroid/src/main/jni/third-party/glog/config.h
+++ b/packages/react-native/ReactAndroid/src/main/jni/third-party/glog/config.h
@@ -64,6 +64,10 @@
/* Define if you have the `sigaltstack' function */
#define HAVE_SIGALTSTACK 1
+#if !defined(__ANDROID__)
+#define HAVE_SIGACTION 1
+#endif
+
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
@@ -176,7 +180,9 @@
/* TODO(vjn/dreiss): revisit these when use the android-21 (or newer) NDK platform. */
+#if defined(__ANDROID__)
#undef HAVE_SYSCALL_H
#undef HAVE_SYS_SYSCALL_H
#undef OS_LINUX
+#endif
#undef OS_MACOSX
Under AddressSanitizer or ThreadSanitizer the sanitizer's own report already prints the stack, so the call could be left out of those builds.
Steps to reproduce
-
git clone https://github.com/YevheniiKotyrlo/react-native-fantom-reproducer && cd react-native-fantom-reproducer -
./fantom/reproduce.sh crash-prints-no-stack(needs Docker). It clonesreact/react-nativeatmainand builds Fantom's tester as CI does, then:- applies
fantom/null-write-in-clear-all-images.patch, which makesNativeFantom::clearAllImageswrite through a null pointer in a function namedfaultOnNullWrite, and copiesfantom/NativeCrash-itest.js, a test that callsNativeFantom.clearAllImages(), intoprivate/react-native-fantom/src/__tests__/; - runs
yarn fantom private/react-native-fantom/src/__tests__/NativeCrash-itest.json that tester; - applies
fantom/install-failure-signal-handler.patch(themain.cpphunk above), rebuilds and runs the test again; - applies
fantom/glog-config-sigaction.patch(HAVE_SIGACTION), rebuilds and runs it again; - applies
fantom/glog-config-keep-os-linux.patch(OS_LINUXkept), rebuilds and runs it once more.
Each rebuild runs
./gradlew :private:react-native-fantom:buildFantomTester --rerunafteryarn workspace @react-native/fantom build, since Gradle calls the tester up to date after a change to glog'sconfig.h. - applies
Expected: the crash's report names SIGSEGV and the crashing frame, faultOnNullWrite().
Actual: on main at f1f1474, steps 2 and 3 print stderr: (empty); step 4 prints the signal and 24 frames, each (unknown); only step 5 names faultOnNullWrite(), NativeFantom::clearAllImages() and the frames up to main.
React Native Version
0.88.0 (reproduced on main at f1f1474)
Affected Platforms
Build - Linux
Output of npx @react-native-community/cli info
System:
OS: Linux 6.18 Ubuntu 22.04.5 LTS 22.04.5 LTS (Jammy Jellyfish)
CPU: (24) x64 AMD Ryzen 9 9950X3D 16-Core Processor
Memory: 121.74 GB / 125.63 GB
Shell:
version: 5.1.16
path: /bin/bash
Binaries:
Node:
version: 22.14.0
path: /usr/local/bin/node
Yarn:
version: 1.22.22
path: /usr/local/bin/yarn
npm:
version: 10.9.2
path: /usr/local/bin/npm
Watchman: Not Found
SDKs:
Android SDK:
API Levels:
- "37"
Build Tools:
- 37.0.0
Android NDK: 28.2.13676358
IDEs:
Android Studio: Not Found
Languages:
Java:
version: 17.0.20.1
path: /usr/bin/javac
Ruby:
version: 3.0.2
path: /usr/bin/ruby
npmPackages:
"@react-native-community/cli": Not Found
react: Not Found
react-native: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: Not found
newArchEnabled: Not found
iOS:
hermesEnabled: Not found
newArchEnabled: Not found
Stacktrace or Logs
react-native f1f147405888d6ffbcab40e59a05df7aa21ddc7e, committed 2026-10-31T14:33:21+00:00
clang version 23.1.3 (https://github.com/llvm/llvm-project 0d261d1ca552c95a8f007e061c787ac7132fbcbc)
== the stock tester
Command failed (status code: (empty), signal: SIGSEGV): /react-native/private/react-native-fantom/build/tester/fantom_tester --bundlePath /react-native/private/react-native-fantom/.out/js-builds/run-1793466203344/1793466216285-NativeCrash-itest.js.bundle.js --featureFlags {} --minLogLevel error
stdout:
(empty)
stderr:
(empty)
== InstallFailureSignalHandler in main
Command failed (status code: (empty), signal: SIGSEGV): /react-native/private/react-native-fantom/build/tester/fantom_tester --bundlePath /react-native/private/react-native-fantom/.out/js-builds/run-1793466247448/1793466255947-NativeCrash-itest.js.bundle.js --featureFlags {} --minLogLevel error
stdout:
(empty)
stderr:
(empty)
== and HAVE_SIGACTION in glog's config.h
Command failed (status code: (empty), signal: SIGSEGV): /react-native/private/react-native-fantom/build/tester/fantom_tester --bundlePath /react-native/private/react-native-fantom/.out/js-builds/run-1793466328130/1793466336202-NativeCrash-itest.js.bundle.js --featureFlags {} --minLogLevel error
stdout:
(empty)
stderr:
*** Aborted at 1793466337 (unix time) try "date -d @1793466337" if you are using GNU date ***
PC: @ 0x0 (unknown)
*** SIGSEGV (@0x0) received by PID 12849 (TID 0x7fa6a81aaf00) stack trace: ***
@ 0x7fa6aa33b520 (unknown)
@ 0x5c12e082a256 (unknown)
@ 0x5c12e082a21d (unknown)
@ 0x5c12e0837eac (unknown)
@ 0x5c12e08322e6 (unknown)
@ 0x5c12e083ee70 (unknown)
@ 0x5c12e083ee26 (unknown)
@ 0x5c12e083edb0 (unknown)
@ 0x5c12e083ec70 (unknown)
@ 0x7fa6aaef48d7 (unknown)
@ 0x7fa6ab0b2921 (unknown)
@ 0x7fa6ab0b3230 (unknown)
@ 0x7fa6ab0b2a4f (unknown)
@ 0x7fa6ab097c0d (unknown)
@ 0x7fa6aaee97fb (unknown)
@ 0x5c12e08596f8 (unknown)
@ 0x5c12e0859665 (unknown)
@ 0x5c12e0846b11 (unknown)
@ 0x5c12e084100d (unknown)
@ 0x5c12e08a86a1 (unknown)
@ 0x7fa6aa322d90 (unknown)
@ 0x7fa6aa322e40 (unknown)
@ 0x5c12e0821745 (unknown)
@ 0x0 (unknown)
== and OS_LINUX kept in glog's config.h
Command failed (status code: (empty), signal: SIGSEGV): /react-native/private/react-native-fantom/build/tester/fantom_tester --bundlePath /react-native/private/react-native-fantom/.out/js-builds/run-1793466481945/1793466501913-NativeCrash-itest.js.bundle.js --featureFlags {} --minLogLevel error
stdout:
(empty)
stderr:
*** Aborted at 1793466504 (unix time) try "date -d @1793466504" if you are using GNU date ***
PC: @ 0x0 (unknown)
*** SIGSEGV (@0x0) received by PID 15321 (TID 0x73082173ff00) from PID 0; stack trace: ***
@ 0x7308238d0520 (unknown)
@ 0x58ef9a29c066 facebook::react::faultOnNullWrite()
@ 0x58ef9a29c02d facebook::react::NativeFantom::clearAllImages()
@ 0x58ef9a2a9cbc _ZN8facebook5react8bridging10callFromJsIvNS0_12NativeFantomEvJEJEEET_RNS_3jsi7RuntimeEMT0_FT1_S7_DpT2_ERKSt10shared_ptrINS0_11CallInvokerEEPS8_DpOT3_
@ 0x58ef9a2a40f6 facebook::react::NativeFantomCxxSpec<>::__clearAllImages()
@ 0x58ef9a2b0c80 _ZZN8facebook5react11TurboModule6createERNS_3jsi7RuntimeERKNS2_10PropNameIDEENKUlS4_RKNS2_5ValueEPS9_mE_clES4_SA_SB_m
@ 0x58ef9a2b0c36 _ZSt13__invoke_implIN8facebook3jsi5ValueERZNS0_5react11TurboModule6createERNS1_7RuntimeERKNS1_10PropNameIDEEUlS6_RKS2_PSA_mE_JS6_SB_SC_mEET_St14__invoke_otherOT0_DpOT1_
@ 0x58ef9a2b0bc0 _ZSt10__invoke_rIN8facebook3jsi5ValueERZNS0_5react11TurboModule6createERNS1_7RuntimeERKNS1_10PropNameIDEEUlS6_RKS2_PSA_mE_JS6_SB_SC_mEENSt9enable_ifIX16is_invocable_r_vIT_T0_DpT1_EESG_E4typeEOSH_DpOSI_
@ 0x58ef9a2b0a80 _ZNSt17_Function_handlerIFN8facebook3jsi5ValueERNS1_7RuntimeERKS2_PS5_mEZNS0_5react11TurboModule6createES4_RKNS1_10PropNameIDEEUlS4_S6_S7_mE_E9_M_invokeERKSt9_Any_dataS4_S6_OS7_Om
@ 0x73082448f8d7 facebook::hermes::(anonymous namespace)::HermesRuntimeImpl::HFContext::func()
@ 0x73082464d921 hermes::vm::Interpreter::handleCallSlowPath()
@ 0x73082464e230 hermes::vm::Interpreter::interpretFunction<>()
@ 0x73082464da4f hermes::vm::Runtime::interpretFunctionImpl()
@ 0x730824632c0d hermes::vm::JSFunction::_callImpl()
@ 0x7308244847fb facebook::hermes::(anonymous namespace)::HermesRuntimeImpl::call()
@ 0x58ef9a2cb508 facebook::jsi::Function::call()
@ 0x58ef9a2cb475 facebook::jsi::Function::call()
@ 0x58ef9a2b8921 _ZNK8facebook3jsi8Function4callIJEEENS0_5ValueERNS0_8IRuntimeEDpOT_
@ 0x58ef9a2b2e1d facebook::react::TesterAppDelegate::loadScriptAndRunTests()
@ 0x58ef9a31a4b1 main
@ 0x7308238b7d90 (unknown)
@ 0x7308238b7e40 __libc_start_main
@ 0x58ef9a293555 _start
@ 0x0 (unknown)
MANDATORY Reproducer
https://github.com/YevheniiKotyrlo/react-native-fantom-reproducer
Screenshots and Videos
No response
- Dominant language
- C++
- Stars
- 127k
- Forks
- 25.4k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 73
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from react/react-native
-
🌐Networking Needs: Author Feedback Needs: Repro Platform: Android
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
react/react-native#59704 · 1 comment ·
Maintainers usually reply within 2 days
-
Fantom runs end 5 seconds after their last test, with "Jest did not exit one second after the test run has completed": globalTeardown never clears its shutdown timerPossibly taken @lazerg claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 85/100
react/react-native#59699 ·
Maintainers usually reply within 2 days
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
react/react-native#59694 ·
Maintainers usually reply within 2 days
-
Android autolinking keeps a stale autolinking.json when only bun.lock changes, since bun.lock isn't in the default lockFilesPossibly taken @lazerg claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 85/100
react/react-native#59693 ·
Maintainers usually reply within 2 days
-
Image.resolveAssetSource's TypeScript declaration drops the null it returns for an unknown assetPossibly taken @Hassan1305 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
react/react-native#59648 · 1 comment ·
Maintainers usually reply within 2 days
All issues in react/react-native
Similar issues
-
agent:WSL bug LOW security
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
mgradwohl/tasksmack#3290 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
mw00/project-maya#743 ·
Maintainers usually reply within 1 day
-
Bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
bug triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
envoyproxy/envoy#48897 ·
Maintainers usually reply within 1 day
-
comp-view potential bug
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
ClickHouse/ClickHouse#128410 ·
Maintainers usually reply within 1 day