[Bug 381904] Re: mysql dies on simple select

Arkadiusz Miśkiewicz arekm at pld-linux.org
Tue Aug 18 12:34:47 CEST 2009


** Changed in: pld-linux
       Status: New => Fix Released

-- 
mysql dies on simple select
https://bugs.launchpad.net/bugs/381904
You received this bug notification because you are subscribed to PLD
Linux.

Status in PLD Linux Distribution: Fix Released

Bug description:
[root at angua mysql]# service mysql stop
Stopping MySQL /var/lib/mysql service...............................................................................................................................[ DONE ]
[root at angua mysql]# rm /var/log/mysql/* /var/lib/mysql/mysqldb -rf
[root at angua mysql]# service mysql init                             
Initializing cluster /var/lib/mysql.................................................................................................................................
Installing MySQL system tables for /var/lib/mysql/mysqldb/db........................................................................................................[ DONE ]

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL USERS!
This is done, after starting database, in the order shown,
with:

For 'mysql_sysadmin' (RELOAD and SHUTDOWN privileges):
echo "update mysql.user set password=password('newpassword') where user='mysql_sysadmin'; FLUSH PRIVILEGES;" | mysql -u mysql -S /var/lib/mysql/mysqldb/mysql.sock

For 'mysql' user (ALL privileges, DB admin):
echo "update mysql.user set password=password('newpassword') where user='mysql'; FLUSH PRIVILEGES;" | mysql -u mysql -S /var/lib/mysql/mysqldb/mysql.sock

NOTE: mysql_sysadmin password should be placed to /var/lib/mysql/mysqld.conf in
mysqladmin section. See the manual for more instructions.
(This user is used at logs rotation and server shutdown)

Filling help tables.................................................................................................................................................[ DONE ]
[root at angua mysql]# service mysql start
Starting MySQL /var/lib/mysql service...............................................................................................................................[ DONE ]
_sysadmin'; FLUSH PRIVILEGES;" | mysql -u mysql -S /var/lib/mysql/mysqldb/mysql.sock                                                                                           <
[root at angua mysql]# echo "update mysql.user set password=password('newpassword') where user='mysql'; FLUSH PRIVILEGES;" | mysql -u mysql -S /var/lib/mysql/mysqldb/mysql.sock
[root at angua mysql]# mysqladmin -u mysql --password=newpassword create poczta         
[root at angua mysql]# echo "grant all privileges on poczta.* to poczta at localhost identified by 'poczta'; FLUSH PRIVILEGES;" | mysql -u mysql --password=mysql mysql
[root at angua mysql]# cat /tmp/poczta.dump
CREATE TABLE `exim_greylist` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `relay_ip` varchar(64) DEFAULT NULL,
  `from_domain` varchar(255) DEFAULT NULL,
  `block_expires` datetime NOT NULL,
  `record_expires` datetime NOT NULL,
  `origin_type` enum('MANUAL','AUTO') NOT NULL DEFAULT 'AUTO',
  `create_time` datetime NOT NULL,
  PRIMARY KEY (`id`)
);

CREATE TABLE `mailboxes` (
  `domain` varchar(255) NOT NULL DEFAULT '',
  `username` varchar(255) NOT NULL DEFAULT '',
  `passwd` varchar(255) NOT NULL DEFAULT '',
  `alias` varchar(255) NOT NULL DEFAULT '',
  `remove_spam` tinyint(4) NOT NULL DEFAULT '0',
  `move_to_spam_folder` tinyint(4) NOT NULL DEFAULT '0',
  `do_not_mark_spam` tinyint(4) NOT NULL DEFAULT '0'
);

INSERT INTO `mailboxes` VALUES ('example.com','adamg','9dd4e461268c8034f5c8564e155c67a6','',0,0,0);
[root at angua mysql]# mysql -u poczta --password=poczta poczta < /tmp/poczta.dump
[root at angua mysql]# echo 'SELECT * FROM mailboxes;' | mysql -u poczta --password=poczta poczta
ERROR 2013 (HY000) at line 1: Lost connection to MySQL server during query
[root at angua mysql]# cat /var/log/mysql/mysqld.log
InnoDB: The first specified data file /var/lib/mysql/mysqldb/db/ibdata1 did not exist:
InnoDB: a new database to be created!
090530 17:03:17  InnoDB: Setting file /var/lib/mysql/mysqldb/db/ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
090530 17:03:17  InnoDB: Log file /var/lib/mysql/mysqldb/db/ib_logfile0 did not exist: new to be created
InnoDB: Setting log file /var/lib/mysql/mysqldb/db/ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
090530 17:03:17  InnoDB: Log file /var/lib/mysql/mysqldb/db/ib_logfile1 did not exist: new to be created
InnoDB: Setting log file /var/lib/mysql/mysqldb/db/ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
090530 17:03:17  InnoDB: Started; log sequence number 0 0
090530 17:03:17  InnoDB: Starting shutdown...
090530 17:03:19  InnoDB: Shutdown completed; log sequence number 0 46409
090530 17:03:19 [Warning] Forcing shutdown of 1 plugins
090530 17:03:19  InnoDB: Started; log sequence number 0 46409
090530 17:03:19  InnoDB: Starting shutdown...
090530 17:03:20  InnoDB: Shutdown completed; log sequence number 0 46409
090530 17:03:20 [Warning] Forcing shutdown of 1 plugins
090530 17:03:24  InnoDB: Started; log sequence number 0 46409
090530 17:03:24 [Note] Event Scheduler: Loaded 0 events
090530 17:03:24 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.1.34-log'  socket: '/var/lib/mysql/mysqldb/mysql.sock'  port: 0  PLD Linux Distribution MySQL RPM
090530 17:05: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=8384512
read_buffer_size=131072
max_used_connections=1
max_threads=151
threads_connected=1
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 337743 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd: 0x8b1a0b8
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 = 0xb489936c thread_stack 0x30000
/usr/sbin/mysqld(my_print_stacktrace+0x29) [0x8478b3f]
/usr/sbin/mysqld(handle_segfault+0x4bd) [0x81cf450]
[0xb80a4400]
/usr/sbin/mysqld(QUERY_PROFILE::new_status(char const*, char const*, char const*, unsigned int)+0x68) [0x825151a]
/usr/sbin/mysqld(PROFILING::status_change(char const*, char const*, char const*, unsigned int)+0x51) [0x82515dd]
/usr/sbin/mysqld(set_thd_proc_info+0x4a) [0x81be46b]
/usr/sbin/mysqld(check_access(THD*, unsigned long, char const*, unsigned long*, bool, bool, bool)+0x92) [0x81d8382]
/usr/sbin/mysqld(check_table_access(THD*, unsigned long, TABLE_LIST*, unsigned int, bool)+0x206) [0x81d8d2c]
/usr/sbin/mysqld(mysql_execute_command(THD*)+0x59e) [0x81dc75b]
/usr/sbin/mysqld(mysql_parse(THD*, char const*, unsigned int, char const**)+0x2f1) [0x81e3cbf]
/usr/sbin/mysqld(dispatch_command(enum_server_command, THD*, char*, unsigned int)+0xdcc) [0x81e4f7e]
/usr/sbin/mysqld(do_command(THD*)+0xf5) [0x81e589d]
/usr/sbin/mysqld(handle_one_connection+0x32a) [0x81d6003]
/lib/libpthread.so.0 [0xb8088522]
/lib/libpthread.so.0 [0xb808843d]
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 0x8b6a360 = SELECT * FROM mailboxes
thd->thread_id=6
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.
[root at angua mysql]#


More information about the pld-bugs mailing list