Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools: run test-asan on ubuntu-latest #52374

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

targos
Copy link
Member

@targos targos commented Apr 5, 2024

Closes: #45578

The only way to know if it works is to try.

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/actions

@nodejs-github-bot nodejs-github-bot added the meta Issues and PRs related to the general management of the project. label Apr 5, 2024
@targos
Copy link
Member Author

targos commented Apr 5, 2024

If it still fails, I hope we can use this PR to collaborate on finding a real fix for #45578.

@targos
Copy link
Member Author

targos commented Apr 5, 2024

===
=== 9 tests failed
===

Failed tests:
out/Release/node --test-reporter=spec --test-reporter-destination=stdout --test-reporter=./tools/github_reporter/index.js --test-reporter-destination=stdout /home/runner/work/node/node/test/sequential/test-single-executable-application.js
out/Release/node --test-reporter=spec --test-reporter-destination=stdout --test-reporter=./tools/github_reporter/index.js --test-reporter-destination=stdout /home/runner/work/node/node/test/sequential/test-single-executable-application-assets.js
out/Release/node --test-reporter=spec --test-reporter-destination=stdout --test-reporter=./tools/github_reporter/index.js --test-reporter-destination=stdout /home/runner/work/node/node/test/sequential/test-single-executable-application-assets-raw.js
out/Release/node --test-reporter=spec --test-reporter-destination=stdout --test-reporter=./tools/github_reporter/index.js --test-reporter-destination=stdout /home/runner/work/node/node/test/sequential/test-single-executable-application-disable-experimental-sea-warning.js
out/Release/node --test-reporter=spec --test-reporter-destination=stdout --test-reporter=./tools/github_reporter/index.js --test-reporter-destination=stdout /home/runner/work/node/node/test/sequential/test-single-executable-application-empty.js
out/Release/node --test-reporter=spec --test-reporter-destination=stdout --test-reporter=./tools/github_reporter/index.js --test-reporter-destination=stdout /home/runner/work/node/node/test/sequential/test-single-executable-application-snapshot.js
out/Release/node --test-reporter=spec --test-reporter-destination=stdout --test-reporter=./tools/github_reporter/index.js --test-reporter-destination=stdout /home/runner/work/node/node/test/sequential/test-single-executable-application-snapshot-and-code-cache.js
out/Release/node --test-reporter=spec --test-reporter-destination=stdout --test-reporter=./tools/github_reporter/index.js --test-reporter-destination=stdout /home/runner/work/node/node/test/sequential/test-single-executable-application-use-code-cache.js
out/Release/node --test-reporter=spec --test-reporter-destination=stdout --test-reporter=./tools/github_reporter/index.js --test-reporter-destination=stdout /home/runner/work/node/node/test/abort/test-signal-handler.js
=== release test-single-executable-application ===
Path: sequential/test-single-executable-application
Error: --- stderr ---
[process 177986]: --- stderr ---
=================================================================
==177986==ERROR: AddressSanitizer: alloc-dealloc-mismatch (malloc vs operator delete []) on 0x602000000050
    #0 0x55c2c68b5acd in operator delete[](void*) (/home/runner/work/node/node/test/.tmp.4102/sea+0x1ab5acd) (BuildId: 790abd3d700c[5596](https://github.com/nodejs/node/actions/runs/8567708081/job/23480032918?pr=52374#step:6:5597)3374b7aaca574c0d1b29db72)
    #1 0x7f2067505b6c in std::__cxx11::collate<char>::do_transform(char const*, char const*) const (/lib/x86_64-linux-gnu/libstdc++.so.6+0x105b6c) (BuildId: 2db998bd67acbfb235c464c0275d4070061695fb)
    #2 0x55c2c6ba3f40 in std::__detail::_BracketMatcher<std::__cxx11::regex_traits<char>, false, false>::_M_apply(char, std::integral_constant<bool, false>) const::'lambda'()::operator()() const (/home/runner/work/node/node/test/.tmp.4102/sea+0x1da3f40) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #3 0x55c2c6ba1421 in std::__detail::_BracketMatcher<std::__cxx11::regex_traits<char>, false, false>::_M_ready() (/home/runner/work/node/node/test/.tmp.4102/sea+0x1da1421) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #4 0x55c2c6b9b310 in void std::__detail::_Compiler<std::__cxx11::regex_traits<char> >::_M_insert_character_class_matcher<false, false>() (/home/runner/work/node/node/test/.tmp.4102/sea+0x1d9b310) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #5 0x55c2c6b94919 in std::__detail::_Compiler<std::__cxx11::regex_traits<char> >::_M_atom() (/home/runner/work/node/node/test/.tmp.4102/sea+0x1d94919) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #6 0x55c2c6b8fa66 in std::__detail::_Compiler<std::__cxx11::regex_traits<char> >::_M_alternative() (/home/runner/work/node/node/test/.tmp.4102/sea+0x1d8fa66) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #7 0x55c2c6b89826 in std::__detail::_Compiler<std::__cxx11::regex_traits<char> >::_M_disjunction() (/home/runner/work/node/node/test/.tmp.4102/sea+0x1d89826) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #8 0x55c2c6b880e0 in std::__detail::_Compiler<std::__cxx11::regex_traits<char> >::_Compiler(char const*, char const*, std::locale const&, std::regex_constants::syntax_option_type) (/home/runner/work/node/node/test/.tmp.4102/sea+0x1d880e0) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #9 0x55c2c6b8743b in std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char> >::_M_compile(char const*, char const*, std::regex_constants::syntax_option_type) (/home/runner/work/node/node/test/.tmp.4102/sea+0x1d8743b) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #10 0x55c2c6790cf2 in _GLOBAL__sub_I_node_dotenv.cc node_dotenv.cc
    #11 0x7f2067029eba in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29eba) (BuildId: c289da5071a3399de893d2af81d6a30c62646e1e)
    #12 0x55c2c67f7554 in _start (/home/runner/work/node/node/test/.tmp.4102/sea+0x19f7554) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)

0x602000000050 is located 0 bytes inside of 2-byte region [0x602000000050,0x602000000052)
allocated by thread T0 here:
    #0 0x55c2c687a39e in malloc (/home/runner/work/node/node/test/.tmp.4102/sea+0x1a7a39e) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #1 0x7f20674b751b in operator new(unsigned long) (/lib/x86_64-linux-gnu/libstdc++.so.6+0xb751b) (BuildId: 2db998bd67acbfb235c464c0275d4070061695fb)

