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":1256.6999998092651,"ttfb":273.7999999523163,"pageVisibility":"visible","entityId":129312,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"0ae3d8e4-ce5b-41fd-b0b1-4508ea67b2b6","navigationType":0,"readyForUser":1355.8999998569489,"redirectCount":0,"resourceLoadedEnd":1088.5999999046326,"resourceLoadedStart":289.39999985694885,"resourceTiming":[{"duration":379.2999999523163,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":289.39999985694885,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":289.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":668.6999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":379.59999990463257,"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":289.59999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":289.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":669.1999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":442.10000014305115,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":289.89999985694885,"connectEnd":289.89999985694885,"connectStart":289.89999985694885,"domainLookupEnd":289.89999985694885,"domainLookupStart":289.89999985694885,"fetchStart":289.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":289.89999985694885,"responseEnd":732,"responseStart":732,"secureConnectionStart":289.89999985694885},{"duration":529.7000000476837,"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":290.09999990463257,"connectEnd":290.09999990463257,"connectStart":290.09999990463257,"domainLookupEnd":290.09999990463257,"domainLookupStart":290.09999990463257,"fetchStart":290.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":290.09999990463257,"responseEnd":819.7999999523163,"responseStart":819.7999999523163,"secureConnectionStart":290.09999990463257},{"duration":534.2000000476837,"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":290.19999980926514,"connectEnd":290.19999980926514,"connectStart":290.19999980926514,"domainLookupEnd":290.19999980926514,"domainLookupStart":290.19999980926514,"fetchStart":290.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":290.19999980926514,"responseEnd":824.3999998569489,"responseStart":824.3999998569489,"secureConnectionStart":290.19999980926514},{"duration":534.5,"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":290.5,"connectEnd":290.5,"connectStart":290.5,"domainLookupEnd":290.5,"domainLookupStart":290.5,"fetchStart":290.5,"redirectEnd":0,"redirectStart":0,"requestStart":290.5,"responseEnd":825,"responseStart":825,"secureConnectionStart":290.5},{"duration":534.9000000953674,"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":290.59999990463257,"connectEnd":290.59999990463257,"connectStart":290.59999990463257,"domainLookupEnd":290.59999990463257,"domainLookupStart":290.59999990463257,"fetchStart":290.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":290.59999990463257,"responseEnd":825.5,"responseStart":825.5,"secureConnectionStart":290.59999990463257},{"duration":603.7999999523163,"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":290.7999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":290.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":894.5999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":535,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":291,"connectEnd":291,"connectStart":291,"domainLookupEnd":291,"domainLookupStart":291,"fetchStart":291,"redirectEnd":0,"redirectStart":0,"requestStart":291,"responseEnd":826,"responseStart":826,"secureConnectionStart":291},{"duration":603.7000000476837,"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":291.09999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":291.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":894.7999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":535.2000000476837,"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":291.2999999523163,"connectEnd":291.2999999523163,"connectStart":291.2999999523163,"domainLookupEnd":291.2999999523163,"domainLookupStart":291.2999999523163,"fetchStart":291.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":291.2999999523163,"responseEnd":826.5,"responseStart":826.5,"secureConnectionStart":291.2999999523163},{"duration":791.2000000476837,"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":296.89999985694885,"connectEnd":296.89999985694885,"connectStart":296.89999985694885,"domainLookupEnd":296.89999985694885,"domainLookupStart":296.89999985694885,"fetchStart":296.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":296.89999985694885,"responseEnd":1088.0999999046326,"responseStart":1088.0999999046326,"secureConnectionStart":296.89999985694885},{"duration":791.5999999046326,"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":297,"connectEnd":297,"connectStart":297,"domainLookupEnd":297,"domainLookupStart":297,"fetchStart":297,"redirectEnd":0,"redirectStart":0,"requestStart":297,"responseEnd":1088.5999999046326,"responseStart":1088.5999999046326,"secureConnectionStart":297},{"duration":55,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":938,"connectEnd":938,"connectStart":938,"domainLookupEnd":938,"domainLookupStart":938,"fetchStart":938,"redirectEnd":0,"redirectStart":0,"requestStart":938,"responseEnd":993,"responseStart":993,"secureConnectionStart":938}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":89,"responseStart":274,"responseEnd":295,"domLoading":288,"domInteractive":1465,"domContentLoadedEventStart":1465,"domContentLoadedEventEnd":1528,"domComplete":2296,"loadEventStart":2296,"loadEventEnd":2296,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1436.3999998569489},{"name":"bigPipe.sidebar-id.end","time":1437.1999998092651},{"name":"bigPipe.activity-panel-pipe-id.start","time":1437.3999998569489},{"name":"bigPipe.activity-panel-pipe-id.end","time":1439.5999999046326},{"name":"activityTabFullyLoaded","time":1545.7999999523163}],"measures":[],"correlationId":"b46c21834767a3","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":108,"dbReadsTimeInMs":12,"dbConnsTimeInMs":21,"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.