Segmentation fault starting mysql client linked with embedded library

Segmentation fault starting mysql client linked with embedded library

am 13.04.2003 03:00:48 von root

From: Niksa Jurinovic
To: bugs@mysql.com
Subject: Segmentation fault starting mysql client linked with embedded library

>Description:
Mysql client in classic client-server combination works fine. Only mysql
client linked with embedded libmysqld.a library crashes with segmentation
fault at start time.
>How-To-Repeat:
Start mysql client linked with embedded library in ../libmysqld/examples
directory.
>Fix:
The problem didn't exist in mysql-4.0.12. It seems the problem is in mysql.cc
source
code with points related to embedded library. Linked with libmysqlclient, it
works
fine. At the other side, any other program linked with embedded libmysqld.a
library
also works fine. Only combination mysql.cc - libmysqld.a produces
segmentation fault.

>Submitter-Id:
>Originator: root
>Organization:
>MySQL support: [none | licence | email support | extended email support ]
>Synopsis: # ../libmysqld/examples/mysql
>Severity: <[ non-critical | serious | critical ] (one line)>
>Priority: <[ low | medium | high ] (one line)>
>Category: mysql
>Class: <[ sw-bug | doc-bug | change-request | support ] (one line)>
>Release: mysql-4.1.0-alpha (Source distribution)
>Server: /opt/mysql/bin/mysqladmin Ver 8.40 Distrib 4.1.0-alpha, for pc-linux
on i686
Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license

Server version 4.1.0-alpha
Protocol version 10
Connection Localhost via UNIX socket
UNIX socket /opt/mysql/tmp/mysql.sock
Uptime: 2 hours 10 min 59 sec

Threads: 1 Questions: 802 Slow queries: 0 Opens: 35 Flush tables: 1 Open
tables: 11 Queries per second avg: 0.102
>C compiler: gcc-3.2.2 (GCC) 3.2.2 (Mandrake Linux 9.2 3.2.2-5mdk)
>C++ compiler: gcc-3.2.2 (GCC) 3.2.2 (Mandrake Linux 9.2 3.2.2-5mdk)
>Environment:

System: Linux localhost 2.4.21-0.16mdkenterprise #1 SMP Fri Apr 11 06:09:08
CEST 2003 i686 unknown unknown GNU/Linux
Architecture: i686

Some paths: /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc
/usr/bin/cc
GCC: Reading specs from /usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.2.2/specs
Configured with: ../configure --prefix=/usr --libdir=/usr/lib
--with-slibdir=/lib --mandir=/usr/share/man --infodir=/usr/share/info
--enable-shared --enable-threads=posix --disable-checking --enable-long-long
--enable-__cxa_atexit --enable-languages=c,c++,ada,f77,objc,java
--host=i586-mandrake-linux-gnu --target=i586-mandrake-linux-gnu
--with-system-zlib
Thread model: posix
gcc version 3.2.2 (Mandrake Linux 9.2 3.2.2-5mdk)
Compilation info: CC='gcc' CFLAGS='-W -Wall -O6 -fomit-frame-pointer -pipe
-mcpu=pentium4 -march=pentium4 -DCPU=pentium4 -ffast-math
-fno-strength-reduce' CXX='gcc' CXXFLAGS='-W -Wall -O6 -fomit-frame-pointer
-pipe -mcpu=pentium4 -march=pentium4 -DCPU=pentium4 -ffast-math
-fno-strength-reduce -felide-constructors' LDFLAGS='-s' ASFLAGS=''
LIBC:
lrwxrwxrwx 1 root root 13 Apr 6 03:55 /lib/libc.so.6 ->
libc-2.3.1.so
-rwxr-xr-x 1 root root 1229764 Feb 17 11:31 /lib/libc-2.3.1.so
-rw-r--r-- 1 root root 2367496 Feb 17 11:30 /usr/lib/libc.a
-rw-r--r-- 1 root root 204 Feb 17 11:13 /usr/lib/libc.so
-rw-r--r-- 1 root root 2316670 Jan 8 11:17
/usr/lib/libc-client-PHP4.a
-rw-r--r-- 1 root root 2256934 Jan 8 11:17
/usr/lib/libc-client-nossl.a
-rw-r--r-- 1 root root 2339648 Jan 8 11:17 /usr/lib/libc-client.a
Configure command: ./configure '--prefix=/opt/mysql'
'--localstatedir=/opt/mysql/data'
'--with-unix-socket-path=/opt/mysql/tmp/mysql.sock'
'--with-mysqld-user=mysql' '--with-charset=latin1'
'--with-extra-charsets=latin1_de,croat,ucs2,utf8' '--with-embedded-server'
'--with-client-ldflags=-all-static' '--with-mysqld-ldflags=-all-static'
'--enable-local-infile' '--without-innodb' '--enable-thread-safe-client'
'--enable-assembler' '--enable-large-files' 'CC=gcc' 'CFLAGS=-W -Wall -O6
-fomit-frame-pointer -pipe -mcpu=pentium4 -march=pentium4 -DCPU=pentium4
-ffast-math -fno-strength-reduce' 'CXXFLAGS=-W -Wall -O6 -fomit-frame-pointer
-pipe -mcpu=pentium4 -march=pentium4 -DCPU=pentium4 -ffast-math
-fno-strength-reduce -felide-constructors -fno-rtti -fno-exceptions'
'CXX=gcc' 'LDFLAGS=-s'



