-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Building 0.8.28 on Arch Linux with CMAKE_BUILD_TYPE=None
hits an assert in std::optional
: Assertion 'this->_M_is_engaged()' failed
#15871
Comments
You shall not have another CompilerStack aside me.
Can you check if there's additional detail stuck to the first of the errors that are being reported? Like in #15788 (comment). If there is, that's the only relevant bit of the output and all the As to the error itself, from these effects I highly suspect it's triggered by something in I actually need to bump the package to version 13, though I doubt this will help the problem we're seeing here (other than by forcing a rebuild of |
Thanks for the response. I am going to post the error output as soon as I have. I have to increase console output history length because it exceeds my current history length. I am the author auf the AUR package. Only the version and cmake options were changed. The error was actually reported to me an I was able to reproduce in a clean build. It is not an error solely on my end. |
But I meant that there were no changes in the |
Yes, "evmone" was rebuild too. I see that you are a maintainer of that AUR package. Could you update it please? It is outdated. Also consider these improvement suggestions. |
Sure. I'll do this tomorrow when I'll have some time to reproduce and investigate the bug. I'll also incorporate the suggestions. |
Here is the beginning of the error output: [ 97%] Built target strictasm_diff_ossfuzz
[ 98%] Built target strictasm_opt_ossfuzz
[100%] Built target strictasm_assembly_ossfuzz
WARNING :: Gas cost expectations are not being enforced
WARNING :: Gas Cost Expectations are not being enforced
Running 8957 test cases...
0% 10 20 30 40 50 60 70 80 90 100%
|----|----|----|----|----|----|----|----|----|----|
***sr/include/c++/14.2.1/optional:482: constexpr const _Tp& std::_Optional_base_impl<_Tp, _Dp>::_M_get() const [with _Tp = unsigned char; _Dp = std::_Optional_base<unsigned char, true, true>]: Assertion 'this->_M_is_engaged()' failed.
9munknown location(0): fatal error: in "StandardCompiler/linking_yul": signal: SIGABRT (application abort requested)
/usr/src/debug/solidity/solidity_0.8.28/test/libsolidity/StandardCompiler.cpp(882): last checkpoint: "linking_yul" test entry
/usr/include/c++/14.2.1/optional:482: constexpr const _Tp& std::_Optional_base_impl<_Tp, _Dp>::_M_get() const [with _Tp = unsigned char; _Dp = std::_Optional_base<unsigned char, true, true>]: Assertion 'this->_M_is_engaged()' failed.
unknown location(0): fatal error: in "StandardCompiler/linking_yul_empty_link_reference": signal: SIGABRT (application abort requested)
/usr/src/debug/solidity/solidity_0.8.28/test/libsolidity/StandardCompiler.cpp(914): last checkpoint: "linking_yul_empty_link_reference" test entry
/usr/include/c++/14.2.1/optional:482: constexpr const _Tp& std::_Optional_base_impl<_Tp, _Dp>::_M_get() const [with _Tp = unsigned char; _Dp = std::_Optional_base<unsigned char, true, true>]: Assertion 'this->_M_is_engaged()' failed.
unknown location(0): fatal error: in "StandardCompiler/linking_yul_no_filename_in_link_reference": signal: SIGABRT (application abort requested)
/usr/src/debug/solidity/solidity_0.8.28/test/libsolidity/StandardCompiler.cpp(946): last checkpoint: "linking_yul_no_filename_in_link_reference" test entry
/usr/include/c++/14.2.1/optional:482: constexpr const _Tp& std::_Optional_base_impl<_Tp, _Dp>::_M_get() const [with _Tp = unsigned char; _Dp = std::_Optional_base<unsigned char, true, true>]: Assertion 'this->_M_is_engaged()' failed.
unknown location(0): fatal error: in "StandardCompiler/linking_yul_same_library_name_different_files": signal: SIGABRT (application abort requested)
/usr/src/debug/solidity/solidity_0.8.28/test/libsolidity/StandardCompiler.cpp(978): last checkpoint: "linking_yul_same_library_name_different_files" test entry
*sr/include/c++/14.2.1/optional:482: constexpr const _Tp& std::_Optional_base_impl<_Tp, _Dp>::_M_get() const [with _Tp = unsigned char; _Dp = std::_Optional_base<unsigned char, true, true>]: Assertion 'this->_M_is_engaged()' failed.
39;49munknown location(0): fatal error: in "SolidityEndToEndTest/creation_code_optimizer": signal: SIGABRT (application abort requested)
/usr/src/debug/solidity/solidity_0.8.28/test/libsolidity/SolidityEndToEndTest.cpp(113): last checkpoint
/usr/src/debug/solidity/solidity_0.8.28/libsolidity/interface/CompilerStack.cpp(119): fatal error: in "solidity::frontend::CompilerStack::CompilerStack(solidity::frontend::ReadCallback::Callback)": /usr/src/debug/solidity/solidity_0.8.28/libsolidity/interface/CompilerStack.cpp(119): Throw in function solidity::frontend::CompilerStack::CompilerStack(solidity::frontend::ReadCallback::Callback)
Dynamic exception type: boost::wrapexcept<solidity::langutil::InternalCompilerError>
std::exception::what: You shall not have another CompilerStack aside me.
[solidity::util::tag_comment*] = You shall not have another CompilerStack aside me.
/usr/src/debug/solidity/solidity_0.8.28/test/libsolidity/SolidityEndToEndTest.cpp(122): last checkpoint: "exp_operator" fixture ctor
/usr/src/debug/solidity/solidity_0.8.28/libsolidity/interface/CompilerStack.cpp(119): fatal error: in "solidity::frontend::CompilerStack::CompilerStack(solidity::frontend::ReadCallback::Callback)": /usr/src/debug/solidity/solidity_0.8.28/libsolidity/interface/CompilerStack.cpp(119): Throw in function solidity::frontend::CompilerStack::CompilerStack(solidity::frontend::ReadCallback::Callback)
Dynamic exception type: boost::wrapexcept<solidity::langutil::InternalCompilerError>
std::exception::what: You shall not have another CompilerStack aside me.
[solidity::util::tag_comment*] = You shall not have another CompilerStack aside me. |
Thanks! Looks like it likely has nothing to do with the evmone package, just has a similar effect. We're hitting an assert in the implementation of
This happens in That's just the symptom though. Hard to say what's the underlying cause without some debugging. Could be just a random side-effect of an unrelated bug, like writing to already freed memory somewhere. I suspect that the reason we're not seeing the failure in CI despite having an Arch Linux job is that we build a release binary (with debug info), and have debug asserts disabled. BTW, I think your package may (unintentionally?) be doing a debug build. You have Lines 6 to 15 in 65e0fd7
We should really add a validation for this. I don't recommend running debug builds outside development, because these produce a huge binary (200-300 MB) and are very slow. Though you'd probably notice this so it's also possible that you're just getting some hybrid that's optimized but still has debug asserts compiled in. Please either just omit the setting or set it to |
Maybe we should just have a dedicated build type for release with debug assertions enabled. The reason we don't have a |
You shall not have another CompilerStack aside me.
std::optional
: Assertion 'this->_M_is_engaged()' failed
The option |
May I politely remind you of this. |
std::optional
: Assertion 'this->_M_is_engaged()' failed
CMAKE_BUILD_TYPE=None
hits an assert in std::optional
: Assertion 'this->_M_is_engaged()' failed
Sorry for the delay. I haven't forgotten, but we're trying to get a new release out and it had a higher priority. I also had problems with reproducing it in our build environment, which made debugging this pretty tedious. I spent some time on this today to still get it done before we release and got to the bottom of it: #15909. It was actually a simple bug due to dereferencing of an empty There's still the matter of being able to detect these failing asserts so I reopened #12641 and will try to get it addressed in the near future. I also need to look more into those |
Out of curiosity since I am a C++ developer too, why does the build type |
Because it enables the assertion in |
I get a lot of these error when running the tests,
./build/test/soltest -p true -- --testpath ./test/
.It only happens when installing via
makepkg
on Arch Linux but not when executing the same commands on a cloned repository manually. Additional information, I do not have installed z3 or cvc5.The build script can be inspected here.
The issue has to be introduced with version 0.8.27 or 0.8.28 because 0.8.26 worked. I have only tested 0.8.28 now which does not work.
The text was updated successfully, but these errors were encountered: