how to remove stale locks ?
Posted in 1998
Hi.
Over here student develop programs in java using the jdbc:odbc bridge
to connect to informix oline 7.23. When their programs crash, the locks
are not released properly. Hence I need a way to remove them. So far I
couldn't find a proper way how to do it. Taking informix offline and
then online again is no real option.
So how is this done?
Chris.
PS: this is what onstat -kus says. If I understood correctly, addresses
in Userthreads, column wait, should reapprear either in Latches.address
or Locks.address. Actualy, I can't find even one of them in one of the
other tables. The other way around it is clear which session holds the
locks listed. BTW: Many of those sessions waiting for locks don't (or
better: shouldn't) exist anymore. How can I get rid off them?
> onstat -kus
INFORMIX-OnLine Version 7.23.UC2 -- On-Line -- Up 05:38:50 -- 9160 Kbytes
Userthreads
address flags sessid user tty wait tout locks nreads nwrites
a12a018 ---P--D 1 informix - 0 0 0 35 9
a12a458 ---P--F 0 informix - 0 0 0 0 184
a12a898 ---P--B 9 informix - 0 0 0 0 0
a12b558 ---P--D 12 informix - 0 0 0 0 0
a12b998 Y--P--- 19 infx4 15 a270908 0 5 0 0
a12c218 Y--P--- 1134 infx5 5 a3bee88 0 1 0 0
a12d318 Y--P--- 676 infx5 6 a3ab108 0 1 1 0
a12dfd8 Y--P--- 1090 dbprak2 5 a3bf0f0 0 1 0 0
a12ec98 Y--P--- 1135 infx5 5 a1d1718 0 1 0 0
a12f518 Y-BP--- 1127 infx4 4 a436e08 0 13 10 0
10 active, 128 total, 24 maximum concurrent
Latches with lock or userthread set
name address lock wait userthread
Locks
address wtlist owner lklist type tblsnum rowid key#/bsiz
a031de4 0 a12f518 0 HDR+S 100002 220 0
a031e44 0 a12b998 0 S 100002 220 0
a031ea4 0 a12b998 a031e44 HDR+S f00066 0 0
a031f64 0 a12b998 a031ea4 HDR+IS f00060 0 0
a031f94 0 a12b998 a031f64 HDR+SR f00060 40e K- 2
a031fc4 0 a12b998 a031f94 HDR+S f00060 40e 0
a032054 0 a12dfd8 0 HDR+S 100002 210 0
a0320e4 0 a12f518 a0327a4 HDR+S f00081 200 0
a032114 0 a12c218 0 HDR+S 100002 214 0
a032204 0 a12f518 a032a44 HDR+X f00082 b00 1
a032414 0 a12f518 a032a74 HDR+X f00082 c00 0
a032594 0 a12f518 a0320e4 HDR+IX f00082 0 0
a0325f4 0 a12d318 0 S 100002 214 0
a0327a4 0 a12f518 a032804 HDR+S f00081 100 1
a0327d4 0 a12f518 a0329b4 HDR+S f00080 100 1
a032804 0 a12f518 a032954 HDR+IS f00081 0 0
a032834 0 a12f518 a032204 HDR+X f00082 200 2
a032954 0 a12f518 a0327d4 HDR+S f00080 200 0
a0329b4 0 a12f518 a031de4 HDR+IS f00080 0 0
a032a44 0 a12f518 a032594 HDR+X f00082 a00 0
a032a74 0 a12f518 a032834 HDR+X f00082 300 3
a032d14 0 a12ec98 0 S 100002 214 0
22 active, 2000 total, 2048 hash buckets