SUMMARY: AddressSanitizer: alloc-dealloc-mismatch (/home/runner/work/node/node/test/.tmp.4102/sea+0x1ab5acd) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72) in operator delete[](void*)
==177986==HINT: if you don't care about these errors you may set ASAN_OPTIONS=alloc_dealloc_mismatch=0
==177986==ABORTING

[process 177986]: --- stdout ---

[process 177986]: status = 1, signal = null
/home/runner/work/node/node/test/common/child_process.js:86
    throw new Error(`${failures.join('\n')}`);
    ^

Error: - process terminated with status 1, expected 0
    at logAndThrow (/home/runner/work/node/node/test/common/child_process.js:86:11)
    at expectSyncExit (/home/runner/work/node/node/test/common/child_process.js:91:5)
    at spawnSyncAndA
=== release test-single-executable-application-assets ===
Path: sequential/test-single-executable-application-assets
Error: --- stderr ---
[process 178303]: --- stderr ---
=================================================================
==178303==ERROR: AddressSanitizer: alloc-dealloc-mismatch (malloc vs operator delete []) on 0x602000000050
    #0 0x563b096b5acd in operator delete[](void*) (/home/runner/work/node/node/test/.tmp.4103/sea+0x1ab5acd) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #1 0x7fd018505b6c in std::__cxx11::collate<char>::do_transform(char const*, char const*) const (/lib/x86_64-linux-gnu/libstdc++.so.6+0x105b6c) (BuildId: 2db998bd67acbfb235c464c0275d4070061695fb)
    #2 0x563b099a3f40 in std::__detail::_BracketMatcher<std::__cxx11::regex_traits<char>, false, false>::_M_apply(char, std::integral_constant<bool, false>) const::'lambda'()::operator()() const (/home/runner/work/node/node/test/.tmp.4103/sea+0x1da3f40) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #3 0x563b099a1421 in std::__detail::_BracketMatcher<std::__cxx11::regex_traits<char>, false, false>::_M_ready() (/home/runner/work/node/node/test/.tmp.4103/sea+0x1da1421) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #4 0x563b0999b310 in void std::__detail::_Compiler<std::__cxx11::regex_traits<char> >::_M_insert_character_class_matcher<false, false>() (/home/runner/work/node/node/test/.tmp.4103/sea+0x1d9b310) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #5 0x563b09994919 in std::__detail::_Compiler<std::__cxx11::regex_traits<char> >::_M_atom() (/home/runner/work/node/node/test/.tmp.4103/sea+0x1d94919) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #6 0x563b0998fa66 in std::__detail::_Compiler<std::__cxx11::regex_traits<char> >::_M_alternative() (/home/runner/work/node/node/test/.tmp.4103/sea+0x1d8fa66) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #7 0x563b09989826 in std::__detail::_Compiler<std::__cxx11::regex_traits<char> >::_M_disjunction() (/home/runner/work/node/node/test/.tmp.4103/sea+0x1d89826) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #8 0x563b099880e0 in std::__detail::_Compiler<std::__cxx11::regex_traits<char> >::_Compiler(char const*, char const*, std::locale const&, std::regex_constants::syntax_option_type) (/home/runner/work/node/node/test/.tmp.4103/sea+0x1d880e0) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #9 0x563b0998743b in std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char> >::_M_compile(char const*, char const*, std::regex_constants::syntax_option_type) (/home/runner/work/node/node/test/.tmp.4103/sea+0x1d8743b) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #10 0x563b09590cf2 in _GLOBAL__sub_I_node_dotenv.cc node_dotenv.cc
    #11 0x7fd018029eba in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29eba) (BuildId: c289da5071a3399de893d2af81d6a30c62646e1e)
    #12 0x563b095f7554 in _start (/home/runner/work/node/node/test/.tmp.4103/sea+0x19f7554) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)

0x602000000050 is located 0 bytes inside of 2-byte region [0x602000000050,0x602000000052)
allocated by thread T0 here:
    #0 0x563b0967a39e in malloc (/home/runner/work/node/node/test/.tmp.4103/sea+0x1a7a39e) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #1 0x7fd0184b751b in operator new(unsigned long) (/lib/x86_64-linux-gnu/libstdc++.so.6+0xb751b) (BuildId: 2db998bd67acbfb235c464c0275d4070061695fb)

SUMMARY: AddressSanitizer: alloc-dealloc-mismatch (/home/runner/work/node/node/test/.tmp.4103/sea+0x1ab5acd) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72) in operator delete[](void*)
==178303==HINT: if you don't care about these errors you may set ASAN_OPTIONS=alloc_dealloc_mismatch=0
==178303==ABORTING

[process 178303]: --- stdout ---

[process 178303]: status = 1, signal = null
/home/runner/work/node/node/test/common/child_process.js:86
    throw new Error(`${failures.join('\n')}`);
    ^

Error: - process terminated with status 1, expected 0
    at logAndThrow (/home/runner/work/node/node/test/common/child_process.js:86:11)
    at expectSyncExit (/home/runner/work/node/node/test/common/child_process.js:91:5)
    at spawnSyncAndA
