mutex dbs_partn and pt_170003
Posted in 2009
Topics: Stored Procedures & SPL, Platform-Specific Issues, Jobs, Consulting & Announcements
Hi everyone, we are having a problem since this morning with mutexes. Our
batch process got stuck waiting mutex dbs_patn and pt_170003.
We are using IBM Informix Dynamic Server Version 10.00.FC9 on AIX 5.3
This is a unormal behaviour in our system because we havent had problems with
mutexes before, we checked the logs of process for the same time and same hour
and we have not seen problems for mutexes.
The partnum 170003 is a fragment for a fragmented table. Anyone nknows why is
this happeing?? Thanks in advanced.
ONSTAT -U
7000004b39d1ae0 B--PR-- 582015 informix - 700000056c74910 0 1 4414222 18979
70000053964bc98 ---PR-- 545703 s1000 - 0 0 3 217748 708
7000004e6edb490 S--PR-- 546715 s1000 - 7000004b4f86718 0 3 210055 1155
7000005396423b0 ---PR-- 545592 s1000 - 0 0 3 209711 656
70000052ba04e50 S--PR-- 545735 s1000 - 7000004b4f86718 0 3 202757 667
70000051c60c7a0 B--PR-- 582028 s1000 - 700000056aadf30 0 1 201339 0
70000051c60f350 S--PR-- 545623 s1000 - 7000004b4f86718 0 3 192933 815
7000004c2214bf0 ---PR-- 546124 s1000 - 0 0 3 188316 689
700000539643240 ---PR-- 545717 s1000 - 0 0 3 183757 513
7000004e6ee5c08 S--PR-- 545653 s1000 - 7000004b4f86718 0 3 180458 482
700000539638380 ---PR-- 546110 s1000 - 0 0 3 178794 1255
700000539653118 ---PR-- 545564 s1000 - 0 0 3 176285 726
70000051c62ff90 S--PR-- 546883 s1000 - 7000004b4f86718 0 3 168357 1345
70000050fa2bbd8 ---PR-- 545666 s1000 - 0 0 3 168333 687
70000052b9cd600 S--PR-- 546132 s1000 - 7000004b4f86718 0 3 167999 1004
ONSTAT -G WMX
IBM Informix Dynamic Server Version 10.00.FC9 -- On-Line -- Up 1 days 18:55:29
-- 24286208 Kbytes
Mutexes with waiters:
mid addr name holder lkcnt waiter waittime
39153 7000004b29ab0b8 dbs_partn 646498 0 655969 0
661797 0
653288 0
646718 0
40379 7000004b4f86718 pt_1700003 656587 0 647595 0
Number of mutexes on VP free lists: 18449
ONSTAT -G SES FOR ONE PROCESS:
IBM Informix Dynamic Server Version 10.00.FC9 -- On-Line -- Up 1 days 18:58:32
-- 24286208 Kbytes
session #RSAM total used dynamic
id user tty pid hostname threads memory memory explain
536883 s1000 - 27299940 osiris 1 802816 790096 off
tid name rstcb flags curstk status
647139 sqlexec 700000539644818 S--PR-- 13632 mutex wait(pt_1700003)
Memory pools count 2
name class addr totalsize freesize #allocfrag #freefrag
536883 V 7000004d4b35040 798720 11880 1297 32
536883*O0 V 7000004cb1e1040 4096 840 1 1
name free used name free used
overhead 0 6512 mtmisc 0 328
scb 0 264 opentable 0 91984
filetable 0 13216 ru 0 600
log 0 16520 temprec 0 16248
keys 0 6832 ralloc 0 519856
gentcb 0 1632 ostcb 0 3448
sort 0 104 sqscb 0 40344
sql 0 72 rdahead 0 2144
hashfiletab 0 552 osenv 0 3640
buft_buffer 0 10784 sqtcb 0 14280
fragman 0 39520 shmblklist 0 440
sapi 0 64 udr 0 640
sqscb info
scb sqscb optofc pdqpriority sqlstats optcompind directives
7000004b9309028 7000004dae7c028 0 0 0 0 1
Sess SQL Current Iso Lock SQL ISAM F.E.
Id Stmt type Database Lvl Mode ERR ERR Vers Explain
536883 UPDATE gen DR Wait 0 0 9.29 Off
Stored procedure stack :
context proc-counter opcode name
------------------------------------------------------------------
0x07000004d476ca88 0x7000004c7ec2b50+0x0010 SQL gen:calc_vta_mdia_bcle
Current SQL statement in procedure gen:calc_vta_mdia_bcle
proc-counter 0x7000004c7ec2b50 opcode SQL
update resumen_dia set
(med_rup) = (v_vta_dia)
where (and (and (and (and (= pto_dia, pto), (= fec_mov, fecha)), (= int_art,
v_int_art)), (= ean_art, v_ean_art)), (= ean_rel, v_ean_rel));
Last parsed SQL statement :
execute procedure gen:calc_vta_mdia_bcle( 10," 1","09282009")
User-created Temp tables :
partnum tabname rowsize
9000af mas_de_4_semanas 35
5000e6 t_detalle_vta 31
40026b t_final 57
b00086 muestra_inicial 51
40003e t_arti_alma 94
c003e6 t_alma_rel 47
a003ae t_resumen_dia 129
Hi people, im not really sure if was something related with statistics, but i ran statistics medium for the table, and user applications and batch process ran better, without waiting mutex. However anyones has an opinion about this issue??
Did you check the mutex locks with "onstat -g lmx" and get the session id what
is locking it??
Hi, today happened the same thing, the batch processes suffered for mutexes,
in onstat -g wmx shows the thread which have waiting for mutex others
usethreads is one userthread of batch process:
10010210|IBM Informix Dynamic Server Version 10.00.FC9 -- On-Line -- Up 3 days
13:48:23 -- 24286208 Kbytes
10010210|Mutexes with waiters:
10010210|mid addr name holder lkcnt waiter waittime
10010210|39153 7000004b29ab0b8 dbs_partn 1458478 0 1463345 0
10010210|40385 7000004b4fc1a90 pt_1700005 -1 0 1463394 0
10010210| 1463347 0
10010210| 1461865 0
onstat -g wai|grep -i 145847810010214| 1458478 7000005024aead8 7000004b39d8f60 1 mutex wait pt_1700005
16cpu sqlexec
onstat -u|grep -i 7000004b39d8f60
10010210|7000004b39d8f60 ---PR-- 1263502 s1000 - 0 0 4 1349 0
Something rare is the update statistics for the fragmented table took less
time to run yesterday. This same happened two days ago, and i had to run
statistics for this table. Im thinking to update statistics dropping
distributions instead of taking statistics medium. I think the statistics for
this table could be the problem, since about two weeks ago we are updating
statistics in medium mode.
Related threads
- Posting from the Informix-list
- Migrating from IDS 9.40.UC6 to 11.50.UC3
- Ip for a network session
- questions onstat -g