itwinjs-core: Tests segfault on startup
Describe the bug
rush cover
in CI jobs is producing segmentation faults on mac and linux.
To Reproduce Steps to reproduce the behavior:
- Consult CI job results for #5661
- Observe multiple test suites producing seg faults on mac and linux.
Screenshots
==[ FAILURE: 7 operations ]====================================================
--[ FAILURE: @itwin/analytical-backend ]---------------------[ 5.70 seconds ]--
Segmentation fault (core dumped)
--[ FAILURE: @itwin/core-backend ]--------------------------[ 13.29 seconds ]--
Segmentation fault (core dumped)
--[ FAILURE: @itwin/linear-referencing-backend ]-------------[ 5.74 seconds ]--
Segmentation fault (core dumped)
--[ FAILURE: @itwin/physical-material-backend ]--------------[ 4.57 seconds ]--
Segmentation fault (core dumped)
--[ FAILURE: core-full-stack-tests ]------------------------[ 37.85 seconds ]--
WARNING: Tests attempted to load missing asset: "/locales/en-US/iModelJs.json"
WARNING: Tests attempted to load missing asset: "/locales/en-US/CoreTools.json"
WARNING: Tests attempted to load missing asset: "/locales/en-US/Editor.json"
WARNING: Tests attempted to load missing asset: "/locales/en/Editor.json"
WARNING: Tests attempted to load missing asset: "/locales/en-US/TestApp.json"
WARNING: Tests attempted to load missing asset: "/locales/en/TestApp.json"
Segmentation fault (core dumped)
--[ FAILURE: example-code-snippets ]-------------------------[ 4.01 seconds ]--
Segmentation fault (core dumped)
--[ FAILURE: presentation-full-stack-tests ]-----------------[ 5.19 seconds ]--
Invoking: npm run -s test
Backend PID: 19201
Default supplemental rules
[2023-06-21T01:35:05.890Z] Tests initialized
Content modifiers
bis.Element
Related properties
Operations failed.
rush cover (4 minutes 51.9 seconds)
##[error]Bash exited with code '1'.
Finishing: rush cover
==[ FAILURE: 8 operations ]====================================================
--[ FAILURE: @itwin/analytical-backend ]---------------------[ 3.68 seconds ]--
Invoking: nyc npm -s test
AnalyticalSchema
=============================== Coverage summary ===============================
Statements : Unknown% ( 0/0 )
Branches : Unknown% ( 0/0 )
Functions : Unknown% ( 0/0 )
Lines : Unknown% ( 0/0 )
================================================================================
--[ FAILURE: @itwin/core-backend ]---------------------------[ 8.20 seconds ]--
Invoking: nyc npm -s test
Category
=============================== Coverage summary ===============================
Statements : Unknown% ( 0/0 )
Branches : Unknown% ( 0/0 )
Functions : Unknown% ( 0/0 )
Lines : Unknown% ( 0/0 )
================================================================================
--[ FAILURE: @itwin/linear-referencing-backend ]-------------[ 2.67 seconds ]--
Invoking: nyc npm -s test
LinearReferencing Domain
=============================== Coverage summary ===============================
Statements : Unknown% ( 0/0 )
Branches : Unknown% ( 0/0 )
Functions : Unknown% ( 0/0 )
Lines : Unknown% ( 0/0 )
================================================================================
--[ FAILURE: @itwin/physical-material-backend ]--------------[ 2.78 seconds ]--
Invoking: nyc npm -s test
PhysicalMaterialSchema
=============================== Coverage summary ===============================
Statements : Unknown% ( 0/0 )
Branches : Unknown% ( 0/0 )
Functions : Unknown% ( 0/0 )
Lines : Unknown% ( 0/0 )
================================================================================
--[ FAILURE: core-full-stack-tests ]------------------------[ 20.89 seconds ]--
WARNING: Tests attempted to load missing asset: "/locales/en-US/iModelJs.json"
WARNING: Tests attempted to load missing asset: "/locales/en-US/CoreTools.json"
sh: line 1: 299 Segmentation fault: 11 npm run -s test:chrome
--[ FAILURE: example-code-app ]------------------------------[ 4.88 seconds ]--
sh: line 1: 710 Segmentation fault: 11 mocha --no-config
rush cover (3 minutes 45.5 seconds)
##[error]Bash exited with code '1'.
Finishing: rush cover
Desktop (please complete the applicable information):
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
- iTwin.js Version [e.g. 2.5.3]
Additional context
Failing build pipeline.
First observed in #5660. Occurred on all 3 runs of the pipeline.
#5661 produces similar results, with no code changes vs master.
Each test suite crash without completing a single test. Only test suites that use @itwin/core-backend are affected.
The most recent addon included upgrades of several third-party libraries. These failures were not observed at the time the new addon was integrated.
I fail to reproduce the problem running rush cover
on Ubuntu 22.04.
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 16 (12 by maintainers)
I repro’ed with 18.16.0. Only that once though. I suppose it’s possible the crash is sporadic but more likely to occur with 18.16.1? I’ll update to that.
I just observed the seg fault running core-backend tests on Ubuntu on a branch newly-created from master. I’ll see if I can repro with a locally-built (debuggable) addon.