4.0.9 Segmentation Fault Crash under Solaris

4.0.9 Segmentation Fault Crash under Solaris

am 04.02.2003 00:49:33 von Bruce Dembecki

So I can't see the bug list archive beyond January on the Web Site, so
forgive me if this has been submitted...

I'm using mysql-max-4.0.9-gamma-sun-solaris2.8-sparc and
mysql-max-4.0.9-gamma-sun-solaris2.9-sparc-64bit on three machines which are
obviously using Solaris 8 and Solaris 9.

I start them by adding the mysql.server script in the downloaded Binaries
"support-files" directory to /etc/init.d and symlinking that to
/etc/rc3.d/S99mysql.server - I also use the same script in the same location
for manually stopping and starting mysqld - eg I would type
"/etc/rc3.d/S99mysql.server start" (or stop).

On both versions of Solaris if I start mysqld manually using this process
the daemon will crash when I exit the shell connection, and immediately
restart itself (presumably mysqld_safe does that). The crash claims to be a
"Segmentation Fault".

How-To-Repeat:

ssh my.server.adress
su -
/etc/rc3.d/S99mysql.server stop
/etc/rc3.d/S99mysql.server start
exit (which logs me out as root, but keeps the shell alive)
exit (which closes the ssh session and thus closes the shell)
Immediate failure at this point, recovers cleanly by starting itself up
again, but still a bad thing.

I am enclosing at the end of this email a full transcript of a session I
created on a replication slave to demonstrate this crash - note that the
Segmentation Fault also fails to correctly close the SSH session, so the
terminal window is pretty much locked open with no prompt etc... (not that
this is really an issue).

Best Regards, Bruce

[ZBeeb:~] bruce% ssh mysql2
bruce@mysql2's password:
Last login: Mon Jan 27 00:37:38 2003 from xxxxxxxxxxxx
Sun Microsystems Inc. SunOS 5.8 Generic February 2000
mysql2% su -
Password:
Sun Microsystems Inc. SunOS 5.8 Generic February 2000
mysql2# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 10868 to server version: 4.0.9-gamma-max-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> status
--------------
mysql Ver 12.16 Distrib 4.0.9-gamma, for sun-solaris2.8 (sparc)

Connection id: 10868
Current database:
Current user: root@localhost
SSL: Not in use
Current pager: /usr/local/bin/less
Using outfile: ''
Server version: 4.0.9-gamma-max-log
Protocol version: 10
Connection: Localhost via UNIX socket
Client characterset: latin1
Server characterset: latin1
UNIX socket: /tmp/mysql.sock
Uptime: 3 days 18 hours 30 min 12 sec

Threads: 1 Questions: 3663511 Slow queries: 1 Opens: 1711 Flush tables:
1 Open tables: 326 Queries per second avg: 11.244
--------------

mysql> exit
Bye
mysql2# /etc/rc3.d/S99mysql.server stop
Killing mysqld with pid 1918
Wait for mysqld to exit... done
mysql2# /etc/rc3.d/S99mysql.server start
mysql2# Starting mysqld daemon with databases from /mysqldata

mysql2# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3 to server version: 4.0.9-gamma-max-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> status
--------------
mysql Ver 12.16 Distrib 4.0.9-gamma, for sun-solaris2.8 (sparc)

Connection id: 3
Current database:
Current user: root@localhost
SSL: Not in use
Current pager: /usr/local/bin/less
Using outfile: ''
Server version: 4.0.9-gamma-max-log
Protocol version: 10
Connection: Localhost via UNIX socket
Client characterset: latin1
Server characterset: latin1
UNIX socket: /tmp/mysql.sock
Uptime: 23 sec

Threads: 1 Questions: 108 Slow queries: 0 Opens: 29 Flush tables: 1
Open tables: 23 Queries per second avg: 4.696
--------------

mysql> exit
Bye
mysql2# exit
mysql2% exit
Segmentation Fault
030127 22:52:04 mysqld restarted


------------------------------------------------------------ ---------
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-thread13660@lists.mysql.com
To unsubscribe, e-mail

Re: 4.0.9 Segmentation Fault Crash under Solaris

am 04.02.2003 14:05:27 von Sinisa Milivojevic

