MariaDB crash with specific query

Description

When we run a specific query, it makes MariaDb crash

Dec 16 18:14:48 wdevl01 mysqld: Some pointers may be invalid and cause the dump to abort.
Dec 16 18:14:48 wdevl01 mysqld: Query (0x32b8fc9d020): is an invalid pointer
Dec 16 18:14:48 wdevl01 mysqld: Connection ID (thread ID): 543
Dec 16 18:14:48 wdevl01 mysqld: Status: NOT_KILLED

We tested the query on MariaDB 10.0.22 and 10.1.9 and both crash the same way.
Executing the query using PHP or direct via myqsl CLI result in a crash.
Running the exact same query on the same imported database on Mysql 5.5.46 doesn't crash.

The query and full logs are in the attached mariadb_query_logs.txt. A database dump with relevant tables to reproduce the crash is provided with database_dump.zip.

Trying different mariadb configurations (buffer, etc) did not have an impact on the issue.
Switching back to the default debian config with slight changes result in a crash too (current mariadb config is also attached)

I checked the opened bugs and did not find one similar to this one.
Feel of course free to ask for more info if needed and btw, thanks for your work !

Sébastien Fiquemont - Ciméos

Environment

Linux Debian 8 64 bits
LAMP server (web development server)
2cpu/4Go ram

mariaDB packages (rom mariaDB apt repository)
ii libmariadbclient18 10.1.9+maria-1~jessie amd64 MariaDB database client library
ii mariadb-client-10.1 10.1.9+maria-1~jessie amd64 MariaDB database client binaries
ii mariadb-client-core-10.1 10.1.9+maria-1~jessie amd64 MariaDB database core client binaries
ii mariadb-common 10.1.9+maria-1~jessie all MariaDB database common files (e.g. /etc/mysql/conf.d/mariadb.cnf)
ii mariadb-server-10.1 10.1.9+maria-1~jessie amd64 MariaDB database server binaries
ii mariadb-server-core-10.1 10.1.9+maria-1~jessie amd64 MariaDB database core server files

Status

Assignee

Vicențiu Ciorbaru

Reporter

CimeosC

Labels

External issue ID

None

External issue ID

None

Sprint

None

Fix versions

Affects versions

10.0
10.1
5.5

Priority

Critical