--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org

Re: Segmentation fault starting mysql client linked with embedded library

am 14.04.2003 01:21:13 von Martin Gainty

Where is your my.conf and what are the contents?
Martin
----- Original Message -----
From: "root"
To:
Sent: Sunday, April 13, 2003 5:16 PM
Subject: Re: Segmentation fault starting mysql client linked with embedded
library


> Examining the stack with backtrace command this is what I get:
>
> # gdb mysql core.725
> GNU gdb 5.3-22mdk (Mandrake Linux)
> Copyright 2002 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 "i586-mandrake-linux-gnu"...
> Core was generated by `./mysql'.
> Program terminated with signal 11, Segmentation fault.
> #0 0x081a4f55 in load_defaults (conf_file=0x827c1af "my",
groups=0x82d61e4,
> argc=0xbfffe994,
> argv=0xbfffe998) at default.c:177
> 177 res[0]=argv[0][0];
> (gdb) backtrace
> #0 0x081a4f55 in load_defaults (conf_file=0x827c1af "my",
groups=0x82d61e4,
> argc=0xbfffe994,
> argv=0xbfffe998) at default.c:177
> #1 0x0806ce2c in init_common_variables (conf_file_name=0x827c1af "my",
> argc=0, argv=0x0,
> groups=0x82d61d8) at mysqld.cc:2033
> #2 0x0806ee95 in mysql_server_init (argc=0, argv=0x0, groups=0x82d61d8)
at
> lib_sql.cc:186
> #3 0x08048449 in main (argc=5, argv=0x8374040) at mysql.cc:348
> #4 0x08209ddc in __libc_start_main ()
> Current language: auto; currently c
> (gdb)
>
> The problem didn't exist in mysql-4.0.12.
>
> Regards,
>
> Niksa Jurinovic
> niksa@jurinovic.de
>
>
>
>
> On Sunday 13 April 2003 01:00 am, Niksa Jurinovic wrote:
> > From: Niksa Jurinovic
> > To: bugs@lists.mysql.com
> > Subject: Segmentation fault starting mysql client linked with embedded
> > library
> >
> > >Description:
> >
> > Mysql client in classic client-server combination works fine. Only mysql
> > client linked with embedded libmysqld.a library crashes with
segmentation
> > fault at start time.
> >
> > >How-To-Repeat:
> >
> > Start mysql client linked with embedded library in ../libmysqld/examples
> > directory.
> >
> > >Fix:
> >
> > The problem didn't exist in mysql-4.0.12. It seems the problem is in
> > mysql.cc source
> > code with points related to embedded library. Linked with
libmysqlclient,
> > it works
> > fine. At the other side, any other program linked with embedded
> > libmysqld.a library
> > also works fine. Only combination mysql.cc - libmysqld.a produces
> > segmentation fault.
> >
> > >Submitter-Id:
> > >Originator: root
> > >Organization:
> > >MySQL support: [none | licence | email support | extended email
support ]
> > >Synopsis: # ../libmysqld/examples/mysql
> > >Severity: <[ non-critical | serious | critical ] (one line)>
> > >Priority: <[ low | medium | high ] (one line)>
> > >Category: mysql
> > >Class: <[ sw-bug | doc-bug | change-request | support ] (one line)>
> > >Release: mysql-4.1.0-alpha (Source distribution)
> > >Server: /opt/mysql/bin/mysqladmin Ver 8.40 Distrib 4.1.0-alpha, for
> > > pc-linux
> >
> > on i686
> > Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
> > This software comes with ABSOLUTELY NO WARRANTY. This is free software,
> > and you are welcome to modify and redistribute it under the GPL license
> >
> > Server version 4.1.0-alpha
> > Protocol version 10
> > Connection Localhost via UNIX socket
> > UNIX socket /opt/mysql/tmp/mysql.sock
> > Uptime: 2 hours 10 min 59 sec
> >
> > Threads: 1 Questions: 802 Slow queries: 0 Opens: 35 Flush tables: 1
> > Open tables: 11 Queries per second avg: 0.102
> >
> > >C compiler: gcc-3.2.2 (GCC) 3.2.2 (Mandrake Linux 9.2 3.2.2-5mdk)
> > >C++ compiler: gcc-3.2.2 (GCC) 3.2.2 (Mandrake Linux 9.2 3.2.2-5mdk)
> > >Environment:
> >
> >
> > System: Linux localhost 2.4.21-0.16mdkenterprise #1 SMP Fri Apr 11
06:09:08
> > CEST 2003 i686 unknown unknown GNU/Linux
> > Architecture: i686
> >
> > Some paths: /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc
> > /usr/bin/cc
> > GCC: Reading specs from
> > /usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.2.2/specs Configured with:
> > ../configure --prefix=/usr --libdir=/usr/lib
> > --with-slibdir=/lib --mandir=/usr/share/man --infodir=/usr/share/info
> > --enable-shared --enable-threads=posix --disable-checking
> > --enable-long-long --enable-__cxa_atexit
> > --enable-languages=c,c++,ada,f77,objc,java
> > --host=i586-mandrake-linux-gnu --target=i586-mandrake-linux-gnu
> > --with-system-zlib
> > Thread model: posix
> > gcc version 3.2.2 (Mandrake Linux 9.2 3.2.2-5mdk)
> > Compilation info: CC='gcc'
CFLAGS='-W -Wall -O6 -fomit-frame-pointer -pipe
> > -mcpu=pentium4 -march=pentium4 -DCPU=pentium4 -ffast-math
> > -fno-strength-reduce' CXX='gcc' CXXFLAGS='-W -Wall -O6
> > -fomit-frame-pointer -pipe -mcpu=pentium4 -march=pentium4 -DCPU=pentium4
> > -ffast-math
> > -fno-strength-reduce -felide-constructors' LDFLAGS='-s' ASFLAGS=''
> > LIBC:
> > lrwxrwxrwx 1 root root 13 Apr 6 03:55
/lib/libc.so.6 ->
> > libc-2.3.1.so
> > -rwxr-xr-x 1 root root 1229764 Feb 17 11:31
/lib/libc-2.3.1.so
> > -rw-r--r-- 1 root root 2367496 Feb 17 11:30 /usr/lib/libc.a
> > -rw-r--r-- 1 root root 204 Feb 17 11:13 /usr/lib/libc.so
> > -rw-r--r-- 1 root root 2316670 Jan 8 11:17
> > /usr/lib/libc-client-PHP4.a
> > -rw-r--r-- 1 root root 2256934 Jan 8 11:17
> > /usr/lib/libc-client-nossl.a
> > -rw-r--r-- 1 root root 2339648 Jan 8 11:17
> > /usr/lib/libc-client.a Configure command: ./configure
'--prefix=/opt/mysql'
> > '--localstatedir=/opt/mysql/data'
> > '--with-unix-socket-path=/opt/mysql/tmp/mysql.sock'
> > '--with-mysqld-user=mysql' '--with-charset=latin1'
> > '--with-extra-charsets=latin1_de,croat,ucs2,utf8'
'--with-embedded-server'
> > '--with-client-ldflags=-all-static' '--with-mysqld-ldflags=-all-static'
> > '--enable-local-infile' '--without-innodb' '--enable-thread-safe-client'
> > '--enable-assembler' '--enable-large-files' 'CC=gcc'
'CFLAGS=-W -Wall -O6
> > -fomit-frame-pointer -pipe -mcpu=pentium4 -march=pentium4 -DCPU=pentium4
> > -ffast-math -fno-strength-reduce' 'CXXFLAGS=-W -Wall -O6
> > -fomit-frame-pointer -pipe -mcpu=pentium4 -march=pentium4 -DCPU=pentium4
> > -ffast-math
> > -fno-strength-reduce -felide-constructors -fno-rtti -fno-exceptions'
> > 'CXX=gcc' 'LDFLAGS=-s'
>
>
> --
> MySQL Bugs Mailing List
> For list archives: http://lists.mysql.com/bugs
> To unsubscribe: http://lists.mysql.com/bugs?unsub=mgainty@hotmail.com
>
>

--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org

Re: Segmentation fault starting mysql client linked with embedded library

am 14.04.2003 02:16:23 von root

Examining the stack with backtrace command this is what I get:

# gdb mysql core.725
GNU gdb 5.3-22mdk (Mandrake Linux)
Copyright 2002 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 "i586-mandrake-linux-gnu"...
Core was generated by `./mysql'.
Program terminated with signal 11, Segmentation fault.
#0 0x081a4f55 in load_defaults (conf_file=0x827c1af "my", groups=0x82d61e4,
argc=0xbfffe994,
argv=0xbfffe998) at default.c:177
177 res[0]=argv[0][0];
(gdb) backtrace
#0 0x081a4f55 in load_defaults (conf_file=0x827c1af "my", groups=0x82d61e4,
argc=0xbfffe994,
argv=0xbfffe998) at default.c:177
#1 0x0806ce2c in init_common_variables (conf_file_name=0x827c1af "my",
argc=0, argv=0x0,
groups=0x82d61d8) at mysqld.cc:2033
#2 0x0806ee95 in mysql_server_init (argc=0, argv=0x0, groups=0x82d61d8) at
lib_sql.cc:186
#3 0x08048449 in main (argc=5, argv=0x8374040) at mysql.cc:348
#4 0x08209ddc in __libc_start_main ()
Current language: auto; currently c
(gdb)

