status-im / status-mobile

a free (libre) open source, mobile OS for Ethereum
https://status.app
Mozilla Public License 2.0
3.85k stars 983 forks source link

Random failure in integration test #20544

Open ilmotta opened 6 days ago

ilmotta commented 6 days ago

Problem

Our integration tests are randomly failing both locally and in the CI. Triggering tests again always fixed the problem for me. It happens rarely, but probably every 10 days I get at least one failure.

Likely other CCs are hitting this same problem. The output below says it's a segfault. @cammellos shared with me that it's likely a problem in the C bindings because if it was Go, it would cause a panic.

[2024-06-24T12:19:30.853Z] Testing tests.integration-test.core-test

[2024-06-24T12:19:30.853Z] 2024-06-24T12:19:30.537Z INFO [test-helpers.integration:103] - ==== :test-helpers.integration/initialize-app ====

[2024-06-24T12:19:30.853Z] 2024-06-24T12:19:30.537Z INFO [test-helpers.integration:127] - ==== inside wait-for after let block ====

[2024-06-24T12:19:30.853Z] 2024-06-24T12:19:30.537Z DEBUG [utils.re-frame:24] - Handling re-frame event:  :set-view-id

[2024-06-24T12:19:30.853Z] 2024-06-24T12:19:30.538Z DEBUG [utils.re-frame:24] - Handling re-frame event:  :profile.settings/switch-theme

[2024-06-24T12:19:30.853Z] 2024-06-24T12:19:30.538Z DEBUG [utils.re-frame:24] - Handling re-frame event:  :set-view-id

[2024-06-24T12:19:30.853Z] 2024-06-24T12:19:30.539Z DEBUG [utils.re-frame:24] - Handling re-frame event:  :profile/get-profiles-overview-success

[2024-06-24T12:19:30.853Z] 2024-06-24T12:19:30.539Z DEBUG [status-im.common.keychain.events:35] - [keychain] can-save-user-password?

[2024-06-24T12:19:30.853Z] 2024-06-24T12:19:30.539Z DEBUG [utils.re-frame:24] - Handling re-frame event:  :app-started

[2024-06-24T12:19:30.853Z] 2024-06-24T12:19:30.540Z DEBUG [status-im.common.keychain.events:35] - [keychain] can-save-user-password?

[2024-06-24T12:19:30.853Z] 2024-06-24T12:19:30.540Z DEBUG [native-module.core:77] - [native-module] open-accounts

[2024-06-24T12:19:30.853Z] 2024-06-24T12:19:30.541Z DEBUG [utils.re-frame:24] - Handling re-frame event:  :signals/signal-received

[2024-06-24T12:19:30.853Z] 2024-06-24T12:19:30.541Z DEBUG [status-im.common.signals.events:43] - Signal received {:type "history.request.completed"}

[2024-06-24T12:19:30.853Z] 2024-06-24T12:19:30.541Z DEBUG [status-im.common.signals.events:123] - Event  history.request.completed  not handled

[2024-06-24T12:19:30.853Z] /tmp/tmp-status-mobile-jenkins-status-mobile-prs-tests-PR-20481-8/nix-shell-3837983-0/rc: line 6: 3849428 Segmentation fault      node --require ./test-resources/override.js "$SHADOW_OUTPUT_TO"

Example build

I don't have the track record of previous failures. Here's one from today 2024-06-24 https://ci.status.im/blue/organizations/jenkins/status-mobile%2Fprs%2Ftests/detail/PR-20481/8/pipeline/

Example on 2024-06-28 https://ci.status.im/blue/organizations/jenkins/status-mobile%2Fprs%2Ftests/detail/PR-20517/4/pipeline

Parveshdhull commented 6 days ago

related to/duplicate of https://github.com/status-im/status-mobile/issues/19256 ?

ilmotta commented 6 days ago

@Parveshdhull, I checked that issue, but they seem different based on the test output. This one really causes the integration test step to fail and it always prints the segmentation fault error, but I couldn't find this error in that issue.