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":1026.4000000953674,"ttfb":301.90000009536743,"pageVisibility":"visible","entityId":129312,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"7f7e4e18-57d9-4b33-be7a-ae8ea9997d6d","navigationType":0,"readyForUser":1159.8000000715256,"redirectCount":0,"resourceLoadedEnd":746.4000000953674,"resourceLoadedStart":309.2000000476837,"resourceTiming":[{"duration":17,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":309.2000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":309.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":326.2000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":17.100000023841858,"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":309.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":309.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":326.60000002384186,"responseStart":0,"secureConnectionStart":0},{"duration":291,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":309.60000002384186,"connectEnd":309.60000002384186,"connectStart":309.60000002384186,"domainLookupEnd":309.60000002384186,"domainLookupStart":309.60000002384186,"fetchStart":309.60000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":337.3000000715256,"responseEnd":600.6000000238419,"responseStart":356.60000002384186,"secureConnectionStart":309.60000002384186},{"duration":436.60000002384186,"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":309.8000000715256,"connectEnd":309.8000000715256,"connectStart":309.8000000715256,"domainLookupEnd":309.8000000715256,"domainLookupStart":309.8000000715256,"fetchStart":309.8000000715256,"redirectEnd":0,"redirectStart":0,"requestStart":339.8000000715256,"responseEnd":746.4000000953674,"responseStart":365.2000000476837,"secureConnectionStart":309.8000000715256},{"duration":20.40000009536743,"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":310,"connectEnd":310,"connectStart":310,"domainLookupEnd":310,"domainLookupStart":310,"fetchStart":310,"redirectEnd":0,"redirectStart":0,"requestStart":310,"responseEnd":330.40000009536743,"responseStart":330.40000009536743,"secureConnectionStart":310},{"duration":62,"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":310.2000000476837,"connectEnd":310.2000000476837,"connectStart":310.2000000476837,"domainLookupEnd":310.2000000476837,"domainLookupStart":310.2000000476837,"fetchStart":310.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":341.10000002384186,"responseEnd":372.2000000476837,"responseStart":367.3000000715256,"secureConnectionStart":310.2000000476837},{"duration":62.09999990463257,"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":310.40000009536743,"connectEnd":310.40000009536743,"connectStart":310.40000009536743,"domainLookupEnd":310.40000009536743,"domainLookupStart":310.40000009536743,"fetchStart":310.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":341.40000009536743,"responseEnd":372.5,"responseStart":368.3000000715256,"secureConnectionStart":310.40000009536743},{"duration":25.800000071525574,"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":310.60000002384186,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":310.60000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":336.40000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":62.5,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":310.8000000715256,"connectEnd":310.8000000715256,"connectStart":310.8000000715256,"domainLookupEnd":310.8000000715256,"domainLookupStart":310.8000000715256,"fetchStart":310.8000000715256,"redirectEnd":0,"redirectStart":0,"requestStart":341.5,"responseEnd":373.3000000715256,"responseStart":369.40000009536743,"secureConnectionStart":310.8000000715256},{"duration":25.600000023841858,"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":311,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":311,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":336.60000002384186,"responseStart":0,"secureConnectionStart":0},{"duration":23.200000047683716,"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":311.2000000476837,"connectEnd":311.2000000476837,"connectStart":311.2000000476837,"domainLookupEnd":311.2000000476837,"domainLookupStart":311.2000000476837,"fetchStart":311.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":311.2000000476837,"responseEnd":334.40000009536743,"responseStart":334.40000009536743,"secureConnectionStart":311.2000000476837},{"duration":31.700000047683716,"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":327.7000000476837,"connectEnd":327.7000000476837,"connectStart":327.7000000476837,"domainLookupEnd":327.7000000476837,"domainLookupStart":327.7000000476837,"fetchStart":327.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":327.7000000476837,"responseEnd":359.40000009536743,"responseStart":359.40000009536743,"secureConnectionStart":327.7000000476837},{"duration":24.5,"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":336.3000000715256,"connectEnd":336.3000000715256,"connectStart":336.3000000715256,"domainLookupEnd":336.3000000715256,"domainLookupStart":336.3000000715256,"fetchStart":336.3000000715256,"redirectEnd":0,"redirectStart":0,"requestStart":336.3000000715256,"responseEnd":360.8000000715256,"responseStart":360.8000000715256,"secureConnectionStart":336.3000000715256},{"duration":141.40000009536743,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":749.5,"connectEnd":749.5,"connectStart":749.5,"domainLookupEnd":749.5,"domainLookupStart":749.5,"fetchStart":749.5,"redirectEnd":0,"redirectStart":0,"requestStart":841,"responseEnd":890.9000000953674,"responseStart":882.8000000715256,"secureConnectionStart":749.5},{"duration":177.5,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":974.7000000476837,"connectEnd":974.7000000476837,"connectStart":974.7000000476837,"domainLookupEnd":974.7000000476837,"domainLookupStart":974.7000000476837,"fetchStart":974.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":1111.4000000953674,"responseEnd":1152.2000000476837,"responseStart":1151.5,"secureConnectionStart":974.7000000476837},{"duration":197.70000004768372,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1018.7000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1018.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1216.4000000953674,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":102,"responseStart":302,"responseEnd":336,"domLoading":307,"domInteractive":1253,"domContentLoadedEventStart":1253,"domContentLoadedEventEnd":1327,"domComplete":1439,"loadEventStart":1439,"loadEventEnd":1440,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1223.1000000238419},{"name":"bigPipe.sidebar-id.end","time":1223.9000000953674},{"name":"bigPipe.activity-panel-pipe-id.start","time":1224.1000000238419},{"name":"bigPipe.activity-panel-pipe-id.end","time":1226.2000000476837},{"name":"activityTabFullyLoaded","time":1348}],"measures":[],"correlationId":"b11ec7228494ac","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":107,"dbReadsTimeInMs":13,"dbConnsTimeInMs":22,"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.