=== release test-single-executable-application-assets-raw ===
Path: sequential/test-single-executable-application-assets-raw
Error: --- stderr ---
[process 178725]: --- stderr ---
=================================================================
==178725==ERROR: AddressSanitizer: alloc-dealloc-mismatch (malloc vs operator delete []) on 0x602000000050
    #0 0x55ba444b5acd in operator delete[](void*) (/home/runner/work/node/node/test/.tmp.4104/sea+0x1ab5acd) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #1 0x7f027b305b6c in std::__cxx11::collate<char>::do_transform(char const*, char const*) const (/lib/x86_64-linux-gnu/libstdc++.so.6+0x105b6c) (BuildId: 2db998bd67acbfb235c464c0275d4070061695fb)
    #2 0x55ba447a3f40 in std::__detail::_BracketMatcher<std::__cxx11::regex_traits<char>, false, false>::_M_apply(char, std::integral_constant<bool, false>) const::'lambda'()::operator()() const (/home/runner/work/node/node/test/.tmp.4104/sea+0x1da3f40) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #3 0x55ba447a1421 in std::__detail::_BracketMatcher<std::__cxx11::regex_traits<char>, false, false>::_M_ready() (/home/runner/work/node/node/test/.tmp.4104/sea+0x1da1421) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #4 0x55ba4479b310 in void std::__detail::_Compiler<std::__cxx11::regex_traits<char> >::_M_insert_character_class_matcher<false, false>() (/home/runner/work/node/node/test/.tmp.4104/sea+0x1d9b310) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #5 0x55ba44794919 in std::__detail::_Compiler<std::__cxx11::regex_traits<char> >::_M_atom() (/home/runner/work/node/node/test/.tmp.4104/sea+0x1d94919) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #6 0x55ba4478fa66 in std::__detail::_Compiler<std::__cxx11::regex_traits<char> >::_M_alternative() (/home/runner/work/node/node/test/.tmp.4104/sea+0x1d8fa66) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #7 0x55ba44789826 in std::__detail::_Compiler<std::__cxx11::regex_traits<char> >::_M_disjunction() (/home/runner/work/node/node/test/.tmp.4104/sea+0x1d89826) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #8 0x55ba447880e0 in std::__detail::_Compiler<std::__cxx11::regex_traits<char> >::_Compiler(char const*, char const*, std::locale const&, std::regex_constants::syntax_option_type) (/home/runner/work/node/node/test/.tmp.4104/sea+0x1d880e0) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #9 0x55ba4478743b in std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char> >::_M_compile(char const*, char const*, std::regex_constants::syntax_option_type) (/home/runner/work/node/node/test/.tmp.4104/sea+0x1d8743b) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #10 0x55ba44390cf2 in _GLOBAL__sub_I_node_dotenv.cc node_dotenv.cc
    #11 0x7f027ae29eba in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29eba) (BuildId: c289da5071a3399de893d2af81d6a30c62646e1e)
    #12 0x55ba443f7554 in _start (/home/runner/work/node/node/test/.tmp.4104/sea+0x19f7554) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)

0x602000000050 is located 0 bytes inside of 2-byte region [0x602000000050,0x602000000052)
allocated by thread T0 here:
    #0 0x55ba4447a39e in malloc (/home/runner/work/node/node/test/.tmp.4104/sea+0x1a7a39e) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #1 0x7f027b2b751b in operator new(unsigned long) (/lib/x86_64-linux-gnu/libstdc++.so.6+0xb751b) (BuildId: 2db998bd67acbfb235c464c0275d4070061695fb)

SUMMARY: AddressSanitizer: alloc-dealloc-mismatch (/home/runner/work/node/node/test/.tmp.4104/sea+0x1ab5acd) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72) in operator delete[](void*)
==178725==HINT: if you don't care about these errors you may set ASAN_OPTIONS=alloc_dealloc_mismatch=0
==178725==ABORTING

[process 178725]: --- stdout ---

[process 178725]: status = 1, signal = null
/home/runner/work/node/node/test/common/child_process.js:86
    throw new Error(`${failures.join('\n')}`);
    ^

Error: - process terminated with status 1, expected 0
    at logAndThrow (/home/runner/work/node/node/test/common/child_process.js:86:11)
    at expectSyncExit (/home/runner/work/node/node/test/common/child_process.js:91:5)
    at spawnSyncAndE
=== release test-single-executable-application-disable-experimental-sea-warning ===
Path: sequential/test-single-executable-application-disable-experimental-sea-warning
Error: --- stderr ---
[process 179019]: --- stderr ---
=================================================================
==179019==ERROR: AddressSanitizer: alloc-dealloc-mismatch (malloc vs operator delete []) on 0x602000000050
    #0 0x55b68e6b5acd in operator delete[](void*) (/home/runner/work/node/node/test/.tmp.4105/sea+0x1ab5acd) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #1 0x7f1b0e905b6c in std::__cxx11::collate<char>::do_transform(char const*, char const*) const (/lib/x86_64-linux-gnu/libstdc++.so.6+0x105b6c) (BuildId: 2db998bd67acbfb235c464c0275d4070061695fb)
    #2 0x55b68e9a3f40 in std::__detail::_BracketMatcher<std::__cxx11::regex_traits<char>, false, false>::_M_apply(char, std::integral_constant<bool, false>) const::'lambda'()::operator()() const (/home/runner/work/node/node/test/.tmp.4105/sea+0x1da3f40) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #3 0x55b68e9a1421 in std::__detail::_BracketMatcher<std::__cxx11::regex_traits<char>, false, false>::_M_ready() (/home/runner/work/node/node/test/.tmp.4105/sea+0x1da1421) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #4 0x55b68e99b310 in void std::__detail::_Compiler<std::__cxx11::regex_traits<char> >::_M_insert_character_class_matcher<false, false>() (/home/runner/work/node/node/test/.tmp.4105/sea+0x1d9b310) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #5 0x55b68e994919 in std::__detail::_Compiler<std::__cxx11::regex_traits<char> >::_M_atom() (/home/runner/work/node/node/test/.tmp.4105/sea+0x1d94919) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #6 0x55b68e98fa66 in std::__detail::_Compiler<std::__cxx11::regex_traits<char> >::_M_alternative() (/home/runner/work/node/node/test/.tmp.4105/sea+0x1d8fa66) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #7 0x55b68e989826 in std::__detail::_Compiler<std::__cxx11::regex_traits<char> >::_M_disjunction() (/home/runner/work/node/node/test/.tmp.4105/sea+0x1d89826) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #8 0x55b68e9880e0 in std::__detail::_Compiler<std::__cxx11::regex_traits<char> >::_Compiler(char const*, char const*, std::locale const&, std::regex_constants::syntax_option_type) (/home/runner/work/node/node/test/.tmp.4105/sea+0x1d880e0) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #9 0x55b68e98743b in std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char> >::_M_compile(char const*, char const*, std::regex_constants::syntax_option_type) (/home/runner/work/node/node/test/.tmp.4105/sea+0x1d8743b) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #10 0x55b68e590cf2 in _GLOBAL__sub_I_node_dotenv.cc node_dotenv.cc
    #11 0x7f1b0e429eba in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29eba) (BuildId: c289da5071a3399de893d2af81d6a30c62646e1e)
    #12 0x55b68e5f7554 in _start (/home/runner/work/node/node/test/.tmp.4105/sea+0x19f7554) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)

