Subject: NetBSD/Alpha 1.5_beta MySQL 3.23.26beta Finally A Success
To: mysql <>
From: netbsd alpha <>
List: current-users
Date: 10/23/2000 22:45:47
If anyone has kept up with my posts about getting
NetBSD/Alpha 1.5_ALPHA2 to work with MySQL 3.23.26.
During this proccess, I've linked MySQL with several
different threading systems (all latest as of today): 

    - MySQL's MIT-Pthread
    - PTL2
    - gnu Pthread (pth and pthread)
    - original MIT-Pthreads
    - pmpthreads (patched up MIT-Pthreads)
    - unproven (derivative of MIT-Pthreads)

The original MIT-Pthreads, pmpthreads, and unproven
were just dated. So I didn't put too much efforts into
that. I originally worked with MySQL's default
MIT-Pthreads version. Under NetBSD/Alpha 1.5_ALPHA2,
MySQL would core dump left and right under very light
load. I would see:

    - Undefined PLT symbol "memcpy,"
    - Undefined PLT symbol "memmove,"
    - Undefined PTL "pthread_getspecific," and 
    - many Segmentation fault (Stack bottom xxxx)
    - machdep_sys_sigprocmask () 
      No such file or directory

I wasn't able to track down these errors. At first I
thought it was because library dependency problems.
"memcpy", "memmove" were in libc. So I even linked to
that directly without better results.
"pthread_getspecific" was in MySQL's MIT-pthreads, so
I had no idea why it was undefined. The mysterious
Segmentation fault and "syscall-template.S" errors
where just that, mysterious.

After all that frustration, I tried PTL2. It compiled
prefectly fine from both NetBSD's package collection
and from source. Ater linking it with MySQL, things
looked good. After some tests, it would core dump with
similar errors as above. Even worst, I wasn't able to
use MySQL's clients. It would all just hang there and
do nothing once i start it.

After a few packs of cigarettes, I decided to give
GNU's Pthread a try. Again, it compiled cleanly. After
re-compiling MySQL and linking it with GNU's Pthread,
I started "safe_mysqld." Load up the web page driven
by PHP-4.0.3pl1. Nothing came up. I went to start one
of the MySQL clients, they all hung and were
comatosed. Something was different with GNU Pthread
though, it not only didn't work, it didn't core dump.
That was some what of a nice change -- not having to
see a 70+ MB of mysqld.core file.

By now, I felt like pulling all my hair out. For all I
knew, my lungs were going to collaps from all that
smoking. I've been at this for a little over 3-days,
and no progress. Actually there were some results.
Something did come out of all this. I'm sure you'll
notice as of MySQL 3.23.27, you see in their
documentations that MIT-Pthreads DOES support Unix
socket. You'll also see that "select now()" should
return the proper date in stead of 2036 or 2037 on
64-bit machines located in negative GMT time zones.
Lastly, it should compile cleanly on NetBSD 1.5.

Anyway, back to my frustrating time. By now, I've
bittened everyone's head off who came in contact with
me. I was so on-edge. I decided to sup
NetBSD-current's source, compiled a new kernel, and
make build on the source. I went to sleep.

When I woke up, I rebooted the machine with the new
binaries and kernel. Things went with out a hitch.
Stared at MySQL's directory for a while and then
decided to start fresh. Patched up and re-compiled
MySQL with it's MIT-Pthreads. By now, I got really
good at keying the same tasks over and over again --
not to mention my finger tips were starting to hurt.
"safe_mysqld" was started. Put some stress on the web
server and didn't notice a core dump or any errors in
mysql's logs. I was stunned.

Now I suppose I should wrap up this e-mail. If you are
running NetBSD/Alpha 1.5_ALPHA2, sup to the latest
source and wait for MySQL 3.23.27. I think it should
be out "very shortly."

Do You Yahoo!?
Yahoo! Messenger - Talk while you surf!  It's FREE.