Bruce Dembecki writes:
> So I can't see the bug list archive beyond January on the Web Site, so
> forgive me if this has been submitted...
>
> I'm using mysql-max-4.0.9-gamma-sun-solaris2.8-sparc and
> mysql-max-4.0.9-gamma-sun-solaris2.9-sparc-64bit on three machines which are
> obviously using Solaris 8 and Solaris 9.
>
> I start them by adding the mysql.server script in the downloaded Binaries
> "support-files" directory to /etc/init.d and symlinking that to
> /etc/rc3.d/S99mysql.server - I also use the same script in the same location
> for manually stopping and starting mysqld - eg I would type
> "/etc/rc3.d/S99mysql.server start" (or stop).
>
> On both versions of Solaris if I start mysqld manually using this process
> the daemon will crash when I exit the shell connection, and immediately
> restart itself (presumably mysqld_safe does that). The crash claims to be a
> "Segmentation Fault".
>
> How-To-Repeat:
>

Hi!

I have tried to repeat failure that you describe on our Solairs 2.9
server and it worked just fine. mysql.server start / stop started and
stopped mysqld without any crashes.

This could be some problem in your configuration / setup.

Or you have not been root when you were running that script.

--
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / 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-thread13666@lists.mysql.com
To unsubscribe, e-mail

Re: 4.0.9 Segmentation Fault Crash under Solaris

am 04.02.2003 18:17:03 von Bruce Dembecki

On 2/4/03 5:05 AM, "Sinisa Milivojevic" wrote:

> Bruce Dembecki writes:
>> So I can't see the bug list archive beyond January on the Web Site, so
>> forgive me if this has been submitted...
>>
>> I'm using mysql-max-4.0.9-gamma-sun-solaris2.8-sparc and
>> mysql-max-4.0.9-gamma-sun-solaris2.9-sparc-64bit on three machines which are
>> obviously using Solaris 8 and Solaris 9.
>>
>> I start them by adding the mysql.server script in the downloaded Binaries
>> "support-files" directory to /etc/init.d and symlinking that to
>> /etc/rc3.d/S99mysql.server - I also use the same script in the same location
>> for manually stopping and starting mysqld - eg I would type
>> "/etc/rc3.d/S99mysql.server start" (or stop).
>>
>> On both versions of Solaris if I start mysqld manually using this process
>> the daemon will crash when I exit the shell connection, and immediately
>> restart itself (presumably mysqld_safe does that). The crash claims to be a
>> "Segmentation Fault".
>>
>> How-To-Repeat:
>>
>
> Hi!
>
> I have tried to repeat failure that you describe on our Solairs 2.9
> server and it worked just fine. mysql.server start / stop started and
> stopped mysqld without any crashes.
>
> This could be some problem in your configuration / setup.
>
> Or you have not been root when you were running that script.

The start stop script works fine. It starts mysqld, it stops it. I am logged
in first as me, and then su to root. I can start it and stop it as many
times as I like. As soon as I exit the shell, then I get the Segmentation
Fault. I can switch exit root and su back again and soon, but as soon as I
close the ssh connection to the server, thus closing the shell, then the
segmentation fault occurs.

Moreover I have just tested against a console connection and the problem
does not occur. This occurs when using SSH to connect to the server, logging
in as a user, and then su to root. When I exit the shell, it breaks,
transcripts of sample sessions below.

This is repeatable time and time again when using SSH to connect as username
and using su to root.

Best Regards, Bruce


Console connection using user root:

mysql2 console login: root
Password:
Feb 4 09:02:19 mysql2 login: ROOT LOGIN /dev/console
Last login: Thu Jan 23 02:43:30 on console
Sun Microsystems Inc. SunOS 5.8 Generic February 2000
mysql2# /etc/rc3.d/S99mysql.server stop
Killing mysqld with pid 2538
Wait for mysqld to exit... done
mysql2# /etc/rc3.d/S99mysql.server start
mysql2# Starting mysqld daemon with databases from /mysqldata
mysql2# exit
mysql2 console login:

SSH Connection using username and su to root:

[ZBeeb:~] bruce% ssh mysql2
bruce@mysql2's password:
Last login: Tue Feb 4 09:07:56 2003 from bruce-48.vpn.liv
Sun Microsystems Inc. SunOS 5.8 Generic February 2000
No mail.
mysql2% su -
Password:
Sun Microsystems Inc. SunOS 5.8 Generic February 2000
mysql2# /etc/rc3.d/S99mysql.server stop
Killing mysqld with pid 3710
Wait for mysqld to exit....... done
mysql2# /etc/rc3.d/S99mysql.server start
mysql2# Starting mysqld daemon with databases from /mysqldata
mysql2# exit
mysql2% exit
Segmentation Fault
030204 09:11:20 mysqld restarted