0x602000000050 is located 0 bytes inside of 2-byte region [0x602000000050,0x602000000052)
allocated by thread T0 here:
    #0 0x55b68e67a39e in malloc (/home/runner/work/node/node/test/.tmp.4105/sea+0x1a7a39e) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #1 0x7f1b0e8b751b in operator new(unsigned long) (/lib/x86_64-linux-gnu/libstdc++.so.6+0xb751b) (BuildId: 2db998bd67acbfb235c464c0275d4070061695fb)

SUMMARY: AddressSanitizer: alloc-dealloc-mismatch (/home/runner/work/node/node/test/.tmp.4105/sea+0x1ab5acd) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72) in operator delete[](void*)
==179019==HINT: if you don't care about these errors you may set ASAN_OPTIONS=alloc_dealloc_mismatch=0
==179019==ABORTING

[process 179019]: --- stdout ---

[process 179019]: status = 1, signal = null
/home/runner/work/node/node/test/common/child_process.js:86
    throw new Error(`${failures.join('\n')}`);
    ^

Error: - process terminated with status 1, expected 0
    at logAndThrow (/home/runner/work/node/node/test/common/child_process.js:86:11)
    at expectSyncExit (/home/runner/work/node/node/test/common/child_process.js:91:5)
    at spawnSyncAndA
=== release test-single-executable-application-empty ===
Path: sequential/test-single-executable-application-empty
Error: --- stderr ---
[process 179319]: --- stderr ---
=================================================================
==179319==ERROR: AddressSanitizer: alloc-dealloc-mismatch (malloc vs operator delete []) on 0x602000000050
    #0 0x55a4ca2b5acd in operator delete[](void*) (/home/runner/work/node/node/test/.tmp.4106/sea+0x1ab5acd) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #1 0x7f787d705b6c in std::__cxx11::collate<char>::do_transform(char const*, char const*) const (/lib/x86_64-linux-gnu/libstdc++.so.6+0x105b6c) (BuildId: 2db998bd67acbfb235c464c0275d4070061695fb)
    #2 0x55a4ca5a3f40 in std::__detail::_BracketMatcher<std::__cxx11::regex_traits<char>, false, false>::_M_apply(char, std::integral_constant<bool, false>) const::'lambda'()::operator()() const (/home/runner/work/node/node/test/.tmp.4106/sea+0x1da3f40) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #3 0x55a4ca5a1421 in std::__detail::_BracketMatcher<std::__cxx11::regex_traits<char>, false, false>::_M_ready() (/home/runner/work/node/node/test/.tmp.4106/sea+0x1da1421) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #4 0x55a4ca59b310 in void std::__detail::_Compiler<std::__cxx11::regex_traits<char> >::_M_insert_character_class_matcher<false, false>() (/home/runner/work/node/node/test/.tmp.4106/sea+0x1d9b310) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #5 0x55a4ca594919 in std::__detail::_Compiler<std::__cxx11::regex_traits<char> >::_M_atom() (/home/runner/work/node/node/test/.tmp.4106/sea+0x1d94919) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #6 0x55a4ca58fa66 in std::__detail::_Compiler<std::__cxx11::regex_traits<char> >::_M_alternative() (/home/runner/work/node/node/test/.tmp.4106/sea+0x1d8fa66) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #7 0x55a4ca589826 in std::__detail::_Compiler<std::__cxx11::regex_traits<char> >::_M_disjunction() (/home/runner/work/node/node/test/.tmp.4106/sea+0x1d89826) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #8 0x55a4ca5880e0 in std::__detail::_Compiler<std::__cxx11::regex_traits<char> >::_Compiler(char const*, char const*, std::locale const&, std::regex_constants::syntax_option_type) (/home/runner/work/node/node/test/.tmp.4106/sea+0x1d880e0) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #9 0x55a4ca58743b in std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char> >::_M_compile(char const*, char const*, std::regex_constants::syntax_option_type) (/home/runner/work/node/node/test/.tmp.4106/sea+0x1d8743b) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #10 0x55a4ca190cf2 in _GLOBAL__sub_I_node_dotenv.cc node_dotenv.cc
    #11 0x7f787d229eba in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29eba) (BuildId: c289da5071a3399de893d2af81d6a30c62646e1e)
    #12 0x55a4ca1f7554 in _start (/home/runner/work/node/node/test/.tmp.4106/sea+0x19f7554) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)

0x602000000050 is located 0 bytes inside of 2-byte region [0x602000000050,0x602000000052)
allocated by thread T0 here:
    #0 0x55a4ca27a39e in malloc (/home/runner/work/node/node/test/.tmp.4106/sea+0x1a7a39e) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #1 0x7f787d6b751b in operator new(unsigned long) (/lib/x86_64-linux-gnu/libstdc++.so.6+0xb751b) (BuildId: 2db998bd67acbfb235c464c0275d4070061695fb)

SUMMARY: AddressSanitizer: alloc-dealloc-mismatch (/home/runner/work/node/node/test/.tmp.4106/sea+0x1ab5acd) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72) in operator delete[](void*)
==179319==HINT: if you don't care about these errors you may set ASAN_OPTIONS=alloc_dealloc_mismatch=0
==179319==ABORTING

[process 179319]: --- stdout ---

[process 179319]: status = 1, signal = null
/home/runner/work/node/node/test/common/child_process.js:86
    throw new Error(`${failures.join('\n')}`);
    ^

Error: - process terminated with status 1, expected 0
    at logAndThrow (/home/runner/work/node/node/test/common/child_process.js:86:11)
    at expectSyncExit (/home/runner/work/node/node/test/common/child_process.js:91:5)
    at spawnSyncAndE
