2003-09-22 22:58:20

by Urban Widmark

[permalink] [raw]
Subject: semaphore IPC problem?


Hello all

I'm having a problem with IBM DB2 on linux. I found a page where IBM
points fingers to the linux semaphore implementation, but without giving
any details.


"Information about the StaleConnectionException on Linux systems

The StaleConnectionException SQl1224 is related to the extension shared
memory attachment. Linux systems have a semaphore problem causing the DB2
SQL1224 error."

http://publib7b.boulder.ibm.com/wasinfo1/en/info/aes/ae/rdat_stalelinux.html


Does that make sense to anyone?
Known semaphore problems/races?


The page has a workaround which is to set it up as a remote database and
connect over 127.0.0.1 instead of shm ipc. Doing that seems to work, but
the setup is annoying. That it works could just be speed related, not sure
if loopback is slower.

The testcase is a number of threads (java) doing repeated select
operations, with commit+close between each and using a connection pool.

I have tested this on 2.4.22 (UP) and 2.6.0-test5. 2.6 can handle a lot
more threads than 2.4 (~70 vs 3-5) before failing, but they both fail in
the same way.


I know I don't have much info ...

Hints on where to look? (other than IBM support)

/Urban