Bug 1491833
Summary: | MariaDB server segfaults with select query | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Jason <jason> | |
Component: | mariadb | Assignee: | Michal Schorm <mschorm> | |
Status: | CLOSED CURRENTRELEASE | QA Contact: | qe-baseos-daemons | |
Severity: | medium | Docs Contact: | ||
Priority: | high | |||
Version: | 7.4 | CC: | bgollahe, databases-maint, enagel, hhorak, jason, kvolny, mmuzila, toneata | |
Target Milestone: | rc | Keywords: | FastFix, ZStream | |
Target Release: | --- | |||
Hardware: | x86_64 | |||
OS: | Linux | |||
Whiteboard: | ||||
Fixed In Version: | Doc Type: | If docs needed, set a value | ||
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1584029 (view as bug list) | Environment: | ||
Last Closed: | 2018-10-30 15:43:46 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | ||||
Bug Blocks: | 1551022, 1584029 |
Description
Jason
2017-09-14 19:40:06 UTC
I went through the MariaDB changelog, however I was not able to distinguish the possible fix. I'll assume this issue will be solved by rebase to >=5.5.57. I tried to reproduce the issue, however, without data, I was NOT successful. But I'll leave it there for later reproducer creation: --- mysql -u root create database REPRODUCER; use REPRODUCER; create table servers (id int, name int, short_name int, serial_number int, created_by int, preferences_id int, status_id int, `order` int, plan_id int, plan_users int, installed int, allow_access int, visible int, category int, updated_at int); create table ec_demo_servers (sales_id int, server_id int); create table user_ec (id int, user_id int); create table project_server (server_id int, project_id int); create table client_project (client_id int, project_id int); create table contact_targets (target_id int, department_id int, contact_id int); create table contact_target_departments (id int, name int); select `servers1`.`id` as `ID`, `servers1`.`name` as `Name`, `servers1`.`short_name` as `ShortName`, `servers1`.`serial_number` as `SerialNumber`, `servers1`.`created_by` as `CreatorID`, `servers1`.`preferences_id` as `PreferenceID`, `servers1`.`status_id` as `StatusID`, `servers1`.`order` as `Order`, `servers1`.`plan_id` as `PlanID`, `servers1`.`plan_users` as `PlanUsers`, `servers1`.`installed` as `Installed`, `servers1`.`allow_access` as `Accessible`, `servers1`.`visible` as `Visible`, `servers1`.`category` as `Category`, `servers1`.`updated_at` as `UpdatedAt`, `servers1`.`id` as `ID`, `servers1`.`preferences_id` as `PreferenceID` from `servers` as `servers1` where `servers1`.`id` in ('8165', '8166', '8807', '8917', '13274') having (servers1.id in (select d.server_id from ec_demo_servers as d, user_ec as s where (s.id=d.sales_id OR d.sales_id=0) and s.user_id=37717) OR servers1.id IN (select s.server_id from project_server as s, client_project as p, contact_targets as t, contact_target_departments as d where s.project_id=p.project_id and p.client_id=t.target_id and t.department_id=d.id and d.name='Sales' and t.contact_id=32385)); I tried to add dummy data which return non-zero set. Unfortunatelly, still no crash reproduced. --- mysql -u root create database REPRODUCER; use REPRODUCER; create table servers (id int, name varchar(20), short_name varchar(20), serial_number int, created_by int, preferences_id int, status_id int, `order` int, plan_id int, plan_users int, installed int, allow_access int, visible int, category int, updated_at int); create table user_ec (id int, user_id int); create table ec_demo_servers (sales_id int, server_id int); create table project_server (server_id int, project_id int); create table client_project (client_id int, project_id int); create table contact_targets (target_id int, department_id int, contact_id int); create table contact_target_departments (id int, name varchar(20)); INSERT INTO servers values (1, "x", "x", 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); INSERT INTO servers values (8165, "x", "x", 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); INSERT INTO servers values (8166, "x", "x", 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); INSERT INTO servers values (8807, "x", "x", 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); INSERT INTO servers values (8917, "x", "x", 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); INSERT INTO servers values (13274, "x", "x", 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); INSERT INTO user_ec values (1, 1); INSERT INTO user_ec values (2, 1); INSERT INTO user_ec values (2, 37717); INSERT INTO ec_demo_servers values (0, 10); INSERT INTO ec_demo_servers values (1, 100); INSERT INTO ec_demo_servers values (2, 1000); INSERT INTO ec_demo_servers values (2, 8165); INSERT INTO ec_demo_servers values (0, 8166); INSERT INTO ec_demo_servers values (2, 8807); INSERT INTO ec_demo_servers values (0, 8917); INSERT INTO ec_demo_servers values (2, 13274); INSERT INTO project_server values (8807, 1); INSERT INTO project_server values (8807, 2); INSERT INTO project_server values (8807, 3); INSERT INTO project_server values (8807, 4); INSERT INTO project_server values (8807, 5); INSERT INTO client_project values (1, 1); INSERT INTO client_project values (2, 1); INSERT INTO client_project values (3, 1); INSERT INTO client_project values (4, 1); INSERT INTO contact_targets values (1, 1, 1); INSERT INTO contact_targets values (1, 1, 32385); INSERT INTO contact_targets values (1, 3, 32385); INSERT INTO contact_target_departments values (1, "x"); INSERT INTO contact_target_departments values (1, "Sales"); INSERT INTO contact_target_departments values (2, "Sales"); select `servers1`.`id` as `ID`, `servers1`.`name` as `Name`, `servers1`.`short_name` as `ShortName`, `servers1`.`serial_number` as `SerialNumber`, `servers1`.`created_by` as `CreatorID`, `servers1`.`preferences_id` as `PreferenceID`, `servers1`.`status_id` as `StatusID`, `servers1`.`order` as `Order`, `servers1`.`plan_id` as `PlanID`, `servers1`.`plan_users` as `PlanUsers`, `servers1`.`installed` as `Installed`, `servers1`.`allow_access` as `Accessible`, `servers1`.`visible` as `Visible`, `servers1`.`category` as `Category`, `servers1`.`updated_at` as `UpdatedAt`, `servers1`.`id` as `ID`, `servers1`.`preferences_id` as `PreferenceID` from `servers` as `servers1` where `servers1`.`id` in ('8165', '8166', '8807', '8917', '13274') having (servers1.id in (select d.server_id from ec_demo_servers as d, user_ec as s where (s.id=d.sales_id OR d.sales_id=0) and s.user_id=37717) OR servers1.id IN (select s.server_id from project_server as s, client_project as p, contact_targets as t, contact_target_departments as d where s.project_id=p.project_id and p.client_id=t.target_id and t.department_id=d.id and d.name='Sales' and t.contact_id=32385)); Jason, are you able to provide more data to reproduce this, please? Not sure if this is the exact same bug, but it reproduces easily and is fixed with 5.5.57: https://jira.mariadb.org/browse/MDEV-13180 |