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

Infinite recursion in bcp tests #367

Closed
2 of 3 tasks
Lastique opened this issue Mar 24, 2024 · 3 comments
Closed
2 of 3 tasks

Infinite recursion in bcp tests #367

Lastique opened this issue Mar 24, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@Lastique
Copy link
Contributor

Make sure you completed the following tasks

Environment and version details

  • Operating System+version: Kubuntu 22.04
  • Compiler+version: gcc 11.4
  • Shell: bash
  • B2 Version: B2 5.1.0 (OS=LINUX, jobs=8)
  • B2 Configuration:
$ b2 --debug-configuration
notice: loading B2 from /home/lastique/src/boost/tools/build/src/build-system.jam
notice: Searching '/etc' '/home/lastique' '/home/lastique/src/boost/tools/build/src/util' '/home/lastique/src/boost/tools/build/src/tools' '/home/lastique/src/boost/tools/build/src/options' '/home/lastique/src/boost/tools/build/src/engine' '/home/lastique/src/boost/tools/build/src/contrib' '/home/lastique/src/boost/tools/build/src/build' '/home/lastique/src/boost/tools/build/src' for site-config configuration file 'site-config.jam'.
notice: Configuration file 'site-config.jam' not found in '/etc' '/home/lastique' '/home/lastique/src/boost/tools/build/src/util' '/home/lastique/src/boost/tools/build/src/tools' '/home/lastique/src/boost/tools/build/src/options' '/home/lastique/src/boost/tools/build/src/engine' '/home/lastique/src/boost/tools/build/src/contrib' '/home/lastique/src/boost/tools/build/src/build' '/home/lastique/src/boost/tools/build/src'.
notice: Searching '/home/lastique' '/home/lastique/src/boost/tools/build/src/util' '/home/lastique/src/boost/tools/build/src/tools' '/home/lastique/src/boost/tools/build/src/options' '/home/lastique/src/boost/tools/build/src/engine' '/home/lastique/src/boost/tools/build/src/contrib' '/home/lastique/src/boost/tools/build/src/build' '/home/lastique/src/boost/tools/build/src' for user-config configuration file 'user-config.jam'.
notice: Loading user-config configuration file 'user-config.jam' from '/home/lastique'.
notice: will use 'g++' for gcc, condition <toolset>gcc-11
notice: using gcc libraries :: <toolset>gcc-11 :: /usr/bin /usr/lib /usr/lib32 /usr/lib64
notice: using gcc archiver :: <toolset>gcc-11 :: /usr/bin/ar
warning: toolset gcc initialization: can not find tool windres
warning: initialized from /home/lastique/user-config.jam:44
notice: using rc compiler :: <toolset>gcc-11 :: /usr/bin/as
notice: using doxygen :
notice: Boost.Book: searching XSL/DTD in
notice: /home/lastique/src/boost/tools/boostbook
notice: BoostBook: found docbook XSL stylesheets in: /usr/share/xml/docbook/stylesheet/nwalsh
notice: BoostBook: found docbook DTD in: /usr/share/xml/docbook/schema/dtd/4.2
notice: BoostBook: found boostbook XSL stylesheets in: /home/lastique/src/boost/tools/boostbook/xsl
notice: BoostBook: found boostbook DTD in: /home/lastique/src/boost/tools/boostbook/dtd
notice: Searching '.' for project-config configuration file 'project-config.jam'.
notice: Loading project-config configuration file 'project-config.jam' from '.'.
notice: [python-cfg] Configuring python...
notice: [python-cfg]   user-specified version: "3.10"
notice: [python-cfg]   user-specified cmd-or-prefix: "/usr"
notice: [python-cfg] Checking interpreter command "/usr/bin/python3.10"...
notice: [python-cfg] running command '/usr/bin/python3.10 -c "from sys import *; print('version=%d.%d\nplatform=%s\nprefix=%s\nexec_prefix=%s\nexecutable=%s' % (version_info[0],version_info[1],platform,prefix,exec_prefix,executable))" 2>&1'
notice: [python-cfg] ...requested configuration matched!
notice: [python-cfg] Details of this Python configuration:
notice: [python-cfg]   interpreter command: "/usr/bin/python3.10"
notice: [python-cfg]   include path: "/usr/include/python3.10"
notice: [python-cfg]   library path: "/usr/lib/python3.10/config" "/usr/lib"
notice: [python-cfg] Checking for NumPy...
notice: [python-cfg] running command '/usr/bin/python3.10 -c "import sys; sys.stderr = sys.stdout; import numpy; print(numpy.get_include())"'
notice: [python-cfg] NumPy enabled
Segmentation fault (core dumped)

