[MDEV-9006] MariaDB crashes executing attached query Created: 2015-10-24  Updated: 2015-11-10  Resolved: 2015-11-10

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - XtraDB, Views
Affects Version/s: 10.0.21-galera
Fix Version/s: 10.0.22, 10.1.9

Type: Bug Priority: Minor
Reporter: Jan Hicken Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: upstream-fixed
Environment:

OS: Arch Linux
Hardware: Intel NUC DN2820FYKH


Attachments: File debug.sql     File error.sql     File my.cnf    
Issue Links:
Duplicate
duplicates MDEV-8525 mariadb 10.0.20 crashing when data is... Closed

 Description   

When creating the database "debug" using the attached SQL statements in debug.sql and then executing the attachedf query error.sql, the database server crashes producing the following stack trace in my systemd-journal:

Okt 24 15:11:55 nuc mysqld[2726]: 151024 15:11:55 [ERROR] mysqld got signal 11 ;
Okt 24 15:11:55 nuc mysqld[2726]: This could be because you hit a bug. It is also possible that this binary
Okt 24 15:11:55 nuc mysqld[2726]: or one of the libraries it was linked against is corrupt, improperly built,
Okt 24 15:11:55 nuc mysqld[2726]: or misconfigured. This error can also be caused by malfunctioning hardware.
Okt 24 15:11:55 nuc mysqld[2726]: To report this bug, see http://kb.askmonty.org/en/reporting-bugs
Okt 24 15:11:55 nuc mysqld[2726]: We will try our best to scrape up some info that will hopefully help
Okt 24 15:11:55 nuc mysqld[2726]: diagnose the problem, but since we have already crashed,
Okt 24 15:11:55 nuc mysqld[2726]: something is definitely wrong and this may fail.
Okt 24 15:11:55 nuc mysqld[2726]: Server version: 10.0.21-MariaDB-log
Okt 24 15:11:55 nuc mysqld[2726]: key_buffer_size=16777216
Okt 24 15:11:55 nuc mysqld[2726]: read_buffer_size=262144
Okt 24 15:11:55 nuc mysqld[2726]: max_used_connections=11
Okt 24 15:11:55 nuc mysqld[2726]: max_threads=153
Okt 24 15:11:55 nuc mysqld[2726]: thread_count=11
Okt 24 15:11:55 nuc mysqld[2726]: It is possible that mysqld could use up to
Okt 24 15:11:55 nuc mysqld[2726]: key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 136891 K  bytes of memory
Okt 24 15:11:55 nuc mysqld[2726]: Hope that's ok; if not, decrease some variables in the equation.
Okt 24 15:11:55 nuc mysqld[2726]: Thread pointer: 0x0x7fa1c261f148
Okt 24 15:11:55 nuc mysqld[2726]: Attempting backtrace. You can use the following information to find out
Okt 24 15:11:55 nuc mysqld[2726]: where mysqld died. If you see no messages after this, something went
Okt 24 15:11:55 nuc mysqld[2726]: terribly wrong...
Okt 24 15:11:55 nuc mysqld[2726]: stack_bottom = 0x7fa1d3319e80 thread_stack 0x48000
Okt 24 15:11:55 nuc mysqld[2726]: /usr/bin/mysqld(my_print_stacktrace+0x3d)[0x5623bfd8c56d]
Okt 24 15:11:55 nuc mysqld[2726]: /usr/bin/mysqld(handle_fatal_signal+0x33d)[0x5623bf90358d]
Okt 24 15:11:55 nuc mysqld[2726]: /usr/lib/libpthread.so.0(+0x10d60)[0x7fa1e4b5dd60]
Okt 24 15:11:55 nuc mysqld[2726]: /usr/bin/mysqld(_ZN10Item_fieldC2EP5Field+0x9)[0x5623bf91d429]
Okt 24 15:11:55 nuc mysqld[2726]: /usr/bin/mysqld(_ZN14Item_subselect18get_tmp_table_itemEP3THD+0x6e)[0x5623bf982efe]
Okt 24 15:11:55 nuc mysqld[2726]: /usr/bin/mysqld(_ZN20Item_direct_view_ref18get_tmp_table_itemEP3THD+0x11)[0x5623bf92a161]
Okt 24 15:11:55 nuc mysqld[2726]: /usr/bin/mysqld(_ZN4JOIN10exec_innerEv+0x19bc)[0x5623bf7fa3ac]
Okt 24 15:11:55 nuc mysqld[2726]: /usr/bin/mysqld(_ZN4JOIN4execEv+0x11)[0x5623bf7fb111]
Okt 24 15:11:55 nuc mysqld[2726]: /usr/bin/mysqld(_Z12mysql_selectP3THDPPP4ItemP10TABLE_LISTjR4ListIS1_ES2_jP8st_orderSB_S2_SB_yP13select_resultP18st_select_lex_unitP13st_select_lex+0x1f9)[0x5623bf7f7db9]
Okt 24 15:11:55 nuc mysqld[2726]: /usr/bin/mysqld(_Z13handle_selectP3THDP3LEXP13select_resultm+0x172)[0x5623bf7f8602]
Okt 24 15:11:55 nuc mysqld[2726]: /usr/bin/mysqld(+0x3c0b79)[0x5623bf79ab79]
Okt 24 15:11:55 nuc mysqld[2726]: /usr/bin/mysqld(_Z21mysql_execute_commandP3THD+0x5a09)[0x5623bf7a7249]
Okt 24 15:11:55 nuc mysqld[2726]: /usr/bin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_state+0x1e2)[0x5623bf7a8f42]
Okt 24 15:11:55 nuc systemd[1]: mysqld.service: Main process exited, code=exited, status=1/FAILURE
Okt 24 15:11:55 nuc systemd[1]: mysqld.service: Unit entered failed state.
Okt 24 15:11:55 nuc systemd[1]: mysqld.service: Failed with result 'exit-code'.
Okt 24 15:11:55 nuc systemd[1]: mysqld.service: Service hold-off time over, scheduling restart.
Okt 24 15:11:56 nuc systemd[1]: Stopped MariaDB database server.

