Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 705998 - dev-db/mysql-8.0.18 - /usr/bin/protoc: terminate called after throwing an instance of 'std::system_error' // what(): Unknown error -1 // --yplg_out: protoc-gen-yplg: Plugin killed by signal 6.
Summary: dev-db/mysql-8.0.18 - /usr/bin/protoc: terminate called after throwing an ins...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Linux MySQL bugs team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-21 12:41 UTC by cbi
Modified: 2020-01-23 12:32 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info and build.log (build.log,544.13 KB, text/plain)
2020-01-21 12:41 UTC, cbi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description cbi 2020-01-21 12:41:40 UTC
Created attachment 603852 [details]
emerge --info and build.log

Hello there,


  trying to emerge mysql 8.0.18 drops:

[ 20%] Built target mysys_objlib
[ 20%] Linking CXX static library libmysqlgcs.a
cd /var/tmp/portage/dev-db/mysql-8.0.18/work/mysql-8.0.18_build/plugin/group_replication/libmysqlgcs && /usr/bin/cmake -P CMakeFiles/mysqlgcs.dir/cmake_clean_target.cmake
cd /var/tmp/portage/dev-db/mysql-8.0.18/work/mysql-8.0.18_build/plugin/group_replication/libmysqlgcs && /usr/bin/cmake -E cmake_link_script CMakeFiles/mysqlgcs.dir/link.txt --verbose=1
/usr/bin/x86_64-pc-linux-gnu-ar qc libmysqlgcs.a  CMakeFiles/mysqlgcs.dir/src/bindings/xcom/xcom/pax_msg.c.o CMakeFiles/mysqlgcs.dir/src/bindings/xcom/xcom/xcom_base.c.o CMakeFiles/mysqlgcs.dir/src/bindings/xcom/xcom/xcom_memory.c.o CMakeFiles/mysqlgcs.dir/src/bindings/xcom/xcom/xcom_vp_str.c.o CMakeFiles/mysqlgcs.dir/src/bindings/xcom/xcom/xcom_cfg.c.o CMakeFiles/mysqlgcs.dir/src/bindings/xcom/xcom/xcom_cache.c.o CMakeFiles/mysqlgcs.dir/src/bindings/xcom/xcom/xcom_transport.c.o CMakeFiles/mysqlgcs.dir/src/bindings/xcom/xcom/node_address.c.o CMakeFiles/mysqlgcs.dir/src/bindings/xcom/xcom/xcom_msg_queue.c.o CMakeFiles/mysqlgcs.dir/src/bindings/xcom/xcom/xcom_statistics.c.o CMakeFiles/mysqlgcs.dir/src/bindings/xcom/xcom/app_data.c.o CMakeFiles/mysqlgcs.dir/src/bindings/xcom/xcom/site_def.c.o CMakeFiles/mysqlgcs.dir/src/bindings/xcom/xcom/xcom_ssl_transport.c.o CMakeFiles/mysqlgcs.dir/src/bindings/xcom/xcom/xcom_recover.c.o CMakeFiles/mysqlgcs.dir/src/bindings/xcom/xcom/task.c.o CMakeFiles/mysqlgcs.dir/src/bindings/xcom/xcom/bitset.c.o CMakeFiles/mysqlgcs.dir/src/bindings/xcom/xcom/simset.c.o CMakeFiles/mysqlgcs.dir/src/bindings/xcom/xcom/node_set.c.o CMakeFiles/mysqlgcs.dir/src/bindings/xcom/xcom/xcom_interface.c.o CMakeFiles/mysqlgcs.dir/src/bindings/xcom/xcom/node_list.c.o CMakeFiles/mysqlgcs.dir/src/bindings/xcom/xcom/task_debug.c.o CMakeFiles/mysqlgcs.dir/src/bindings/xcom/xcom/sock_probe.c.o CMakeFiles/mysqlgcs.dir/src/bindings/xcom/xcom/task_net.c.o CMakeFiles/mysqlgcs.dir/src/bindings/xcom/xcom/synode_no.c.o CMakeFiles/mysqlgcs.dir/src/bindings/xcom/xcom/xcom_detector.c.o CMakeFiles/mysqlgcs.dir/src/bindings/xcom/xcom/xcom_input_request.c.o CMakeFiles/mysqlgcs.dir/src/bindings/xcom/xcom/get_synode_app_data.c.o CMakeFiles/mysqlgcs.dir/src/bindings/xcom/xcom/checked_data.c.o CMakeFiles/mysqlgcs.dir/xdr_gen/xcom_vp_xdr.c.o CMakeFiles/mysqlgcs.dir/src/interface/gcs_logging.cc.o CMakeFiles/mysqlgcs.dir/src/interface/gcs_logging_system.cc.o CMakeFiles/mysqlgcs.dir/src/interface/xplatform/my_xp_cond.cc.o CMakeFiles/mysqlgcs.dir/src/interface/xplatform/my_xp_thread.cc.o CMakeFiles/mysqlgcs.dir/src/interface/xplatform/my_xp_mutex.cc.o CMakeFiles/mysqlgcs.dir/src/interface/xplatform/my_xp_util.cc.o CMakeFiles/mysqlgcs.dir/src/interface/gcs_view.cc.o CMakeFiles/mysqlgcs.dir/src/interface/gcs_types.cc.o CMakeFiles/mysqlgcs.dir/src/interface/gcs_message.cc.o CMakeFiles/mysqlgcs.dir/src/interface/gcs_member_identifier.cc.o CMakeFiles/mysqlgcs.dir/src/interface/gcs_group_identifier.cc.o CMakeFiles/mysqlgcs.dir/src/interface/gcs_psi.cc.o CMakeFiles/mysqlgcs.dir/src/interface/gcs_tagged_lock.cc.o CMakeFiles/mysqlgcs.dir/src/gcs_interface_factory.cc.o CMakeFiles/mysqlgcs.dir/src/bindings/xcom/gcs_xcom_communication_interface.cc.o CMakeFiles/mysqlgcs.dir/src/bindings/xcom/gcs_xcom_control_interface.cc.o CMakeFiles/mysqlgcs.dir/src/bindings/xcom/gcs_xcom_group_management.cc.o CMakeFiles/mysqlgcs.dir/src/bindings/xcom/gcs_internal_message_headers.cc.o CMakeFiles/mysqlgcs.dir/src/bindings/xcom/gcs_internal_message.cc.o CMakeFiles/mysqlgcs.dir/src/bindings/xcom/gcs_xcom_networking.cc.o CMakeFiles/mysqlgcs.dir/src/bindings/xcom/gcs_xcom_utils.cc.o CMakeFiles/mysqlgcs.dir/src/bindings/xcom/gcs_xcom_state_exchange.cc.o CMakeFiles/mysqlgcs.dir/src/bindings/xcom/gcs_xcom_group_member_information.cc.o CMakeFiles/mysqlgcs.dir/src/bindings/xcom/gcs_message_stages.cc.o CMakeFiles/mysqlgcs.dir/src/bindings/xcom/gcs_xcom_view_identifier.cc.o CMakeFiles/mysqlgcs.dir/src/bindings/xcom/gcs_xcom_interface.cc.o CMakeFiles/mysqlgcs.dir/src/bindings/xcom/gcs_xcom_notification.cc.o CMakeFiles/mysqlgcs.dir/src/bindings/xcom/gcs_message_stage_lz4.cc.o CMakeFiles/mysqlgcs.dir/src/bindings/xcom/gcs_xcom_statistics_interface.cc.o CMakeFiles/mysqlgcs.dir/src/bindings/xcom/gcs_xcom_proxy.cc.o CMakeFiles/mysqlgcs.dir/src/bindings/xcom/gcs_xcom_communication_protocol_changer.cc.o CMakeFiles/mysqlgcs.dir/__/__/__/extra/lz4/xxhash.c.o CMakeFiles/mysqlgcs.dir/src/bindings/xcom/gcs_message_stage_split.cc.o CMakeFiles/mysqlgcs.dir/src/bindings/xcom/gcs_xcom_synode.cc.o
/usr/bin/x86_64-pc-linux-gnu-ranlib libmysqlgcs.a
make[2]: Leaving directory '/var/tmp/portage/dev-db/mysql-8.0.18/work/mysql-8.0.18_build'
[ 20%] Built target mysqlgcs
make[1]: Leaving directory '/var/tmp/portage/dev-db/mysql-8.0.18/work/mysql-8.0.18_build'
make: *** [Makefile:152: all] Error 2
 * ERROR: dev-db/mysql-8.0.18::gentoo failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=dev-db/mysql-8.0.18::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-db/mysql-8.0.18::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/dev-db/mysql-8.0.18/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-db/mysql-8.0.18/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-db/mysql-8.0.18/work/mysql-8.0.18_build'
 * S: '/var/tmp/portage/dev-db/mysql-8.0.18/work/mysql'

