Wednesday, June 30, 2004

More fun with AIX

Wild. Turns out that it was GCC. I switched from GCC 3.3.2 to IBM's xlc_r compiler, and all the problems went away. It took some doing to get the compiler flags mapped from GCC to xlc_r, but it wasn't that bad. And as a side effect, some other tools such as ldd also started working, where they hadn't before.

Lesson learned - don't use GCC for building JNI libraries for AIX.

Monday, June 28, 2004

AIX? Feh!

I've been working with a client porting some iXmatch code to AIX. Ugh. I've been killing their AIX machine on a regular basis; causing kernel panics. I'm working with java code and some JNI code, not doing anything as root at all. I shouldn't be able to cause the machine to choke at all if I'm not running as root. Ever. I though this was a solved problem, like, 15-20 years ago. I'm a java developer - I don't want to have to learn kdb!


WFT?


If you're interested, here's the stack frame causing the problem:

(0)> f
pvthread+007700 STACK:
[00646324]ld_xatt1+00008C (00000000, 10000000, 00000000, D12C5000, 00000001 [??])
[006B6F18]ld_relocate+000078 (??)
[006B3430]ld_loadmodule+0005D8 (2FF3B300, 2FF3A5CC, 00000031, 00000280, 2FF3A5CD, 00000000, 2FF3B268)
[006B3C5C]ld_proc_load+000530 (??, ??, ??, ??, ??, ??, ??)
[006BE97C]_dl_loadModule+000068 (??, ??, ??, ??, ??, ??, ??)
[006BE538]ld_loadutil+0000D0 (??, ??, ??, ??, ??)
[001070E0]forkstack_load+000060 ()
Not a valid VMM address @ D020F428
(0)>


Yeah - it looks like a dynamic loader problem to me too. It's also tied to the pthreads library somehow. The code works fine when running single-threaded, but in a MT environment, it dies hard. I wrote a Junit test class that spins up a bunch of child threads and then fires up the ixmatch code. If the ixmatch code is loaded from thread 0, it works great. If not, it dies and takes the machine down with it.

Sick, sick, sick.

Back from Grandma's

I did the Garry Bjorklund Half-marathon last week. Had a good run - not quite a personal best, but there was a 15 mph headwind most of the race. There were no course records set this time; so I don't feel bad about not being at my fastest-ever either.

I think I got maybe 3 hours of sleep prior to the race - having to get up at 4:30 is the worst part of this race.

Can't wait to do it again next year!