Bug #37789 Solaris socket connections fail when in rush
Submitted: 1 Jul 2008 23:00 Modified: 15 Sep 2008 7:29
Reporter: Adam Dixon Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: General Severity:S3 (Non-critical)
Version:5.0.46 5.0.62 OS:Solaris (Solaris 10)
Assigned to: CPU Architecture:Any

[1 Jul 2008 23:00] Adam Dixon
Description:
Running a simple test.sh script (which connects and performs a basic operation) concurrently, causes connections to fail with socket error. (err 146).

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.adixon.sock' (146)

How to repeat:
Create a table in test db.
mysql -S /tmp/mysql.sock -u root test -e "CREATE TABLE `t1` (`id` int(11) NOT NULL auto_increment,`c0` int(11) NOT NULL,`c1` char(24) default NULL,PRIMARY KEY  (`id`)) ENGINE=MyISAM;"

##test.sh contains;;
for count in 0 1 2 3 4 5 6 7
do
mysql -S /tmp/mysql.sock -u root test -e "INSERT INTO t1 (c0,c1) values (${count},'abcdasdasdasdadasda');"
done &
for count in 0 1 2 3 4 5 6 7
do
mysql -S /tmp/mysql.sock -u root test -e "INSERT INTO t1 (c0,c1) values (${count},'abcdasdasdasdadasda');"
done &
for count in 0 1 2 3 4 5 6 7
do
mysql -S /tmp/mysql.sock -u root test -e "INSERT INTO t1 (c0,c1) values (${count},'abcdasdasdasdadasda');"
done &
for count in 0 1 2 3 4 5 6 7
do
mysql -S /tmp/mysql.sock -u root test -e "INSERT INTO t1 (c0,c1) values (${count},'abcdasdasdasdadasda');"
done &
for count in 0 1 2 3 4 5 6 7
do
mysql -S /tmp/mysql.sock -u root test -e "INSERT INTO t1 (c0,c1) values (${count},'abcdasdasdasdadasda');"
done &
for count in 0 1 2 3 4 5 6 7
do
mysql -S /tmp/mysql.sock -u root test -e "INSERT INTO t1 (c0,c1) values (${count},'abcdasdasdasdadasda');"
done &
for count in 0 1 2 3 4 5 6 7
do
mysql -S /tmp/mysql.sock -u root test -e "INSERT INTO t1 (c0,c1) values (${count},'abcdasdasdasdadasda');"
done &
for count in 0 1 2 3 4 5 6 7
do
mysql -S /tmp/mysql.sock -u root test -e "INSERT INTO t1 (c0,c1) values (${count},'abcdasdasdasdadasda');"
done &

Start mysqld_safe on solaris, then run;
for count in 0 1 2 3 4 5 6 7; do ./test.sh & done &
for count in 0 1 2 3 4 5 6 7; do ./test.sh & done &

Increasing back_log seemed to work around the issue on some load levels, but it would still occur (just had to increase the concurrency of test.sh).

This does not repeat on linux that I have seen.
[12 Sep 2008 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".
[12 Sep 2008 23:08] Adam Dixon
Note, upgrading kernel/solaris patch level is reported to have solved this.
[15 Sep 2008 7:29] Sveta Smirnova
Thank you for the feedback.

Closed as "Not a Bug", because cause was not MySQL bug.
[15 Feb 2010 21:55] Margaret Frances
I have experienced this problem extremely intermittently on two servers for a while and had difficulty figuring out the cause, in large part because I couldn't reliably reproduce the problem (because I didn't know the cause, ahem).  I've finally been able to reliably reproduce the problem thanks to your report.  One of my machines is at patch level 118833-36; the other is at 127127-11.  Do you happen to know the patch level at which this problem is eliminated?
[16 Feb 2010 4:27] Valeriy Kravchuk
It was determined that SunOS 5.10 Generic_137111-07 solves the problem (to some extent at least). "Latest and greatest" strategy for the patch level may work...