Build log file, emerge_info and emerge pretend have been attached.
Comment 1 Ben Kohler gentoo-dev 2020-01-21 12:53:31 UTC
This version has been removed so you'll probably want to sync & make sure you can still reproduce this on 8.0.19
Comment 2 cbi 2020-01-21 13:15:25 UTC
I've just issued: 

$ emerge --sync

but there isn't yet 8.0.19:

$ ls /usr/portage/dev-db/mysql/

Manifest                metadata.xml            mysql-5.6.45-r2.ebuild  mysql-5.7.27-r1.ebuild  mysql-8.0.18.ebuild     
files/                  mysql-5.6.44-r1.ebuild  mysql-5.7.26-r1.ebuild  mysql-8.0.17.ebuild     

I'll have to wait...
Comment 3 Ben Kohler gentoo-dev 2020-01-21 13:21:16 UTC
I don't know your sync/mirror details but you can see 8.0.18 was replaced with .19 about 18 hours ago:  https://gitweb.gentoo.org/repo/gentoo.git/log/dev-db/mysql

Actually your NEW output doesn't even show 8.0.18, but only 8.0.17.  Something is wrong.
Comment 4 cbi 2020-01-21 13:23:19 UTC
It appears mysql-8.0.18.ebuild after mysql-5.7.27-r1.ebuild...
Comment 5 Arfrever Frehtes Taifersar Arahesis 2020-01-22 02:16:16 UTC
I heard that this type of error ("terminate called after throwing an instance of 'std::system_error'") may be triggered by using GOLD linker.

