Type:
Bug
Priority:
Blocker
Resolution:
Fixed
Affects Version/s:
None
Component/s:
None
The attached binary log was created by a fair concurrent test on master, without any manual editing.
In case it relevant, the master server was running with the following options:
10.0/sql/mysqld --no-defaults --basedir=10.0 --datadir=/home/elenst/test_results/analyze2/data --lc-messages-dir=10.0/sql/share --character-sets-dir=10.0/sql/share/charsets --tmpdir=/home/elenst/test_results/analyze2/tmp --core-file --max-allowed-packet=128Mb --port=10730 --socket=/home/elenst/test_results/analyze2/mysql.sock --pid-file=/home/elenst/test_results/analyze2/mysql.pid --general-log --general-log-file=/home/elenst/test_results/analyze2/mysql.log --server_id=1 --report-host=127.0.0.1 --report_port=10730 --innodb --sql-mode=no_engine_substitution --binlog_commit_wait_count=10 --binlog_commit_wait_usec=1000000 --ignore-builtin-innodb --plugin-load=ha_innodb.so --slave-skip-errors=1054,1317,1049,1305,1539,1505 --log-output=FILE --slave_parallel_threads=16 --slave_parallel_max_queued=4194304
Despite slave-specific options, it was not configured as a slave and was not replicating from anywhere.
Now I'm feeding this binary log to a slave running with slave-parallel-threads=16 (no other special options either on master or on slave is necessary).
I'm getting several problems.
Replication failure
Initially replication breaks with
140314 18:04:40 [ERROR] Slave SQL: Error 'Lock wait timeout exceeded; try restarting transaction' on query. Default database: 'test'. Query: 'INSERT INTO `view_A` ( `pk` ) VALUES (NULL)', Internal MariaDB error code: 1205
140314 18:04:40 [Warning] Slave: Lock wait timeout exceeded; try restarting transaction Error_code: 1205
140314 18:04:40 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'mysql-bin.000001' position 312054
It happens every time, in the same place, does not seem to be a race condition, probably some logic specific to parallel replication.
Data discrepancy
After the previous failure, I simply issue START SLAVE again, and replication does not fail anymore.
But when I check the contents of view_A, it turns out that it only has 4 rows while the master has 30+ (either the master on the original datadir, or after feeding the binlog into a new one via MySQL client).
It also happens every time.
Assertion failure
When slave reports that it has finished replication, I attempt to shut down the server, and get the assertion failure upon shutdown:
mysqld: 10.0/sql/handler.cc:2381: THD* handler::ha_thd() const: Assertion `!table || !table->in_use || table->in_use == _current_thd()' failed.
140314 18:12:47 [ERROR] mysqld got signal 6 ;
#5 0x00007f0a9a4b46f0 in *__GI_abort () at abort.c:92
#6 0x00007f0a9a4aa621 in *__GI___assert_fail (assertion=0xfdbc48 "!table || !table->in_use || table->in_use == _current_thd()", file=<optimized out>, line=2381, function=0xfde5c0 "THD* handler::ha_thd() const") at assert.c:81
#7 0x000000000085f648 in handler::ha_thd (this=0x7f0a6d62f088) at 10.0/sql/handler.cc:2381
#8 0x0000000000b74035 in ha_innobase::extra (this=0x7f0a6d62f088, operation=HA_EXTRA_DETACH_CHILDREN) at 10.0/storage/xtradb/handler/ha_innodb.cc:12762
#9 0x000000000060fc14 in mark_tmp_table_for_reuse (table=0x7f0a7121c070) at 10.0/sql/sql_base.cc:696
#10 0x000000000060faf2 in mark_temp_tables_as_free_for_reuse (thd=0x7f0a6bd11070) at 10.0/sql/sql_base.cc:663
#11 0x0000000000610224 in close_thread_tables (thd=0x7f0a6bd11070) at 10.0/sql/sql_base.cc:943
#12 0x000000000077d1e1 in rpl_group_info::slave_close_thread_tables (this=0x7f0a6bcde870, thd=0x7f0a6bd11070) at 10.0/sql/rpl_rli.cc:1699
#13 0x000000000077ced0 in rpl_group_info::cleanup_context (this=0x7f0a6bcde870, thd=0x7f0a6bd11070, error=true) at 10.0/sql/rpl_rli.cc:1611
#14 0x00000000005e3381 in handle_slave_sql (arg=0x7f0a7c3ad070) at 10.0/sql/slave.cc:4594
#15 0x0000000000a2da58 in pfs_spawn_thread (arg=0x7f0a72887ef0) at 10.0/storage/perfschema/pfs.cc:1853
#16 0x00007f0a9c04eb50 in start_thread (arg=<optimized out>) at pthread_create.c:304
#17 0x00007f0a9a559a7d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
Stack trace from:
revision-id: monty@mariadb.org-20140313144311-hmphz2gup3qdjlp9
date: 2014-03-13 16:43:11 +0200
build-date: 2014-03-14 19:43:28 +0400
revno: 4051
branch-nick: 10.0
Server where the binary log was created
revision-id: svoj@mariadb.org-20140307074306-blf3begv8ee0tb5j
date: 2014-03-07 11:43:06 +0400
build-date: 2014-03-14 17:43:49 +0200
revno: 4045
branch-nick: 10.0
{"report":{"fcp":840.8999998569489,"ttfb":129.69999980926514,"pageVisibility":"visible","entityId":33010,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"a65c9e22-59a1-459e-82e0-f08edc094112","navigationType":0,"readyForUser":905.1999998092651,"redirectCount":0,"resourceLoadedEnd":1141.7999999523163,"resourceLoadedStart":134.89999985694885,"resourceTiming":[{"duration":269.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":134.89999985694885,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":134.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":404.39999985694885,"responseStart":0,"secureConnectionStart":0},{"duration":269.2000000476837,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/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","startTime":135.19999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":135.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":404.39999985694885,"responseStart":0,"secureConnectionStart":0},{"duration":279.09999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":135.29999995231628,"connectEnd":135.29999995231628,"connectStart":135.29999995231628,"domainLookupEnd":135.29999995231628,"domainLookupStart":135.29999995231628,"fetchStart":135.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":135.29999995231628,"responseEnd":414.39999985694885,"responseStart":414.39999985694885,"secureConnectionStart":135.29999995231628},{"duration":308,"initiatorType":"script","name":"https://jira.mariadb.org/s/94c15bff32baef80f4096a08aceae8bc-CDN/lu2bu7/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":135.5,"connectEnd":135.5,"connectStart":135.5,"domainLookupEnd":135.5,"domainLookupStart":135.5,"fetchStart":135.5,"redirectEnd":0,"redirectStart":0,"requestStart":135.5,"responseEnd":443.5,"responseStart":443.5,"secureConnectionStart":135.5},{"duration":304.19999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/s/099b33461394b8015fc36c0a4b96e19f-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/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","startTime":135.5,"connectEnd":135.5,"connectStart":135.5,"domainLookupEnd":135.5,"domainLookupStart":135.5,"fetchStart":135.5,"redirectEnd":0,"redirectStart":0,"requestStart":135.5,"responseEnd":439.69999980926514,"responseStart":439.69999980926514,"secureConnectionStart":135.5},{"duration":308.2999999523163,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":135.59999990463257,"connectEnd":135.59999990463257,"connectStart":135.59999990463257,"domainLookupEnd":135.59999990463257,"domainLookupStart":135.59999990463257,"fetchStart":135.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":135.59999990463257,"responseEnd":443.89999985694885,"responseStart":443.89999985694885,"secureConnectionStart":135.59999990463257},{"duration":308.60000014305115,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":135.69999980926514,"connectEnd":135.69999980926514,"connectStart":135.69999980926514,"domainLookupEnd":135.69999980926514,"domainLookupStart":135.69999980926514,"fetchStart":135.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":135.69999980926514,"responseEnd":444.2999999523163,"responseStart":444.2999999523163,"secureConnectionStart":135.69999980926514},{"duration":308.7999999523163,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bu7/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":135.79999995231628,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":135.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":444.59999990463257,"responseStart":0,"secureConnectionStart":0},{"duration":308.7000000476837,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":135.89999985694885,"connectEnd":135.89999985694885,"connectStart":135.89999985694885,"domainLookupEnd":135.89999985694885,"domainLookupStart":135.89999985694885,"fetchStart":135.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":135.89999985694885,"responseEnd":444.59999990463257,"responseStart":444.59999990463257,"secureConnectionStart":135.89999985694885},{"duration":309.09999990463257,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bu7/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":136,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":136,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":445.09999990463257,"responseStart":0,"secureConnectionStart":0},{"duration":309.2000000476837,"initiatorType":"script","name":"https://jira.mariadb.org/s/3339d87fa2538a859872f2df449bf8d0-CDN/lu2bu7/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":136.09999990463257,"connectEnd":136.09999990463257,"connectStart":136.09999990463257,"domainLookupEnd":136.09999990463257,"domainLookupStart":136.09999990463257,"fetchStart":136.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":136.09999990463257,"responseEnd":445.2999999523163,"responseStart":445.2999999523163,"secureConnectionStart":136.09999990463257},{"duration":476.90000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":141.59999990463257,"connectEnd":141.59999990463257,"connectStart":141.59999990463257,"domainLookupEnd":141.59999990463257,"domainLookupStart":141.59999990463257,"fetchStart":141.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":141.59999990463257,"responseEnd":618.5,"responseStart":618.3999998569489,"secureConnectionStart":141.59999990463257},{"duration":1000.1000001430511,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":141.69999980926514,"connectEnd":141.69999980926514,"connectStart":141.69999980926514,"domainLookupEnd":141.69999980926514,"domainLookupStart":141.69999980926514,"fetchStart":141.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":141.69999980926514,"responseEnd":1141.7999999523163,"responseStart":1141.7999999523163,"secureConnectionStart":141.69999980926514},{"duration":450.7999999523163,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":644.5,"connectEnd":644.5,"connectStart":644.5,"domainLookupEnd":644.5,"domainLookupStart":644.5,"fetchStart":644.5,"redirectEnd":0,"redirectStart":0,"requestStart":644.5,"responseEnd":1095.2999999523163,"responseStart":1095.2999999523163,"secureConnectionStart":644.5}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":3,"responseStart":130,"responseEnd":137,"domLoading":133,"domInteractive":1161,"domContentLoadedEventStart":1161,"domContentLoadedEventEnd":1197,"domComplete":2283,"loadEventStart":2283,"loadEventEnd":2285,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1143.5999999046326},{"name":"bigPipe.sidebar-id.end","time":1144.3999998569489},{"name":"bigPipe.activity-panel-pipe-id.start","time":1144.5999999046326},{"name":"bigPipe.activity-panel-pipe-id.end","time":1146.8999998569489},{"name":"activityTabFullyLoaded","time":1203.8999998569489}],"measures":[],"correlationId":"216b9ae4c80dd","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":71,"dbReadsTimeInMs":11,"dbConnsTimeInMs":18,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}