Subject: PTL2, MySQL, NetBSD/Alpha core dumps
To: None <current-users@netbsd.org>
From: Thomas T. Thai <tom@minnesota.com>
List: current-users
Date: 10/21/2000 13:16:27
here is the message i sent to the author of PTL2. Perhaps someone can shed
some light on it as well.

PTL2 is from the package collection. MySQL is 3.23.26-beta.

---------- Forwarded message ----------
Date: Sat, 21 Oct 2000 12:43:20 -0500 (CDT)
From: Thomas T. Thai <tom@ns01.minnesota.com>
To: KOIE Hidetaka <hide@koie.org>
Cc: mysql@lists.mysql.com, pthread@media.osaka-cu.ac.jp
Subject: RE: (pthread 506) Forward: PTL2 NetBSD/Alpha

thanks for the response. I actually figured it out before receiving your
email. here is what is used (sh shell):

export CC=ptlgcc && export CXX=ptlg++ and it compiled just fine with only
one error:

conflict in redefinition of these two functions:
/*
#ifndef PTL_NO_RENAME
# define pthread_mutex_lock(mutex) \
        _pthread_mutex_lock(mutex, __FILE__, __FUNCTION__, __LINE__)
#endif
 */

so i commented out from the PTL's pthread.h file. then compilation
finished. i started safe_mysqld script and tested the client programs:

first i tested mysqladmin --password=***** version:
<copyright display>

Server version          3.23.26-beta-log
Protocol version        10
Connection              Localhost via UNIX socket
UNIX socket             /tmp/mysql.sock
===>IT HANGS HERE FOR ABOUT 30 SECONDS 
===>BEFORE GIVING THE SHELL PROMPT BACK
===>OR I HAD TO PRESS CTRL-C TO GET THE NEXT LINE

Uptime:                      2 min 25 sec

Threads: 2  Questions: 1125  Slow queries: 0  Opens: 13  Flush tables: 1
Open tables: 7 Queries per second avg: 7.759

===>CTRL-C AGAIN TO GET MY SHELL PROMPT BACK

mysqladmin --password=****** shutdown
would just hang there indefinitely. CTRL-C wouldn't break it out. I had to
use kill -KILL "process#" to get rid of it.

mysql --password=*****  -e "select now()"
would hang indefinitely 'til i issue a kill -HUP to the process.

NOTE: php linked with my other compile of mysql's mit-pthread can still
access the database just fine. i've not tried to compile php with this
version of mysql using PTL2 threads.


Here are the mysqld's error log:

001021 04:01:54  mysqld restarted
/usr/local/install/mysql-3.23.26-beta/libexec/mysqld: Undefined PLT symbol
"pthread_getspecific"
(reloc type = 26, symnum = 71)
001021 04:01:54  mysqld restarted
/usr/local/install/mysql-3.23.26-beta/libexec/mysqld: ready for
connections
/usr/local/install/mysql-3.23.26-beta/libexec/mysqld: Undefined PLT symbol
"pthread_getspecific"
(reloc type = 26, symnum = 71)
001021 05:12:48  mysqld restarted
001021 05:12:48  mysqld restarted
/usr/local/install/mysql-3.23.26-beta/libexec/mysqld: ready for
connections
001021 08:30:14  mysqld restarted
/usr/local/install/mysql-3.23.26-beta/libexec/mysqld: Undefined PLT symbol
"pthread_getspecific"
(reloc type = 26, symnum = 71)
001021 08:30:14  mysqld restarted
/usr/local/install/mysql-3.23.26-beta/libexec/mysqld: ready for
connections
pid 3972 (mysqld): unaligned access: va=0x12000287b pc=0x120104f60
ra=0x120104f00 op=ldt
[Thread 14]Segmentation fault (Stack bottom 0x124bfb1f0)
Abort trap - core dumped
001021 10:43:55  mysqld restarted
001021 10:43:55  mysqld restarted
/usr/local/install/mysql-3.23.26-beta/libexec/mysqld: ready for
connections
001021 11:07:26  mysqld restarted
/usr/local/install/mysql-3.23.26-beta/libexec/mysqld: Undefined PLT symbol
"memmove" (reloc type
= 26, symnum = 137)
001021 11:07:26  mysqld restarted
/usr/local/install/mysql-3.23.26-beta/libexec/mysqld: ready for
connections
[Thread 22]Segmentation fault (Stack bottom 0x124d971f0)
Abort trap - core dumped
001021 12:27:10  mysqld restarted
001021 12:27:10  mysqld restarted
/usr/local/install/mysql-3.23.26-beta/libexec/mysqld: ready for
connections


On Sat, 21 Oct 2000, KOIE Hidetaka wrote:

> Date: Sat, 21 Oct 2000 23:13:15 +0900
> From: KOIE Hidetaka <hide@koie.org>
> To: pthread@media.osaka-cu.ac.jp, tom@minnesota.com
> Subject: RE: (pthread 506) Forward: PTL2 NetBSD/Alpha
> 
> 
>   | I'm trying to link PTL2 with MySQL 3.23.26-beta on NetBSD/Alpah
>   | 1.5_ALPHA2. Here is my configure script:
>  ..
>   | for some reason, ./configure can't detect the PTL libraries and thinks
> 
> Gussing:
> 
> env CC=ptlgcc LD=ptlgcc ./configure \
> --prefix=/usr/local/install/mysql-3.23.26-beta \
> --localstatedir=/var/mysql \
> --with-low-memory \
> --with-named-curses=curses \
> --with-gnu-ld \
> --with-mysqld-ldflags="-lz" \
> --with-client-ldflags="-lz" \
> --without-docs
> 
> --
> KOIE Hidetaka <hide@koie.org>
>