Bug 242914 - databases/mariadb104-server: mysqld --help --verbose crashes (upstream: MDEV-15795)
Summary: databases/mariadb104-server: mysqld --help --verbose crashes (upstream: MDEV-...
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Many People
Assignee: Bernard Spil
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-12-27 16:31 UTC by Wouter Oosterveld
Modified: 2019-12-27 16:36 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (brnrd)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Wouter Oosterveld 2019-12-27 16:31:55 UTC
If you run mysqld of mariadb104-server with options --help and --verbose it crashes with SIGSEGV or SIGILL (seen both).

---8<---

# /usr/local/libexec/mysqld --help --verbose
2019-12-27 16:52:16 0 [Note] Plugin 'FEEDBACK' is disabled.
2019-12-27 16:52:16 0 [Warning] Could not open mysql.plugin table. Some options may be missing from the help text
/usr/local/libexec/mysqld  Ver 10.4.11-MariaDB for FreeBSD12.0 on amd64 (FreeBSD Ports)
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Starts the MariaDB database server.

Usage: /usr/local/libexec/mysqld [OPTIONS]

Default options are read from the following files in the given order:
/usr/local/etc/my.cnf /usr/local/etc/mysql/my.cnf ~/.my.cnf 
The following groups are read: mysqld server mysqld-10.4 mariadb mariadb-10.4 mariadbd mariadbd-10.4 client-server galera
The following options may be given as the first argument:
--print-defaults          Print the program argument list and exit.
--no-defaults             Don't read default options from any option file.
The following specify which files/extra groups are read (specified before remaining options):
--defaults-file=#         Only read default options from the given file #.
--defaults-extra-file=#   Read this file after the global files are read.
--defaults-group-suffix=# Additionally read default groups with # appended as a suffix.
(...)
wsrep-slave-FK-checks                                      TRUE
wsrep-slave-UK-checks                                      FALSE
wsrep-slave-threads                                        1
wsrep-sst-auth                                             (No default value)
wsrep-sst-donor                                            
wsrep-sst-donor-rejects-queries                            FALSE
wsrep-sst-method                                           rsync
wsrep-sst-receive-address                                  AUTO
wsrep-start-position                                       00000000-0000-0000-0000-000000000000:-1
wsrep-sync-wait                                            0
wsrep-trx-fragment-size                                    0
wsrep-trx-fragment-unit                                    bytes

To see what variables a running MySQL server is using, type
'mysqladmin variables' instead of 'mysqld --verbose --help'.
Illegal instruction (core dumped)

--->8---

This is a known issue upstream: https://jira.mariadb.org/browse/MDEV-15795

Fix is to remove a line from mysys/thr_timer.c:

# cat files/patch-mysys_thr__timer.c 
--- mysys/thr_timer.c.orig	2019-12-27 15:39:16 UTC
+++ mysys/thr_timer.c
@@ -85,7 +85,6 @@ my_bool init_thr_timer(uint alloc_timers)
   /* Create a thread to handle timers */
   pthread_attr_init(&thr_attr);
   pthread_attr_setscope(&thr_attr,PTHREAD_SCOPE_PROCESS);
-  pthread_attr_setstacksize(&thr_attr,8196);
   thr_timer_inited= 1;
   if (mysql_thread_create(key_thread_timer, &timer_thread, &thr_attr,
                           timer_handler, NULL))