CMakeLists.txt contains:
[[[
# Use gold if available and not explicitly disabled.
IF(WIN32)
  # Feature tests are expensive on Windows, and we only support MSVC,
  # which does not use gold. Thus, default to off to save the test.
  OPTION(USE_LD_GOLD "Use GNU gold linker" OFF)
ELSE()
  OPTION(USE_LD_GOLD "Use GNU gold linker" ON)
ENDIF()
...
IF (USE_LD_GOLD AND NOT (C_LD_LLD_RESULT AND CXX_LD_LLD_RESULT))
  CMAKE_PUSH_CHECK_STATE(RESET)
  SET(CMAKE_REQUIRED_LIBRARIES "-fuse-ld=gold")
  CHECK_C_SOURCE_COMPILES("int main() {}" C_LD_GOLD_RESULT)
  CHECK_CXX_SOURCE_COMPILES("int main() {}" CXX_LD_GOLD_RESULT)
  IF (C_LD_GOLD_RESULT AND CXX_LD_GOLD_RESULT AND NOT SOLARIS)
    STRING_APPEND(CMAKE_C_LINK_FLAGS " -fuse-ld=gold")
    STRING_APPEND(CMAKE_CXX_LINK_FLAGS " -fuse-ld=gold")
...
]]]

You can try building with -DUSE_LD_GOLD=OFF added to mycmakeargs in ebuild.
Comment 6 cbi 2020-01-22 13:51:08 UTC
-DUSE_LD_GOLD=OFF made the trick! Got working after changing ebuild mycmakeargs:

