[MDEV-33040] MariaDB restarted [ERROR] mysqld got signal 11 Created: 2023-12-15  Updated: 2023-12-18  Resolved: 2023-12-17

Status: Closed
Project: MariaDB Server
Component/s: Optimizer - Window functions
Affects Version/s: 10.5.9
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: R S N Murthy Assignee: Daniel Black
Resolution: Cannot Reproduce Votes: 0
Labels: crash
Environment:

Red Hat Enterprise Linux 8.5 (Ootpa)
10.5.9-MariaDB


Attachments: Text File ERROR_MairaDB_restart_errorlog_OSLogMessage.txt     Text File TestInsertQeuryIssue_Denodo.txt    

 Description   

MariaDB service was noticed restarted when checked with "status" command , however the OS process still shows older date.

The Mariadb Error log file , /var/log/message and dmsg logs are attached to ticket .

MariaDB [(none)]> status;
--------------
mysql  Ver 15.1 Distrib 10.5.9-MariaDB, for Linux (x86_64) using readline 5.1
 
Connection id:          18415
Current database:
Current user:           unm@localhost
SSL:                    Not in use
Current pager:          stdout
Using outfile:          ''
Using delimiter:        ;
Server:                 MariaDB
Server version:         10.5.9-MariaDB-log MariaDB Server
Protocol version:       10
Connection:             Localhost via UNIX socket
Server characterset:    utf8
Db     characterset:    utf8
Client characterset:    utf8
Conn.  characterset:    utf8
UNIX socket:            /tmp/mysql.sock
*Uptime:                 3 hours 8 min 24 sec*
 
Threads: 700  Questions: 562457  Slow queries: 0  Opens: 1016  Open tables: 1009  Queries per second avg: 49.757
--------------
 
MariaDB [(none)]> exit
Bye
$ ps -ewf|grep mysqld
unm 2459083 2458709  0 09:48 pts/0    00:00:00 grep --color=auto mysqld
*unm 3438211       1  0 Jul19 ?        *00:00:00 /bin/sh <PATH>/mysqld_safe --datadir=/<PATH>
$



 Comments   
Comment by Sergei Golubchik [ 2023-12-15 ]

as the log shows, it could be due to the statement

INSERT INTO campaign.denodo_camp_promo_view
    (ID, name, startdate, enddate, ownerid, promotion_code__c, PROMOCODE_DETAILS)
SELECT
    ROW_NUMBER() OVER (ORDER BY (SELECT NULL)),
    NULL,
    NULL,
    NULL,
    NULL,
    NULL,
    'NA'

could you show the table structure of denodo_camp_promo_view please?

Comment by Daniel Black [ 2023-12-15 ]

10.5.9 is really old, has had almost 3 years of bugs fixes. I suspect this has been fixed already.

Can you test the same insert query in the logs on the same data with a newer MariaDB version?

It looked like mysqld_safe respawned the process. Until MDEV-31568 was fixed there is a lack of safety allowing multiple MariaDB instances to manipulate the same data.

Comment by R S N Murthy [ 2023-12-16 ]

These is a "BASE TABLE" , as per table definition the default value of all columns is NULL.

MariaDB [(none)]> select table_schema,table_name,table_type from information_schema.tables where table_name like '%denodo_camp_promo_view%';
----------------------------------------------

table_schema table_name table_type

----------------------------------------------

campaign denodo_camp_promo_view BASE TABLE

----------------------------------------------
1 row in set (0.021 sec)

MariaDB [(none)]> show create table campaign.denodo_camp_promo_view;
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

Table Create Table

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

denodo_camp_promo_view CREATE TABLE `denodo_camp_promo_view` (
`ID` decimal(15,0) DEFAULT NULL,
`name` varchar(80) DEFAULT NULL,
`startdate` date DEFAULT NULL,
`enddate` date DEFAULT NULL,
`ownerid` varchar(18) DEFAULT NULL,
`promotion_code__c` varchar(255) DEFAULT NULL,
`PROMOCODE_DETAILS` varchar(321) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.000 sec)

MariaDB [(none)]> select * from campaign.denodo_camp_promo_view where id is null;
--------------------------------------------------------------------

ID name startdate enddate ownerid promotion_code__c PROMOCODE_DETAILS

--------------------------------------------------------------------

NULL NULL 2023-12-15 NULL NULL NA NA

--------------------------------------------------------------------
1 row in set (0.000 sec)

MariaDB [(none)]>

Comment by R S N Murthy [ 2023-12-16 ]

Worked on TestEnv with the insert statement. same errors are observed. Insert statement using select crashed the instance

Attaching the complete log containing error log , /var/log/messages and dmesg .

MariaDB [(none)]> status;
--------------
mysql Ver 15.1 Distrib 10.5.9-MariaDB, for Linux (x86_64) using readline 5.1

Connection id: 10
Current database:
Current user: unicauser@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server: MariaDB
Server version: 10.5.9-MariaDB-log MariaDB Server
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: utf8
Db characterset: utf8
Client characterset: utf8
Conn. characterset: utf8
UNIX socket: /tmp/mysql.sock
Uptime: 3 days 21 hours 21 min 28 sec

Threads: 3 Questions: 84 Slow queries: 0 Opens: 33 Open tables: 4 Queries per second avg: 0.000
--------------

MariaDB [(none)]> SELECT
-> ROW_NUMBER() OVER (ORDER BY (SELECT NULL)),
-> NULL,
-> NULL,
-> NULL,
-> NULL,
-> NULL,
-> 'NA';
------------------------------------------------------------------