------------------------------------------------------------ ---------
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-thread13669@lists.mysql.com
To unsubscribe, e-mail

Re: 4.0.9 Segmentation Fault Crash under Solaris

am 04.02.2003 18:36:53 von Sinisa Milivojevic

Bruce Dembecki writes:
> On 2/4/03 5:05 AM, "Sinisa Milivojevic" wrote:
>
>
> The start stop script works fine. It starts mysqld, it stops it. I am logged
> in first as me, and then su to root. I can start it and stop it as many
> times as I like. As soon as I exit the shell, then I get the Segmentation
> Fault. I can switch exit root and su back again and soon, but as soon as I
> close the ssh connection to the server, thus closing the shell, then the
> segmentation fault occurs.
>
> Moreover I have just tested against a console connection and the problem
> does not occur. This occurs when using SSH to connect to the server, logging
> in as a user, and then su to root. When I exit the shell, it breaks,
> transcripts of sample sessions below.
>
> This is repeatable time and time again when using SSH to connect as username
> and using su to root.
>
> Best Regards, Bruce
>
>
> Console connection using user root:
>
> mysql2 console login: root
> Password:
> Feb 4 09:02:19 mysql2 login: ROOT LOGIN /dev/console
> Last login: Thu Jan 23 02:43:30 on console
> Sun Microsystems Inc. SunOS 5.8 Generic February 2000
> mysql2# /etc/rc3.d/S99mysql.server stop
> Killing mysqld with pid 2538
> Wait for mysqld to exit... done
> mysql2# /etc/rc3.d/S99mysql.server start
> mysql2# Starting mysqld daemon with databases from /mysqldata
> mysql2# exit
> mysql2 console login:
>
> SSH Connection using username and su to root:
>
> [ZBeeb:~] bruce% ssh mysql2
> bruce@mysql2's password:
> Last login: Tue Feb 4 09:07:56 2003 from bruce-48.vpn.liv
> Sun Microsystems Inc. SunOS 5.8 Generic February 2000
> No mail.
> mysql2% su -
> Password:
> Sun Microsystems Inc. SunOS 5.8 Generic February 2000
> mysql2# /etc/rc3.d/S99mysql.server stop
> Killing mysqld with pid 3710
> Wait for mysqld to exit....... done
> mysql2# /etc/rc3.d/S99mysql.server start
> mysql2# Starting mysqld daemon with databases from /mysqldata
> mysql2# exit
> mysql2% exit
> Segmentation Fault
> 030204 09:11:20 mysqld restarted

Hi!

This looks like some problem with shell on Solaris. Which one do you
use and why do you need two exits ??

If you start MySQL , then exit from SSH session, re-login is MySQL
server still running. If it is , then this is not MySQL related.

--
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / 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-thread13671@lists.mysql.com
To unsubscribe, e-mail

Re: 4.0.9 Segmentation Fault Crash under Solaris

am 04.02.2003 19:54:15 von Bruce Dembecki

On 2/4/03 9:36 AM, "Sinisa Milivojevic" wrote:

> Bruce Dembecki writes:
>> On 2/4/03 5:05 AM, "Sinisa Milivojevic" wrote:
>>
>>
>> The start stop script works fine. It starts mysqld, it stops it. I am logged
>> in first as me, and then su to root. I can start it and stop it as many
>> times as I like. As soon as I exit the shell, then I get the Segmentation
>> Fault. I can switch exit root and su back again and soon, but as soon as I
>> close the ssh connection to the server, thus closing the shell, then the
>> segmentation fault occurs.
>>
>> Moreover I have just tested against a console connection and the problem
>> does not occur. This occurs when using SSH to connect to the server, logging
>> in as a user, and then su to root. When I exit the shell, it breaks,
>> transcripts of sample sessions below.
>>
>> This is repeatable time and time again when using SSH to connect as username
>> and using su to root.
>>
>> Best Regards, Bruce
>>
>>
>> Console connection using user root:
>>
>> mysql2 console login: root
>> Password:
>> Feb 4 09:02:19 mysql2 login: ROOT LOGIN /dev/console
>> Last login: Thu Jan 23 02:43:30 on console
>> Sun Microsystems Inc. SunOS 5.8 Generic February 2000
>> mysql2# /etc/rc3.d/S99mysql.server stop
>> Killing mysqld with pid 2538
>> Wait for mysqld to exit... done
>> mysql2# /etc/rc3.d/S99mysql.server start
>> mysql2# Starting mysqld daemon with databases from /mysqldata
>> mysql2# exit
>> mysql2 console login:
>>
>> SSH Connection using username and su to root:
>>
>> [ZBeeb:~] bruce% ssh mysql2
>> bruce@mysql2's password:
>> Last login: Tue Feb 4 09:07:56 2003 from bruce-48.vpn.liv
>> Sun Microsystems Inc. SunOS 5.8 Generic February 2000
>> No mail.
>> mysql2% su -
>> Password:
>> Sun Microsystems Inc. SunOS 5.8 Generic February 2000
>> mysql2# /etc/rc3.d/S99mysql.server stop
>> Killing mysqld with pid 3710
>> Wait for mysqld to exit....... done
>> mysql2# /etc/rc3.d/S99mysql.server start
>> mysql2# Starting mysqld daemon with databases from /mysqldata
>> mysql2# exit
>> mysql2% exit
>> Segmentation Fault
>> 030204 09:11:20 mysqld restarted
>
> Hi!
>
> This looks like some problem with shell on Solaris. Which one do you
> use and why do you need two exits ??
>
> If you start MySQL , then exit from SSH session, re-login is MySQL
> server still running. If it is , then this is not MySQL related.

