[debian-mysql] Bug#989170: mariadb-server-10.5: mariadb-10.5.9 segfault on some SELECT

Olivier Bonvalet ob.reportbug at daevel.fr
Thu May 27 12:51:20 BST 2021


Package: mariadb-server-10.5
Version: 1:10.5.9-1
Severity: important
Tags: upstream
X-Debbugs-Cc: ob.reportbug at daevel.fr

Dear Maintainer,

MariaDB 10.5.9 was crashing on our database, on some SELECT queries.
Problem was also reproduced with the Docker version of MariaDB 10.5.9.

By testing with Docker's MariaDB 10.5.10, we see that the last version
of MariaDB 10.5.x doesn't have the problem.

Next, I've installed the Debian's MariaDB 10.5.10-2 from unstable repository,
which also fixed our problem.
So please, include version 10.5.10 in Debian Bullseye release.

The stack trace :

mariadbd[2009289]: 210527  9:42:24 [ERROR] mysqld got signal 11 ;
mariadbd[2009289]: This could be because you hit a bug. It is also possible that this binary
mariadbd[2009289]: or one of the libraries it was linked against is corrupt, improperly built,
mariadbd[2009289]: or misconfigured. This error can also be caused by malfunctioning hardware.
mariadbd[2009289]: To report this bug, see https://mariadb.com/kb/en/reporting-bugs
mariadbd[2009289]: We will try our best to scrape up some info that will hopefully help
mariadbd[2009289]: diagnose the problem, but since we have already crashed,
mariadbd[2009289]: something is definitely wrong and this may fail.
mariadbd[2009289]: Server version: 10.5.9-MariaDB-1-log
mariadbd[2009289]: key_buffer_size=268435456
mariadbd[2009289]: read_buffer_size=131072
mariadbd[2009289]: max_used_connections=261
mariadbd[2009289]: max_threads=65537
mariadbd[2009289]: thread_count=68
mariadbd[2009289]: It is possible that mysqld could use up to
mariadbd[2009289]: key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 143074107 K  bytes of memory
mariadbd[2009289]: Hope that's ok; if not, decrease some variables in the equation.
mariadbd[2009289]: Thread pointer: 0x7eb58c0365d8
mariadbd[2009289]: Attempting backtrace. You can use the following information to find out
mariadbd[2009289]: where mysqld died. If you see no messages after this, something went
mariadbd[2009289]: terribly wrong...
mariadbd[2009289]: stack_bottom = 0x7eb66a53ec88 thread_stack 0x49000
mariadbd[2009289]: ??:0(my_print_stacktrace)[0x55a8c7f8f93e]
mariadbd[2009289]: ??:0(handle_fatal_signal)[0x55a8c7a9e7c5]
mariadbd[2009289]: ??:0(__restore_rt)[0x7f0247966140]
mariadbd[2009289]: ??:0(Type_handler_newdecimal::calc_pack_length(unsigned int) const)[0x55a8c775a818]
mariadbd[2009289]: ??:0(SEL_ARG::tree_delete(SEL_ARG*))[0x55a8c7bd8143]
mariadbd[2009289]: ??:0(SEL_ARG::tree_delete(SEL_ARG*))[0x55a8c7bd8a8a]
mariadbd[2009289]: ??:0(SEL_IMERGE::and_sel_tree(RANGE_OPT_PARAM*, SEL_TREE*, SEL_IMERGE*))[0x55a8c7bd9223]
mariadbd[2009289]: ??:0(Item_cond_and::get_mm_tree(RANGE_OPT_PARAM*, Item**))[0x55a8c7bd944b]
mariadbd[2009289]: ??:0(SQL_SELECT::test_quick_select(THD*, Bitmap<64u>, unsigned long long, unsigned long long, bool, bool, bool, bool))[0x55a8c7bdeeab]
mariadbd[2009289]: ??:0(JOIN::make_notnull_conds_for_range_scans())[0x55a8c790917f]
mariadbd[2009289]: ??:0(JOIN::optimize_inner())[0x55a8c790dc5c]
mariadbd[2009289]: ??:0(JOIN::optimize())[0x55a8c790e1e3]
mariadbd[2009289]: ??:0(mysql_select(THD*, TABLE_LIST*, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*))[0x55a8c790e2a3]
mariadbd[2009289]: ??:0(handle_select(THD*, LEX*, select_result*, unsigned long))[0x55a8c790ed48]
mariadbd[2009289]: ??:0(comp_ne_creator(bool))[0x55a8c789f921]
mariadbd[2009289]: ??:0(mysql_execute_command(THD*))[0x55a8c78ac4d0]
mariadbd[2009289]: ??:0(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x55a8c78ade1b]
mariadbd[2009289]: ??:0(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x55a8c78b0b88]
mariadbd[2009289]: ??:0(do_command(THD*))[0x55a8c78b1ba9]
mariadbd[2009289]: ??:0(tp_callback(TP_connection*))[0x55a8c7a33cf1]
mariadbd[2009289]: ??:0(get_event(worker_thread_t*, thread_group_t*, timespec*))[0x55a8c7c4290d]
mariadbd[2009289]: ??:0(MyCTX_nopad::finish(unsigned char*, unsigned int*))[0x55a8c7cd7602]
mariadbd[2009289]: ??:0(start_thread)[0x7f024795aea7]
mariadbd[2009289]: ??:0(clone)[0x7f0247571def]
mariadbd[2009289]: Trying to get some variables.
mariadbd[2009289]: Some pointers may be invalid and cause the dump to abort.
mariadbd[2009289]: Query (0x7eb58c00dd80): SELECT all_products.code_ean, all_products.id_marchand, all_products.id_marchand_format,