=== release test-single-executable-application-snapshot ===
Path: sequential/test-single-executable-application-snapshot
Error: --- stderr ---
[process 179625]: --- stderr ---
=================================================================
==179625==ERROR: AddressSanitizer: alloc-dealloc-mismatch (malloc vs operator delete []) on 0x602000000050
    #0 0x55bc38eb5acd in operator delete[](void*) (/home/runner/work/node/node/test/.tmp.4107/sea+0x1ab5acd) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #1 0x7fa4f6105b6c in std::__cxx11::collate<char>::do_transform(char const*, char const*) const (/lib/x86_64-linux-gnu/libstdc++.so.6+0x105b6c) (BuildId: 2db998bd67acbfb235c464c0275d4070061695fb)
    #2 0x55bc391a3f40 in std::__detail::_BracketMatcher<std::__cxx11::regex_traits<char>, false, false>::_M_apply(char, std::integral_constant<bool, false>) const::'lambda'()::operator()() const (/home/runner/work/node/node/test/.tmp.4107/sea+0x1da3f40) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #3 0x55bc391a1421 in std::__detail::_BracketMatcher<std::__cxx11::regex_traits<char>, false, false>::_M_ready() (/home/runner/work/node/node/test/.tmp.4107/sea+0x1da1421) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #4 0x55bc3919b310 in void std::__detail::_Compiler<std::__cxx11::regex_traits<char> >::_M_insert_character_class_matcher<false, false>() (/home/runner/work/node/node/test/.tmp.4107/sea+0x1d9b310) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #5 0x55bc39194919 in std::__detail::_Compiler<std::__cxx11::regex_traits<char> >::_M_atom() (/home/runner/work/node/node/test/.tmp.4107/sea+0x1d94919) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #6 0x55bc3918fa66 in std::__detail::_Compiler<std::__cxx11::regex_traits<char> >::_M_alternative() (/home/runner/work/node/node/test/.tmp.4107/sea+0x1d8fa66) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #7 0x55bc39189826 in std::__detail::_Compiler<std::__cxx11::regex_traits<char> >::_M_disjunction() (/home/runner/work/node/node/test/.tmp.4107/sea+0x1d89826) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #8 0x55bc391880e0 in std::__detail::_Compiler<std::__cxx11::regex_traits<char> >::_Compiler(char const*, char const*, std::locale const&, std::regex_constants::syntax_option_type) (/home/runner/work/node/node/test/.tmp.4107/sea+0x1d880e0) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #9 0x55bc3918743b in std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char> >::_M_compile(char const*, char const*, std::regex_constants::syntax_option_type) (/home/runner/work/node/node/test/.tmp.4107/sea+0x1d8743b) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #10 0x55bc38d90cf2 in _GLOBAL__sub_I_node_dotenv.cc node_dotenv.cc
    #11 0x7fa4f5c29eba in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29eba) (BuildId: c289da5071a3399de893d2af81d6a30c62646e1e)
    #12 0x55bc38df7554 in _start (/home/runner/work/node/node/test/.tmp.4107/sea+0x19f7554) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)

0x602000000050 is located 0 bytes inside of 2-byte region [0x602000000050,0x602000000052)
allocated by thread T0 here:
    #0 0x55bc38e7a39e in malloc (/home/runner/work/node/node/test/.tmp.4107/sea+0x1a7a39e) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #1 0x7fa4f60b751b in operator new(unsigned long) (/lib/x86_64-linux-gnu/libstdc++.so.6+0xb751b) (BuildId: 2db998bd67acbfb235c464c0275d4070061695fb)

SUMMARY: AddressSanitizer: alloc-dealloc-mismatch (/home/runner/work/node/node/test/.tmp.4107/sea+0x1ab5acd) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72) in operator delete[](void*)
==179625==HINT: if you don't care about these errors you may set ASAN_OPTIONS=alloc_dealloc_mismatch=0
==179625==ABORTING

[process 179625]: --- stdout ---

[process 179625]: status = 1, signal = null
/home/runner/work/node/node/test/common/child_process.js:86
    throw new Error(`${failures.join('\n')}`);
    ^

Error: - process terminated with status 1, expected 0
    at logAndThrow (/home/runner/work/node/node/test/common/child_process.js:86:11)
    at expectSyncExit (/home/runner/work/node/node/test/common/child_process.js:91:5)
    at spawnSyncAndA
=== release test-single-executable-application-snapshot-and-code-cache ===
Path: sequential/test-single-executable-application-snapshot-and-code-cache
Error: --- stderr ---
[process 180004]: --- stderr ---
=================================================================
==180004==ERROR: AddressSanitizer: alloc-dealloc-mismatch (malloc vs operator delete []) on 0x602000000050
    #0 0x558755eb5acd in operator delete[](void*) (/home/runner/work/node/node/test/.tmp.4108/sea+0x1ab5acd) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #1 0x7fb8e8b05b6c in std::__cxx11::collate<char>::do_transform(char const*, char const*) const (/lib/x86_64-linux-gnu/libstdc++.so.6+0x105b6c) (BuildId: 2db998bd67acbfb235c464c0275d4070061695fb)
    #2 0x5587561a3f40 in std::__detail::_BracketMatcher<std::__cxx11::regex_traits<char>, false, false>::_M_apply(char, std::integral_constant<bool, false>) const::'lambda'()::operator()() const (/home/runner/work/node/node/test/.tmp.4108/sea+0x1da3f40) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #3 0x5587561a1421 in std::__detail::_BracketMatcher<std::__cxx11::regex_traits<char>, false, false>::_M_ready() (/home/runner/work/node/node/test/.tmp.4108/sea+0x1da1421) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #4 0x55875619b310 in void std::__detail::_Compiler<std::__cxx11::regex_traits<char> >::_M_insert_character_class_matcher<false, false>() (/home/runner/work/node/node/test/.tmp.4108/sea+0x1d9b310) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #5 0x558756194919 in std::__detail::_Compiler<std::__cxx11::regex_traits<char> >::_M_atom() (/home/runner/work/node/node/test/.tmp.4108/sea+0x1d94919) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #6 0x5587[5618](https://github.com/nodejs/node/actions/runs/8567708081/job/23480032918?pr=52374#step:6:5619)fa66 in std::__detail::_Compiler<std::__cxx11::regex_traits<char> >::_M_alternative() (/home/runner/work/node/node/test/.tmp.4108/sea+0x1d8fa66) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #7 0x558756189826 in std::__detail::_Compiler<std::__cxx11::regex_traits<char> >::_M_disjunction() (/home/runner/work/node/node/test/.tmp.4108/sea+0x1d89826) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #8 0x5587561880e0 in std::__detail::_Compiler<std::__cxx11::regex_traits<char> >::_Compiler(char const*, char const*, std::locale const&, std::regex_constants::syntax_option_type) (/home/runner/work/node/node/test/.tmp.4108/sea+0x1d880e0) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #9 0x55875618743b in std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char> >::_M_compile(char const*, char const*, std::regex_constants::syntax_option_type) (/home/runner/work/node/node/test/.tmp.4108/sea+0x1d8743b) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #10 0x558755d90cf2 in _GLOBAL__sub_I_node_dotenv.cc node_dotenv.cc
    #11 0x7fb8e8629eba in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29eba) (BuildId: c289da5071a3399de893d2af81d6a30c62646e1e)
    #12 0x558755df7554 in _start (/home/runner/work/node/node/test/.tmp.4108/sea+0x19f7554) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)