The problem didn't exist in mysql-4.0.12.

Regards,

Niksa Jurinovic
niksa@jurinovic.de




On Sunday 13 April 2003 01:00 am, Niksa Jurinovic wrote:
> From: Niksa Jurinovic
> To: bugs@lists.mysql.com
> Subject: Segmentation fault starting mysql client linked with embedded
> library
>
> >Description:
>
> Mysql client in classic client-server combination works fine. Only mysql
> client linked with embedded libmysqld.a library crashes with segmentation
> fault at start time.
>
> >How-To-Repeat:
>
> Start mysql client linked with embedded library in ../libmysqld/examples
> directory.
>
> >Fix:
>
> The problem didn't exist in mysql-4.0.12. It seems the problem is in
> mysql.cc source
> code with points related to embedded library. Linked with libmysqlclient,
> it works
> fine. At the other side, any other program linked with embedded
> libmysqld.a library
> also works fine. Only combination mysql.cc - libmysqld.a produces
> segmentation fault.
>
> >Submitter-Id:
> >Originator: root
> >Organization:
> >MySQL support: [none | licence | email support | extended email support ]
> >Synopsis: # ../libmysqld/examples/mysql
> >Severity: <[ non-critical | serious | critical ] (one line)>
> >Priority: <[ low | medium | high ] (one line)>
> >Category: mysql
> >Class: <[ sw-bug | doc-bug | change-request | support ] (one line)>
> >Release: mysql-4.1.0-alpha (Source distribution)
> >Server: /opt/mysql/bin/mysqladmin Ver 8.40 Distrib 4.1.0-alpha, for
> > pc-linux
>
> on i686
> Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
> This software comes with ABSOLUTELY NO WARRANTY. This is free software,
> and you are welcome to modify and redistribute it under the GPL license
>
> Server version 4.1.0-alpha
> Protocol version 10
> Connection Localhost via UNIX socket
> UNIX socket /opt/mysql/tmp/mysql.sock
> Uptime: 2 hours 10 min 59 sec
>
> Threads: 1 Questions: 802 Slow queries: 0 Opens: 35 Flush tables: 1
> Open tables: 11 Queries per second avg: 0.102
>
> >C compiler: gcc-3.2.2 (GCC) 3.2.2 (Mandrake Linux 9.2 3.2.2-5mdk)
> >C++ compiler: gcc-3.2.2 (GCC) 3.2.2 (Mandrake Linux 9.2 3.2.2-5mdk)
> >Environment:
>
>
> System: Linux localhost 2.4.21-0.16mdkenterprise #1 SMP Fri Apr 11 06:09:08
> CEST 2003 i686 unknown unknown GNU/Linux
> Architecture: i686
>
> Some paths: /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc
> /usr/bin/cc
> GCC: Reading specs from
> /usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.2.2/specs Configured with:
> ../configure --prefix=/usr --libdir=/usr/lib
> --with-slibdir=/lib --mandir=/usr/share/man --infodir=/usr/share/info
> --enable-shared --enable-threads=posix --disable-checking
> --enable-long-long --enable-__cxa_atexit
> --enable-languages=c,c++,ada,f77,objc,java
> --host=i586-mandrake-linux-gnu --target=i586-mandrake-linux-gnu
> --with-system-zlib
> Thread model: posix
> gcc version 3.2.2 (Mandrake Linux 9.2 3.2.2-5mdk)
> Compilation info: CC='gcc' CFLAGS='-W -Wall -O6 -fomit-frame-pointer -pipe
> -mcpu=pentium4 -march=pentium4 -DCPU=pentium4 -ffast-math
> -fno-strength-reduce' CXX='gcc' CXXFLAGS='-W -Wall -O6
> -fomit-frame-pointer -pipe -mcpu=pentium4 -march=pentium4 -DCPU=pentium4
> -ffast-math
> -fno-strength-reduce -felide-constructors' LDFLAGS='-s' ASFLAGS=''
> LIBC:
> lrwxrwxrwx 1 root root 13 Apr 6 03:55 /lib/libc.so.6 ->
> libc-2.3.1.so
> -rwxr-xr-x 1 root root 1229764 Feb 17 11:31 /lib/libc-2.3.1.so
> -rw-r--r-- 1 root root 2367496 Feb 17 11:30 /usr/lib/libc.a
> -rw-r--r-- 1 root root 204 Feb 17 11:13 /usr/lib/libc.so
> -rw-r--r-- 1 root root 2316670 Jan 8 11:17
> /usr/lib/libc-client-PHP4.a
> -rw-r--r-- 1 root root 2256934 Jan 8 11:17
> /usr/lib/libc-client-nossl.a
> -rw-r--r-- 1 root root 2339648 Jan 8 11:17
> /usr/lib/libc-client.a Configure command: ./configure '--prefix=/opt/mysql'
> '--localstatedir=/opt/mysql/data'
> '--with-unix-socket-path=/opt/mysql/tmp/mysql.sock'
> '--with-mysqld-user=mysql' '--with-charset=latin1'
> '--with-extra-charsets=latin1_de,croat,ucs2,utf8' '--with-embedded-server'
> '--with-client-ldflags=-all-static' '--with-mysqld-ldflags=-all-static'
> '--enable-local-infile' '--without-innodb' '--enable-thread-safe-client'
> '--enable-assembler' '--enable-large-files' 'CC=gcc' 'CFLAGS=-W -Wall -O6
> -fomit-frame-pointer -pipe -mcpu=pentium4 -march=pentium4 -DCPU=pentium4
> -ffast-math -fno-strength-reduce' 'CXXFLAGS=-W -Wall -O6
> -fomit-frame-pointer -pipe -mcpu=pentium4 -march=pentium4 -DCPU=pentium4
> -ffast-math
> -fno-strength-reduce -felide-constructors -fno-rtti -fno-exceptions'
> 'CXX=gcc' 'LDFLAGS=-s'


