Bug #20320 big query can't run on slave server while it can run on master server
Submitted: 7 Jun 2006 15:55 Modified: 3 Aug 2006 16:08
Reporter: Patrick Asia Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:Any OS:Linux (Linux)
Assigned to: CPU Architecture:Any

[7 Jun 2006 15:55] Patrick Asia
Description:
Big query can't run  on slave server while it can run on master server.

After issue big query on slave server, it would do for a while.  Then all mysql process hanged and mysqld attempt to restart itself.  However, the restart always fail and display the port 3306 already bind.

How to repeat:
Create a table and insert 3 million records
Then run a big query which has group by clause

e.g.

create table banktransaction
(
id int not null auto_increment primary key,
amount int not null
createdate date not null,
index(createdate)
)

select count(*), sum(amount), createdate from banktransaction group by createdate;
[8 Jun 2006 12:45] Valeriy Kravchuk
Thank you for a problem report. Please, send EXPLAIN results for this query from your master and from slave. Send my.cnf files content from both servers. Are you sure that your slave has enough free disk space to execute that query?

Exect versions of master and slave will be also useful.
[10 Jun 2006 19:08] Patrick Asia
>mysql -V
mysql  Ver 11.18 Distrib 3.23.58, for pc-linux (i686)

>df -m
/dev/sda1               133776     14999    111982  12% /

060610 14:59:09  InnoDB: Assertion failure in thread 114696 in file ../include/page0page.ic line 482
InnoDB: We intentionally generate a memory trap.
InnoDB: Send a detailed bug report to mysql@lists.mysql.com
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=33550336
record_buffer=1531904
sort_buffer=2097144
max_used_connections=14
max_connections=1500
threads_connected=15
It is possible that mysqld could use up to
key_buffer_size + (record_buffer + sort_buffer)*max_connections = 1154448 K
bytes of memory
Hope that's ok, if not, decrease some variables in the equation

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...
Cannot determine thread, fp=0x5f7824d8, backtrace may not be correct.
Stack range sanity check OK, backtrace follows:
0x80ec28c
0x4002d7ce
0x828fcbe
0x828d0ab
0x81f6c18
0x81f7b53
0x824e5ca
0x82560e8
0x8256a39
0x81f57d8
0x81f588f
0x81daa68
0x40028881
0x420e40c7
New value of fp=(nil) failed sanity check, terminating stack trace!
Please read http://www.mysql.com/doc/U/s/Using_stack_trace.html and follow instructions on how to resolve the stack trace. Resolved
stack trace is much more helpful in diagnosing the problem, so please do
resolve it
The manual page at http://www.mysql.com/doc/C/r/Crashing.html contains
information that should help you find out what is causing the crash

Number of processes running now: 0
060610 14:59:09  mysqld restarted
060610 14:59:09  Can't start server: Bind on TCP/IP port: Address already in use
060610 14:59:09  Do you already have another mysqld server running on port: 3306 ?
060610 14:59:09  Aborting

060610 14:59:09  /usr/libexec/mysqld: Shutdown Complete

060610 14:59:09  mysqld ended
[10 Jun 2006 19:09] Patrick Asia
>cat /proc/meminfo
        total:    used:    free:  shared: buffers:  cached:
Mem:  6341287936 5627428864 713859072        0 83804160 2999062528
Swap: 4293586944        0 4293586944
MemTotal:      6192664 kB
MemFree:        697128 kB
MemShared:           0 kB
Buffers:         81840 kB
Cached:        2928772 kB
SwapCached:          0 kB
Active:        2363316 kB
ActiveAnon:     435700 kB
ActiveCache:   1927616 kB
Inact_dirty:   2632476 kB
Inact_laundry:  188488 kB
Inact_clean:     85320 kB
Inact_target:  1053920 kB
HighTotal:     5373376 kB
HighFree:       172820 kB
LowTotal:       819288 kB
LowFree:        524308 kB
SwapTotal:     4192956 kB
SwapFree:      4192956 kB
[10 Jun 2006 19:10] Patrick Asia
slave config
[mysqld]
server-id=2
master-host=xxx
master-user=xxxx
master-password=xxxxx
log-slave-updates
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
innodb_data_file_path = ibdata1:1500M;ibdata2:1500M;ibdata3:1500M;ibdata4:1500M;ibdata5:1500M;ibdata6:1500M;ibdata7:1500M;ibdata8:1500M:autoextend
innodb_data_home_dir = /var/mysql/data
set-variable = innodb_mirrored_log_groups=1
innodb_log_group_home_dir = /var/mysql/log
set-variable = innodb_log_files_in_group=3
set-variable = innodb_log_file_size=50M
set-variable = innodb_log_buffer_size=10M
innodb_flush_log_at_trx_commit=1
innodb_log_arch_dir = /var/mysql/log
innodb_log_archive=0
set-variable = innodb_buffer_pool_size=350M
set-variable = innodb_additional_mem_pool_size=100M
set-variable = innodb_file_io_threads=4
set-variable = innodb_lock_wait_timeout=90

[mysql.server]
user=mysql
basedir=/var/lib

[safe_mysqld]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
[10 Jun 2006 19:11] Patrick Asia
master config

[mysqld]
server-id=1
log-bin=/var/mysql/binlog/cms-bin
log-bin-index=/var/mysql/binlog/cms-bin
sql-bin-update-same
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
innodb_data_file_path = ibdata1:1500M;ibdata2:1500M;ibdata3:1500M;ibdata4:1500M;ibdata5:1500M;ibdata6:1500M;ibdata7:1500M;ibdata8:1500M:autoextend
innodb_data_home_dir = /var/mysql/data
set-variable = innodb_mirrored_log_groups=1
innodb_log_group_home_dir = /var/mysql/log
set-variable = innodb_log_files_in_group=3
set-variable = innodb_log_file_size=50M
set-variable = innodb_log_buffer_size=10M
innodb_flush_log_at_trx_commit=1
innodb_log_arch_dir = /var/mysql/log
innodb_log_archive=0
set-variable = innodb_buffer_pool_size=350M
set-variable = innodb_additional_mem_pool_size=100M
set-variable = innodb_file_io_threads=4
set-variable = innodb_lock_wait_timeout=90

[mysql.server]
user=mysql
basedir=/var/lib

[safe_mysqld]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
[3 Jul 2006 16:08] Valeriy Kravchuk
What version do you use on slave? I had found very simuilar bug report: bug #8126. It looks like a duplicate for me.
[3 Aug 2006 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".