0x602000000050 is located 0 bytes inside of 2-byte region [0x602000000050,0x602000000052)
allocated by thread T0 here:
    #0 0x558755e7a39e in malloc (/home/runner/work/node/node/test/.tmp.4108/sea+0x1a7a39e) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #1 0x7fb8e8ab751b in operator new(unsigned long) (/lib/x86_64-linux-gnu/libstdc++.so.6+0xb751b) (BuildId: 2db998bd67acbfb235c464c0275d4070061695fb)

SUMMARY: AddressSanitizer: alloc-dealloc-mismatch (/home/runner/work/node/node/test/.tmp.4108/sea+0x1ab5acd) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72) in operator delete[](void*)
==180004==HINT: if you don't care about these errors you may set ASAN_OPTIONS=alloc_dealloc_mismatch=0
==180004==ABORTING

[process 180004]: --- stdout ---

[process 180004]: status = 1, signal = null
/home/runner/work/node/node/test/common/child_process.js:86
    throw new Error(`${failures.join('\n')}`);
    ^

Error: - process terminated with status 1, expected 0
    at logAndThrow (/home/runner/work/node/node/test/common/child_process.js:86:11)
    at expectSyncExit (/home/runner/work/node/node/test/common/child_process.js:91:5)
    at spawnSyncAndA
=== release test-single-executable-application-use-code-cache ===
Path: sequential/test-single-executable-application-use-code-cache
Error: --- stderr ---
[process 180312]: --- stderr ---
=================================================================
==180312==ERROR: AddressSanitizer: alloc-dealloc-mismatch (malloc vs operator delete []) on 0x602000000050
    #0 0x55a84e6b5acd in operator delete[](void*) (/home/runner/work/node/node/test/.tmp.4109/sea+0x1ab5acd) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #1 0x7f4f16f05b6c in std::__cxx11::collate<char>::do_transform(char const*, char const*) const (/lib/x86_64-linux-gnu/libstdc++.so.6+0x105b6c) (BuildId: 2db998bd67acbfb235c464c0275d4070061695fb)
    #2 0x55a84e9a3f40 in std::__detail::_BracketMatcher<std::__cxx11::regex_traits<char>, false, false>::_M_apply(char, std::integral_constant<bool, false>) const::'lambda'()::operator()() const (/home/runner/work/node/node/test/.tmp.4109/sea+0x1da3f40) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #3 0x55a84e9a1421 in std::__detail::_BracketMatcher<std::__cxx11::regex_traits<char>, false, false>::_M_ready() (/home/runner/work/node/node/test/.tmp.4109/sea+0x1da1421) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #4 0x55a84e99b310 in void std::__detail::_Compiler<std::__cxx11::regex_traits<char> >::_M_insert_character_class_matcher<false, false>() (/home/runner/work/node/node/test/.tmp.4109/sea+0x1d9b310) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #5 0x55a84e994919 in std::__detail::_Compiler<std::__cxx11::regex_traits<char> >::_M_atom() (/home/runner/work/node/node/test/.tmp.4109/sea+0x1d94919) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #6 0x55a84e98fa66 in std::__detail::_Compiler<std::__cxx11::regex_traits<char> >::_M_alternative() (/home/runner/work/node/node/test/.tmp.4109/sea+0x1d8fa66) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #7 0x55a84e989826 in std::__detail::_Compiler<std::__cxx11::regex_traits<char> >::_M_disjunction() (/home/runner/work/node/node/test/.tmp.4109/sea+0x1d89826) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #8 0x55a84e9880e0 in std::__detail::_Compiler<std::__cxx11::regex_traits<char> >::_Compiler(char const*, char const*, std::locale const&, std::regex_constants::syntax_option_type) (/home/runner/work/node/node/test/.tmp.4109/sea+0x1d880e0) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #9 0x55a84e98743b in std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char> >::_M_compile(char const*, char const*, std::regex_constants::syntax_option_type) (/home/runner/work/node/node/test/.tmp.4109/sea+0x1d8743b) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #10 0x55a84e590cf2 in _GLOBAL__sub_I_node_dotenv.cc node_dotenv.cc
    #11 0x7f4f16a29eba in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29eba) (BuildId: c289da5071a3399de893d2af81d6a30c62646e1e)
    #12 0x55a84e5f7554 in _start (/home/runner/work/node/node/test/.tmp.4109/sea+0x19f7554) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)

0x602000000050 is located 0 bytes inside of 2-byte region [0x602000000050,0x602000000052)
allocated by thread T0 here:
    #0 0x55a84e67a39e in malloc (/home/runner/work/node/node/test/.tmp.4109/sea+0x1a7a39e) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #1 0x7f4f16eb751b in operator new(unsigned long) (/lib/x86_64-linux-gnu/libstdc++.so.6+0xb751b) (BuildId: 2db998bd67acbfb235c464c0275d4070061695fb)

SUMMARY: AddressSanitizer: alloc-dealloc-mismatch (/home/runner/work/node/node/test/.tmp.4109/sea+0x1ab5acd) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72) in operator delete[](void*)
==180312==HINT: if you don't care about these errors you may set ASAN_OPTIONS=alloc_dealloc_mismatch=0
==180312==ABORTING

[process 180312]: --- stdout ---

[process 180312]: status = 1, signal = null
/home/runner/work/node/node/test/common/child_process.js:86
    throw new Error(`${failures.join('\n')}`);
    ^