For security reasons we have (like I imagine most people do) SSH setup so
that you can not SSH as root user. So you need to ssh as username, and su to
root. The two exits are in order to exit su and become regular user again,
and then to exit the shell and close the SSH connection.

Both the Bruce user and the root user has sh as their shell.

To simplify it I changed our ssh settings to enable root login temporarily
and went through the process logging in directly as root, same result, when
exiting the shell (and thus ssh) mysqld crashes with a segmentation error.

Best Regards, Bruce

[ZBeeb:~] bruce% ssh root@mysql2
root@mysql2's password:
Last login: Tue Feb 4 10:34:49 2003 from bruce-48.vpn.liv
Sun Microsystems Inc. SunOS 5.8 Generic February 2000
No mail.
mysql2# which sh
/bin/sh
mysql2# /etc/rc3.d/S99mysql stop
Killing mysqld with pid 4002
Wait for mysqld to exit.... done
mysql2# /etc/rc3.d/S99mysql start
mysql2# Starting mysqld daemon with databases from /mysqldata
mysql2# exit
Segmentation Fault
030204 10:49:32 mysqld restarted


------------------------------------------------------------ ---------
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-thread13672@lists.mysql.com
To unsubscribe, e-mail

Re: 4.0.9 Segmentation Fault Crash under Solaris

am 04.02.2003 20:34:19 von Sinisa Milivojevic

Bruce Dembecki writes:
> On 2/4/03 9:36 AM, "Sinisa Milivojevic" wrote:
>
> Best Regards, Bruce
>
> [ZBeeb:~] bruce% ssh root@mysql2
> root@mysql2's password:
> Last login: Tue Feb 4 10:34:49 2003 from bruce-48.vpn.liv
> Sun Microsystems Inc. SunOS 5.8 Generic February 2000
> No mail.
> mysql2# which sh
> /bin/sh
> mysql2# /etc/rc3.d/S99mysql stop
> Killing mysqld with pid 4002
> Wait for mysqld to exit.... done
> mysql2# /etc/rc3.d/S99mysql start
> mysql2# Starting mysqld daemon with databases from /mysqldata
> mysql2# exit
> Segmentation Fault
> 030204 10:49:32 mysqld restarted
>


After it crashes and re-starts does it keep running ????

Any messages in error log file ???

--
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / 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-thread13677@lists.mysql.com
To unsubscribe, e-mail

Re: 4.0.9 Segmentation Fault Crash under Solaris

am 04.02.2003 20:57:59 von Bruce Dembecki

On 2/4/03 11:34 AM, "Sinisa Milivojevic" wrote:

> Bruce Dembecki writes:
>> On 2/4/03 9:36 AM, "Sinisa Milivojevic" wrote:
>>
>> Best Regards, Bruce
>>
>> How-To-Repeat:
>>
>> [ZBeeb:~] bruce% ssh root@mysql2
>> root@mysql2's password:
>> Last login: Tue Feb 4 10:34:49 2003 from bruce-48.vpn.liv
>> Sun Microsystems Inc. SunOS 5.8 Generic February 2000
>> No mail.
>> mysql2# which sh
>> /bin/sh
>> mysql2# /etc/rc3.d/S99mysql stop
>> Killing mysqld with pid 4002
>> Wait for mysqld to exit.... done
>> mysql2# /etc/rc3.d/S99mysql start
>> mysql2# Starting mysqld daemon with databases from /mysqldata
>> mysql2# exit
>> Segmentation Fault
>> 030204 10:49:32 mysqld restarted
>>
>
>
> After it crashes and re-starts does it keep running ????
>
> Any messages in error log file ???