Brief problem description

b2 enters infinite recursion and crashes when invoked in the Boost tree produced by bcp CI.

This reproduces in CI here, as well as locally.

Steps to reproduce the issue

  1. In Boost develop tree, cd tools/bcp.
  2. Checkout the updated version from this PR. This will fix compilation of bcp.
  3. cd test; ./ci_script.sh

Actual behavior summary

After bcp completes copying the Boost tree and invokes ./b2 -j3 libs/program_options/build in the copied tree, b2 crashes with SIGSEGV.

I have built b2 in debug mode and captured a backtrace. The whole backtrace is large, here's the top few entries:

#0  0x00005555555db3b0 in yylex () at scan.cpp:248
#1  0x00005555555c2691 in yyparse () at src/engine/jamgram.cpp:1293
#2  0x00005555555cfa3b in parse_impl (frame=0x7fffff850d50) at parse.cpp:68
#3  0x00005555555cfb73 in parse_file (f=0x555556473d60, frame=0x7fffff850d50) at parse.cpp:89
#4  0x00005555555cfea4 in parse_include (target=0x555556478af0, frame=0x7fffff850d50) at parse.cpp:157
#5  0x00005555555f5ee1 in b2::jam::modules::load (module_name=..., filename=..., search=..., context_ref=...) at mod_jam_modules.cpp:202
#6  0x00005555555f7f17 in b2::jam::modules::import (module_names=..., rules_opt=..., rename_opt=..., context_ref=...) at mod_jam_modules.cpp:337
#7  0x000055555556d6a6 in b2::jam::jam_bind<void, b2::jam::jam_arg_spec<b2::bind::arg_<1>, b2::bind::arg_<1>, b2::bind::arg_<1> >, b2::list_cref, b2::list_cref, b2::list_cref, b2::bind::context_ref_>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, b2::jam::jam_arg_spec<b2::bind::arg_<1>, b2::bind::arg_<1>, b2::bind::arg_<1> >&, void (*)(b2::list_cref, b2::list_cref, b2::list_cref, b2::bind::context_ref_))::{lambda(frame*, int)#1}::operator()(frame*, int) const::{lambda(b2::list_cref, b2::list_cref, b2::list_cref, b2::bind::context_ref_)#1}::operator()(b2::list_cref, b2::list_cref, b2::list_cref, b2::bind::context_ref_) const (__closure=0x7fffff850518, args#0=..., args#1=..., args#2=..., args#3=...)
    at bindjam.cpp:706
#8  0x000055555557b6d8 in b2::mp::invoke<void, b2::jam::jam_bind<void, b2::jam::jam_arg_spec<b2::bind::arg_<1>, b2::bind::arg_<1>, b2::bind::arg_<1> >, b2::list_cref, b2::list_cref, b2::list_cref, b2::bind::context_ref_>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, b2::jam::jam_arg_spec<b2::bind::arg_<1>, b2::bind::arg_<1>, b2::bind::arg_<1> >&, void (*)(b2::list_cref, b2::list_cref, b2::list_cref, b2::bind::context_ref_))::{lambda(frame*, int)#1}::operator()(frame*, int) const::{lambda(b2::list_cref, b2::list_cref, b2::list_cref, b2::bind::context_ref_)#1}&, std::tuple<b2::list_cref, b2::list_cref, b2::list_cref, b2::bind::context_ref_>&, 0ul, 1ul, 2ul, 3ul>(b2::jam::jam_arg_spec<b2::bind::arg_<1>, b2::bind::arg_<1>, b2::bind::arg_<1> >&&, std::tuple<b2::list_cref, b2::list_cref, b2::list_cref, b2::bind::context_ref_>&, b2::mp::index_sequence<0ul, 1ul, 2ul, 3ul>) (call=..., args=std::tuple containing = {...})
    at /home/lastique/src/bcp-output/tools/build/src/engine/mp.h:53
