Details
-
Bug
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
10.3.15, 10.4.6
-
None
-
None
-
FreeBSD 11.2 amd64
Description
I've encountered a reproducible crash in 10.4.6 (hangs in 10.3.14/15/16).
Workaround:
Disable slow query log
Information:
Crashes and hang happens in debug and release builds.
Executing the attached query using mariadb c++ connector (crash.cpp) against 10.4.6 causes a crash
Executing the same query via the command line (test.sql) works correctly.
Executing the same expanded query (without parameters) works correctly (c++ connector, and command-line).
I repeated the same test on 10.3.14/15/16, and cpu goes to 90%, client never gets a reply... no timeout. Can supply debug trace.
After further investigation, the crash happens under the following conditions:
slow-query-log is enabled
using libmaridb.so.3 (test program attached)
Command Line:
[as used with attached files]
./mysqld --defaults-file=../../my.cnf -u mysql --basedir="${PWD}" --datadir=/tmp/mysql-data/10.4 --socket=/var/run/mysql/.sock --debug
[after further investigation...]
./mysqld --no-defaults -u mysql --basedir="${PWD}" --datadir=/tmp/mysql-data/10.4 --socket=/var/run/mysql/.sock --slow-query-log --debug
Attached Files:
lldb-10.4.txt: lldb session
mysqld-10.5.trace.tgz: mysqld.trace (15MB) (omitted after further investigation, can send on request)
my.cnf: Used config
test-db.sql: Database causing the issue
crash.cpp: Test program exhibiting the issue
test.sql: SQL for same query, that works correctly when executed from mysql command line.
System: FreeBSD 11.2-STABLE FreeBSD 11.2-STABLE #21 r346749: Fri Apr 26 15:55:57 UTC 2019 /usr/obj/usr/src/sys/GENERIC amd64
Building:
- cmake . \
-DCONC_WITH_SSL=ON \
-DCONC_WITH_UNIT_TESTS=OFF \
-DCONNECT_WITH_JDBC=OFF \
-DCONNECT_WITH_MONGO=OFF \
-DCONNECT_WITH_ODBC=ON \
-DCONNECT_WITH_VCT=ON \
-DENABLED_PROFILING=OFF \
-DPLUGIN_MROONGA=NO \
-DPLUGIN_ROCKSDB=NO \
-DWITH_INNODB_SNAPPY=OFF \
-DPLUGIN_ROCKSDB=NO \
-DPLUGIN_SPIDER=NO \
-DPLUGIN_TOKUDB=NO \
-DCMAKE_BUILD_TYPE=Debug - cmake --build . --config Debug – -j8
Notes:
I investigated this after encountering no response from the 10.3.14 after adding some indexes to the `feature` table and modifying a query.