Yes, after it crashes and restarts it keeps running. I can log in and out
again and again and have no impact, except in sessions where I start mysqld.
I didn't have this problem on the 3.23.55 version, only since I switched to
4.0.9.

The log file has no messages other than startup messages... There is no
indication that it had crashed or otherwise stop... In the examples I have
given you there is a set of messages saying mysql is going through a normal
shutdown, then a set of messages on the startup, indicating that it is ready
to go, and then another set of messages about startup, with nothing in
between the two sets of startup messages.

My own interpretation is useless of course, but it seems to me that
mysqld-safe is restarting it after the segmentation fault crash - therefore
I am assuming mysqld-safe is running happily independent of the SSH session,
but for some reason mysqld is tied to the ssh session or something like that
- which seems odd given that the start/stop script uses mysqld-safe to
launch mysqld.

To help further I have a process list below. This process list is pre and
post crash/restart...

Best Regards, Bruce

This is the process list after starting mysql using the start/stop script -
note that mysqld-safe is PID 4189 running under /bin/sh owned by /etc/init,
mysqld itself is pid 4213, naturally enough owned by the /bin/sh running
mysqld-safe.

mysql2# /etc/rc3.d/S99mysql.server stop
Killing mysqld with pid 4084
Wait for mysqld to exit..... done
mysql2# /etc/rc3.d/S99mysql.server start
mysql2# Starting mysqld daemon with databases from /mysqldata
mysql2# ps -ef|grep sql
root 4189 1 0 11:50:17 pts/1 0:00 /bin/sh
/usr/local/mysql/bin/mysqld_safe --datadir=/mysqldata --pid-file=/mysql
mysql 4213 4189 11 11:50:17 pts/1 0:11
/usr/local/mysql-max-4.0.9-gamma-sun-solaris2.8-sparc/bin/my sqld
--defaults-ext
root 4214 4143 0 11:50:28 pts/1 0:00 grep sql
mysql2# exit
Segmentation Fault
030204 11:53:29 mysqld restarted

After reconnecting we see that mysqld-safe is still running under the shell
with the same PID, so it hasn't restarted or anything. mysqld is running a
new PID of course but is still owned by mysqld-safe's shell.

[ZBeeb:~] bruce% ssh mysql2
bruce@mysql2's password:
Last login: Tue Feb 4 11:38:18 2003 from bruce-48.vpn.liv
Sun Microsystems Inc. SunOS 5.8 Generic February 2000
No mail.
mysql2% ps -ef|grep sql
root 4189 1 0 11:50:17 ? 0:00 /bin/sh
/usr/local/mysql/bin/mysqld_safe --datadir=/mysqldata --pid-file=/mysql
mysql 4222 4189 2 11:53:29 ? 0:36
/usr/local/mysql-max-4.0.9-gamma-sun-solaris2.8-sparc/bin/my sqld
--defaults-ext
bruce 4247 4227 0 11:54:49 pts/2 0:00 grep sql
mysql2%


------------------------------------------------------------ ---------
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-thread13681@lists.mysql.com
To unsubscribe, e-mail

Re: 4.0.9 Segmentation Fault Crash under Solaris

am 04.02.2003 21:13:14 von Sinisa Milivojevic

Bruce Dembecki writes:
> On 2/4/03 11:34 AM, "Sinisa Milivojevic" wrote:
>
>
> Yes, after it crashes and restarts it keeps running. I can log in and out
> again and again and have no impact, except in sessions where I start mysqld.
> I didn't have this problem on the 3.23.55 version, only since I switched to
> 4.0.9.
>
> The log file has no messages other than startup messages... There is no
> indication that it had crashed or otherwise stop... In the examples I have
> given you there is a set of messages saying mysql is going through a normal
> shutdown, then a set of messages on the startup, indicating that it is ready
> to go, and then another set of messages about startup, with nothing in
> between the two sets of startup messages.
>
> My own interpretation is useless of course, but it seems to me that
> mysqld-safe is restarting it after the segmentation fault crash - therefore
> I am assuming mysqld-safe is running happily independent of the SSH session,
> but for some reason mysqld is tied to the ssh session or something like that
> - which seems odd given that the start/stop script uses mysqld-safe to
> launch mysqld.
>
> To help further I have a process list below. This process list is pre and
> post crash/restart...
>
> Best Regards, Bruce
>

