Re: mysqld in an infinite loop

Re: mysqld in an infinite loop

am 11.03.2003 10:53:28 von Alexander Keremidarski

Christofer,

Christopher Chan wrote:
> Hi I have found mysqld in an infinite loop.


> How-To-Repeat: Generate plenty of mysql connections until the machine
> starts swapping. When the bug is triggered, you will not be able to
> connect to mysqld anymore and if you kill off all other processes, you
> will find mysql happily taking up all CPU that is available to run its
> infinite loop.

Please prepare Repeatable Test case including version or MySQL, how it was
installed and and my.cnf file.

mysqlbug script can help you dong this.

Without knowing even version you use we don't have smallest chance to try
repeating your problem. We can only guess what it might be and this can't help you
a lot.



Best regards

--
MySQL Conference and Expo 2003 http://www.mysql.com/events/uc2003/index.html
For technical support contracts, visit https://order.mysql.com/?ref=msal
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Alexander Keremidarski
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer
/_/ /_/\_, /___/\___\_\___/ Sofia, Bulgaria
<___/ www.mysql.com




------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail bugs-thread13942@lists.mysql.com
To unsubscribe, e-mail

mysqld in an infinite loop

am 11.03.2003 14:26:14 von Christopher Chan

Hi I have found mysqld in an infinite loop.

strace -p pid would bring

break(0xnumber) = -1 ENOMEM (Cannot allocate memory) repeatedly.

How-To-Repeat: Generate plenty of mysql connections until the machine
starts swapping. When the bug is triggered, you will not be able to connect
to mysqld anymore and if you kill off all other processes, you will find
mysql happily taking up all CPU that is available to run its infinite loop.

This mysql installation has InnoDB enabled and almost all the connections
run selects on an indexed column in a InnoDB table.

mysqld could not be killed and nor could we connect to it to shut it down.

A reboot of the machine was the only thing we could do. This only happens
when swap is touched but does not occur straight away.

It runs on a FreeBSD 4.7 Stable box. Swap was not completely used up.

We need to be able to push this box but if mysql is going to into an
infinite loop during the times it hits swap it is going to pose a rather
big problem. Is there anything that I can do to track down where this one is?


------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail bugs-thread13941@lists.mysql.com
To unsubscribe, e-mail

Re: mysqld in an infinite loop

am 11.03.2003 14:43:56 von Sinisa Milivojevic

Christopher Chan writes:
>
> [mysqld]
> datadir=/var/lib/mysql
> socket=/var/lib/mysql/mysql.sock
> set-variable = thread_cache_size=700
> set-variable = table_cache=850
> set-variable = key_buffer_size=16M
> set-variable = max_connections=850
> set-variable = max_connect_errors=999999999
> skip-name-resolve
> skip-locking
> memlock

Hi!

First of all, try not using memlock.

Second, when MySQL runs out of memory, which is a possibility here, it
will print the error message in the error log file.

Third, try to achieve the same effect with our binary, as you could be
running out of system space with glibc default stack size.


--
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Sinisa Milivojevic
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Fulltime Developer
/_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus
<___/ www.mysql.com

Join MySQL Users Conference and Expo:
http://www.mysql.com/events/uc2003/


------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail bugs-thread13945@lists.mysql.com
To unsubscribe, e-mail

Re: mysqld in an infinite loop

am 11.03.2003 15:33:25 von Christopher Chan

> Christopher Chan writes:
> >
> > [mysqld]
> > datadir=/var/lib/mysql
> > socket=/var/lib/mysql/mysql.sock
> > set-variable = thread_cache_size=700
> > set-variable = table_cache=850
> > set-variable = key_buffer_size=16M
> > set-variable = max_connections=850
> > set-variable = max_connect_errors=999999999
> > skip-name-resolve
> > skip-locking
> > memlock
>
> Hi!
>
> First of all, try not using memlock.

I'll give this a try.
>
> Second, when MySQL runs out of memory, which is a possibility here, it
> will print the error message in the error log file.

We have 1GB of swap available and only 20% of it was reported as being used
by top when the mysqlds were in their infinite loops. Plural here because we
found the same problem on multiple machines at the time this was discovered.

The mysqld.log did have a few lines about needing 16kb.
>
> Third, try to achieve the same effect with our binary, as you could be
> running out of system space with glibc default stack size.
>

I'll try this one if possible.
>
> --
> __ ___ ___ ____ __
> / |/ /_ __/ __/ __ \/ / Mr. Sinisa Milivojevic
> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Fulltime Developer
> /_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus
> <___/ www.mysql.com
>
> Join MySQL Users Conference and Expo:
> http://www.mysql.com/events/uc2003/
>
>
> ------------------------------------------------------------ ---------
> Before posting, please check:
> http://www.mysql.com/manual.php (the manual)
> http://lists.mysql.com/ (the list archive)
>
> To request this thread, e-mail bugs-thread13945@lists.mysql.com
> To unsubscribe, e-mail
>
>


