[MDEV-20257] Server crashes in Grant_table_base::init_read_record upon crash-upgrade Created: 2019-08-05  Updated: 2020-04-27  Resolved: 2020-04-27

Status: Closed
Project: MariaDB Server
Component/s: Authentication and Privilege System
Affects Version/s: 10.4
Fix Version/s: 10.4.13

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: None

Attachments: File data.tar.gz    

 Description   

10.4 60a37783

#3  <signal handler called>
#4  0x000055b93dd6747d in init_read_record (info=0x7ffc5df2c8c0, thd=0x0, table=0x55b94169cd40, select=0x0, filesort=0x0, use_record_cache=1, print_error=true, disable_rr_cache=false) at /data/src/10.4/sql/records.cc:303
#5  0x000055b93d7ed579 in Grant_table_base::init_read_record (this=0x7ffc5df2cd98, info=0x7ffc5df2c8c0) at /data/src/10.4/sql/sql_acl.cc:792
#6  0x000055b93d7c5525 in acl_load (thd=0x55b940af6280, tables=...) at /data/src/10.4/sql/sql_acl.cc:2324
#7  0x000055b93d7c6de1 in acl_reload (thd=0x55b940af6280) at /data/src/10.4/sql/sql_acl.cc:2693
#8  0x000055b93d7c531e in acl_init (dont_read_acl_tables=false) at /data/src/10.4/sql/sql_acl.cc:2278
#9  0x000055b93d766167 in mysqld_main (argc=11, argv=0x55b9409c6a48) at /data/src/10.4/sql/mysqld.cc:5758
#10 0x000055b93d75a940 in main (argc=11, argv=0x7ffc5df2d3c8) at /data/src/10.4/sql/main.cc:25

To reproduce:

  • start fresh 10.2/10.3 server with all defaults;
  • run CREATE USER foo@localhost;
  • SIGKILL the server;
  • start 10.4 server with all defaults on the same datadir.

Example of a datadir created on 10.2 05b35cf4 is attached as data.tar.gz.



 Comments   
Comment by Sergei Golubchik [ 2020-04-25 ]

I'm awfully sorry, I had this browser tab open for a while and then I didn't notice it was IN REVIEW and fixed it.
I had a rather simpler change though, similar to what sql_handler.cc does — back up and restore thd->open_tables.

Here: https://github.com/MariaDB/server/commit/6dab094fbd3

Generated at Thu Feb 08 08:58:05 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.