Original full hanging command during 11.5 opt UB+ASAN compilation:
00:04:47 /usr/lib/gcc/x86_64-linux-gnu/12/cc1 -quiet -I /test/11.5_opt_san/storage/mroonga/vendor/groonga/lib -I /test/11.5_opt_san/storage/mroonga/vendor/groonga/include -I /test/11.5_opt_san/storage/mroonga/vendor/groonga -I /test/11.5_opt_san/wsrep-lib/include -I /test/11.5_opt_san/wsrep-lib/wsrep-API/v26 -I /test/11.5_opt_san/include -I /test/11.5_opt_san/include/providers -I /test/11.5_opt_san/storage/mroonga/vendor/groonga/lib/dat -imultiarch x86_64-linux-gnu -MD CMakeFiles/libgroonga.dir/expr.c.d -MF CMakeFiles/libgroonga.dir/expr.c.o.d -MT storage/mroonga/vendor/groonga/lib/CMakeFiles/libgroonga.dir/expr.c.o -D GRN_DAT_EXPORT -D GRN_EMBEDDED -D HAVE_CONFIG_H -D ONIG_EXTERN=extern -D USE_MYSYS_NEW -D _FILE_OFFSET_BITS=64 -D HAVE_ONIGMO_H -D MRB_INT64 -U _FORTIFY_SOURCE -U _FORTIFY_SOURCE -D WITH_UBSAN -D DBUG_OFF /test/11.5_opt_san/storage/mroonga/vendor/groonga/lib/expr.c -quiet -dumpdir CMakeFiles/libgroonga.dir/ -dumpbase expr.c.c -dumpbase-ext .c -mtune=generic -march=x86-64 -g -O3 -Wno-unused-but-set-variable -Wno-pointer-sign -Wformat=1 -Wstrict-aliasing=2 -Wno-disabled-optimization -Wfloat-equal -Wpointer-arith -Wbad-function-cast -Wcast-align -Wno-sign-compare -Wno-missing-field-initializers -Wimplicit-fallthrough=0 -Wno-uninitialized -Wall -Wdeclaration-after-statement -Wenum-compare -Wenum-conversion -Wextra -Wformat-security -Wmissing-braces -Wformat-truncation=0 -Wno-init-self -Wno-nonnull-compare -Wno-unused-parameter -Wvla -Wwrite-strings -std=gnu99 -std=gnu99 -fexceptions -fno-strict-aliasing -fsanitize=address -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=undefined -fno-sanitize=alignment -fno-omit-frame-pointer -fPIC -fasynchronous-unwind-tables -fstack-protector-strong -Wformat-security -fstack-clash-protection -fcf-protection -o /tmp/ccKRo6T9.s
|
The (overly reduced) command:
/usr/lib/gcc/x86_64-linux-gnu/12/cc1 -I /test/11.5_opt_san/storage/mroonga/vendor/groonga/lib -I /test/11.5_opt_san/storage/mroonga/vendor/groonga/include -I /test/11.5_opt_san/storage/mroonga/vendor/groonga -I /test/11.5_opt_san/wsrep-lib/include -I /test/11.5_opt_san/wsrep-lib/wsrep-API/v26 -I /test/11.5_opt_san/include -I /test/11.5_opt_san/include/providers -I /test/11.5_opt_san/storage/mroonga/vendor/groonga/lib/dat -imultiarch x86_64-linux-gnu -D HAVE_CONFIG_H -D WITH_UBSAN /test/11.5_opt_san/storage/mroonga/vendor/groonga/lib/expr.c -dumpdir CMakeFiles/libgroonga.dir/ -dumpbase expr.c.c -dumpbase-ext .c -g -O3 -std=gnu99 -fPIC -Wstrict-aliasing -o /tmp/ccKRo6T9.s
|
Will show:
... functions are shown ...
|
Analyzing compilation unit
|
Performing interprocedural optimizations
|
<*free_lang_data> {heap 15M} <visibility> {heap 15M} <build_ssa_passes> {heap 15M} <opt_local_passes> {heap 17M}
|
Note the {heap 17M}. It will pause at this point for a few minutes, before continuing the output:
... previous output above ...
|
<remove_symbols> {heap 119M} <targetclone> {heap 119M} <free-fnsummary> {heap 119M}
|
Streaming LTO
|
<whole-program> {heap 119M} <profile_estimate> {heap 119M} <icf> {heap 119M} <devirt> {heap 119M} <cp> {heap 119M} <sra> {heap 119M} <fnsummary> {heap 119M} <inline> {heap 119M} <pure-const> {heap 119M} <modref> {heap 119M} <free-fnsummary> {heap 119M} <static-var> {heap 119M} <single-use> {heap 119M} <comdats> {heap 119M}
|
Assembling functions:
|
<simdclone> {heap 119M} ... functions are shown ...
|
The bit longer (and thus not overly reduced/actual working testcase):
/usr/lib/gcc/x86_64-linux-gnu/12/cc1 -I /test/11.5_opt_san/storage/mroonga/vendor/groonga/lib -I /test/11.5_opt_san/storage/mroonga/vendor/groonga/include -I /test/11.5_opt_san/storage/mroonga/vendor/groonga -I /test/11.5_opt_san/wsrep-lib/include -I /test/11.5_opt_san/wsrep-lib/wsrep-API/v26 -I /test/11.5_opt_san/include -I /test/11.5_opt_san/include/providers -I /test/11.5_opt_san/storage/mroonga/vendor/groonga/lib/dat -imultiarch x86_64-linux-gnu -D HAVE_CONFIG_H -D WITH_UBSAN /test/11.5_opt_san/storage/mroonga/vendor/groonga/lib/expr.c -dumpdir CMakeFiles/libgroonga.dir/ -dumpbase expr.c.c -dumpbase-ext .c -g -O3 -std=gnu99 -fexceptions -fno-strict-aliasing -fsanitize=address -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=undefined -fno-sanitize=alignment -fno-omit-frame-pointer -fPIC -o /tmp/ccKRo6T9.s
|
Will show similar output, however:
...
|
Analyzing compilation unit
|
Performing interprocedural optimizations
|
<*free_lang_data> {heap 17M} <visibility> {heap 17M} <build_ssa_passes> {heap 17M} <opt_local_passes> {heap 22M}
|
And then hang, with a small amount of single-thread CPU usage, presumable doing some compiler level optimzations or similar.
Note the {heap 22M} (the original unreduced command is 23M). It thus seems there is some "too complex" operation going on that does not terminate.
The time lapsed can be seen with:
$ echo $(( ($(date +%s) - $(stat -c %Y /tmp/ccKRo6T9.s)) / 60 )) minutes
|
20 minutes # Original command tested to hang 30+ min, and the orginal compilation of a single build had failed overnight (i.e. 8+ hours)
|
As GCC 13 is the default on Ubuntu 23, here is the procedure for installing GCC 12.3.0 and making it default:
sudo apt remove gcc-13 g++-13
|
sudo apt update
|
sudo apt install gcc-12 g++-12
|
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 10
|
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 10
|
sudo update-alternatives --config gcc # 0/auto
|
sudo update-alternatives --config g++ # 0/auto
|
gcc --version # 12.3.0
|
g++ --version # 12.3.0
|
Note that if you use -j >1 threads, the compilation may hang at different percentages. I have seen it as low as approx 25% up to 96% using 30 threads; use ps -ef | grep cc | grep mroonga once hang occurs.
Verified on 10.5 opt and 11.5 opt.
- relates to
-
MDEV-31802
GCC 13: sql/sys_vars.inl: runtime error: store to address ... with insufficient space for an object of type ...
-
-
Closed
{"report":{"fcp":1379.6000000238419,"ttfb":309.40000009536743,"pageVisibility":"visible","entityId":129312,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"ea7fc097-5b80-4f12-8082-f31bdc9b433c","navigationType":0,"readyForUser":1512.9000000953674,"redirectCount":0,"resourceLoadedEnd":931.1000000238419,"resourceLoadedStart":325,"resourceTiming":[{"duration":37.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":325,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":325,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":362.5,"responseStart":0,"secureConnectionStart":0},{"duration":37.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/download/contextbatch/css/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":325.3000000715256,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":325.3000000715256,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":362.8000000715256,"responseStart":0,"secureConnectionStart":0},{"duration":360.3000000715256,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":325.5,"connectEnd":325.5,"connectStart":325.5,"domainLookupEnd":325.5,"domainLookupStart":325.5,"fetchStart":325.5,"redirectEnd":0,"redirectStart":0,"requestStart":375.60000002384186,"responseEnd":685.8000000715256,"responseStart":432.7000000476837,"secureConnectionStart":325.5},{"duration":604.1000000238419,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/download/contextbatch/js/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true&whisper-enabled=true","startTime":327,"connectEnd":327,"connectStart":327,"domainLookupEnd":327,"domainLookupStart":327,"fetchStart":327,"redirectEnd":0,"redirectStart":0,"requestStart":375.7000000476837,"responseEnd":931.1000000238419,"responseStart":433.5,"secureConnectionStart":327},{"duration":135.89999997615814,"initiatorType":"script","name":"https://jira.mariadb.org/s/a9324d6758d385eb45c462685ad88f1d-CDN/lu2cib/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":327.3000000715256,"connectEnd":327.3000000715256,"connectStart":327.3000000715256,"domainLookupEnd":327.3000000715256,"domainLookupStart":327.3000000715256,"fetchStart":327.3000000715256,"redirectEnd":0,"redirectStart":0,"requestStart":388.90000009536743,"responseEnd":463.2000000476837,"responseStart":453.8000000715256,"secureConnectionStart":327.3000000715256},{"duration":136.10000002384186,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":327.5,"connectEnd":327.5,"connectStart":327.5,"domainLookupEnd":327.5,"domainLookupStart":327.5,"fetchStart":327.5,"redirectEnd":0,"redirectStart":0,"requestStart":390.2000000476837,"responseEnd":463.60000002384186,"responseStart":454.7000000476837,"secureConnectionStart":327.5},{"duration":136.10000002384186,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":327.8000000715256,"connectEnd":327.8000000715256,"connectStart":327.8000000715256,"domainLookupEnd":327.8000000715256,"domainLookupStart":327.8000000715256,"fetchStart":327.8000000715256,"redirectEnd":0,"redirectStart":0,"requestStart":390.60000002384186,"responseEnd":463.90000009536743,"responseStart":455.3000000715256,"secureConnectionStart":327.8000000715256},{"duration":58.10000002384186,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2cib/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":328.2000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":328.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":386.3000000715256,"responseStart":0,"secureConnectionStart":0},{"duration":145.80000007152557,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":328.5,"connectEnd":328.5,"connectStart":328.5,"domainLookupEnd":328.5,"domainLookupStart":328.5,"fetchStart":328.5,"redirectEnd":0,"redirectStart":0,"requestStart":432.5,"responseEnd":474.3000000715256,"responseStart":466.3000000715256,"secureConnectionStart":328.5},{"duration":99.20000004768372,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.css?jira.create.linked.issue=true","startTime":328.7000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":328.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":427.90000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":146.29999995231628,"initiatorType":"script","name":"https://jira.mariadb.org/s/5d5e8fe91fbc506585e83ea3b62ccc4b-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.js?jira.create.linked.issue=true&locale=en","startTime":328.8000000715256,"connectEnd":328.8000000715256,"connectStart":328.8000000715256,"domainLookupEnd":328.8000000715256,"domainLookupStart":328.8000000715256,"fetchStart":328.8000000715256,"redirectEnd":0,"redirectStart":0,"requestStart":432.60000002384186,"responseEnd":475.10000002384186,"responseStart":471.3000000715256,"secureConnectionStart":328.8000000715256},{"duration":528.5999999046326,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":329.90000009536743,"connectEnd":329.90000009536743,"connectStart":329.90000009536743,"domainLookupEnd":329.90000009536743,"domainLookupStart":329.90000009536743,"fetchStart":329.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":594.2000000476837,"responseEnd":858.5,"responseStart":855.3000000715256,"secureConnectionStart":329.90000009536743},{"duration":528.6000000238419,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":330,"connectEnd":330,"connectStart":330,"domainLookupEnd":330,"domainLookupStart":330,"fetchStart":330,"redirectEnd":0,"redirectStart":0,"requestStart":667.1000000238419,"responseEnd":858.6000000238419,"responseStart":855.9000000953674,"secureConnectionStart":330},{"duration":158.89999997615814,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":857.8000000715256,"connectEnd":857.8000000715256,"connectStart":857.8000000715256,"domainLookupEnd":857.8000000715256,"domainLookupStart":857.8000000715256,"fetchStart":857.8000000715256,"redirectEnd":0,"redirectStart":0,"requestStart":978.2000000476837,"responseEnd":1016.7000000476837,"responseStart":1015.9000000953674,"secureConnectionStart":857.8000000715256},{"duration":524.1000000238419,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1274.1000000238419,"connectEnd":1274.1000000238419,"connectStart":1274.1000000238419,"domainLookupEnd":1274.1000000238419,"domainLookupStart":1274.1000000238419,"fetchStart":1274.1000000238419,"redirectEnd":0,"redirectStart":0,"requestStart":1761.2000000476837,"responseEnd":1798.2000000476837,"responseStart":1797.6000000238419,"secureConnectionStart":1274.1000000238419}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":86,"responseStart":309,"responseEnd":320,"domLoading":320,"domInteractive":1679,"domContentLoadedEventStart":1680,"domContentLoadedEventEnd":1776,"domComplete":2657,"loadEventStart":2658,"loadEventEnd":2658,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1623},{"name":"bigPipe.sidebar-id.end","time":1624},{"name":"bigPipe.activity-panel-pipe-id.start","time":1624.1000000238419},{"name":"bigPipe.activity-panel-pipe-id.end","time":1627},{"name":"activityTabFullyLoaded","time":1805.4000000953674}],"measures":[],"correlationId":"b51300d9dc014c","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":121,"dbReadsTimeInMs":11,"dbConnsTimeInMs":19,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
This, combined with
MDEV-31802(on GCC 13),semi-blocks UB+ASAN testingon Ubuntu 23 where GCC 13 is the default and GCC 12 can be set with the above procedure, but is blocked by this Mroonga issue. I will next try GCC 11 and disabling Mroonga, though something hangs in my head about GCC 12 being the required minimum now.Update 1: GCC 11 (11.4.0) is able to build UB+ASAN builds correctly (with Mroonga left enabled).
Update 2: Neither -DWITH_MROONGA=0 nor -WITH_MROONGA_STORAGE_ENGINE=OFF turns off the Mroonga engine compilation.