#9  0x000055555555ea69 in b2::jam::jam_call_function<b2::jam::jam_bind<void, b2::jam::jam_arg_spec<b2::bind::arg_<1>, b2::bind::arg_<1>, b2::bind::arg_<1> >, b2::list_cref, b2::list_cref, b2::list_cref, b2::bind::context_ref_>(const string_t&, const string_t&, b2::jam::jam_arg_spec<b2::bind::arg_<1>, b2::bind::arg_<1>, b2::bind::arg_<1> >&, void (*)(b2::list_cref, b2::list_cref, b2::list_cref, b2::bind::context_ref_))::<lambda(FRAME*, int)>::<lambda(b2::list_cref, b2::list_cref, b2::list_cref, b2::bind::context_ref_)>, b2::list_cref, b2::list_cref, b2::list_cref, b2::bind::context_ref_, void>(FRAME *, int, struct {...}, void (*)(b2::list_cref, b2::list_cref, b2::list_cref, b2::bind::context_ref_)) (frame=0x7fffff850d50, flags=0, cxx_call=...) at bindjam.cpp:514
#10 0x000055555556d62b in b2::jam::jam_bind<void, b2::jam::jam_arg_spec<b2::bind::arg_<1>, b2::bind::arg_<1>, b2::bind::arg_<1> >, b2::list_cref, b2::list_cref, b2::list_cref, b2::bind::context_ref_>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, b2::jam::jam_arg_spec<b2::bind::arg_<1>, b2::bind::arg_<1>, b2::bind::arg_<1> >&, void (*)(b2::list_cref, b2::list_cref, b2::list_cref, b2::bind::context_ref_))::{lambda(frame*, int)#1}::operator()(frame*, int) const (__closure=0x555555887480, 
    frame=0x7fffff850d50, flags=0) at bindjam.cpp:703
#11 0x0000555555589e7e in std::__invoke_impl<LIST*, b2::jam::jam_bind<void, b2::jam::jam_arg_spec<b2::bind::arg_<1>, b2::bind::arg_<1>, b2::bind::arg_<1> >, b2::list_cref, b2::list_cref, b2::list_cref, b2::bind::context_ref_>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, b2::jam::jam_arg_spec<b2::bind::arg_<1>, b2::bind::arg_<1>, b2::bind::arg_<1> >&, void (*)(b2::list_cref, b2::list_cref, b2::list_cref, b2::bind::context_ref_))::{lambda(frame*, int)#1}&, frame*, int>(std::__invoke_other, b2::jam::jam_arg_spec<b2::bind::arg_<1>, b2::bind::arg_<1>, b2::bind::arg_<1> >&&, frame*&&, int&&) (__f=...) at /usr/include/c++/11/bits/invoke.h:61
#12 0x00005555555831c4 in std::__invoke_r<LIST*, b2::jam::jam_bind<void, b2::jam::jam_arg_spec<b2::bind::arg_<1>, b2::bind::arg_<1>, b2::bind::arg_<1> >, b2::list_cref, b2::list_cref, b2::list_cref, b2::bind::context_ref_>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, b2::jam::jam_arg_spec<b2::bind::arg_<1>, b2::bind::arg_<1>, b2::bind::arg_<1> >&, void (*)(b2::list_cref, b2::list_cref, b2::list_cref, b2::bind::context_ref_))::{lambda(frame*, int)#1}&, frame*, int>(b2::jam::jam_arg_spec<b2::bind::arg_<1>, b2::bind::arg_<1>, b2::bind::arg_<1> >&&, frame*&&, int&&) (__fn=...) at /usr/include/c++/11/bits/invoke.h:142
#13 0x000055555557b79c in std::_Function_handler<LIST* (frame*, int), b2::jam::jam_bind<void, b2::jam::jam_arg_spec<b2::bind::arg_<1>, b2::bind::arg_<1>, b2::bind::arg_<1> >, b2::list_cref, b2::list_cref, b2::list_cref, b2::bind::context_ref_>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, b2::jam::jam_arg_spec<b2::bind::arg_<1>, b2::bind::arg_<1>, b2::bind::arg_<1> >&, void (*)(b2::list_cref, b2::list_cref, b2::list_cref, b2::bind::context_ref_))::{lambda(frame*, int)#1}>::_M_invoke(std::_Any_data const&, frame*&&, int&&) (__functor=..., __args#0=@0x7fffff8506a0: 0x7fffff850d50, __args#1=@0x7fffff85069c: 0) at /usr/include/c++/11/bits/std_function.h:290
#14 0x00005555555bc76a in std::function<LIST* (frame*, int)>::operator()(frame*, int) const (this=0x555555887480, __args#0=0x7fffff850d50, __args#1=0) at /usr/include/c++/11/bits/std_function.h:590
#15 0x00005555555b7d19 in function_run (function_=0x555555887460, frame=0x7fffff850d50) at function.cpp:4333
#16 0x000055555559d76a in evaluate_rule (rule=0x5555558803b8, rulename=0x555555887550, frame=0x7fffff850d50) at compile.cpp:153
#17 0x00005555555ad458 in function_call_rule (function=0x555557e0d920, frame=0x7fffff852140, s=0x55555565ee60 <stack_global()::singleton>, n_args=1, unexpanded=0x555555887568 "import", file=0x555556473d60, 
    line=17) at function.cpp:772
