64bit mysqld signal 10 (bus error) on sparcv9-sun-solaris2 and gcc 3.2
64bit mysqld signal 10 (bus error) on sparcv9-sun-solaris2 and gcc 3.2
am 24.08.2002 02:53:53 von joergprante
MySQL 4.0.2-alpha built with gcc 3.2-64bit in 64 bit mode on a SunBlade
1000 under Solaris 8 fails at running mysqld.
Everything works fine (I can use mysql client and remote connect to another
mysqld, and mysql_db_install script works fine too) but not mysqld. It fails
immediately with signal 10 (bus error) when I try 'mysqld_safe &'. No core
dump. '/tmp/mysql.sock' is created but size is 0 (zero) bytes after failure.
Here is the message in the error log:
------------------ start
020824 02:06:04 mysqld started
mysqld got signal 10;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help diagnose
the problem, but since we have already crashed, something is definitely wrong
and this may fail.
key_buffer_size=8388600
record_buffer=131072
sort_buffer=2097144
max_used_connections=0
max_connections=100
threads_connected=0
It is possible that mysqld could use up to
key_buffer_size + (record_buffer + sort_buffer)*max_connections = 225791 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
020824 02:06:04 mysqld ended
------------------- end
How-To-Repeat:
Please build MySQL 4.0.2a on Solaris 8 with the following parameters and
gcc/binutils combination:
$ uname -a
SunOS medea 5.8 Generic_108528-15 sun4u sparc SUNW,Sun-Blade-1000
$ gcc -v
Reading specs from
/opt/medea/local/gcc-3.2-64bit/bin/../lib/gcc-lib/sparcv9-su n-solaris2/3.2/sp
ecs Configured with: /opt/medea/build/gcc-3.2/configure
--prefix=/opt/medea/gcc-3.2-64bit --enable-languages=c,c++
sparcv9-sun-solaris2
Thread model: posix
gcc version 3.2
$ file gcc
/opt/medea/local/gcc-3.2-64bit/bin/gcc: ELF 64-bit MSB executable SPARCV9
Version 1, dynamically linked, not stripped
binutils-2.13 (64bit)
$ file ld
/opt/medea/local/binutils-2.13-64bit/bin/ld: ELF 64-bit MSB executable
SPARCV9 Version 1, dynamically linked, not stripped
MySQL 4.0.2a config:
$ ./configure --prefix=/opt/medea/mysql4-64bit --enable-thread-safe-client
--with-gnu-ld --host=sparcv9-sun-solaris2
Finally you should get:
$ file libexec/mysqld
libexec/mysqld: ELF 64-bit MSB executable SPARCV9 Version 1, dynamically
linked, not stripped
$ ldd libexec/mysqld
librt.so.1 => /usr/lib/64/librt.so.1
libdl.so.1 => /usr/lib/64/libdl.so.1
libpthread.so.1 => /usr/lib/64/libpthread.so.1
libthread.so.1 => /usr/lib/64/libthread.so.1
libz.so.1 => /usr/lib/64/libz.so.1
libgen.so.1 => /usr/lib/64/libgen.so.1
libsocket.so.1 => /usr/lib/64/libsocket.so.1
libnsl.so.1 => /usr/lib/64/libnsl.so.1
libstdc++.so.5 =>
/opt/medea/local/gcc-3.2-64bit/lib/libstdc++.so.5
libm.so.1 => /usr/lib/64/libm.so.1
libgcc_s.so.1 =>
/opt/medea/local/gcc-3.2-64bit/lib/sparcv9/libgcc_s.so.1
libc.so.1 => /usr/lib/64/libc.so.1
libaio.so.1 => /usr/lib/64/libaio.so.1
libmp.so.2 => /usr/lib/64/libmp.so.2
/usr/platform/SUNW,Sun-Blade-1000/lib/sparcv9/libc_psr.so.1
I checked it and I'm quite sure there is no 32bit library involved.
'bin/mysql' works, but not 'bin/mysqld_safe &'. If you need more info, please
email me. I would appreciate it to get that 64bit mysqld beast running.
Regards,
Jörg Prante
------------------------------------------------------------ ---------
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-thread12403@lists.mysql.com
To unsubscribe, e-mail
64bit mysqld signal 10 (bus error) on sparcv9-sun-solaris2 and gcc 3.2
am 25.08.2002 20:24:41 von Michael Widenius
Hi!
>>>>> "Jörg" == Jörg Prante < (by wa=
y of Jörg Prante )> writes:
Jörg> MySQL 4.0.2-alpha built with gcc 3.2-64bit in 64 bit mode on a =
SunBlade
Jörg> 1000 under Solaris 8 fails at running mysqld.
Jörg> Everything works fine (I can use mysql client and remote connec=
t to another
Jörg> mysqld, and mysql_db_install script works fine too) but not mys=
qld. It fails
Jörg> immediately with signal 10 (bus error) when I try 'mysqld_safe =
&'. No core
Jörg> dump. '/tmp/mysql.sock' is created but size is 0 (zero) bytes a=
fter failure.
I think this is an indication that gcc 3.2-64 bit can't yet produce a 6=
4
bit thread safe binary.
The reasons for the above assumption is that we know that MySQL 4.0 is
64 bit clean as it works without any problems on Linux-Alpha,
Linux-Itanium and Solaris 2.8, the last one compiled with Suns 64 bit
compiler.
The only way to fix this is to compile MySQL with debugging
(configure --with-debug) and run mysqld under a debugger to find out
what's going wrong.
Jörg> I checked it and I'm quite sure there is no 32bit library invol=
ved.=20
Jörg> 'bin/mysql' works, but not 'bin/mysqld_safe &'. If you need mor=
e info, please=20
Jörg> email me. I would appreciate it to get that 64bit mysqld beast =
running.
Please read the 'debugging mysqld under gdb' manual entry to get more
information how to proceed.
Regards,
Monty
--=20
For technical support contracts, goto https://order.mysql.com/
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Michael Widenius
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, CTO
/_/ /_/\_, /___/\___\_\___/ Helsinki, Finland
<___/ www.mysql.com
------------------------------------------------------------ ---------
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-thread12406@lists.mysql.com
To unsubscribe, e-mail
Re: 64bit mysqld signal 10 (bus error) on sparcv9-sun-solaris2 and gcc 3.2
am 26.08.2002 00:26:44 von joergprante
On Sunday 25 August 2002 20:24, Michael Widenius wrote:
> I think this is an indication that gcc 3.2-64 bit can't yet produce a 64
> bit thread safe binary.
>
> The reasons for the above assumption is that we know that MySQL 4.0 is
> 64 bit clean as it works without any problems on Linux-Alpha,
> Linux-Itanium and Solaris 2.8, the last one compiled with Suns 64 bit
> compiler.
>
> The only way to fix this is to compile MySQL with debugging
> (configure --with-debug) and run mysqld under a debugger to find out
> what's going wrong.
I produced a file /tmp/mysqld.trace. It's the InnoDB initialization in
'innobase_init' causing trouble. After the first malloc, the signal 10 (bus
error) was sent. Here are the last few lines:
[...]
T@1 : >hash_init
T@1 : | enter: hash: 10049e0b0 size: 128
T@1 : | >init_dynamic_array
T@1 : | | >my_malloc
T@1 : | | | my: Size: 2048 MyFlags: 16
T@1 : | | | exit: ptr: 1004c5370
T@1 : | |
T@1 : |
T@1 :
T@1 : >innobase_init
T@1 : | >my_malloc
T@1 : | | my: Size: 23 MyFlags: 16
T@1 : | | exit: ptr: 1004bb340
T@1 : |
I don't know whether it is gcc 3.2 or an InnoDB bug. A recompiled mysql-64bit
without InnoDB works, using gcc 3.2 on Solaris 8. Firing up mysql client and
playing with SQL commands works, too. In the next days, I will run some
stress tests with threads. I expect the thread issues in former gcc 3.x to be
gone.
Regards,
Jörg
------------------------------------------------------------ ---------
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-thread12407@lists.mysql.com
To unsubscribe, e-mail
Re: 64bit mysqld signal 10 (bus error) on sparcv9-sun-solaris2 and gcc 3.2
am 26.08.2002 14:36:23 von Michael Widenius
Hi!
>>>>> "Jörg" == Jörg Prante writes:=
Jörg> I produced a file /tmp/mysqld.trace. It's the InnoDB initializa=
tion in=20
Jörg> 'innobase_init' causing trouble. After the first malloc, the si=
gnal 10 (bus=20
Jörg> error) was sent. Here are the last few lines:
Jörg> I don't know whether it is gcc 3.2 or an InnoDB bug. A recompil=
ed mysql-64bit=20
Jörg> without InnoDB works, using gcc 3.2 on Solaris 8. Firing up mys=
ql client and=20
Jörg> playing with SQL commands works, too. In the next days, I will =
run some=20
Jörg> stress tests with threads. I expect the thread issues in former=
gcc 3.x to be=20
Jörg> gone.
Jörg, is there any chance you could give Heikki, the creator of Innod=
b,
access to your box to try to fix this ?
Another option is to start mysqld in gdb and then when it dies do:
backtrace
info local
up
info local
up
info local
If Heikki would get the above he should have a good idea of what's
going wrong...
You can find more information in the MySQL manual about running mysqld
under gdb...
Regards,
Monty
--=20
For technical support contracts, goto https://order.mysql.com/
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Michael Widenius
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, CTO
/_/ /_/\_, /___/\___\_\___/ Helsinki, Finland
<___/ www.mysql.com
------------------------------------------------------------ ---------
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-thread12409@lists.mysql.com
To unsubscribe, e-mail
Re: 64bit mysqld signal 10 (bus error) on sparcv9-sun-solaris2 and gcc 3.2
am 26.08.2002 20:08:34 von Heikki Tuuri
Jörg,
have you already created an InnoDB database, or does mysqld crash
immediately, when creating an InnoDB database?
In 4.0.2 there was a bug in 64-bit versions which could make InnoDB to crash
in startup, but that bug can only be present if you have updated a row which
contains an SQL NULL in an InnoDB table. It cannot exhibit itself in the
database creation.
"
July 20, 2002:
On 64-bit computers updating rows which contained the SQL NULL in some
column could cause the undo log and the ordinary log to become corrupt
"
Anyway, running mysqld inside gdb might solve this in 15 minutes. I have run
stress tests today on a 64-bit Linux-2.4.4-SMP Alpha with 3.23.52, and no
bus errors were reported.
Regards,
Heikki
Innobase Oy
----- Original Message -----
From: "Michael Widenius"
To:
Cc: ;
Sent: Monday, August 26, 2002 3:36 PM
Subject: Re: 64bit mysqld signal 10 (bus error) on sparcv9-sun-solaris2 and
gcc 3.2
Hi!
>>>>> "Jörg" == Jörg Prante writes:
Jörg> I produced a file /tmp/mysqld.trace. It's the InnoDB initialization in
Jörg> 'innobase_init' causing trouble. After the first malloc, the signal 10
(bus
Jörg> error) was sent. Here are the last few lines:
Jörg> I don't know whether it is gcc 3.2 or an InnoDB bug. A recompiled
mysql-64bit
Jörg> without InnoDB works, using gcc 3.2 on Solaris 8. Firing up mysql
client and
Jörg> playing with SQL commands works, too. In the next days, I will run
some
Jörg> stress tests with threads. I expect the thread issues in former gcc
3.x to be
Jörg> gone.
Jörg, is there any chance you could give Heikki, the creator of Innodb,
access to your box to try to fix this ?
Another option is to start mysqld in gdb and then when it dies do:
backtrace
info local
up
info local
up
info local
If Heikki would get the above he should have a good idea of what's
going wrong...
You can find more information in the MySQL manual about running mysqld
under gdb...
Regards,
Monty
--
For technical support contracts, goto https://order.mysql.com/
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Michael Widenius
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, CTO
/_/ /_/\_, /___/\___\_\___/ Helsinki, Finland
<___/ www.mysql.com
------------------------------------------------------------ ---------
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-thread12410@lists.mysql.com
To unsubscribe, e-mail
Re: 64bit mysqld signal 10 (bus error) on sparcv9-sun-solaris2 and gcc 3.2
am 27.08.2002 00:17:01 von joergprante
On Monday 26 August 2002 20:08, Heikki Tuuri wrote:
> have you already created an InnoDB database, or does mysqld crash
> immediately, when creating an InnoDB database?
Heikki, no I didn't. I just compiled MySQL with default configuration. MySQL
crashes immediately in 'innobase_init()' after the first malloc (is it
strdup?). With option "--without-innodb", mysqld runs smoothly.
> Anyway, running mysqld inside gdb might solve this in 15 minutes. I have
> run stress tests today on a 64-bit Linux-2.4.4-SMP Alpha with 3.23.52, and
> no bus errors were reported.
I wish I could have done it in 15 minutes. Sun's gdb 5.0 crashed on the mysqld
gcc 3.2 code because of missing DW_FORM_strp support. I have to upgrade gdb,
building gdb 5.2.1 from source for gcc 3.2 and will be back with more
information soon.
> ----- Original Message -----
> From: "Michael Widenius"
> Jörg, is there any chance you could give Heikki, the creator of Innodb,
> access to your box to try to fix this ?
Unfortunately no, I'm not administrator.
> Another option is to start mysqld in gdb and then when it dies do:
>
> backtrace
> info local
> up
> info local
> up
> info local
>
> If Heikki would get the above he should have a good idea of what's
> going wrong...
I will record the output.
Regards,
Jörg
------------------------------------------------------------ ---------
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-thread12411@lists.mysql.com
To unsubscribe, e-mail
Re: 64bit mysqld signal 10 (bus error) on sparcv9-sun-solaris2 and gcc 3.2
am 27.08.2002 00:26:19 von joergprante
On Tuesday 27 August 2002 00:17, Jörg Prante wrote:
> I wish I could have done it in 15 minutes. Sun's gdb 5.0 crashed on the
> mysqld gcc 3.2 code because of missing DW_FORM_strp support. I have to
> upgrade gdb, building gdb 5.2.1 from source for gcc 3.2 and will be back
> with more information soon.
GNU gdb 5.2.1
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 "sparc-sun-solaris2.8"...
(gdb) run
Starting program: /opt/medea/mysql4-64bit/libexec/mysqld
[New LWP 1]
[New LWP 2]
[New LWP 3]
[New LWP 4]
Program received signal SIGSEGV, Segmentation fault.
os_thread_get_curr_id () at os0thread.c:40
40 return(*(os_thread_id_t*)((void*) (&pthr)));
Current language: auto; currently c
(gdb) backtrace
#0 os_thread_get_curr_id () at os0thread.c:40
#1 0x1002fd13c in thr_local_get_in_ibuf_field () at thr0loc.c:145
#2 0x1001ea10c in ibuf_inside () at ibuf0ibuf.c:223
#3 0x1002d37a8 in fil_io (type=10, sync=1, space_id=0, block_offset=5,
byte_offset=0, len=16384,
buf=0x1011c8000, message=0x0) at fil0fil.c:1105
#4 0x100273520 in trx_sys_doublewrite_restore_corrupt_pages () at
trx0sys.c:281
#5 0x1001c6638 in innobase_start_or_create_for_mysql () at srv0start.c:1099
#6 0x10016b314 in innobase_init() () at ha_innodb.cc:470
#7 0x10015ef80 in ha_init() () at handler.cc:147
#8 0x1000cd06c in main (argc=1, argv=0x1005e8790) at mysqld.cc:1951
(gdb) info local
pthr = 1
(gdb) up
#1 0x1002fd13c in thr_local_get_in_ibuf_field () at thr0loc.c:145
145 local = thr_local_get(os_thread_get_curr_id());
(gdb) info local
local = (struct thr_local_struct *) 0x0
(gdb) up
#2 0x1001ea10c in ibuf_inside () at ibuf0ibuf.c:223
223 return(*thr_local_get_in_ibuf_field());
(gdb) info local
No locals.
(gdb)
------------------------------------------------------------ ---------
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-thread12412@lists.mysql.com
To unsubscribe, e-mail
Re: 64bit mysqld signal 10 (bus error) on sparcv9-sun-solaris2 and gcc 3.2
am 27.08.2002 10:29:54 von Heikki Tuuri
Jörg,
this explains it. I used a complex typecast to convert a pthread_t type
object to an unsigned long int. This typecast was necessary because in HP-UX
pthread_t is a struct of 3 fields, not a pointer.
Maybe pthread_t is only a 32-bit pointer in 64-bit Solaris. Then gcc-3.2 may
not align it at an address divisible by 8, which might produce a bus error.
This is already fixed in MySQL-3.23.52. You can try compiling that. This is
also fixed in upcoming 4.0.3 which may be out this week.
Best regards,
Heikki
Innobase Oy
....................
On Tuesday 27 August 2002 00:17, Jörg Prante wrote:
> I wish I could have done it in 15 minutes. Sun's gdb 5.0 crashed on the
> mysqld gcc 3.2 code because of missing DW_FORM_strp support. I have to
> upgrade gdb, building gdb 5.2.1 from source for gcc 3.2 and will be back
> with more information soon.
GNU gdb 5.2.1
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 "sparc-sun-solaris2.8"...
(gdb) run
Starting program: /opt/medea/mysql4-64bit/libexec/mysqld
[New LWP 1]
[New LWP 2]
[New LWP 3]
[New LWP 4]
Program received signal SIGSEGV, Segmentation fault.
os_thread_get_curr_id () at os0thread.c:40
40 return(*(os_thread_id_t*)((void*) (&pthr)));
Current language: auto; currently c
(gdb) backtrace
#0 os_thread_get_curr_id () at os0thread.c:40
#1 0x1002fd13c in thr_local_get_in_ibuf_field () at thr0loc.c:145
#2 0x1001ea10c in ibuf_inside () at ibuf0ibuf.c:223
#3 0x1002d37a8 in fil_io (type=10, sync=1, space_id=0, block_offset=5,
byte_offset=0, len=16384,
buf=0x1011c8000, message=0x0) at fil0fil.c:1105
#4 0x100273520 in trx_sys_doublewrite_restore_corrupt_pages () at
trx0sys.c:281
#5 0x1001c6638 in innobase_start_or_create_for_mysql () at srv0start.c:1099
#6 0x10016b314 in innobase_init() () at ha_innodb.cc:470
#7 0x10015ef80 in ha_init() () at handler.cc:147
#8 0x1000cd06c in main (argc=1, argv=0x1005e8790) at mysqld.cc:1951
(gdb) info local
pthr = 1
(gdb) up
#1 0x1002fd13c in thr_local_get_in_ibuf_field () at thr0loc.c:145
145 local = thr_local_get(os_thread_get_curr_id());
(gdb) info local
local = (struct thr_local_struct *) 0x0
(gdb) up
#2 0x1001ea10c in ibuf_inside () at ibuf0ibuf.c:223
223 return(*thr_local_get_in_ibuf_field());
(gdb) info local
No locals.
(gdb)
How-To-Repeat:
------------------------------------------------------------ ---------
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-thread12416@lists.mysql.com
To unsubscribe, e-mail
Re: 64bit mysqld signal 10 (bus error) on sparcv9-sun-solaris2 and gcc 3.2
am 29.08.2002 13:31:23 von Sinisa Milivojevic
Jörg Prante (by way of Jörg Prante
rgprante@netcologne.de>) writes:
>=20
> MySQL 4.0.2-alpha built with gcc 3.2-64bit in 64 bit mode on a SunBla=
de
> 1000 under Solaris 8 fails at running mysqld.
>=20
> Everything works fine (I can use mysql client and remote connect to a=
nother
> mysqld, and mysql_db_install script works fine too) but not mysqld. I=
t fails
> immediately with signal 10 (bus error) when I try 'mysqld_safe &'. No=
core
> dump. '/tmp/mysql.sock' is created but size is 0 (zero) bytes after f=
ailure.
>=20
>=20
> Regards,
>=20
> Jörg Prante
>=20
Latest 4.0.3 source, with one additional patch works fine on 64bit
Solaris 2.8.=20
I would recommend you try 4.0.3 instead. Even better to try latest
4.0.3 from our BK repository.
--=20
Regards,
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Sinisa Milivojevic
>
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Fulltime Developer
/_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus
<___/ www.mysql.com
------------------------------------------------------------ ---------
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-thread12426@lists.mysql.com
To unsubscribe, e-mail