Bug #46335 MySQL thread crashes on grant command
Submitted: 22 Jul 2009 7:17 Modified: 22 Aug 2009 7:42
Reporter: Ruturaj Vartak Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: General Severity:S1 (Critical)
Version:5.1.34 OS:Linux (compiled from source ()
Assigned to: CPU Architecture:Any
Tags: 5.1, crash, grant

[22 Jul 2009 7:17] Ruturaj Vartak
Description:
A grant statement crashes the thread,
here is error trace
======================================
090722 12:45:47 - mysqld got signal 11 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help diagnose
the problem, but since we have already crashed, something is definitely wrong
and this may fail.

key_buffer_size=33554432
read_buffer_size=1048576
max_used_connections=1
max_threads=50
threads_connected=2
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 135484 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd: 0x8a733f8
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0xb3154ac8 thread_stack 0x30000
/usr/local/mysql-5.1/libexec/mysqld(unsigned long+0x29) [0x854a679]
/usr/local/mysql-5.1/libexec/mysqld(unsigned char+0x429) [0x81ff5e9]
[0xb7f6e420]
/usr/local/mysql-5.1/libexec/mysqld [0x82af8be]
/usr/local/mysql-5.1/libexec/mysqld(mysql_create_user(THD*, List<st_lex_user>&)+0x134) [0x82a94b4]
/usr/local/mysql-5.1/libexec/mysqld(mysql_execute_command(THD*)+0x4465) [0x820f885]
/usr/local/mysql-5.1/libexec/mysqld(mysql_parse(THD*, char const*, unsigned, char const**)+0x13a) [0x8213bba]
/usr/local/mysql-5.1/libexec/mysqld(dispatch_command(enum_server_command, THD*, char*, unsigned)+0x4b6) [0x8209ed6]
/usr/local/mysql-5.1/libexec/mysqld(do_command(THD*)+0xeb) [0x82099cb]
/usr/local/mysql-5.1/libexec/mysqld(unsigned char+0xc8) [0x8207bc8]
/lib/tls/libpthread.so.0 [0xb7f5cb63]
/lib/tls/libc.so.6(__clone+0x5a) [0xb7dbe18a]
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 0x8aa1448 = CREATE USER 'localtest'@'localhost' IDENTIFIED BY 'pass1'
thd->thread_id=2
thd->killed=NOT_KILLED
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.
====================================================

Here is the kernel info
=====================
Linux node-2 2.6.18 #1 SMP PREEMPT Tue Nov 25 14:47:31 IST 2008 i686 GNU/Linux
=====================

How to repeat:
try to create a new user
[22 Jul 2009 7:28] Sveta Smirnova
Thank you for the report.

We have similar bug #45327 when user had same problem after binary upgrade. Have you upgraded from previous version? Have you run mysql_upgrade?
[22 Jul 2009 7:38] Ruturaj Vartak
an update on the mysql.user table was done accomodate prev. users

the DB was imported from a mysqldump file (.sql), the upgrade script wasn't run
[22 Jul 2009 7:42] Sveta Smirnova
Thank you for the feedback.

Please run mysql_upgrade anyway and inform us if it solves the problem.
[22 Aug 2009 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".