mycmakeargs=(
		-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
		-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
		-DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
		-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
		-DSYSCONFDIR="${EPREFIX}/etc/mysql"
		-DINSTALL_BINDIR=bin
		-DINSTALL_DOCDIR=share/doc/${PF}
		-DINSTALL_DOCREADMEDIR=share/doc/${PF}
		-DINSTALL_INCLUDEDIR=include/mysql
		-DINSTALL_INFODIR=share/info
		-DINSTALL_LIBDIR=$(get_libdir)
		-DINSTALL_MANDIR=share/man
		-DINSTALL_MYSQLSHAREDIR=share/mysql
		-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
		-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
		-DINSTALL_SBINDIR=sbin
		-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
		-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
		-DWITH_UNIT_TESTS=$(usex test ON OFF)
		-DWITH_EDITLINE=system
		-DWITH_ZLIB=system
		-DWITH_SSL=system
		-DWITH_LIBWRAP=0
		-DENABLED_LOCAL_INFILE=1
		-DUSE_LD_GOLD=OFF
		-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
		-DWITH_DEFAULT_COMPILER_OPTIONS=0
		-DWITH_DEFAULT_FEATURE_SET=0
		# The build forces this to be defined when cross-compiling. We pass it
		# all the time for simplicity and to make sure it is actually correct.
		-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
		-DCMAKE_POSITION_INDEPENDENT_CODE=ON
		-DWITH_CURL=system
		-DWITH_BOOST="${S}/boost"
		-DWITH_ROUTER=$(usex router ON OFF)
	)

Thank you!
Comment 7 Thomas Deutschmann (RETIRED) gentoo-dev 2020-01-22 14:40:24 UTC
dev-db/mysql-8 will try to use ld.gold when available. But this shouldn't be a problem. So I would like to understand why ld.gold doesn't work for you after passing mysql's internal checks.
Comment 8 cbi 2020-01-22 14:43:19 UTC
Tell me in what I may help you...

BTW, when I issued:

ACCEPT_KEYWORDS="~amd64" emerge -v dev-db/mysql

