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
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 70/100
Línea de trabajo
Comienza desde private/react-native-fantom/tester/src/main.cpp y packages/react-native/ReactAndroid/src/main/jni/third-party/glog/config.h donde el issue proporciona diffs exactos. Aplica los tres hunks, luego reconstruye con yarn workspace @react-native/fantom build y ./gradlew :private:react-native-fantom:buildFantomTester --rerun. Hecho cuando un crash de SIGSEGV imprime frames con nombre tales como faultOnNullWrite().
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- C++
- Estrellas
- 127k
- Forks
- 25.4k
- Merge medio
- 2 d 9 h
- PR fusionados (30 d)
- 91
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de react/react-native
-
Android: new WebSocket() crashes the app for a URL that OkHttp or java.net.URI rejectsPosiblemente ocupada @sorinc03 la tomó hoy. Abierto🌐Networking Needs: Author Feedback Needs: Repro Platform: Android
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
react/react-native#59704 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
react/react-native#59694 ·
Los mantenedores suelen responder en 2 días
-
Android autolinking keeps a stale autolinking.json when only bun.lock changes, since bun.lock isn't in the default lockFilesPosiblemente ocupada @lazerg la tomó hace 2 días. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
react/react-native#59693 ·
Los mantenedores suelen responder en 2 días
-
Image.resolveAssetSource's TypeScript declaration drops the null it returns for an unknown assetPosiblemente ocupada @Hassan1305 la tomó hace 2 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
react/react-native#59648 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
Linking.getInitialURL() returns the task's first link after a link relaunches a reclaimed Android appPosiblemente ocupada @YevheniiKotyrlo la tomó hace 19 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
react/react-native#59006 · 2 comentarios ·
Los mantenedores suelen responder en 2 días
Todos los issues de react/react-native
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
FujiNetWIFI/fujinet-firmware#2261 ·
Los mantenedores suelen responder en 1 día
-
bug difficulty: easy good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
nagisa-kamishiro/rosehip#73 ·
Los mantenedores suelen responder en 1 día
-
mode_has_nan gives MSVC warning C4702 (unreachable code)Posiblemente ocupada @ibmibmibm la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
pocoproject/poco#5626 ·
Los mantenedores suelen responder en 2 días