Detox: Signal 11 crash still present after SIMCTL_CHILD_NSZombieEnabled=YES + latest Firebase version
Description
A clear and concise description of what the bug is.
- I have tested this issue on the latest Detox release and it still reproduces
Reproduction
We still see Signal 11 crashes in our project even after adding both SIMCTL_CHILD_NSZombieEnabled=YES detox test -c ios.sim.release
as well as updating firebase + firebase perf to the latest versions and ensuring that GoogleUtilities are at 7.7+.
The error is commonly reproduced on CircleCI and is incredibly difficult / practically impossible to reproduce locally.
In order to help debug I’ve provided a list of all of the dependencies in our project. We use Expo 43 (no expo updates), React Native 0.65.2 and Codepush (probably unrelated, the error happens in the middle of a test, not at the beginning). I’ve found that the Stripe iOS SDK (via tipsi-stripe) is a source of method swizzling. Also, while Flipper is a source of method swizzling, we are building a release project so Flipper should be excluded.
Let me know if there’s anything else I can provide to help debug and resolve this issue.
The stacktrace is:
DetoxRuntimeError: The pending request #99 ("invoke") has been rejected due to the following error:
The app has crashed, see the details below:
Signal 11 was raised
(
0 Detox 0x00000001127a56a5 +[NSThread(DetoxUtils) dtx_demangledCallStackSymbols] + 37
1 Detox 0x00000001127a8230 __DTXHandleCrash + 464
2 Detox 0x00000001127a8971 __DTXHandleSignal + 59
3 libsystem_platform.dylib 0x0000000118ef1d7d _sigtramp + 29
4 ??? 0x00006000162b0180 0x0 + 105553488183680
5 DetoxSync 0x0000000154151b37 -[_DTXTimerTrampoline fire:] + 188
6 DetoxSync 0x0000000154139b70 _DTXCFTimerTrampoline + 74
7 CoreFoundation 0x00000001156416b6 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 20
8 CoreFoundation 0x00000001156411b2 __CFRunLoopDoTimer + 923
9 CoreFoundation 0x0000000115640771 __CFRunLoopDoTimers + 265
10 CoreFoundation 0x000000011563adb0 __CFRunLoopRun + 2010
11 CoreFoundation 0x000000011563a0f3 CFRunLoopRunSpecific + 567
12 Shipt 0x000000010ff87c74 +[RCTCxxBridge runRunLoop] + 281
13 DetoxSync 0x000000015414173a swz_runRunLoopThread + 291
14 Foundation 0x0000000113539550 __NSThread__start__ + 1025
15 libsystem_pthread.dylib 0x0000000118e8a8fc _pthread_start + 224
16 libsystem_pthread.dylib 0x0000000118e86443 thread_start + 15
)
at _callee4$ (/Users/distiller/nebula/e2e/helpers/helpers.ts:22:42)
at tryCatch (/Users/distiller/nebula/node_modules/regenerator-runtime/runtime.js:63:40)
List of dependencies present in the project:
"dependencies": {
"@babel/preset-typescript": "7.16.7",
"@bugsnag/react-native": "7.15.1",
"@formatjs/intl-datetimeformat": "^2.8.3",
"@formatjs/intl-numberformat": "^5.7.5",
"@oracle/react-native-pushiomanager": "https://github.com/shamilovtim/pushiomanager-react-native#shipt-next",
"@react-native-community/async-storage": "^1.6.2",
"@react-native-community/geolocation": "^2.0.2",
"@react-native-community/hooks": "2.8.1",
"@react-native-community/push-notification-ios": "^1.10.1",
"@react-native-firebase/app": "14.2.4",
"@react-native-firebase/perf": "14.2.4",
"@react-navigation/bottom-tabs": "^6.0.9",
"@react-navigation/native": "^6.0.6",
"@react-navigation/routers": "^6.1.0",
"@react-navigation/stack": "^6.0.11",
"@segment/analytics-react-native": "^1.5.0",
"@segment/analytics-react-native-firebase": "^1.5.0",
"accounting-js": "^1.1.1",
"concurrently": "6.5.1",
"core-js": "3.20.1",
"date-fns": "2.7.0",
"date-fns-tz": "1.0.12",
"expo": "43.0.4",
"expo-apple-authentication": "^4.1.0",
"expo-facebook": "12.0.3",
"expo-google-sign-in": "10.0.3",
"expo-linear-gradient": "10.0.3",
"expo-secure-store": "^11.1.0",
"expo-tracking-transparency": "2.0.3",
"graphql": "^15.7.0",
"graphql-request": "3.7.0",
"imagemin": "^8.0.1",
"immer": "9.0.12",
"inquirer": "^8.2.0",
"intl": "^1.2.5",
"invariant": "2.2.4",
"jsdom": "19.0.0",
"lodash": "^4.17.21",
"lottie-ios": "^3.2.3",
"lottie-react-native": "4.1.3",
"mailosaur": "^8.1.0",
"medallia-digital": "https://repository.medallia.com/digital-npm/medallia-digital-rn/medallia-digital-rn-3.8.1.tgz",
"multi-progress": "4.0.0",
"nano-memoize": "1.2.1",
"node-emoji": "^1.11.0",
"normalizr": "^3.6.1",
"prop-types": "15.8.0",
"query-string": "7.0.1",
"react": "17.0.2",
"react-native": "0.65.2",
"react-native-action-sheet": "2.2.0",
"react-native-android-open-settings": "1.3.0",
"react-native-branch": "5.3.0",
"react-native-camera": "4.2.1",
"react-native-code-push": "^7.0.4",
"react-native-device-info": "8.4.8",
"react-native-easing-gradient": "^1.0.0",
"react-native-fs": "^2.18.0",
"react-native-geolocation-service": "5.2.0",
"react-native-gesture-handler": "1.10.3",
"react-native-get-random-values": "1.7.2",
"react-native-haptic-feedback": "1.13.0",
"react-native-html-parser": "^0.1.0",
"react-native-in-app-review": "^3.2.3",
"react-native-keyboard-aware-scroll-view": "0.9.5",
"react-native-mmkv": "1.6.3",
"react-native-modal": "13.0.0",
"react-native-progress": "5.0.0",
"react-native-push-notification": "8.1.1",
"react-native-reanimated": "1.13.1",
"react-native-redash": "^15.6.0",
"react-native-render-html": "4.2.4",
"react-native-safe-area-context": "3.3.2",
"react-native-screens": "3.10.1",
"react-native-share": "7.3.2",
"react-native-svg": "^12.1.1",
"react-native-v8": "0.65.1-patch.1",
"react-native-webview": "11.15.0",
"react-query": "3.34.6",
"react-redux": "^7.2.6",
"reactotron-redux": "^3.1.3",
"redux": "4.1.2",
"redux-persist": "^6.0.0",
"redux-saga": "^1.1.3",
"reselect": "4.1.5",
"shelljs": "^0.8.5",
"sift-react-native": "^0.1.3",
"tipsi-stripe": "adkenyon/tipsi-stripe#5cab5f303bedc5ffd3fb543b14dc229f5259b0a0",
"uri-js": "4.4.1",
"uuid": "^8.3.2",
"v8-android-jit-nointl": "9.93.0"
}
Expected behavior
Expect no signal 11
Screenshots / Video
Not necessary right now, will add later if needed.
Environment
- Detox: 19.4.2
- React Native: 0.65.2
- Node: 14.17.3
- Device: iOS Emulator
- Xcode: 13.2.1
- iOS: latest
- macOS: 11.6
- Test-runner (select one):
jest-circus
Logs
Device and verbose Detox logs
- I have run my tests using the
--loglevel trace
argument and am providing the verbose log below:
Detox logs
The stacktrace is:
DetoxRuntimeError: The pending request #99 ("invoke") has been rejected due to the following error:
The app has crashed, see the details below:
Signal 11 was raised
(
0 Detox 0x00000001127a56a5 +[NSThread(DetoxUtils) dtx_demangledCallStackSymbols] + 37
1 Detox 0x00000001127a8230 __DTXHandleCrash + 464
2 Detox 0x00000001127a8971 __DTXHandleSignal + 59
3 libsystem_platform.dylib 0x0000000118ef1d7d _sigtramp + 29
4 ??? 0x00006000162b0180 0x0 + 105553488183680
5 DetoxSync 0x0000000154151b37 -[_DTXTimerTrampoline fire:] + 188
6 DetoxSync 0x0000000154139b70 _DTXCFTimerTrampoline + 74
7 CoreFoundation 0x00000001156416b6 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 20
8 CoreFoundation 0x00000001156411b2 __CFRunLoopDoTimer + 923
9 CoreFoundation 0x0000000115640771 __CFRunLoopDoTimers + 265
10 CoreFoundation 0x000000011563adb0 __CFRunLoopRun + 2010
11 CoreFoundation 0x000000011563a0f3 CFRunLoopRunSpecific + 567
12 Shipt 0x000000010ff87c74 +[RCTCxxBridge runRunLoop] + 281
13 DetoxSync 0x000000015414173a swz_runRunLoopThread + 291
14 Foundation 0x0000000113539550 __NSThread__start__ + 1025
15 libsystem_pthread.dylib 0x0000000118e8a8fc _pthread_start + 224
16 libsystem_pthread.dylib 0x0000000118e86443 thread_start + 15
)
at _callee4$ (/Users/distiller/nebula/e2e/helpers/helpers.ts:22:42)
at tryCatch (/Users/distiller/nebula/node_modules/regenerator-runtime/runtime.js:63:40)
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 2
- Comments: 71 (27 by maintainers)
I think this is still valid
Valid
Yeah - that’s about as far we’ve narrowed it down to. That’s in line with the investigations I’d done a while back. I have a reasonable suspicion that it’s something to do with the timer trampoline objects being garbage collected (or otherwise becoming invalid).
Our workaround is to stub out everything that’s animated with a non-animated variant, which isn’t great 😦
+1 seeing this in latest versions. Will try and gather some logs if possible
valid
@ball-hayden Detox has some basic self-test suite for animations: https://github.com/wix/Detox/blob/master/detox/test/e2e/12.animations.test.js
Seems like it is not sufficient. A good question would be “what’s missing”.
Here’s the source code of the Animations screen:
https://github.com/wix/Detox/blob/master/detox/test/src/Screens/AnimationsScreen.js
For me this is related to
react-native-camera
. I will investigate further…Edit: I mocked all files, that import suspicious modules and so far both
react-native-tab-view
andreact-native-reanimated
cause crashes. It seems likereact-native-camera
doesn’t cause crashesOh. Okay. Definitely still seeing this. Sorry.
I once repro’d this locally on my M1 Max . Wonder how many Detox runs it would take to see it again.
valid
Not stale
No we don’t. CircleCI doesn’t allow hardware acceleration so we are limited performance wise
@shamilovtim sorry for the delay.
https://github.com/PlayerData/DetoxReanimatedRepro
Just trying to set up GitHub actions to see if that might result in a reproduction.