Bug #2596 MySQL Client Segmentation Fault on Solaris 9
Submitted: 31 Jan 2004 11:17 Modified: 28 Apr 2005 2:29
Reporter: Robert Mazur Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0 alpha OS:Solaris (Solaris 9 sparc 64)
Assigned to: Magnus Blåudd CPU Architecture:Any

[31 Jan 2004 11:17] Robert Mazur
Description:
Solaris 9 - sparc 64bit
MySQL 5.0 alpha (installed using binary from MySQL)

The client will launch locally and process SQL queries. However when using the up arrow to view previously entered SQL statements, the MySQL client throws:

Segmentation Fault (core dumped)

...and exits back to the OS command line.  Sometime it will do this right away, and sometime the user must enter 2 or 3 queries first, and then hit the arrow.

The core dump text seems to suggest OS-level permission problems?  But I have assured and re-assured access to the whole file system is available.  Also, gobbs of memory are available to the system at the time.

The core is below:

CORE···································································································································de: %d)·Can't open stream from handle (Errcode: %d)·····Can't get working dirctory (Errcode: %d)········Can't change dir to '%s' (Errcode: %d)··Warning: '%s' had %d links······%d files and %d streams is left open
···Disk is full writing '%s'. Waiting for someone to free space...·Can't create directory '%s' (Errcode: %d)·······Character set '%s' is not a compiled character set and is not specified in the '%s' file········Out of resources when opening file '%s' (Errcode: %d)···Can't read value for symlink '%s' (Error %d)····Can't create symlink '%s' pointing at '%s' (Error %d)···Error on realpath() on '%s' (Error %d)··Can't sync file '%s' to disk (Errcode: %d)······UNKNOWN·UNOPENED········..······: ······?···············..······/etc/···/usr/local/mysql/data···········~/······--no-defaults···--defaults-file=········--defaults-extra-file=··defaults························.cnf····.cnf····.cnf····--print-defaults········%s would have been started with the following arguments:
·······%s ·············Fatal error in defaults handling. Program aborted
······················warning: World-writeable config file %s is ignored
·····················error: Wrong group definition in config file: %s at line %d
····error: Found option without preceding group in config file: %s at line: %d
·····--······--······
Default options are read from the following files in the given order:··.cnf···· ···············The following groups are read:··
The following options may be given as the first argument:
--print-defaults	Print the program argument list and exit
--no-defaults		Don't read default options from any options file
--defaults-file=#	Only read default options from the given file #
--defaults-extra-file=# Read this file after the global files are read···/usr/local/mysql/share/mysql····/usr/local/mysql········/·······charsets/·······/usr/local/mysql········charsets/·······Index.xml·······?·······?·······.xml····Index.xml·······Index.xml·······Index.xml·······skip····disable·enable··maximum·loose···0·······%s: Option '-O' requires an argument
···-set-variable···%s: Option '--set-variable' requires an argument
·······%s: Option '--set-variable' requires an argument
·······%s: ambiguous option '--%s-%s' (--%s-%s)
·······1·······%s: %s: unknown variable '%s'
··WARNING·ERROR···%s: %s: unknown option '--%s'
··WARNING·%s: variable prefix '%s' is not unique
·%s: ambiguous option '--%s' (%s, %s)
···%s: option '%s' cannot take an argument
········%s: option '--%s' cannot take an argument
······%s: option '--%s' requires an argument
· ·······%s: option '-%c' requires an argument
··%s: Error while setting value '%s' to '%s'
·····%s: unknown option '-%c'
·······%s: Error while setting value '%s' to '%s'
·····Unknown suffix '%c' used for variable '%s' (value '%s')
················  -%c%s·, ······  ······  ······--%s····%s=name%s ······[···············]···············%s=#%s ·[·······················%s······
Variables (--variable-name=value)
·····and boolean options {FALSE|TRUE}  Value (after reading options)
········--------------------------------- -----------------------------
················%s······%s
·····(No default value)······%s
·····TRUE····FALSE···%d
·····%d
·····%lu
····%s
·····%s
·····.·······latin1··latin1_swedish_ci···············latin1··latin1_german2_ci···············latin1··latin1_bin··············(null)··xml·····xml.version·····xml.encoding····charsets········charsets.max-id·charsets.charset········charsets.charset.primary-id·····charsets.charset.binary-id······charsets.charset.name···charsets.charset.family·charsets.charset.description····charsets.charset.alias··charsets.charset.ctype··charsets.charset.ctype.map······charsets.charset.upper··charsets.charset.upper.map······charsets.charset.lower··charsets.charset.lower.map······charsets.charset.unicode········charsets.charset.unicode.map····charsets.charset.collation······charsets.charset.collation.name·charsets.charset.collation.id···charsets.charset.collation.order········charsets.charset.collation.flag·charsets.charset.collation.map·· 	

How to repeat:
1. Start MySQL client (on same machine where server is running)
2. Enter a few queries
3. Hit the up arrow to view a previously viewed statement.
4. Segmentation Fault occurs with core dump.

Suggested fix:
Fix unknown by the user submitting this report.
[6 Feb 2004 15:05] Timothy Smith
I confirmed this on our Solaris 9 development machine, using the standard sparc64
download for 5.0.
[16 Jan 2005 10:11] Nikos Voutsinas
Exact the same behavior was shown by all the mysql-clients in 4.1.x series starting from   4.1.6 . I suggest moving this bug to critical or serious severity.
[19 Apr 2005 15:06] Magnus Blåudd
Happens when compiled with libedit.
[25 Apr 2005 10:07] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/24279
[25 Apr 2005 13:01] Magnus Blåudd
Another patch for this bug has also been committed:
http://lists.mysql.com/internals/24191
[27 Apr 2005 19:55] Magnus Blåudd
Libedit updated to version 2.9
Pushed to 4.1.12 and 5.0.6
[28 Apr 2005 2:29] Paul DuBois
Noted in 4.1.12, 5.0.6 changelogs.