ROW_NUMBER() OVER (ORDER BY (SELECT NULL)) NULL NULL NULL NULL NULL NA

------------------------------------------------------------------

1 NULL NULL NULL NULL NULL NA

------------------------------------------------------------------
1 row in set (0.002 sec)

MariaDB [plan]> show tables;
Empty set (0.000 sec)

MariaDB [plan]> CREATE TABLE `denodo_camp_promo_view` (
-> `ID` decimal(15,0) DEFAULT NULL,
-> `name` varchar(80) DEFAULT NULL,
-> `startdate` date DEFAULT NULL,
-> `enddate` date DEFAULT NULL,
-> `ownerid` varchar(18) DEFAULT NULL,
-> `promotion_code__c` varchar(255) DEFAULT NULL,
-> `PROMOCODE_DETAILS` varchar(321) DEFAULT NULL
-> );
Query OK, 0 rows affected (0.055 sec)

MariaDB [plan]> INSERT INTO denodo_camp_promo_view (ID, name, startdate, enddate, ownerid, promotion_code__c, PROMOCODE_DETAILS) SELECT ROW_NUMBER() OVER (ORDER BY (SELECT NULL)),NULL,NULL,NULL,NULL,NULL,'NA';
ERROR 2013 (HY000): Lost connection to MySQL server during query

MariaDB [plan]> status;
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id: 5
Current database: plan

--------------
mysql Ver 15.1 Distrib 10.5.9-MariaDB, for Linux (x86_64) using readline 5.1

Connection id: 5
Current database: plan
Current user: unicauser@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server: MariaDB
Server version: 10.5.9-MariaDB-log MariaDB Server
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: utf8
Db characterset: utf8
Client characterset: utf8
Conn. characterset: utf8
UNIX socket: /tmp/mysql.sock
Uptime: 24 sec

Threads: 3 Questions: 20 Slow queries: 0 Opens: 17 Open tables: 11 Queries per second avg: 0.833
--------------

MariaDB [plan]>

MariaDB [plan]> show tables;
------------------------

Tables_in_plan

------------------------

denodo_camp_promo_view

------------------------
1 row in set (0.000 sec)

MariaDB [plan]> select * from denodo_camp_promo_view;
Empty set (0.001 sec)

MariaDB [plan]>

TestInsertQeuryIssue_Denodo.txt

Comment by Daniel Black [ 2023-12-17 ]

Cannot reproduce on latest 10.5 release:

MariaDB [testdb]> CREATE TABLE `denodo_camp_promo_view` ( `ID` decimal(15,0) DEFAULT NULL,   `name` varchar(80) DEFAULT NULL,   `startdate` date DEFAULT NULL,   `enddate` date DEFAULT NULL,  `ownerid` varchar(18) DEFAULT NULL, `promotion_code__c` varchar(255) DEFAULT NULL,  `PROMOCODE_DETAILS` varchar(321) DEFAULT NULL );
Query OK, 0 rows affected (0.018 sec)
 
MariaDB [testdb]> INSERT INTO denodo_camp_promo_view (ID, name, startdate, enddate, ownerid, promotion_code__c, PROMOCODE_DETAILS) SELECT ROW_NUMBER() OVER (ORDER BY (SELECT NULL)),NULL,NULL,NULL,NULL,NULL,'NA';
Query OK, 1 row affected (0.003 sec)
Records: 1  Duplicates: 0  Warnings: 0
 
MariaDB [testdb]> \s
--------------
mariadb  Ver 15.1 Distrib 10.5.23-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2
 
Connection id:		28000
Current database:	testdb
Current user:		root@localhost
SSL:			Not in use
Current pager:		stdout
Using outfile:		''
Using delimiter:	;
Server:			MariaDB
Server version:		10.5.23-MariaDB-1:10.5.23+maria~ubu2004 mariadb.org binary distribution
Protocol version:	10
Connection:		Localhost via UNIX socket
Server characterset:	utf8mb4
Db     characterset:	utf8mb4
Client characterset:	utf8
Conn.  characterset:	utf8
UNIX socket:		/run/mysqld/mysqld.sock
Uptime:			4 days 14 hours 34 min 33 sec
 
Threads: 22  Questions: 56142  Slow queries: 0  Opens: 27  Open tables: 20  Queries per second avg: 0.141
--------------
 
MariaDB [testdb]> select version();
+-----------------------------------------+
| version()                               |
+-----------------------------------------+
| 10.5.23-MariaDB-1:10.5.23+maria~ubu2004 |
+-----------------------------------------+
1 row in set (0.001 sec)

Comment by Daniel Black [ 2023-12-17 ]

is fixed somewhere between 10.5.9 and 10.5.23.

Comment by R S N Murthy [ 2023-12-18 ]

Thank you for providing the fix, Please help with version upgrade steps for a Master Slave environment. we have used mariadb-10.5.9-linux-x86_64.tar.gz tar ball extract in present setup.

Comment by Daniel Black [ 2023-12-18 ]

JIRA is for bug reports and not support sorry. See https://mariadb.com/kb/en/getting-help-with-mariadb/ if below isn't sufficient.

Basics steps are there as 10.5.23 tarball here. It needs to replace your existing instance. Keep in mind your data dir is within your current mariadb installation. Update Slave first and then master. Ensure current instance is stopped before new instance is started. Run mariadb-upgrade afterwards on both master and slave. Keep a backup.

Comment by R S N Murthy [ 2023-12-18 ]

That certainly helps. Thank you very much

Generated at Thu Feb 08 10:35:56 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.