Can you get your hands on the core file ???

run :

gdb -c core

and see which process generated it.

--
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / 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-thread13682@lists.mysql.com
To unsubscribe, e-mail

Re: 4.0.9 Segmentation Fault Crash under Solaris

am 05.02.2003 05:31:04 von w

On Tue, Feb 04, 2003 at 09:17:03AM -0800, Bruce Dembecki wrote:
> >> How-To-Repeat:
[...]
> mysql2# /etc/rc3.d/S99mysql.server start
> mysql2# Starting mysqld daemon with databases from /mysqldata
> mysql2# exit
> mysql2 console login:
>
[...]
> mysql2# /etc/rc3.d/S99mysql.server start
> mysql2# Starting mysqld daemon with databases from /mysqldata
> mysql2# exit
> mysql2% exit
> Segmentation Fault
> 030204 09:11:20 mysqld restarted

SIGHUP?

Try run it in background

/etc/rc3.d/S99mysql.server start &

or even

nohup /etc/rc3.d/S99mysql.server start &



--w

------------------------------------------------------------ ---------
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-thread13700@lists.mysql.com
To unsubscribe, e-mail

Re: 4.0.9 Segmentation Fault Crash under Solaris

am 07.02.2003 13:39:08 von Sinisa Milivojevic

Vladimir V. Kolpakov writes:
> On Tue, Feb 04, 2003 at 09:17:03AM -0800, Bruce Dembecki wrote:
> > >> How-To-Repeat:
> [...]
> > mysql2# /etc/rc3.d/S99mysql.server start
> > mysql2# Starting mysqld daemon with databases from /mysqldata
> > mysql2# exit
> > mysql2 console login:
> >
> [...]
> > mysql2# /etc/rc3.d/S99mysql.server start
> > mysql2# Starting mysqld daemon with databases from /mysqldata
> > mysql2# exit
> > mysql2% exit
> > Segmentation Fault
> > 030204 09:11:20 mysqld restarted
>
> SIGHUP?
>
> Try run it in background
>
> /etc/rc3.d/S99mysql.server start &
>
> or even
>
> nohup /etc/rc3.d/S99mysql.server start &
>
>
>
> --w
>

Hi!

It was not designed to be run in the background, but still it should
be fixed.

--
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / 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-thread13716@lists.mysql.com
To unsubscribe, e-mail

Re: 4.0.9 Segmentation Fault Crash under Solaris

am 10.02.2003 23:53:26 von Bruce Dembecki

On 2/4/03 9:36 AM, "Sinisa Milivojevic" wrote:

> Bruce Dembecki writes:
>> On 2/4/03 5:05 AM, "Sinisa Milivojevic" wrote:
>>
>>
>> The start stop script works fine. It starts mysqld, it stops it. I am logged
>> in first as me, and then su to root. I can start it and stop it as many
>> times as I like. As soon as I exit the shell, then I get the Segmentation
>> Fault. I can switch exit root and su back again and soon, but as soon as I
>> close the ssh connection to the server, thus closing the shell, then the
>> segmentation fault occurs.
>>
>> Moreover I have just tested against a console connection and the problem
>> does not occur. This occurs when using SSH to connect to the server, logging
>> in as a user, and then su to root. When I exit the shell, it breaks,
>> transcripts of sample sessions below.
>>
>> This is repeatable time and time again when using SSH to connect as username
>> and using su to root.
>>
>> Best Regards, Bruce
>>
>> How-To-Repeat:
>>
>> Console connection using user root:
>>
>> mysql2 console login: root
>> Password:
>> Feb 4 09:02:19 mysql2 login: ROOT LOGIN /dev/console
>> Last login: Thu Jan 23 02:43:30 on console
>> Sun Microsystems Inc. SunOS 5.8 Generic February 2000
>> mysql2# /etc/rc3.d/S99mysql.server stop
>> Killing mysqld with pid 2538
>> Wait for mysqld to exit... done
>> mysql2# /etc/rc3.d/S99mysql.server start
>> mysql2# Starting mysqld daemon with databases from /mysqldata
>> mysql2# exit
>> mysql2 console login:
>>
>> SSH Connection using username and su to root:
>>
>> [ZBeeb:~] bruce% ssh mysql2
>> bruce@mysql2's password:
>> Last login: Tue Feb 4 09:07:56 2003 from bruce-48.vpn.liv
>> Sun Microsystems Inc. SunOS 5.8 Generic February 2000
>> No mail.
>> mysql2% su -
>> Password:
>> Sun Microsystems Inc. SunOS 5.8 Generic February 2000
>> mysql2# /etc/rc3.d/S99mysql.server stop
>> Killing mysqld with pid 3710
>> Wait for mysqld to exit....... done
>> mysql2# /etc/rc3.d/S99mysql.server start
>> mysql2# Starting mysqld daemon with databases from /mysqldata
>> mysql2# exit
>> mysql2% exit
>> Segmentation Fault
>> 030204 09:11:20 mysqld restarted
>
> Hi!
>
> This looks like some problem with shell on Solaris. Which one do you
> use and why do you need two exits ??
>
> If you start MySQL , then exit from SSH session, re-login is MySQL
> server still running. If it is , then this is not MySQL related.

OK, I have gone through everything from top to bottom. In answer to your
last question, when I re-login MySQL server is running, the word "still"
would be wrong because it has crashes and is restarted by mysqld-safe when I
log off, so when I log in again I can see it is running, but the error log
tells the story of the restart

I have eliminated any possibility that it may be some of the customization I
have done on the start script or mysqld-safe - my changes make no
difference, if I go back to the scripts provided in the 4.0.10 download and
change nothing other than where our data directory is this behavior happens.

So if I run the scripts you provide on Solaris 8 or Solaris 9 and I manually
launch mysql by using the mysql.server script in the download when connected
to the server using SSH mysqld will crash when I log off ssh and be
relaunched by mysqld-safe.

Good part is that mysqld-safe relaunches mysqld, bad part is the crash
happens and interferes with current connections and risks corrupting the
databases.

One work around is to not launch mysql manually ever, but instead reboot the
entire server, thus ensuring the only launch of mysqld-safe and mysqld is
done by the system itself at boot time. Clearly that's not a workable
solution.

There seems to be some problem in the mysqld-safe script you provide with
the Solaris download of at least 4.0.9 and 4.0.10 (maybe earlier) that
wasn't in the 3.23 versions - mysqld-safe itself is correctly launched by
the mysql.server script as an independent server. mysqld-safe however
doesn't seem to launch mysqld independently of the user's SSH connection.

Best Regards, Bruce


------------------------------------------------------------ ---------
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-thread13735@lists.mysql.com
To unsubscribe, e-mail

Re: 4.0.9 Segmentation Fault Crash under Solaris

am 11.02.2003 03:34:20 von Bruce Dembecki

On 2/10/03 2:53 PM, "Bruce Dembecki" wrote:

> On 2/4/03 9:36 AM, "Sinisa Milivojevic" wrote:
>
>> Bruce Dembecki writes:
>>> On 2/4/03 5:05 AM, "Sinisa Milivojevic" wrote:
>>>
>>>
>>> The start stop script works fine. It starts mysqld, it stops it. I am logged
>>> in first as me, and then su to root. I can start it and stop it as many
>>> times as I like. As soon as I exit the shell, then I get the Segmentation
>>> Fault. I can switch exit root and su back again and soon, but as soon as I
>>> close the ssh connection to the server, thus closing the shell, then the
>>> segmentation fault occurs.
>>>
>>> Moreover I have just tested against a console connection and the problem
>>> does not occur. This occurs when using SSH to connect to the server, logging
>>> in as a user, and then su to root. When I exit the shell, it breaks,
>>> transcripts of sample sessions below.
>>>
>>> This is repeatable time and time again when using SSH to connect as username
>>> and using su to root.
>>>
>>> Best Regards, Bruce
>>>
>>> How-To-Repeat:
>>>
>>> Console connection using user root:
>>>
>>> mysql2 console login: root
>>> Password:
>>> Feb 4 09:02:19 mysql2 login: ROOT LOGIN /dev/console
>>> Last login: Thu Jan 23 02:43:30 on console
>>> Sun Microsystems Inc. SunOS 5.8 Generic February 2000
>>> mysql2# /etc/rc3.d/S99mysql.server stop
>>> Killing mysqld with pid 2538
>>> Wait for mysqld to exit... done
>>> mysql2# /etc/rc3.d/S99mysql.server start
>>> mysql2# Starting mysqld daemon with databases from /mysqldata
>>> mysql2# exit
>>> mysql2 console login:
>>>
>>> SSH Connection using username and su to root:
>>>
>>> [ZBeeb:~] bruce% ssh mysql2
>>> bruce@mysql2's password:
>>> Last login: Tue Feb 4 09:07:56 2003 from bruce-48.vpn.liv
>>> Sun Microsystems Inc. SunOS 5.8 Generic February 2000
>>> No mail.
>>> mysql2% su -
>>> Password:
>>> Sun Microsystems Inc. SunOS 5.8 Generic February 2000
>>> mysql2# /etc/rc3.d/S99mysql.server stop
>>> Killing mysqld with pid 3710
>>> Wait for mysqld to exit....... done
>>> mysql2# /etc/rc3.d/S99mysql.server start
>>> mysql2# Starting mysqld daemon with databases from /mysqldata
>>> mysql2# exit
>>> mysql2% exit
>>> Segmentation Fault
>>> 030204 09:11:20 mysqld restarted
>>
I have analyzed the output from mysqld_safe - and obtained the following
command by using "echo" in the mysqld_safe script rather than executing the
command itself...