#18 0x00005555555b9b75 in function_run (function_=0x555557e0d920, frame=0x7fffff852140) at function.cpp:5027
#19 0x00005555555cfac3 in parse_impl (frame=0x7fffff852140) at parse.cpp:77
#20 0x00005555555cfb73 in parse_file (f=0x555556473d60, frame=0x7fffff852140) at parse.cpp:89
#21 0x00005555555cfea4 in parse_include (target=0x555556478af0, frame=0x7fffff852140) at parse.cpp:157
#22 0x00005555555f5ee1 in b2::jam::modules::load (module_name=..., filename=..., search=..., context_ref=...) at mod_jam_modules.cpp:202
#23 0x00005555555f7f17 in b2::jam::modules::import (module_names=..., rules_opt=..., rename_opt=..., context_ref=...) at mod_jam_modules.cpp:337
#24 0x000055555556d6a6 in b2::jam::jam_bind<void, b2::jam::jam_arg_spec<b2::bind::arg_<1>, b2::bind::arg_<1>, b2::bind::arg_<1> >, b2::list_cref, b2::list_cref, b2::list_cref, b2::bind::context_ref_>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, b2::jam::jam_arg_spec<b2::bind::arg_<1>, b2::bind::arg_<1>, b2::bind::arg_<1> >&, void (*)(b2::list_cref, b2::list_cref, b2::list_cref, b2::bind::context_ref_))::{lambda(frame*, int)#1}::operator()(frame*, int) const::{lambda(b2::list_cref, b2::list_cref, b2::list_cref, b2::bind::context_ref_)#1}::operator()(b2::list_cref, b2::list_cref, b2::list_cref, b2::bind::context_ref_) const (__closure=0x7fffff851908, args#0=..., args#1=..., args#2=..., args#3=...) at bindjam.cpp:706
#25 0x000055555557b6d8 in b2::mp::invoke<void, b2::jam::jam_bind<void, b2::jam::jam_arg_spec<b2::bind::arg_<1>, b2::bind::arg_<1>, b2::bind::arg_<1> >, b2::list_cref, b2::list_cref, b2::list_cref, b2::bind::context_ref_>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, b2::jam::jam_arg_spec<b2::bind::arg_<1>, b2::bind::arg_<1>, b2::bind::arg_<1> >&, void (*)(b2::list_cref, b2::list_cref, b2::list_cref, b2::bind::context_ref_))::{lambda(frame*, int)#1}::operator()(frame*, int) const::{lambda(b2::list_cref, b2::list_cref, b2::list_cref, b2::bind::context_ref_)#1}&, std::tuple<b2::list_cref, b2::list_cref, b2::list_cref, b2::bind::context_ref_>&, 0ul, 1ul, 2ul, 3ul>(b2::jam::jam_arg_spec<b2::bind::arg_<1>, b2::bind::arg_<1>, b2::bind::arg_<1> >&&, std::tuple<b2::list_cref, b2::list_cref, b2::list_cref, b2::bind::context_ref_>&, b2::mp::index_sequence<0ul, 1ul, 2ul, 3ul>) (call=..., args=std::tuple containing = {...}) at /home/lastique/src/bcp-output/tools/build/src/engine/mp.h:53
#26 0x000055555555ea69 in b2::jam::jam_call_function<b2::jam::jam_bind<void, b2::jam::jam_arg_spec<b2::bind::arg_<1>, b2::bind::arg_<1>, b2::bind::arg_<1> >, b2::list_cref, b2::list_cref, b2::list_cref, b2::bind::context_ref_>(const string_t&, const string_t&, b2::jam::jam_arg_spec<b2::bind::arg_<1>, b2::bind::arg_<1>, b2::bind::arg_<1> >&, void (*)(b2::list_cref, b2::list_cref, b2::list_cref, b2::bind::context_ref_))::<lambda(FRAME*, int)>::<lambda(b2::list_cref, b2::list_cref, b2::list_cref, b2::bind::context_ref_)>, b2::list_cref, b2::list_cref, b2::list_cref, b2::bind::context_ref_, void>(FRAME *, int, struct {...}, void (*)(b2::list_cref, b2::list_cref, b2::list_cref, b2::bind::context_ref_)) (frame=0x7fffff852140, flags=0, cxx_call=...) at bindjam.cpp:514
#27 0x000055555556d62b in b2::jam::jam_bind<void, b2::jam::jam_arg_spec<b2::bind::arg_<1>, b2::bind::arg_<1>, b2::bind::arg_<1> >, b2::list_cref, b2::list_cref, b2::list_cref, b2::bind::context_ref_>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, b2::jam::jam_arg_spec<b2::bind::arg_<1>, b2::bind::arg_<1>, b2::bind::arg_<1> >&, void (*)(b2::list_cref, b2::list_cref, b2::list_cref, b2::bind::context_ref_))::{lambda(frame*, int)#1}::operator()(frame*, int) const (__closure=0x555555887480, frame=0x7fffff852140, flags=0) at bindjam.cpp:703
#28 0x0000555555589e7e in std::__invoke_impl<LIST*, b2::jam::jam_bind<void, b2::jam::jam_arg_spec<b2::bind::arg_<1>, b2::bind::arg_<1>, b2::bind::arg_<1> >, b2::list_cref, b2::list_cref, b2::list_cref, b2::bind::context_ref_>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, b2::jam::jam_arg_spec<b2::bind::arg_<1>, b2::bind::arg_<1>, b2::bind::arg_<1> >&, void (*)(b2::list_cref, b2::list_cref, b2::list_cref, b2::bind::context_ref_))::{lambda(frame*, int)#1}&, frame*, int>(std::__invoke_other, b2::jam::jam_arg_spec<b2::bind::arg_<1>, b2::bind::arg_<1>, b2::bind::arg_<1> >&&, frame*&&, int&&) (__f=...) at /usr/include/c++/11/bits/invoke.h:61
#29 0x00005555555831c4 in std::__invoke_r<LIST*, b2::jam::jam_bind<void, b2::jam::jam_arg_spec<b2::bind::arg_<1>, b2::bind::arg_<1>, b2::bind::arg_<1> >, b2::list_cref, b2::list_cref, b2::list_cref, b2::bind::context_ref_>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, b2::jam::jam_arg_spec<b2::bind::arg_<1>, b2::bind::arg_<1>, b2::bind::arg_<1> >&, void (*)(b2::list_cref, b2::list_cref, b2::list_cref, b2::bind::context_ref_))::{lambda(frame*, int)#1}&, frame*, int>(b2::jam::jam_arg_spec<b2::bind::arg_<1>, b2::bind::arg_<1>, b2::bind::arg_<1> >&&, frame*&&, int&&) (__fn=...) at /usr/include/c++/11/bits/invoke.h:142
#30 0x000055555557b79c in std::_Function_handler<LIST* (frame*, int), b2::jam::jam_bind<void, b2::jam::jam_arg_spec<b2::bind::arg_<1>, b2::bind::arg_<1>, b2::bind::arg_<1> >, b2::list_cref, b2::list_cref, b2::list_cref, b2::bind::context_ref_>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, b2::jam::jam_arg_spec<b2::bind::arg_<1>, b2::bind::arg_<1>, b2::bind::arg_<1> >&, void (*)(b2::list_cref, b2::list_cref, b2::list_cref, b2::bind::context_ref_))::{lambda(frame*, int)#1}>::_M_invoke(std::_Any_data const&, frame*&&, int&&) (__functor=..., __args#0=@0x7fffff851a90: 0x7fffff852140, __args#1=@0x7fffff851a8c: 0) at /usr/include/c++/11/bits/std_function.h:290
#31 0x00005555555bc76a in std::function<LIST* (frame*, int)>::operator()(frame*, int) const (this=0x555555887480, __args#0=0x7fffff852140, __args#1=0) at /usr/include/c++/11/bits/std_function.h:590
#32 0x00005555555b7d19 in function_run (function_=0x555555887460, frame=0x7fffff852140) at function.cpp:4333
#33 0x000055555559d76a in evaluate_rule (rule=0x5555558803b8, rulename=0x555555887550, frame=0x7fffff852140) at compile.cpp:153
#34 0x00005555555ad458 in function_call_rule (function=0x555557e09780, frame=0x7fffff853530, s=0x55555565ee60 <stack_global()::singleton>, n_args=1, unexpanded=0x555555887568 "import", file=0x555556473d60, line=17) at function.cpp:772
#35 0x00005555555b9b75 in function_run (function_=0x555557e09780, frame=0x7fffff853530) at function.cpp:5027
#36 0x00005555555cfac3 in parse_impl (frame=0x7fffff853530) at parse.cpp:77
#37 0x00005555555cfb73 in parse_file (f=0x555556473d60, frame=0x7fffff853530) at parse.cpp:89
...