--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org

Re: Segmentation fault starting mysql client linked with embedded library

am 14.04.2003 02:46:33 von Niksa Jurinovic

On Sunday 13 April 2003 11:21 pm, Martin Gainty wrote:
> Where is your my.conf and what are the contents?
> Martin

You mean my.cnf file, not my.conf file. But it doesn't matter. With the same
my.cnf file the problem didn't exists in mysql-4.0.12.

Regards,

Niksa Jurinovic


> ----- Original Message -----
> From: "root"
> To:
> Sent: Sunday, April 13, 2003 5:16 PM
> Subject: Re: Segmentation fault starting mysql client linked with embedded
> library
>
> > Examining the stack with backtrace command this is what I get:
> >
> > # gdb mysql core.725
> > GNU gdb 5.3-22mdk (Mandrake Linux)
> > Copyright 2002 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 "i586-mandrake-linux-gnu"...
> > Core was generated by `./mysql'.
> > Program terminated with signal 11, Segmentation fault.
> > #0 0x081a4f55 in load_defaults (conf_file=0x827c1af "my",
>
> groups=0x82d61e4,
>
> > argc=0xbfffe994,
> > argv=0xbfffe998) at default.c:177
> > 177 res[0]=argv[0][0];
> > (gdb) backtrace
> > #0 0x081a4f55 in load_defaults (conf_file=0x827c1af "my",
>
> groups=0x82d61e4,
>
> > argc=0xbfffe994,
> > argv=0xbfffe998) at default.c:177
> > #1 0x0806ce2c in init_common_variables (conf_file_name=0x827c1af "my",
> > argc=0, argv=0x0,
> > groups=0x82d61d8) at mysqld.cc:2033
> > #2 0x0806ee95 in mysql_server_init (argc=0, argv=0x0, groups=0x82d61d8)
>
> at
>
> > lib_sql.cc:186
> > #3 0x08048449 in main (argc=5, argv=0x8374040) at mysql.cc:348
> > #4 0x08209ddc in __libc_start_main ()
> > Current language: auto; currently c
> > (gdb)
> >
> > The problem didn't exist in mysql-4.0.12.
> >
> > Regards,
> >
> > Niksa Jurinovic
> > niksa@jurinovic.de
> >
> > On Sunday 13 April 2003 01:00 am, Niksa Jurinovic wrote:
> > > From: Niksa Jurinovic
> > > To: bugs@lists.mysql.com
> > > Subject: Segmentation fault starting mysql client linked with embedded
> > > library
> > >
> > > >Description:
> > >
> > > Mysql client in classic client-server combination works fine. Only
> > > mysql client linked with embedded libmysqld.a library crashes with
>
> segmentation
>
> > > fault at start time.
> > >
> > > >How-To-Repeat:
> > >
> > > Start mysql client linked with embedded library in
> > > ../libmysqld/examples directory.
> > >
> > > >Fix:
> > >
> > > The problem didn't exist in mysql-4.0.12. It seems the problem is in
> > > mysql.cc source
> > > code with points related to embedded library. Linked with
>
> libmysqlclient,
>
> > > it works
> > > fine. At the other side, any other program linked with embedded
> > > libmysqld.a library
> > > also works fine. Only combination mysql.cc - libmysqld.a produces
> > > segmentation fault.
> > >
> > > >Submitter-Id:
> > > >Originator: root
> > > >Organization:
> > > >MySQL support: [none | licence | email support | extended email
>
> support ]
>
> > > >Synopsis: # ../libmysqld/examples/mysql
> > > >Severity: <[ non-critical | serious | critical ] (one line)>
> > > >Priority: <[ low | medium | high ] (one line)>
> > > >Category: mysql
> > > >Class: <[ sw-bug | doc-bug | change-request | support ] (one line)>
> > > >Release: mysql-4.1.0-alpha (Source distribution)
> > > >Server: /opt/mysql/bin/mysqladmin Ver 8.40 Distrib 4.1.0-alpha, for
> > > > pc-linux
> > >
> > > on i686
> > > Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
> > > This software comes with ABSOLUTELY NO WARRANTY. This is free software,
> > > and you are welcome to modify and redistribute it under the GPL license
> > >
> > > Server version 4.1.0-alpha
> > > Protocol version 10
> > > Connection Localhost via UNIX socket
> > > UNIX socket /opt/mysql/tmp/mysql.sock
> > > Uptime: 2 hours 10 min 59 sec
> > >
> > > Threads: 1 Questions: 802 Slow queries: 0 Opens: 35 Flush tables: 1
> > > Open tables: 11 Queries per second avg: 0.102
> > >
> > > >C compiler: gcc-3.2.2 (GCC) 3.2.2 (Mandrake Linux 9.2 3.2.2-5mdk)
> > > >C++ compiler: gcc-3.2.2 (GCC) 3.2.2 (Mandrake Linux 9.2 3.2.2-5mdk)
> > > >Environment:
> > >
> > >
> > > System: Linux localhost 2.4.21-0.16mdkenterprise #1 SMP Fri Apr 11
>
> 06:09:08
>
> > > CEST 2003 i686 unknown unknown GNU/Linux
> > > Architecture: i686
> > >
> > > Some paths: /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc
> > > /usr/bin/cc
> > > GCC: Reading specs from
> > > /usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.2.2/specs Configured with:
> > > ../configure --prefix=/usr --libdir=/usr/lib
> > > --with-slibdir=/lib --mandir=/usr/share/man --infodir=/usr/share/info
> > > --enable-shared --enable-threads=posix --disable-checking
> > > --enable-long-long --enable-__cxa_atexit
> > > --enable-languages=c,c++,ada,f77,objc,java
> > > --host=i586-mandrake-linux-gnu --target=i586-mandrake-linux-gnu
> > > --with-system-zlib
> > > Thread model: posix
> > > gcc version 3.2.2 (Mandrake Linux 9.2 3.2.2-5mdk)
> > > Compilation info: CC='gcc'
>
> CFLAGS='-W -Wall -O6 -fomit-frame-pointer -pipe
>
> > > -mcpu=pentium4 -march=pentium4 -DCPU=pentium4 -ffast-math
> > > -fno-strength-reduce' CXX='gcc' CXXFLAGS='-W -Wall -O6
> > > -fomit-frame-pointer -pipe -mcpu=pentium4 -march=pentium4
> > > -DCPU=pentium4 -ffast-math
> > > -fno-strength-reduce -felide-constructors' LDFLAGS='-s' ASFLAGS=''
> > > LIBC:
> > > lrwxrwxrwx 1 root root 13 Apr 6 03:55
>
> /lib/libc.so.6 ->
>
> > > libc-2.3.1.so
> > > -rwxr-xr-x 1 root root 1229764 Feb 17 11:31
>
> /lib/libc-2.3.1.so
>
> > > -rw-r--r-- 1 root root 2367496 Feb 17 11:30 /usr/lib/libc.a
> > > -rw-r--r-- 1 root root 204 Feb 17 11:13
> > > /usr/lib/libc.so -rw-r--r-- 1 root root 2316670 Jan 8
> > > 11:17
> > > /usr/lib/libc-client-PHP4.a
> > > -rw-r--r-- 1 root root 2256934 Jan 8 11:17
> > > /usr/lib/libc-client-nossl.a
> > > -rw-r--r-- 1 root root 2339648 Jan 8 11:17
> > > /usr/lib/libc-client.a Configure command: ./configure
>
> '--prefix=/opt/mysql'
>
> > > '--localstatedir=/opt/mysql/data'
> > > '--with-unix-socket-path=/opt/mysql/tmp/mysql.sock'
> > > '--with-mysqld-user=mysql' '--with-charset=latin1'
> > > '--with-extra-charsets=latin1_de,croat,ucs2,utf8'
>
> '--with-embedded-server'
>
> > > '--with-client-ldflags=-all-static' '--with-mysqld-ldflags=-all-static'
> > > '--enable-local-infile' '--without-innodb'
> > > '--enable-thread-safe-client' '--enable-assembler'
> > > '--enable-large-files' 'CC=gcc'
>
> 'CFLAGS=-W -Wall -O6
>
> > > -fomit-frame-pointer -pipe -mcpu=pentium4 -march=pentium4
> > > -DCPU=pentium4 -ffast-math -fno-strength-reduce' 'CXXFLAGS=-W -Wall -O6
> > > -fomit-frame-pointer -pipe -mcpu=pentium4 -march=pentium4
> > > -DCPU=pentium4 -ffast-math
> > > -fno-strength-reduce -felide-constructors -fno-rtti -fno-exceptions'
> > > 'CXX=gcc' 'LDFLAGS=-s'
> >
> > --
> > MySQL Bugs Mailing List
> > For list archives: http://lists.mysql.com/bugs
> > To unsubscribe: http://lists.mysql.com/bugs?unsub=mgainty@hotmail.com


--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org

Re: Segmentation fault starting mysql client linked with embedded library

am 16.04.2003 14:12:02 von Holyfoot

> >How-To-Repeat:
> Start mysql client linked with embedded library in ../libmysqld/examples
> directory.

Yes, there was a problem.
Now it's fixed in 4.1 tree.

Regards.
HF
--
For technical support contracts, visit https://order.mysql.com/
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Alexey Botchkov
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer
/_/ /_/\_, /___/\___\_\___/ Izhevsk, Russia
<___/ www.mysql.com


--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org