Thanks,

-- System Information:
Debian Release: 11.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 5.10.0-5-amd64 (SMP w/56 CPU threads)
Kernel taint flags: TAINT_FIRMWARE_WORKAROUND
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages mariadb-server-10.5 depends on:
ii  adduser                   3.118
ii  debconf [debconf-2.0]     1.5.75
ii  galera-4                  26.4.7-3
ii  gawk                      1:5.1.0-1
ii  iproute2                  5.10.0-4
ii  libc6                     2.31-12
ii  libdbi-perl               1.643-3+b1
ii  libpam0g                  1.4.0-7
ii  libssl1.1                 1.1.1k-1
ii  libstdc++6                10.2.1-6
ii  lsb-base                  11.1.0
ii  lsof                      4.93.2+dfsg-1.1
ii  mariadb-client-10.5       1:10.5.10-2
ii  mariadb-common            1:10.5.10-2
ii  mariadb-server-core-10.5  1:10.5.10-2
ii  passwd                    1:4.8.1-1
ii  perl                      5.32.1-4
ii  procps                    2:3.3.17-5
ii  psmisc                    23.4-2
ii  rsync                     3.2.3-4
ii  socat                     1.7.4.1-3
ii  zlib1g                    1:1.2.11.dfsg-2

Versions of packages mariadb-server-10.5 recommends:
pn  libhtml-template-perl  <none>

Versions of packages mariadb-server-10.5 suggests:
pn  mailx           <none>
pn  mariadb-test    <none>
ii  netcat-openbsd  1.217-3

-- Configuration Files:
/etc/logrotate.d/mariadb changed:
/var/lib/mysql/mysqld.log /mysql.log /var/lib/mysql/mariadb.log /mysql-slow.log /mariadb-slow.log /error.log /processlist.log {
  # If any of the files listed above is missing, skip them silently without
  # emitting any errors
  missingok
  # If file exists but is empty, don't rotate it
  notifempty
  # Run everyday
  daily
  # Keep 5 days of logs
  rotate 5
  # If file is growing too big, rotate immediately
  maxsize 500M
  # Compress logs, as they are text and compression will save a lot of disk space
  compress
  # Don't compress the log immediately to avoid errors about "file size changed while zipping"
  delaycompress
  # Don't run the postrotate script for each file configured in this file, but
  # run it only once if one or more files were rotated
  sharedscripts
  # After each rotation, run this custom script to flush the logs. Note that
  # this assumes that the mariadb-admin command has database access, which it
  # has thanks to the default use of Unix socket authentication for the 'root'
  # account used everywhere since MariaDB 10.4.
  postrotate
    if test -x /etc/mysql/debian.cnf
    then
      EXTRAPARAM='--defaults-file=/etc/mysql/debian.cnf'
    fi
    if test -x /usr/bin/mariadb-admin
    then
      /usr/bin/mariadb-admin $EXTRAPARAM --local flush-error-log \
        flush-engine-log flush-general-log flush-slow-log
    fi
  endscript
}

/etc/mysql/mariadb.conf.d/50-server.cnf changed:
[server]
[mysqld]
user                    = mysql
pid-file                = /run/mysqld/mysqld.pid
basedir                 = /usr
datadir                 = /var/lib/mysql
tmpdir                  = /tmp
lc-messages-dir         = /usr/share/mysql
lc-messages             = en_US
skip-external-locking
character-set-server  = utf8mb4
collation-server      = utf8mb4_general_ci
[embedded]
[mariadb]
[mariadb-10.5]


-- debconf information excluded



More information about the pkg-mysql-maint mailing list