Bug #87824 | Crash when internal_tmp_disk_storage_engine is set to InnoDB | ||
---|---|---|---|
Submitted: | 21 Sep 2017 12:29 | Modified: | 5 Apr 2018 17:30 |
Reporter: | Travis Hidlay | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | MySQL Server: DML | Severity: | S2 (Serious) |
Version: | 5.7.19 | OS: | Ubuntu (Using latest docker container from DockerHub official MySQL repository) |
Assigned to: | CPU Architecture: | Any | |
Tags: | crash |
[21 Sep 2017 12:29]
Travis Hidlay
[21 Sep 2017 23:53]
MySQL Verification Team
Thank you for the bug report, please provide the create table statement of the tables involved. Thanks in advance.
[22 Sep 2017 12:01]
Travis Hidlay
Here are the table schemas: CREATE TABLE `patients_query` ( `id_` int(11) NOT NULL AUTO_INCREMENT, `id` int(11) NOT NULL DEFAULT '0', `external_id` varchar(50) NOT NULL DEFAULT '0', `master_patient_id` varchar(50) NOT NULL DEFAULT '0', `list_type` int(11) NOT NULL DEFAULT '0', `list_name` varchar(100) NOT NULL DEFAULT '0', `NameFirst` varchar(64) NOT NULL, `NameLast` varchar(255) NOT NULL, `company_id` int(11) NOT NULL, `company_ids` varchar(255) NOT NULL, `dob` varchar(50) NOT NULL, `AddrStreet` varchar(255) NOT NULL, `AddrStreet2` varchar(100) NOT NULL, `AddrStreet3` varchar(100) NOT NULL, `AddrZip` varchar(15) NOT NULL, `AddrCity` varchar(63) NOT NULL, `AddrState` varchar(50) NOT NULL, `account_number` varchar(255) NOT NULL, `admit_service_date` varchar(255) NOT NULL, `location_service` varchar(255) NOT NULL, `has_patient_list_history` tinyint(4) NOT NULL, `is_active` tinyint(4) NOT NULL, `phone` varchar(20) NOT NULL, `email` varchar(63) NOT NULL, `do_not_share_my_data` tinyint(4) NOT NULL DEFAULT '0', PRIMARY KEY (`id_`), KEY `list_type` (`list_type`), KEY `company_id` (`company_id`), KEY `list_type_company_id` (`list_type`,`company_id`), KEY `master_patient_id` (`master_patient_id`), KEY `id` (`id`), KEY `master_patien_listy_type` (`master_patient_id`,`list_type`), KEY `NameFirst` (`NameFirst`), KEY `NameLast` (`NameLast`), KEY `dob` (`dob`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `patients_query_removed` ( `id_` int(11) NOT NULL AUTO_INCREMENT, `id` int(11) NOT NULL DEFAULT '0', `external_id` varchar(50) NOT NULL DEFAULT '0', `master_patient_id` varchar(50) NOT NULL DEFAULT '0', `list_type` int(11) NOT NULL DEFAULT '0', `list_name` varchar(100) NOT NULL DEFAULT '0', `NameFirst` varchar(64) NOT NULL, `NameLast` varchar(255) NOT NULL, `company_id` int(11) NOT NULL, `company_ids` varchar(255) NOT NULL, `dob` varchar(50) NOT NULL, `AddrStreet` varchar(255) NOT NULL, `AddrStreet2` varchar(100) NOT NULL, `AddrStreet3` varchar(100) NOT NULL, `AddrZip` varchar(15) NOT NULL, `AddrCity` varchar(63) NOT NULL, `AddrState` varchar(50) NOT NULL, `account_number` varchar(255) NOT NULL, `admit_service_date` varchar(255) NOT NULL, `location_service` varchar(255) NOT NULL, `has_patient_list_history` tinyint(4) NOT NULL, `is_active` tinyint(4) NOT NULL, `phone` varchar(20) NOT NULL, `email` varchar(63) NOT NULL, `do_not_share_my_data` tinyint(4) NOT NULL DEFAULT '0', PRIMARY KEY (`id_`), KEY `list_type` (`list_type`), KEY `company_id` (`company_id`), KEY `list_type_company_id` (`list_type`,`company_id`), KEY `master_patient_id` (`master_patient_id`), KEY `id` (`id`), KEY `master_patien_listy_type` (`master_patient_id`,`list_type`), KEY `NameFirst` (`NameFirst`), KEY `NameLast` (`NameLast`), KEY `dob` (`dob`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
[22 Sep 2017 12:03]
Travis Hidlay
The query I did was: select * from (select * from patients_query union select * from patients_query_removed) limit 10; patients_query had about 450k rows, and patients_query_removed had about 5k
[25 Sep 2017 14:34]
MySQL Verification Team
Thank you for the requested details. I tried to reproduce with dummy data with no luck. Could you please provide config details, and subset of data to reproduce this issue at our end? You may want to mark it as private after posting here. regards, Umesh
[25 Sep 2017 14:35]
MySQL Verification Team
test results - 5.7.19
Attachment: 87824_5.7.19.results (application/octet-stream, text), 10.79 KiB.
[25 Sep 2017 15:09]
Travis Hidlay
Umesh, The test file you attached has this query at the bottom: select * from (select * from patients_query_removed union select * from patients_query_removed) A limit 10; I don't see you selecting from the "patients_query" table anywhere, only from the "patients_query_removed" table. Could you try the test again with this query: select * from (select * from patients_query union select * from patients_query_removed) A limit 10; Also note that my setup is using a Docker container (the official MySQL 5.7 latest container hosted on Dockerhub), mounted with a vboxfs volume on top of the /var/lib/mysql data directory. Here is my docker run command: docker run -v /vagrant/tmp_mysql:/var/lib/mysql -d
[25 Sep 2017 16:23]
MySQL Verification Team
Thank you, even tried your query as is with no luck(tried on a relatively small boxes with just 4G/8G/16 and bigger as much 256G RAM) -- after setting internal_tmp_disk_storage_engine to innodb, with default, and non-default settings select * from (select * from patients_query union select * from patients_query_removed) A limit 10; . Ran some 15+ times but still no luck. I'll try this on docker tomorrow but could you please provide MySQL's config file from your environment to see if it helps to reproduce? Thanks, Umesh
[26 Sep 2017 7:10]
MySQL Verification Team
Quickly attempted using Docker(only diff was that I didn't mount anywhere but let it run on defaults), sorry but still not seeing the issue. Joining the activity log shortly. Regards, Umesh
[26 Sep 2017 7:12]
MySQL Verification Team
Docker based test result
Attachment: Docker_87824.results (application/octet-stream, text), 44.24 KiB.
[26 Sep 2017 8:50]
MySQL Verification Team
Docker based test result - Big dataset
Attachment: Docker_87824_01.results (application/octet-stream, text), 17.23 KiB.
[26 Sep 2017 14:39]
Travis Hidlay
I'm attaching my configuration variables in a second, taken from a "show variables" query. It could be that the key in repro'ing this is in mounting a vboxfs volume on top of the /var/lib/mysql directory on the docker container. Thanks for investigating this Umesh, I really appreciate it!
[26 Sep 2017 14:42]
Travis Hidlay
Configuration variables from "show variables"
Attachment: mysql_config.csv (application/vnd.ms-excel, text), 14.28 KiB.
[26 Sep 2017 14:45]
Peter Laursen
"It could be that the key in repro'ing this is in mounting a vboxfs volume on top of the /var/lib/mysql directory on the docker container." I agree! Actually I know positively that there are no guarantees that things (network, disk functionalities) will work if you install a VM in Virtualbox in a VM in Virtualbox (statement by VB developer in their support Forums). Here you replace the "inner VM" of the described setup with a container. Is this supposed to work. Has anybody ever promised that it will? Or even tested it? -- Peter -- not a MySQL/Oracle person
[5 Apr 2018 17:30]
MySQL Verification Team
I couldn't repeat with most recent server source. Please try 5.7.21. Thanks.