Full backtrace:

gdb.txt.gz

Expected behavior summary

b2 should not crash. If there's a problem with the project tree produced by bcp then b2 should produce an error that tells what's wrong.

@Lastique
Copy link
Contributor Author

@grafikrobot Could you take a look, please? Without this being fixed, we cannot test the bcp PR and merge it.

@grafikrobot
Copy link
Member

I honestly don't know what's going wrong nor when I'll be able to fix this. I'm unable to replicate the b2 problem in any of..

The modular equivalent (https://github.com/grafikrobot/boostorg.bcp/actions/runs/8571146289)

  • Locally on my ArchLinux machine with g++-13:*
 2024-04-18 08:53:41 AM  grafik  ~  …  temp  install  bcp-output 
 l
./  ../  INSTALL  Jamroot  LICENSE_1_0.txt  bin.v2/  boost/  boost.png  boostcpp.jam  bootstrap.bat  bootstrap.sh*  doc/  libs/  tools/
 2024-04-18 08:53:42 AM  grafik  ~  …  temp  install  bcp-output 
 ./bootstrap.sh 
Building B2 engine..

###
###
### Using 'gcc' toolset.
###
###

g++ (GCC) 13.2.1 20230801
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


###
###

> g++ -x c++ -std=c++11 -pthread -O2 -s -DNDEBUG bindjam.cpp builtins.cpp class.cpp command.cpp compile.cpp constants.cpp cwd.cpp debug.cpp debugger.cpp execcmd.cpp execnt.cpp execunix.cpp filent.cpp filesys.cpp fileunix.cpp frames.cpp function.cpp glob.cpp hash.cpp hcache.cpp hdrmacro.cpp headers.cpp jam_strings.cpp jam.cpp jamgram.cpp lists.cpp make.cpp make1.cpp md5.cpp mem.cpp modules.cpp native.cpp option.cpp output.cpp parse.cpp pathnt.cpp pathsys.cpp pathunix.cpp regexp.cpp rules.cpp scan.cpp search.cpp startup.cpp tasks.cpp timestamp.cpp value.cpp variable.cpp w32_getreg.cpp mod_jam_builtin.cpp mod_jam_class.cpp mod_jam_errors.cpp mod_jam_modules.cpp mod_order.cpp mod_path.cpp mod_property_set.cpp mod_regex.cpp mod_sequence.cpp mod_set.cpp mod_string.cpp mod_summary.cpp mod_sysinfo.cpp mod_version.cpp -o b2
tools/build/src/engine/b2
Detecting Python version... 3.11
Detecting Python root... /usr
Unicode/ICU support for Boost.Regex?... /usr
Generating B2 configuration in project-config.jam for gcc...

Bootstrapping is done. To build, run:

    ./b2
    
To generate header files, run:

    ./b2 headers

The configuration generated uses gcc to build by default. If that is
unintended either use the --with-toolset option or adjust configuration, by
editing 'project-config.jam'.

Further information:

   - Command line help:
     ./b2 --help
     
   - Getting started guide: 
     http://www.boost.org/more/getting_started/unix-variants.html
     
   - B2 documentation:
     http://www.boost.org/build/

 2024-04-18 08:54:27 AM  grafik  ~  …  temp  install  bcp-output 
 ./b2 -j3 libs/program_options/build -n
Performing configuration checks

    - default address-model    : 64-bit (cached) [1]
    - default architecture     : x86 (cached) [1]

[1] gcc-13
...patience...
...found 744 targets...
...updating 18 targets...
common.mkdir bin.v2/libs/program_options

        mkdir -p "bin.v2/libs/program_options"
    
common.mkdir bin.v2/libs/program_options/build

        mkdir -p "bin.v2/libs/program_options/build"
    
common.mkdir bin.v2/libs/program_options/build/gcc-13

        mkdir -p "bin.v2/libs/program_options/build/gcc-13"
    
common.mkdir bin.v2/libs/program_options/build/gcc-13/debug

        mkdir -p "bin.v2/libs/program_options/build/gcc-13/debug"
    
common.mkdir bin.v2/libs/program_options/build/gcc-13/debug/threading-multi

        mkdir -p "bin.v2/libs/program_options/build/gcc-13/debug/threading-multi"
    
common.mkdir bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden

        mkdir -p "bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden"
    
gcc.compile.c++ bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/cmdline.o

    "g++"   -fvisibility-inlines-hidden -fPIC -m64 -pthread -O0 -fno-inline -Wall -g -fvisibility=hidden  -DBOOST_ALL_NO_LIB=1 -DBOOST_PROGRAM_OPTIONS_DYN_LINK=1   -I"."  -c -o "bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/cmdline.o" "libs/program_options/src/cmdline.cpp"

gcc.compile.c++ bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/config_file.o

    "g++"   -fvisibility-inlines-hidden -fPIC -m64 -pthread -O0 -fno-inline -Wall -g -fvisibility=hidden  -DBOOST_ALL_NO_LIB=1 -DBOOST_PROGRAM_OPTIONS_DYN_LINK=1   -I"."  -c -o "bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/config_file.o" "libs/program_options/src/config_file.cpp"

gcc.compile.c++ bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/options_description.o

    "g++"   -fvisibility-inlines-hidden -fPIC -m64 -pthread -O0 -fno-inline -Wall -g -fvisibility=hidden  -DBOOST_ALL_NO_LIB=1 -DBOOST_PROGRAM_OPTIONS_DYN_LINK=1   -I"."  -c -o "bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/options_description.o" "libs/program_options/src/options_description.cpp"

gcc.compile.c++ bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/parsers.o

    "g++"   -fvisibility-inlines-hidden -fPIC -m64 -pthread -O0 -fno-inline -Wall -g -fvisibility=hidden  -DBOOST_ALL_NO_LIB=1 -DBOOST_PROGRAM_OPTIONS_DYN_LINK=1   -I"."  -c -o "bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/parsers.o" "libs/program_options/src/parsers.cpp"

gcc.compile.c++ bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/variables_map.o

    "g++"   -fvisibility-inlines-hidden -fPIC -m64 -pthread -O0 -fno-inline -Wall -g -fvisibility=hidden  -DBOOST_ALL_NO_LIB=1 -DBOOST_PROGRAM_OPTIONS_DYN_LINK=1   -I"."  -c -o "bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/variables_map.o" "libs/program_options/src/variables_map.cpp"

gcc.compile.c++ bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/value_semantic.o

    "g++"   -fvisibility-inlines-hidden -fPIC -m64 -pthread -O0 -fno-inline -Wall -g -fvisibility=hidden  -DBOOST_ALL_NO_LIB=1 -DBOOST_PROGRAM_OPTIONS_DYN_LINK=1   -I"."  -c -o "bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/value_semantic.o" "libs/program_options/src/value_semantic.cpp"

gcc.compile.c++ bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/positional_options.o

    "g++"   -fvisibility-inlines-hidden -fPIC -m64 -pthread -O0 -fno-inline -Wall -g -fvisibility=hidden  -DBOOST_ALL_NO_LIB=1 -DBOOST_PROGRAM_OPTIONS_DYN_LINK=1   -I"."  -c -o "bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/positional_options.o" "libs/program_options/src/positional_options.cpp"

gcc.compile.c++ bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/utf8_codecvt_facet.o

    "g++"   -fvisibility-inlines-hidden -fPIC -m64 -pthread -O0 -fno-inline -Wall -g -fvisibility=hidden  -DBOOST_ALL_NO_LIB=1 -DBOOST_PROGRAM_OPTIONS_DYN_LINK=1   -I"."  -c -o "bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/utf8_codecvt_facet.o" "libs/program_options/src/utf8_codecvt_facet.cpp"

gcc.compile.c++ bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/convert.o

    "g++"   -fvisibility-inlines-hidden -fPIC -m64 -pthread -O0 -fno-inline -Wall -g -fvisibility=hidden  -DBOOST_ALL_NO_LIB=1 -DBOOST_PROGRAM_OPTIONS_DYN_LINK=1   -I"."  -c -o "bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/convert.o" "libs/program_options/src/convert.cpp"

gcc.compile.c++ bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/winmain.o

    "g++"   -fvisibility-inlines-hidden -fPIC -m64 -pthread -O0 -fno-inline -Wall -g -fvisibility=hidden  -DBOOST_ALL_NO_LIB=1 -DBOOST_PROGRAM_OPTIONS_DYN_LINK=1   -I"."  -c -o "bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/winmain.o" "libs/program_options/src/winmain.cpp"

gcc.compile.c++ bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/split.o

    "g++"   -fvisibility-inlines-hidden -fPIC -m64 -pthread -O0 -fno-inline -Wall -g -fvisibility=hidden  -DBOOST_ALL_NO_LIB=1 -DBOOST_PROGRAM_OPTIONS_DYN_LINK=1   -I"."  -c -o "bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/split.o" "libs/program_options/src/split.cpp"

gcc.link.dll bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/libboost_program_options.so.1.86.0

    "g++"    -o "bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/libboost_program_options.so.1.86.0" -Wl,-soname -Wl,"libboost_program_options.so.1.86.0" -shared -Wl,--start-group "bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/cmdline.o" "bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/config_file.o" "bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/options_description.o" "bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/parsers.o" "bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/variables_map.o" "bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/value_semantic.o" "bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/positional_options.o" "bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/utf8_codecvt_facet.o" "bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/convert.o" "bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/winmain.o" "bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/split.o"  -Wl,-Bstatic  -Wl,-Bdynamic -lrt -Wl,--end-group -fPIC -m64 -pthread -g -fvisibility=hidden -fvisibility-inlines-hidden 


...updated 18 targets...
 2024-04-18 08:56:12 AM  grafik  ~  …  temp  install  bcp-output 
 ./b2 -j3 libs/program_options/build
Performing configuration checks

    - default address-model    : 64-bit (cached) [1]
    - default architecture     : x86 (cached) [1]

[1] gcc-13
...patience...
...found 744 targets...
...updating 18 targets...
gcc.compile.c++ bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/config_file.o
gcc.compile.c++ bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/cmdline.o
gcc.compile.c++ bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/options_description.o
gcc.compile.c++ bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/parsers.o
gcc.compile.c++ bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/variables_map.o
gcc.compile.c++ bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/positional_options.o
gcc.compile.c++ bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/utf8_codecvt_facet.o
gcc.compile.c++ bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/value_semantic.o
gcc.compile.c++ bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/convert.o
gcc.compile.c++ bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/winmain.o
gcc.compile.c++ bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/split.o
gcc.link.dll bin.v2/libs/program_options/build/gcc-13/debug/threading-multi/visibility-hidden/libboost_program_options.so.1.86.0

...updated 18 targets...

The only reproduction I have is in CI with (https://github.com/grafikrobot/boostorg.bcp/actions/runs/8732065981 or https://github.com/grafikrobot/boostorg.bcp/actions/runs/8732099555).

Hence it's going to take considerable time to just replicate the problem. And I have a wg21 paper to write in the next couple of weeks. So free time it really limited now.

@Lastique can you provide the exact commands you ran repro steps? I want to check if I'm missing something crucial.

@grafikrobot
Copy link
Member

Scratch that.. I've managed to repro it. And have some ideas as to what's going on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants