Bug #1126 mysql crashes on exit
Submitted: 24 Aug 2003 10:02 Modified: 25 Aug 2003 13:17
Reporter: [ name withheld ] Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:3.23.55 OS:Other (OpenBSD 3.4 beta)
Assigned to: CPU Architecture:Any

[24 Aug 2003 10:02] [ name withheld ]
Description:
The mysql command line client crashes on exit:
# mysql mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 11 to server version: 3.23.55-log

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

mysql> Segmentation fault (core dumped)

(I typed Control-D at the command prompt.)

Using gdb, I find:

# gdb /usr/local/bin/mysql mysql.core 
GNU gdb 4.16.1
Copyright 1996 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-unknown-openbsd3.4"...(no debugging symbols found)...
Core was generated by `mysql'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/lib/libreadline.so.1.0...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libncurses.so.9.0...(no debugging symbols found)...done.
Reading symbols from /usr/local/lib/mysql/libmysqlclient.so.10.0...done.
Reading symbols from /usr/lib/libz.so.2.0...done.
Reading symbols from /usr/lib/libm.so.1.0...done.
Reading symbols from /usr/lib/libc.so.30.1...done.
Reading symbols from /usr/libexec/ld.so...done.
#0  0xac661c0 in history_truncate_file ()
(gdb) bt
#0  0xac661c0 in history_truncate_file ()
#1  0xac662a4 in write_history ()
#2  0x1c00248c in vfprintf ()
#3  0x1c0023f3 in vfprintf ()
#4  0x1c001fc1 in vfprintf ()
#5  0x1c001f37 in vfprintf ()
#6  0xcfbf66a4 in ?? ()
#7  0xff0000 in ?? ()
Cannot access memory at address 0x43c00.
(gdb) q

The OpenBSD is from August 22th and should include W^X on i386.

How to repeat:
start mysql, exit with control-d
 (it also works without a data base)
[25 Aug 2003 6:12] Alexander Keremidarski
Sorry, but the bug system is not the appropriate forum for asking
support questions. Your problem is not the result of a bug.
For a list of more appropriate places to ask for help using MySQL
products, please visit http://www.mysql.com/support/

Thank you for your interest in MySQL.

Segmentation fault on mysql exit is indication of improper build or broken dependancies with dynamically linked libraries.

3.23.55 is very old and there is chance this is caused by problem fixed meanwhile.
Use 3.23.58 instead
[25 Aug 2003 13:17] Sergei Golubchik
If the latest version still crashes for you, please reopen this bugreport.
[29 Oct 2004 15:53] Enrique Garcia
I have the same problem with mysql, 3.23.58 and NetBSD 1.6.2_RC3
I will commit a new bug