Error: - process terminated with status 1, expected 0
    at logAndThrow (/home/runner/work/node/node/test/common/child_process.js:86:11)
    at expectSyncExit (/home/runner/work/node/node/test/common/child_process.js:91:5)
    at spawnSyncAndA
=== release test-signal-handler ===
Path: abort/test-signal-handler
Error: --- stderr ---
#  /home/runner/work/node/node/out/Release/node[182524]: void node::Chdir(const FunctionCallbackInfo<v8::Value> &) at ../src/node_process_methods.cc:83
  #  Assertion failed: (args.Length()) == (1)

----- Native stack trace -----

 1: 0x558380b6c01f node::DumpNativeBacktrace(_IO_FILE*) [/home/runner/work/node/node/out/Release/node]
 2: 0x558380de9245 node::Assert(node::AssertionInfo const&) [/home/runner/work/node/node/out/Release/node]
 3: 0x558380f9b747  [/home/runner/work/node/node/out/Release/node]
 4: 0x7ffd49c398f0 

----- JavaScript stack trace -----

1: /home/runner/work/node/node/test/abort/test-signal-handler.js:15:3
2: Module._compile (node:internal/modules/cjs/loader:1421:14)
3: Module._extensions..js (node:internal/modules/cjs/loader:1499:10)
4: Module.load (node:internal/modules/cjs/loader:1232:32)
5: Module._load (node:internal/modules/cjs/loader:1048:12)
6: executeUserEntryPoint (node:internal/modules/run_main:187:14)
7: node:internal/main/run_main_module:28:49


node:assert:408
    throw err;
    ^

AssertionError [ERR_ASSERTION]: child.signal = SIGABRT
    at Object.<anonymous> (/home/runner/work/node/node/test/abort/test-signal-handler.js:23:3)
    at Module._compile (node:internal/modules/cjs/loader:1421:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1499:10)
    at Module.load (node:internal/modules/cjs/loader:1232:32)
    at Module._load (node:internal/modules/cjs/loader:1048:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:187:14)
    at node:internal/main/run_main_module:28:49 {
  generatedMessage: false,
  code: 'ERR_ASSERTION',
  actual: false,
  expected: true,
  operator: '=='
}

Node.js v22.0.0-pre
Command: out/Release/node --test-reporter=spec --test-reporter-destination=stdout --test-reporter=./tools/github_reporter/index.js --test-reporter-destination=stdout /home/runner/work/node/node/test/abort/test-signal-handler.js

@targos targos added help wanted Issues that need assistance from volunteers or PRs that need help to proceed. wip Issues and PRs that are still a work in progress. labels Apr 5, 2024
@aduh95
Copy link
Contributor

aduh95 commented Apr 7, 2024

/cc @nodejs/single-executable

@targos
Copy link
Member Author

targos commented Apr 8, 2024

I hoped to get more information from a debug build but it's not reproducible with it!

@aduh95
Copy link
Contributor

aduh95 commented Apr 8, 2024

Should we try with --debug-node to see if that would also workaround the issue? Hopefully that should reduce the build time.

@targos
Copy link
Member Author

targos commented Apr 9, 2024

--debug-node shows the same errors.

@targos
Copy link
Member Author

targos commented Apr 9, 2024

I suggest to wait for #52406 and retry.

@anonrig
Copy link
Member

anonrig commented Apr 10, 2024

I suggest to wait for #52406 and retry.

How is this related to dotenv? Sorry, I couldn't find the connection @targos

@targos
Copy link
Member Author

targos commented Apr 10, 2024

Guess based on the stack trace:

==177986==ERROR: AddressSanitizer: alloc-dealloc-mismatch (malloc vs operator delete []) on 0x602000000050
    #0 0x55c2c68b5acd in operator delete[](void*) (/home/runner/work/node/node/test/.tmp.4102/sea+0x1ab5acd) (BuildId: 790abd3d700c[5596](https://github.com/nodejs/node/actions/runs/8567708081/job/23480032918?pr=52374#step:6:5597)3374b7aaca574c0d1b29db72)
    #1 0x7f2067505b6c in std::__cxx11::collate<char>::do_transform(char const*, char const*) const (/lib/x86_64-linux-gnu/libstdc++.so.6+0x105b6c) (BuildId: 2db998bd67acbfb235c464c0275d4070061695fb)
    #2 0x55c2c6ba3f40 in std::__detail::_BracketMatcher<std::__cxx11::regex_traits<char>, false, false>::_M_apply(char, std::integral_constant<bool, false>) const::'lambda'()::operator()() const (/home/runner/work/node/node/test/.tmp.4102/sea+0x1da3f40) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #3 0x55c2c6ba1421 in std::__detail::_BracketMatcher<std::__cxx11::regex_traits<char>, false, false>::_M_ready() (/home/runner/work/node/node/test/.tmp.4102/sea+0x1da1421) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #4 0x55c2c6b9b310 in void std::__detail::_Compiler<std::__cxx11::regex_traits<char> >::_M_insert_character_class_matcher<false, false>() (/home/runner/work/node/node/test/.tmp.4102/sea+0x1d9b310) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #5 0x55c2c6b94919 in std::__detail::_Compiler<std::__cxx11::regex_traits<char> >::_M_atom() (/home/runner/work/node/node/test/.tmp.4102/sea+0x1d94919) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #6 0x55c2c6b8fa66 in std::__detail::_Compiler<std::__cxx11::regex_traits<char> >::_M_alternative() (/home/runner/work/node/node/test/.tmp.4102/sea+0x1d8fa66) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #7 0x55c2c6b89826 in std::__detail::_Compiler<std::__cxx11::regex_traits<char> >::_M_disjunction() (/home/runner/work/node/node/test/.tmp.4102/sea+0x1d89826) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #8 0x55c2c6b880e0 in std::__detail::_Compiler<std::__cxx11::regex_traits<char> >::_Compiler(char const*, char const*, std::locale const&, std::regex_constants::syntax_option_type) (/home/runner/work/node/node/test/.tmp.4102/sea+0x1d880e0) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #9 0x55c2c6b8743b in std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char> >::_M_compile(char const*, char const*, std::regex_constants::syntax_option_type) (/home/runner/work/node/node/test/.tmp.4102/sea+0x1d8743b) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)
    #10 0x55c2c6790cf2 in _GLOBAL__sub_I_node_dotenv.cc node_dotenv.cc
    #11 0x7f2067029eba in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29eba) (BuildId: c289da5071a3399de893d2af81d6a30c62646e1e)
    #12 0x55c2c67f7554 in _start (/home/runner/work/node/node/test/.tmp.4102/sea+0x19f7554) (BuildId: 790abd3d700c55963374b7aaca574c0d1b29db72)