nohup /usr/local/mysql-standard-4.0.10-gamma-sun-solaris2.8-sparc/ bin/mysqld
--defaults-extra-file=
/usr/local/mysql-standard-4.0.10-gamma-sun-solaris2.8-sparc/ data/my.cnf
--basedir=/usr/local/mysql-standard-4.0.10-gamma-sun-solaris 2.8-sparc
--datadir=/mysqldata
--user=mysql --pid-file=/mysqldata/mysql2.pid >> /mysqldata/mysql2.err 2>&1

Clearly I have forced some line breaks in the command for easier reading and
email transference...

I also know that mysqld_safe itself is called by mysql.server using commands
to force it into the background, and in fact mysqld_safe continues to run
after exiting SSH... Therefore as we know mysqld is a child of mysqld_safe
and mysqld_safe is run in the background from the shell and mysqld_safe
starts mysqld with nohup, it would appear that something in the way mysqld
is compiled is preventing it from working correctly when it gets a SIGHUP it
should ignore.

This of course applies only to Solaris 2.8 and 2.9 which I have used for
testing here. It also may be totally wrong, but it's the best theory I've
got.

Best Regards, Bruce


------------------------------------------------------------ ---------
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-thread13736@lists.mysql.com
To unsubscribe, e-mail

Re: 4.0.9 Segmentation Fault Crash under Solaris

am 11.02.2003 14:49:39 von Sinisa Milivojevic

Bruce Dembecki writes:
> On 2/10/03 2:53 PM, "Bruce Dembecki" wrote:
>
> I have analyzed the output from mysqld_safe - and obtained the following
> command by using "echo" in the mysqld_safe script rather than executing the
> command itself...
>
> nohup /usr/local/mysql-standard-4.0.10-gamma-sun-solaris2.8-sparc/ bin/mysqld
> --defaults-extra-file=
> /usr/local/mysql-standard-4.0.10-gamma-sun-solaris2.8-sparc/ data/my.cnf
> --basedir=/usr/local/mysql-standard-4.0.10-gamma-sun-solaris 2.8-sparc
> --datadir=/mysqldata
> --user=mysql --pid-file=/mysqldata/mysql2.pid >> /mysqldata/mysql2.err 2>&1
>
> Clearly I have forced some line breaks in the command for easier reading and
> email transference...
>
> I also know that mysqld_safe itself is called by mysql.server using commands
> to force it into the background, and in fact mysqld_safe continues to run
> after exiting SSH... Therefore as we know mysqld is a child of mysqld_safe
> and mysqld_safe is run in the background from the shell and mysqld_safe
> starts mysqld with nohup, it would appear that something in the way mysqld
> is compiled is preventing it from working correctly when it gets a SIGHUP it
> should ignore.
>
> This of course applies only to Solaris 2.8 and 2.9 which I have used for
> testing here. It also may be totally wrong, but it's the best theory I've
> got.
>
> Best Regards, Bruce

Hi!

The only way we can fix a problem is by having a repeatable test case.

I have started / stoppped MySQL on our 2.8 / 2.9 machines through SSH
and did not encounter any errors.

If you are not able to provide us with a repeatable test case, the
only way that we can find out what is going on is that you use debug
binary from our site and that you send us core file once you succeed
in creating one.

--
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / 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-thread13744@lists.mysql.com
To unsubscribe, e-mail