[MDEV-23122] Segfault in Item_func_in::cleanup Created: 2020-07-08  Updated: 2020-08-04  Resolved: 2020-08-04

Status: Closed
Project: MariaDB Server
Component/s: N/A
Affects Version/s: 10.4.13
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Marc Jeanmougin Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Environment:

(tested on 18.04)


Attachments: HTML File show_variables    
Issue Links:
Duplicate
duplicates MDEV-22563 Segfault on duplicate free of Item_f... Closed

 Description   

Hi,

I obtained a segfault when trying to alter a table in mariadb 10.13.
It's not reproduced 100% of the time but roughly 50% of the time, and looks similar to https://jira.mariadb.org/browse/MDEV-17177 .

  1. mysqld --version
    /usr/sbin/mysqld Ver 10.4.13-MariaDB-1:10.4.13+maria~bionic for debian-linux-gnu on x86_64 (mariadb.org binary distribution)

When launching from gdb I obtained the following backtrace :
{{
Thread 43 "mysqld" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff03e2700 (LWP 27295)]
0x0000555555eea267 in Item_func_in::cleanup() ()
(gdb) bt
#0 0x0000555555eea267 in Item_func_in::cleanup() ()
#1 0x0000555555b69c2d in Query_arena::free_items() ()
#2 0x0000555555b6bb4b in THD::cleanup_after_query() ()
#3 0x0000555555bbc02b in mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool) ()
#4 0x0000555555bbe705 in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) ()
#5 0x0000555555bbfbb4 in do_command(THD*) ()
#6 0x0000555555c9c23e in do_handle_one_connection(CONNECT*) ()
#7 0x0000555555c9c2fd in handle_one_connection ()
#8 0x00007ffff70d86db in start_thread (arg=0x7ffff03e2700) at pthread_create.c:463
#9 0x00007ffff5afaa3f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
}}

The errors happens when altering a table to add or remove a column, here my command was
ALTER TABLE nodegroup DROP COLUMN stack_id;



 Comments   
Comment by Elena Stepanova [ 2020-07-08 ]

It could be MDEV-22563 . 10.4.14 hasn't been released yet, but if you want to try the new version to see if the problem goes away, you can pull and build from github, or I can point you at our intermediate builds.

Comment by Marc Jeanmougin [ 2020-07-08 ]
  • no parallel client was writing to this table, not sure about reading but it's very unlikely
  • show variables attached
  • MariaDB [magnum]> SHOW CREATE TABLE nodegroup;
    [...]
    nodegroup CREATE TABLE `nodegroup` (
    `created_at` datetime DEFAULT NULL,
    `updated_at` datetime DEFAULT NULL,
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `uuid` varchar(36) NOT NULL,
    `name` varchar(255) NOT NULL,
    `cluster_id` varchar(255) NOT NULL,
    `project_id` varchar(255) NOT NULL,
    `docker_volume_size` int(11) DEFAULT NULL,
    `labels` text DEFAULT NULL,
    `flavor_id` varchar(255) DEFAULT NULL,
    `image_id` varchar(255) DEFAULT NULL,
    `node_addresses` text DEFAULT NULL,
    `node_count` int(11) DEFAULT NULL,
    `max_node_count` int(11) DEFAULT NULL,
    `min_node_count` int(11) DEFAULT NULL,
    `role` varchar(255) DEFAULT NULL,
    `is_default` tinyint(1) DEFAULT NULL,
    `stack_id` varchar(255) DEFAULT NULL,
    `status` varchar(20) DEFAULT NULL,
    `status_reason` text DEFAULT NULL,
    PRIMARY KEY (`id`),
    UNIQUE KEY `uniq_nodegroup0uuid` (`uuid`),
    UNIQUE KEY `uniq_nodegroup0cluster_id0name` (`cluster_id`,`name`),
    CONSTRAINT `CONSTRAINT_1` CHECK (`is_default` in (0,1))
    ) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8

    [...]
    1 row in set (0.000 sec)

show_variables

Comment by Marc Jeanmougin [ 2020-07-08 ]

> It could be MDEV-22563 . 10.4.14 hasn't been released yet, but if you want to try the new version to see if the problem goes away, you can pull and build from github, or I can point you at our intermediate builds.

Ah, I missed that one in my bug search. I'm interested in dev builds, but if it's easier to build from code, it should be possible too.

Comment by Elena Stepanova [ 2020-07-08 ]

You can find recent Bionic 64-bit packages here: http://hasky.askmonty.org/archive/10.4/build-33954/kvm-deb-bionic-amd64/

Comment by Marc Jeanmougin [ 2020-07-08 ]

Thanks! Can't reproduce the segfault with those packages installed (*-common *-client-core *-client *-server-core *-server )

Is there a scheduled time for 10.4.14 ?

Comment by Elena Stepanova [ 2020-07-08 ]

> Is there a scheduled time for 10.4.14 ?

2020-07-24 according to the current schedule. It's not precise though, can be a few days off.

Generated at Thu Feb 08 09:20:00 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.