Hello, in systemd we recently (today) noticed[0], that certain CI's started timeouting after upgrade to gcc 9.1.1. After a bit of investigation it seems that the runtime of instrumented binaries with ASan is more than doubled. (The GitHub thread contains claims about the performance issue being present even without sanitizers, but that hasn't been confirmed yet, so please ignore it, for now). The comparison between gcc 8.3.1 and gcc 9.1.1: # gcc --version gcc (GCC) 8.3.1 20190223 (Red Hat 8.3.1-2) Copyright (C) 2018 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. # git clone https://github.com/systemd/systemd # cd systemd # CC=gcc CXX=g++ meson build -Db_sanitize=address # ninja -C build # cd build # export ASAN_OPTIONS=detect_stack_use_after_return=1 # time ./test-conf-parser ... == test_config_parse[13] == == test_config_parse[14] == /tmp/test-conf-parser.RHRCxb:1: Line too long == test_config_parse[15] == /tmp/test-conf-parser.6U5c9x:1: Continuation line too long real 0m2.412s user 0m1.866s sys 0m0.497s # time ../test/hwdb-test.sh Expected warnings ... tmp/tmp.rilqtBRjht/etc/udev/hwdb.d/10-bad.hwdb:23: Property or empty line expected, got "BAD:8:match at wrong place", ignoring record /tmp/tmp.rilqtBRjht/etc/udev/hwdb.d/10-bad.hwdb:24: Match expected but got indented property " Z=z", ignoring line /tmp/tmp.rilqtBRjht/etc/udev/hwdb.d/10-bad.hwdb:26: Property expected, ignoring record with no properties real 1m35.293s user 0m42.281s sys 0m51.394s # cd .. # dnf upgrade -y --releasever rawhide --disablerepo fedora-modular,updates-modular --nogpgcheck gcc libasan ... ======================================================================================================================================== Package Architecture Version Repository Size ======================================================================================================================================== Upgrading: cpp x86_64 9.1.1-2.fc31 updates 9.8 M gcc x86_64 9.1.1-2.fc31 updates 23 M gcc-c++ x86_64 9.1.1-2.fc31 updates 12 M libasan x86_64 9.1.1-2.fc31 updates 453 k libgcc x86_64 9.1.1-2.fc31 updates 91 k libgomp x86_64 9.1.1-2.fc31 updates 224 k libstdc++ x86_64 9.1.1-2.fc31 updates 596 k libstdc++-devel x86_64 9.1.1-2.fc31 updates 2.1 M libtool x86_64 2.4.6-30.fc31 updates 686 k Transaction Summary ======================================================================================================================================== Upgrade 9 Packages ... # rm -fr build # gcc --version gcc (GCC) 9.1.1 20190605 (Red Hat 9.1.1-2) Copyright (C) 2019 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. # CC=gcc CXX=g++ meson build -Db_sanitize=address # ninja -C build # cd build # export ASAN_OPTIONS=detect_stack_use_after_return=1 # time ./test-conf-parser ... == test_config_parse[14] == /tmp/test-conf-parser.STRTQN:1: Line too long == test_config_parse[15] == /tmp/test-conf-parser.bZb4j3:1: Continuation line too long real 0m34.070s user 0m33.180s sys 0m0.712s # time ../test/hwdb-test.sh Expected warnings ... tmp/tmp.KBPsuswswG/etc/udev/hwdb.d/10-bad.hwdb:19: Property or empty line expected, got "BAD:7:match at wrong place", ignoring record /tmp/tmp.KBPsuswswG/etc/udev/hwdb.d/10-bad.hwdb:23: Property or empty line expected, got "BAD:8:match at wrong place", ignoring record /tmp/tmp.KBPsuswswG/etc/udev/hwdb.d/10-bad.hwdb:24: Match expected but got indented property " Z=z", ignoring line /tmp/tmp.KBPsuswswG/etc/udev/hwdb.d/10-bad.hwdb:26: Property expected, ignoring record with no properties real 3m21.901s user 2m28.122s sys 0m52.347s # export ASAN_OPTIONS=detect_stack_use_after_return=0 # time ./test-conf-parser ... == test_config_parse[14] == /tmp/test-conf-parser.BdGLST:1: Line too long == test_config_parse[15] == /tmp/test-conf-parser.8aGdir:1: Continuation line too long real 0m2.474s user 0m1.840s sys 0m0.611s # time ../test/hwdb-test.sh Expected warnings ... /tmp/tmp.fLodo3oD2E/etc/udev/hwdb.d/10-bad.hwdb:19: Property or empty line expected, got "BAD:7:match at wrong place", ignoring record /tmp/tmp.fLodo3oD2E/etc/udev/hwdb.d/10-bad.hwdb:23: Property or empty line expected, got "BAD:8:match at wrong place", ignoring record /tmp/tmp.fLodo3oD2E/etc/udev/hwdb.d/10-bad.hwdb:24: Match expected but got indented property " Z=z", ignoring line /tmp/tmp.fLodo3oD2E/etc/udev/hwdb.d/10-bad.hwdb:26: Property expected, ignoring record with no properties real 1m12.008s user 0m24.862s sys 0m46.284s --- [0] https://github.com/systemd/systemd/pull/12856#issuecomment-504395847
Upstream issue: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91101
So the issue is actually on systemd's side, there's nothing to fix in gcc - closing.