@targos
Copy link
Member Author

targos commented Apr 17, 2024

@nodejs/cpp-reviewers Does this make sense to you?

[process 179535]: --- stderr ---
=================================================================
==179535==ERROR: AddressSanitizer: alloc-dealloc-mismatch (malloc vs operator delete) on 0x603000000430
    #0 0x55a691aac89d in operator delete(void*) (/home/runner/work/node/node/test/.tmp.4156/sea+0x1eac89d) (BuildId: 446fbb0b10fb3104b8ae2466b95dd5853f3e4696)
    #1 0x55a6922ee741 in node::options_parser::OptionsParser<node::EnvironmentOptions>::AddAlias(char const*, char const*) /home/runner/work/node/node/out/../src/node_options-inl.h:106
    #2 0x55a6922d51a6 in node::options_parser::EnvironmentOptionsParser::EnvironmentOptionsParser() /home/runner/work/node/node/out/../src/node_options.cc:761:32
    #3 0x55a6922e4a10 in node::options_parser::EnvironmentOptionsParser::EnvironmentOptionsParser(node::options_parser::DebugOptionsParser const&) /home/runner/work/node/node/out/../src/node_options-inl.h:351:19
    #4 0x55a6919b2506 in __cxx_global_var_init.44 /home/runner/work/node/node/out/../src/quic/data.cc:281:44
    #5 0x55a6919b25d3 in _GLOBAL__sub_I_node_options.cc /home/runner/work/node/node/out/../src/quic/data.cc
    #6 0x7f7ac5c29eba in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29eba) (BuildId: c289da5071a3399de893d2af81d6a30c62646e1e)
    #7 0x55a6919ee424 in _start (/home/runner/work/node/node/test/.tmp.4156/sea+0x1dee424) (BuildId: 446fbb0b10fb3104b8ae2466b95dd5853f3e4696)

0x603000000430 is located 0 bytes inside of 31-byte region [0x603000000430,0x60300000044f)
allocated by thread T0 here:
    #0 0x55a691a7126e in malloc (/home/runner/work/node/node/test/.tmp.4156/sea+0x1e7126e) (BuildId: 446fbb0b10fb3104b8ae2466b95dd5853f3e4696)
    #1 0x7f7ac60b751b in operator new(unsigned long) (/lib/x86_64-linux-gnu/libstdc++.so.6+0xb751b) (BuildId: 2db998bd67acbfb235c464c0275d4070061695fb)
    #2 0x55a691ac458c in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string<std::allocator<char> >(char const*, std::allocator<char> const&) /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/optional:1001:6
    #3 0x55a6922ee5d9 in node::options_parser::OptionsParser<node::EnvironmentOptions>::AddAlias(char const*, char const*) /home/runner/work/node/node/out/../src/node_options-inl.h
    #4 0x55a6922d51a6 in node::options_parser::EnvironmentOptionsParser::EnvironmentOptionsParser() /home/runner/work/node/node/out/../src/node_options.cc:761:32
    #5 0x55a6922e4a10 in node::options_parser::EnvironmentOptionsParser::EnvironmentOptionsParser(node::options_parser::DebugOptionsParser const&) /home/runner/work/node/node/out/../src/node_options-inl.h:351:19
    #6 0x55a6919b2506 in __cxx_global_var_init.44 /home/runner/work/node/node/out/../src/quic/data.cc:281:44
    #7 0x55a6919b25d3 in _GLOBAL__sub_I_node_options.cc /home/runner/work/node/node/out/../src/quic/data.cc
    #8 0x7f7ac5c29eba in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29eba) (BuildId: c289da5071a3399de893d2af81d6a30c62646e1e)

SUMMARY: AddressSanitizer: alloc-dealloc-mismatch (/home/runner/work/node/node/test/.tmp.4156/sea+0x1eac89d) (BuildId: 446fbb0b10fb3104b8ae2466b95dd5853f3e4696) in operator delete(void*)
==179535==HINT: if you don't care about these errors you may set ASAN_OPTIONS=alloc_dealloc_mismatch=0
==179535==ABORTING

@targos
Copy link
Member Author

targos commented Apr 17, 2024

What I understand is it points to

node/src/node_options-inl.h

Lines 119 to 123 in 97627da

template <typename Options>
void OptionsParser<Options>::AddAlias(const char* from,
const char* to) {
aliases_[from] = { to };
}

Where an array is allocated.

Then somewhere we use delete instead of delete[] to deallocate it, but I don't see where it happens.

@lemire
Copy link
Member

lemire commented Apr 17, 2024

Line 106 seems to be...

OptionEnvvarSettings env_setting) {

called from

AddAlias("-pe", { "--print", "--eval" });

@lemire
Copy link
Member

lemire commented Apr 18, 2024

What I see are reports about an issue in old code contributed by @addaleax

It seems unclear to me (though not impossible) there there is a defect in this code. Possibly we are encountering a false positive.

@lemire
Copy link
Member

lemire commented Apr 18, 2024

Something does not add up. The trace has...

node::options_parser::OptionsParser<node::EnvironmentOptions>::AddAlias(char const*, char const*) /home/runner/work/node/node/out/../src/node_options-inl.h:106

But AddAlias(char const*, char const*) is not on line 106, rather it appears on line 120.

@lemire lemire added the request-ci Add this label to start a Jenkins CI on a PR. label Apr 18, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Apr 18, 2024
@nodejs-github-bot
Copy link
Collaborator

@lemire
Copy link
Member

lemire commented Apr 19, 2024

Let us try to rerun the tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Issues that need assistance from volunteers or PRs that need help to proceed. meta Issues and PRs related to the general management of the project. wip Issues and PRs that are still a work in progress.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

test-asan workflow broken by runner update to ubuntu-22.04
5 participants