Re: When is it safe to kill -9 an unkillable sqlturbo?
Posted in 1996
Troy Hewitt wrote:
>
> When killing an sqlturbo process you should follow these steps:
>
> 1) Kill the front-end (application) first.
> 2) If the sqlturbo is still around after a minute, perform a tbmode -z
> on the session.
> 3) If the session still won't die, run an onstat -u and look at the
> flags for the session. As long as there isn't an X (critical write)
> in progress, it's safe to kill -9 the sqlturbo.
> 4) If there's a critical write in progress, killing the sqlturbo process
> will automatically bring the engine down. This is to prevent data
> corruption.
>
> There is no way to terminate an sqlturbo process if it's in a
> critical write without bringing down the engine.
>
> Troy
When you send a catchable signal to the sqlturbo (e.g. by tbmode -z or
kill -15) it will rollback any work in progress at the time that the
kill is received. A critical sqlturbo process is one which has a
transaction to be rolled back.
If it was running a transaction which involved a lot of rows (and a
frequent reason for wishing to kill the process is that a user has set
off such a transaction) this can take a lot of time. If you were to
send an uncatchable signal (such as kill -9) the sqlturbo would be
unable to do the rollback and, unless some other action were taken, the
system would be left with an incomplete transaction and, possibly,
inconsistent data. The other action which Informix takes to avoid this
is to stop the engine. When the DBA restarts the engine it rolls back
all pending transactions before coming up into quiescent state; a
drastic but effective (assuming the engine succeeds in coming up without
Informix having to dial in and fix the damage) way to complete the
rollback which the uncatchable signal prevented.
The bottom line is that when you signal the sqlturbo you just have to
wait for the rollback to finish. It's the less unpleasant option.
Ian