Re: unkillable sid's



On Feb 29, 3:10 pm, "da...@xxxxxxxxxxxxx" <da...@xxxxxxxxxxxxx> wrote:
On 29 Feb, 18:42, Darren_Jac...@xxxxxxxxxx wrote:



Greetings,

9.40FC2xa
HPUX 11.11

I have 3 sessions that I can't kill. All three sessions are running the
same sql and the onstat -g ses are all the same. I tried an xtree to see
what, if anything these sessions are doing, and xtree comes back blank.

Here is the ses...yes, it's PeopleSoft.

Any ideas on how to take them out? We are having perf issues and I've seen
in the past where these queries have caused informix to hang.

Thanks in advance for any insight.

$ ses 194

IBM Informix Dynamic Server Version 9.40.FC2XA -- On-Line -- Up 3 days
08:09:36 -- 11580348 Kbytes

session #RSAM total used
dynamic
id user tty pid hostname threads memory memory
explain
194 sysadm FSAPP2P 3900 fsapp2p. 1 733184 691328
off

tid name rstcb flags curstk status
309 sqlexec c0000002488914a0 ---P--- 62752 running

Memory pools count 6
name class addr totalsize freesize #allocfrag
#freefrag
194 V c00000024a00e040 479232 31512 2546 28
194*O0 V c00000025c469040 36864 2888 31 2
194*O1 V c00000025bbf0040 40960 2888 35 2
194*O2 V c00000025bc4d040 49152 1864 44 2
194*O3 V c00000025bdbc040 69632 1864 64 2
194*O4 V c00000025beb3040 57344 840 53 1

name free used name free used
overhead 0 19536 mtmisc 0 280
scb 0 312 opentable 0 49432
filetable 0 8160 ru 0 304
misc 0 128 blobio 0 10192
log 0 2184 temprec 0 10104
blob 0 2448 keys 0 40368
ralloc 0 341296 gentcb 0 1808
ostcb 0 3416 sort 0 104
sqscb 0 180592 sql 0 72
rdahead 0 1120 hashfiletab 0 552
osenv 0 1080 sqtcb 0 9600
fragman 0 624 udr 0 7616

sqscb info
scb sqscb optofc pdqpriority sqlstats optcompind
directives
c000000247f518b0 c00000024a00f028 0 0 0 2
1

Sess SQL Current Iso Lock SQL ISAM F.E.
Id Stmt type Database Lvl Mode ERR ERR Vers
Explain
194 SELECT rol8prd CR Wait 0 0 9.03 Off

Current SQL statement :
SELECT BUSINESS_UNIT, BOOK FROM PS_SP_BOOKB3_CLSVW A WHERE
OPRCLASS='AMANLST' AND BUSINESS_UNIT=' ' ORDER BY BUSINESS_UNIT, BOOK
FOR
READ ONLY

Last parsed SQL statement :
SELECT BUSINESS_UNIT, BOOK FROM PS_SP_BOOKB3_CLSVW A WHERE
OPRCLASS='AMANLST' AND BUSINESS_UNIT=' ' ORDER BY BUSINESS_UNIT, BOOK
FOR
READ ONLY

Here's the view:

create view "sysadm".ps_sp_bookb3_clsvw
(oprclass,business_unit,book,acct_ent_tmpl_id,
required_sw,book_type,currency_cd,capitalization_min,lease_cap_min,distribu­tion_sw,
disposal_dist_sw,business_unit_gl,cal_depr_pd,rt_type,ledger_group,ledger,b­ud_ledger_group)
as
select x1.oprclass ,x0.business_unit ,x0.book ,x0.acct_ent_tmpl_id
,x0.required_sw ,x0.book_type ,x0.currency_cd ,x0.capitalization_min
,x0.lease_cap_min ,x0.distribution_sw ,x0.disposal_dist_sw
,x0.business_unit_gl ,x0.cal_depr_pd ,x0.rt_type ,x0.ledger_group
,x0.ledger ,x0.bud_ledger_group from "sysadm".ps_bu_book_tbl
x0 ,"sysadm".ps_sp_book_clsvw x1 ,"sysadm".ps_set_cntrl_rec
x2 ,"sysadm".ps_led_grp_tbl x3 ,"sysadm".ps_led_grp_led_tbl
x4 where (((((((((((x0.distribution_sw = 'Y' ) AND (x2.recname
= 'LED_GRP_TBL' ) ) AND (x2.setcntrlvalue = x0.business_unit_gl
) ) AND (x3.setid = x2.setid ) ) AND (x3.ledger_group = x0.ledger_group
) ) AND (x4.setid = x3.setid ) ) AND (x4.ledger_group = x3.ledger_group
) ) AND ((((x3.ledgers_sync = 'Y' ) AND (x4.primary_ledger
= 'Y' ) ) AND ((x4.ledger = x0.ledger ) OR (x0.ledger = ''
) ) ) OR ((x3.ledgers_sync != 'Y' ) AND (x4.ledger = x0.ledger
) ) ) ) AND (x1.setid = (select x5.setid from "sysadm".ps_set_cntrl_rec
x5 where ((x5.recname = 'BOOK_DEFN_TBL' ) AND (x5.setcntrlvalue
= x0.business_unit ) ) ) ) ) AND (x1.book = x0.book ) ) AND
(x1.business_unit = x0.business_unit ) ) ;

What does onstat -g stk for the threads give? What flags are against
the session in onstat -u?

onstat -g stk usually isn't very accurate when run against threads in
the "running" state (it can sometimes print a stack out for the
thread, but the result is usually just the stack of what the thread
had been doing the last time it yielded, not what it is currently
doing, other times -g stk on a running thread just failes to unwind
the stack at all and just gives things like *unknown* since the
program counter, and stack pointer (tos) that is checked by the -g stk
code isn't updated on the fly as the thread executes). To get an
accurate stack for running threads you would be better off running the
onmode -X stack <vp id> which will generate a stack into a file. To
find the vp the thread is executing on you can use onstat -g act and
look at the tid column and the vp-class column..if it's on 1cpu then
use 1 for vp id, if its on 4cpu then use 4 for the vp-id.

As a side note, the onmode command to kill sessions doesn't actually
kill the session, it just sets a kill flag that needs to be checked
for by the session so it will then kill itself. If the session is in
some sort of non yielding loop and it's stuck, then the onmode command
to kill that session usually isn't effective, and unless the threat
comes out of it's loop and checks the kill flag, you are stuck with
forcing the server offline, or possibly forcing it to single user mode
to try and kill the thread that way.

Jacques
.



Relevant Pages

  • Re: unkillable sids
    ... same sql  and the onstat -g ses are all the same. ... but the result is usually just the stack of what the thread ... the onmode command to kill sessions doesn't actually ... kill the session, it just sets a kill flag that needs to be checked ...
    (comp.databases.informix)
  • Re: problem connecting to db.
    ... rerun the service with above problem, and kill its oracle-session ... alter system kill session ... ... So do you see the memory being released after you kill? ... like lock type we might be able to help figure out what is going on. ...
    (comp.databases.oracle.misc)
  • Re: Newsreaders and 10.5
    ... locks up after a post and I have to kill it. ... This also marks read as ... unread in the current session. ...
    (comp.sys.mac.advocacy)
  • Re: Scheme vs Lisp! [was Re: web application framework]
    ... > session in interaction with a web page using function calls and returns ... What about keeping state in memory (closures+call stack) ... That's what I do (keeping state in memory) but in objects and closures, ... in the call stack because, as I and others tried to explain, web applications ...
    (comp.lang.lisp)
  • Re: The right time to quit, or pull a bet!
    ... people appear to have no intention of ever taking that big stack to the ... They just like to watch the pretty green and black chips get ... Dozens of photos of all the times i WALKED AWAY with increased money and ... ended a session as a winner, ...
    (rec.gambling.craps)