it downloaded mysql-8.0.19 not 18, and then it compiled it without any problem.
Comment 9 Arfrever Frehtes Taifersar Arahesis 2020-01-23 04:12:45 UTC
I have never reproduced error "terminate called after throwing an instance of 'std::system_error'", but this error was reported also for dev-libs/protobuf (bug #669194) and dev-libs/protobuf-c (bug #688394).


dev-libs/protobuf ebuilds currently have (actually for unrelated reason):

	if tc-ld-is-gold; then
		# https://sourceware.org/bugzilla/show_bug.cgi?id=24527
		tc-ld-disable-gold
	fi


In case of dev-db/mysql, it is seen in build log that this error occurs for xprotocol_plugin which is some custom plugin for /usr/bin/protoc (from dev-libs/protobuf):

[ 19%] Linking CXX executable ../../../../runtime_output_directory/xprotocol_plugin
/usr/bin/x86_64-pc-linux-gnu-g++  -O2 -pipe -felide-constructors -fno-strict-aliasing -Wall -Wextra -Wformat-security -Wvla -Wundef -Wmissing-format-attribute -Woverloaded-virtual -Wcast-qual -Wimplicit-fallthrough=2 -Wlogical-op -DDBUG_OFF -DNDEBUG  -fuse-ld=gold -Wl,--gc-sections -Wl,-O1 -Wl,--as-needed CMakeFiles/xprotocol_plugin.dir/message_field_chain.cc.o CMakeFiles/xprotocol_plugin.dir/messages_used_by_server.cc.o CMakeFiles/xprotocol_plugin.dir/xprotocol_plugin.cc.o  -o ../../../../runtime_output_directory/xprotocol_plugin -lpthread ../protobuf/libmysqlxmessages.a /usr/lib64/libprotoc.so /usr/lib64/libprotobuf.so -lpthread
[ 19%] Built target xprotocol_plugin
...
[ 19%] Running protocol buffer plugin on all 'proto' files
cd /var/tmp/portage/dev-db/mysql-8.0.18/work/mysql-8.0.18_build/plugin/x/protocol/plugin && /usr/bin/protoc --plugin=protoc-gen-yplg=/var/tmp/portage/dev-db/mysql-8.0.18/work/mysql-8.0.18_build/runtime_output_directory/xprotocol_plugin --yplg_out /var/tmp/portage/dev-db/mysql-8.0.18/work/mysql-8.0.18_build/plugin/x/generated -I /usr/include -I /var/tmp/portage/dev-db/mysql-8.0.18/work/mysql/plugin/x/protocol/protobuf /var/tmp/portage/dev-db/mysql-8.0.18/work/mysql/plugin/x/protocol/protobuf/mysqlx.proto /var/tmp/portage/dev-db/mysql-8.0.18/work/mysql/plugin/x/protocol/protobuf/mysqlx_datatypes.proto /var/tmp/portage/dev-db/mysql-8.0.18/work/mysql/plugin/x/protocol/protobuf/mysqlx_connection.proto /var/tmp/portage/dev-db/mysql-8.0.18/work/mysql/plugin/x/protocol/protobuf/mysqlx_expect.proto /var/tmp/portage/dev-db/mysql-8.0.18/work/mysql/plugin/x/protocol/protobuf/mysqlx_expr.proto /var/tmp/portage/dev-db/mysql-8.0.18/work/mysql/plugin/x/protocol/protobuf/mysqlx_crud.proto /var/tmp/portage/dev-db/mysql-8.0.18/work/mysql/plugin/x/protocol/protobuf/mysqlx_sql.proto /var/tmp/portage/dev-db/mysql-8.0.18/work/mysql/plugin/x/protocol/protobuf/mysqlx_session.proto /var/tmp/portage/dev-db/mysql-8.0.18/work/mysql/plugin/x/protocol/protobuf/mysqlx_notice.proto /var/tmp/portage/dev-db/mysql-8.0.18/work/mysql/plugin/x/protocol/protobuf/mysqlx_resultset.proto /var/tmp/portage/dev-db/mysql-8.0.18/work/mysql/plugin/x/protocol/protobuf/mysqlx_cursor.proto /var/tmp/portage/dev-db/mysql-8.0.18/work/mysql/plugin/x/protocol/protobuf/mysqlx_prepare.proto
terminate called after throwing an instance of 'std::system_error'
  what():  Unknown error -1
--yplg_out: protoc-gen-yplg: Plugin killed by signal 6.
make[2]: *** [plugin/x/protocol/plugin/CMakeFiles/xprotocol_tags.dir/build.make:62: plugin/x/generated/xprotocol_tags.h] Error 1


Notice "/usr/bin/protoc --plugin=protoc-gen-yplg=/var/tmp/portage/dev-db/mysql-8.0.18/work/mysql-8.0.18_build/runtime_output_directory/xprotocol_plugin" above.

I do not know what causes that this error occurs for some users and not for others.
Comment 10 Thomas Deutschmann (RETIRED) gentoo-dev 2020-01-23 12:32:37 UTC
Well, I was unable to reproduce with percona-server-8.0.18.9 and mysql-8.0.19.

I can confirm that ld.gold was used.

Used protobuf wasn't compiled using ld.gold and now that you showed that using ld.gold shouldn't even be possible because protobuf will disable that I am out.

We will see if this will pop up again or not.