------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail bugs-thread13947@lists.mysql.com
To unsubscribe, e-mail

Re: mysqld in an infinite loop

am 11.03.2003 19:18:58 von Christopher Chan

> > How-To-Repeat: Generate plenty of mysql connections until the machine
> > starts swapping. When the bug is triggered, you will not be able to
> > connect to mysqld anymore and if you kill off all other processes, you
> > will find mysql happily taking up all CPU that is available to run its
> > infinite loop.
>
> Please prepare Repeatable Test case including version or MySQL, how it was
> installed and and my.cnf file.

Argh! Sorry forgot. version 3.23.55. Compiled from source tar ball including
'--with-innodb' in the parameters to configure. The other parameters are
location type ones.

>
> mysqlbug script can help you dong this.
>
> Without knowing even version you use we don't have smallest chance to try
> repeating your problem. We can only guess what it might be and this can't
help you
> a lot.



------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail bugs-thread13943@lists.mysql.com
To unsubscribe, e-mail

Re: mysqld in an infinite loop

am 11.03.2003 19:27:04 von Christopher Chan

> > > How-To-Repeat: Generate plenty of mysql connections until the machine
> > > starts swapping. When the bug is triggered, you will not be able to
> > > connect to mysqld anymore and if you kill off all other processes, you
> > > will find mysql happily taking up all CPU that is available to run its
> > > infinite loop.
> >
> > Please prepare Repeatable Test case including version or MySQL, how it
was
> > installed and and my.cnf file.
>
> Argh! Sorry forgot. version 3.23.55. Compiled from source tar ball
including
> '--with-innodb' in the parameters to configure. The other parameters are
> location type ones.

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
set-variable = thread_cache_size=700
set-variable = table_cache=850
set-variable = key_buffer_size=16M
set-variable = max_connections=850
set-variable = max_connect_errors=999999999
skip-name-resolve
skip-locking
memlock
master-host=
master-user=
master-password=
master-port=
master-connect-retry=
server-id=
#myisam-sort-buffer-size=200M
#myisam-max-sort-file-size=200M

####### INNODB CONFIG #######
innodb_data_home_dir = /var/lib/mysql/innodbdata
innodb_data_file_path = datafile:4096M:autoextend
set-variable = innodb_buffer_pool_size=24M
set-variable = innodb_additional_mem_pool_size=8M
innodb_log_group_home_dir = /var/lib/mysql/innodblog
innodb_log_arch_dir = /var/lib/mysql/innodblog
set-variable = innodb_log_file_size=10M
set-variable = innodb_log_buffer_size=8M
set-variable = innodb_thread_concurrency=20
innodb_flush_log_at_trx_commit=0
#############################

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

[safe_mysqld]
err-log=/var/lib/mysql/mysqld.log
pid-file=/var/lib/mysql/mysqld.pid
>
> >
> > mysqlbug script can help you dong this.
> >
> > Without knowing even version you use we don't have smallest chance to
try
> > repeating your problem. We can only guess what it might be and this
can't
> help you
> > a lot.
>
>
>
> ------------------------------------------------------------ ---------
> Before posting, please check:
> http://www.mysql.com/manual.php (the manual)
> http://lists.mysql.com/ (the list archive)
>
> To request this thread, e-mail bugs-thread13943@lists.mysql.com
> To unsubscribe, e-mail
>
>


------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail bugs-thread13944@lists.mysql.com
To unsubscribe, e-mail

Re: mysqld in an infinite loop

am 11.03.2003 22:24:20 von Jeremy Zawodny

On Tue, Mar 11, 2003 at 03:43:56PM +0200, Sinisa Milivojevic wrote:
>
> Third, try to achieve the same effect with our binary, as you could be
> running out of system space with glibc default stack size.

On FreeBSD?
--
Jeremy D. Zawodny | Perl, Web, MySQL, Linux Magazine, Yahoo!
| http://jeremy.zawodny.com/

------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail bugs-thread13952@lists.mysql.com
To unsubscribe, e-mail

Re: mysqld in an infinite loop

am 12.03.2003 13:32:52 von Sinisa Milivojevic

Jeremy Zawodny writes:
> On Tue, Mar 11, 2003 at 03:43:56PM +0200, Sinisa Milivojevic wrote:
>
> On FreeBSD?
> --
> Jeremy D. Zawodny | Perl, Web, MySQL, Linux Magazine, Yahoo!
> | http://jeremy.zawodny.com/
>


Oooops, sorry.

If it s FBSD, then set thread_stack to 128K.

--
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Sinisa Milivojevic
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Fulltime Developer
/_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus
<___/ www.mysql.com

Join MySQL Users Conference and Expo:
http://www.mysql.com/events/uc2003/


------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail bugs-thread13955@lists.mysql.com
To unsubscribe, e-mail