Repeat steps are as follows (100% reproducible) :
1. Run the Sysbench benchmark using either Intel P4610 or ScaleFlux CSD 2000 and set the logical sector to 4K (take Intel P4610 as an example below)
[root@localhost~]# isdct start -intelssd 0 -nvmeformat LBAFormat=1
[root@localhost~]# nvme list
Node SN Model Namespace Usage Format FW Rev
---------------- -------------------- ---------------------------------------- --------- -------------------------- ---------------- --------
/dev/nvme0n1 PHLJ8230004W4P0DXX INTEL SSDPE2KX040XX 1 3.84 TB / 3.84 TB 4 KiB + 0 B VDV10131
2. Use the ext4 file system to format and mount the Intel P4610
[root@localhost~]# mkfs.ext4 /dev/nvme0n1
[root@localhost~]# mount /dev/nvme0n1 -o discard /data/nvme0n1
3. Use the binary tar package of MariaDB 10.5.9 to initialize the installation (steps are abbreviated). The configuration options are as follows
[client]
socket=/data/sfdv0n1/mariadb-10.5.9/mysql.sock
[mysqld_safe]
user=mysql
log_error=/data/sfdv0n1/mariadb-10.5.9/error.log
[mysqld]
socket=/data/sfdv0n1/mariadb-10.5.9/mysql.sock
datadir=/data/sfdv0n1/mariadb-10.5.9
basedir=/opt/app/mariadb-10.5.9
user=mysql
log_error=/data/sfdv0n1/mariadb-10.5.9/error.log
explicit_defaults_for_timestamp=1
innodb_page_size=16384
innodb_buffer_pool_size =32G
innodb_buffer_pool_instances=8
innodb_page_cleaners=8
innodb_log_file_size =8G
innodb_log_buffer_size = 128M
innodb_flush_log_at_trx_commit=1
innodb_thread_concurrency=0
innodb_open_files=100000
innodb_file_per_table=1
innodb_flush_method=O_DIRECT
innodb_change_buffering=all
innodb_adaptive_flushing=1
innodb_old_blocks_time=1000
innodb_use_native_aio=1
innodb_lock_wait_timeout=120
lock_wait_timeout=60
innodb_io_capacity_max = 100000
innodb_flush_neighbors = 0
innodb_log_write_ahead_size=8192
innodb_doublewrite=1
innodb_compression_algorithm=zlib
max_connections=65536
max_prepared_stmt_count=1048576
4. Running sysbench requires more than 20GB of data to be written to disk. The sysbench command looks like this
[root@localhost~]# sysbench --db-driver=mysql --time=900 --threads=16 --report-interval=1 --mysql-socket=/data/sfdv0n1/mariadb-10.5.9/mysql.sock --mysql-user=qbench --mysql-password=qbench --mysql-db=sysbench --tables=32 --table-size=20000000 oltp_read_write --db-ps-mode=disable --percentile=99 --mysql-ignore-errors=1062,1213 --mysql_storage_engine=innodb --create_table_options="page_compressed=1" --rand-type=uniform prepare
5. After a minute or so, the sysbench tells you that the connection is broken. If you look at the MariaDB error log, you can see a crash prompt similar to the one shown in the figure below
PS: if the logic of SSD equipment sector is set to 512 bytes, will not appear afore-mentioned crash phenomenon, we again in many different servers, once the logical sector is set to 4 k of SSD equipment, enabling the page compression would be a collapse of the Server process, and once the logic of SSD equipment sector is set to 512 bytes, enable page compression will not appear the phenomenon of Server process crashes, seems page compression of SSD equipment 4 k logical sector support not friendly enough?
{"report":{"fcp":1752.2000002861023,"ttfb":445,"pageVisibility":"visible","entityId":97843,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"5a795ac1-171f-42f2-872a-75ce1f44cbd3","navigationType":0,"readyForUser":1970.1000003814697,"redirectCount":0,"resourceLoadedEnd":1488.6000003814697,"resourceLoadedStart":477.5,"resourceTiming":[{"duration":93.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":477.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":477.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":571,"responseStart":0,"secureConnectionStart":0},{"duration":93.40000009536743,"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":477.90000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":477.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":571.3000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":630.7000002861023,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":478,"connectEnd":478,"connectStart":478,"domainLookupEnd":478,"domainLookupStart":478,"fetchStart":478,"redirectEnd":0,"redirectStart":0,"requestStart":594.7000002861023,"responseEnd":1108.7000002861023,"responseStart":814.9000000953674,"secureConnectionStart":478},{"duration":847.8000001907349,"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":478.30000019073486,"connectEnd":478.30000019073486,"connectStart":478.30000019073486,"domainLookupEnd":478.30000019073486,"domainLookupStart":478.30000019073486,"fetchStart":478.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":594.7000002861023,"responseEnd":1326.1000003814697,"responseStart":869.5,"secureConnectionStart":478.30000019073486},{"duration":255.2000002861023,"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":478.40000009536743,"connectEnd":478.40000009536743,"connectStart":478.40000009536743,"domainLookupEnd":478.40000009536743,"domainLookupStart":478.40000009536743,"fetchStart":478.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":594.8000001907349,"responseEnd":733.6000003814697,"responseStart":733.1000003814697,"secureConnectionStart":478.40000009536743},{"duration":258.69999980926514,"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":478.6000003814697,"connectEnd":478.6000003814697,"connectStart":478.6000003814697,"domainLookupEnd":478.6000003814697,"domainLookupStart":478.6000003814697,"fetchStart":478.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":594.8000001907349,"responseEnd":737.3000001907349,"responseStart":736.7000002861023,"secureConnectionStart":478.6000003814697},{"duration":258.69999980926514,"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":479.1000003814697,"connectEnd":479.1000003814697,"connectStart":479.1000003814697,"domainLookupEnd":479.1000003814697,"domainLookupStart":479.1000003814697,"fetchStart":479.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":595,"responseEnd":737.8000001907349,"responseStart":737.3000001907349,"secureConnectionStart":479.1000003814697},{"duration":92.7999997138977,"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":479.2000002861023,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":479.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":572,"responseStart":0,"secureConnectionStart":0},{"duration":307.59999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":479.6000003814697,"connectEnd":479.6000003814697,"connectStart":479.6000003814697,"domainLookupEnd":479.6000003814697,"domainLookupStart":479.6000003814697,"fetchStart":479.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":595,"responseEnd":787.2000002861023,"responseStart":757.6000003814697,"secureConnectionStart":479.6000003814697},{"duration":111.69999980926514,"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":479.80000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":479.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":591.5,"responseStart":0,"secureConnectionStart":0},{"duration":277.59999990463257,"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":479.90000009536743,"connectEnd":479.90000009536743,"connectStart":479.90000009536743,"domainLookupEnd":479.90000009536743,"domainLookupStart":479.90000009536743,"fetchStart":479.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":595,"responseEnd":757.5,"responseStart":745.9000000953674,"secureConnectionStart":479.90000009536743},{"duration":1007,"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":481.40000009536743,"connectEnd":481.40000009536743,"connectStart":481.40000009536743,"domainLookupEnd":481.40000009536743,"domainLookupStart":481.40000009536743,"fetchStart":481.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":1059.1000003814697,"responseEnd":1488.4000000953674,"responseStart":1482.4000000953674,"secureConnectionStart":481.40000009536743},{"duration":1007.2000002861023,"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":481.40000009536743,"connectEnd":481.40000009536743,"connectStart":481.40000009536743,"domainLookupEnd":481.40000009536743,"domainLookupStart":481.40000009536743,"fetchStart":481.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":1059.7000002861023,"responseEnd":1488.6000003814697,"responseStart":1483.1000003814697,"secureConnectionStart":481.40000009536743},{"duration":193.30000019073486,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1246.5,"connectEnd":1246.5,"connectStart":1246.5,"domainLookupEnd":1246.5,"domainLookupStart":1246.5,"fetchStart":1246.5,"redirectEnd":0,"redirectStart":0,"requestStart":1388.6000003814697,"responseEnd":1439.8000001907349,"responseStart":1422.6000003814697,"secureConnectionStart":1246.5},{"duration":319.19999980926514,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1666.2000002861023,"connectEnd":1666.2000002861023,"connectStart":1666.2000002861023,"domainLookupEnd":1666.2000002861023,"domainLookupStart":1666.2000002861023,"fetchStart":1666.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":1951.2000002861023,"responseEnd":1985.4000000953674,"responseStart":1983.8000001907349,"secureConnectionStart":1666.2000002861023},{"duration":259.2000002861023,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1732.9000000953674,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1732.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1992.1000003814697,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":168,"domainLookupEnd":190,"connectStart":191,"connectEnd":214,"secureConnectionStart":199,"requestStart":216,"responseStart":445,"responseEnd":466,"domLoading":452,"domInteractive":2068,"domContentLoadedEventStart":2068,"domContentLoadedEventEnd":2143,"domComplete":2637,"loadEventStart":2637,"loadEventEnd":2638,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":2008.9000000953674},{"name":"bigPipe.sidebar-id.end","time":2009.8000001907349},{"name":"bigPipe.activity-panel-pipe-id.start","time":2010},{"name":"bigPipe.activity-panel-pipe-id.end","time":2016.8000001907349},{"name":"activityTabFullyLoaded","time":2165.7000002861023}],"measures":[],"correlationId":"bf67907cd8411e","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":147,"dbReadsTimeInMs":19,"dbConnsTimeInMs":29,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Thank you for the report. The crash occurs due to the following:
{
ut_a(cb->m_err == DB_SUCCESS);
This code was refactored in
MDEV-16264.I see that you are using innodb_flush_method=O_DIRECT, which should ensure that DMA is being used. Without it, the Linux kernel could use more CPU in the io_submit() call. In 10.6, we finally changed that to be the default (
MDEV-24854).I suspect that the this is somehow related to the use of page_compressed=1 tables. We have tested MariaDB on various hardware (including NVMe). I think that I ran the ./mtr regression test suite on my NVMe (Intel Optane 960, INTEL SSDPED1D960GAY) when I implemented
MDEV-24854. It includes some tests with page_compressed=1.I think that we need more information to fix this. Could you provide some strace output that could hint what could have gone wrong?
Did I get it right that this does not occur if you are not page_compressed tables? What about ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 (using 1KiB block size)? I understood that we should avoid setting O_DIRECT on the files in either case. The strace output would help verify that.
If I have understood it correctly, for the ScaleFlux hardware, we would probably want to change page_compressed code so that the various IORequest::PUNCH will never be used, but instead sequences of NUL bytes will be written. That is, we would want to let the file system treat the data files as regular files, and the smart storage would transparently compress the individual sectors.