The database is used for a Kodi library. If you omit the "ORDER BY" part of the query, there will be no error.



 Comments   
Comment by Elena Stepanova [ 2015-10-24 ]

Could you please also attach your cnf file(s)? Thanks.

Comment by Jan Hicken [ 2015-10-25 ]

Uploaded my cnf file. That's the one supplied by the Arch Linux package recommended for medium sized systems.

Comment by Elena Stepanova [ 2015-10-25 ]

On some reason, I cannot reproduce the crash with the provided data and query, but it is not overly important, because we already have this bug reported, it's MDEV-8525 – also with Kodi, Arch Linux, same stack trace in the comments. However, it would be useful to check that the fix for MDEV-8525, when we have it, fixes this flavor of the problem as well. So, I will keep the bug open until MDEV-8525 is fixed. The current plan is to fix it in the upcoming 10.0.22 release, but until it is done, there is no guarantee.

Brinox, will you be willing to take the bug fix as soon as it appears i our tree and build locally, or do you prefer to wait till it's released?

Comment by Jan Hicken [ 2015-10-25 ]

Ok, I see. I'd like to apply a patch to fix this issue and build the application locally.

I've added myself as a watcher to the beforementioned issue and will update this issue as soon as there's a fix available.

Comment by Elena Stepanova [ 2015-10-25 ]

Brinox,
Thanks, and thank you for the provided test case. It does happen sometimes that SIGSEGV is triggered on some machines/builds but not others, I suppose we just had bad luck here.

Comment by Jan Hicken [ 2015-11-10 ]

I just tested this in my setup, the error is gone. Fixed by MDEV-8525

Comment by Elena Stepanova [ 2015-11-10 ]

Thanks for checking

Generated at Thu Feb 08 07:31:26 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.