CWO
Joined: 04 Feb 2006 Posts: 677 Location: Chicago, IL USA
|
Posted: Mon Jan 01, 2007 8:24 am Post subject: Queued data mode and packethook processing conflict? 096.4b |
|
|
Last night I had my shard completely freeze. And no wonder, it was stuck on a packethook (critical). The thing I don't understand though is there are no loops at all in this hook and the PC was way out of range for the script.
I'm piecing together quite a few theories on how this went about and I think it possibly had to do with queued data mode.
Semaphore PID: 192
I'm guessing this is the thread number its on.
Last Script: pkg/PacketHooks/sendAscii.ecl PC: 1250
That PC is completely wrong since the script only goes to 225. But it is a packethook which supports that its possibly the right script since its running critical.
192 - Client#933
Looking up the thread, it seems to be a client..
Client#933: Switching to queued data mode (1, 17 bytes)
And theres the last line before it froze...
All info I have in its entirety...
POL.log
| Code: |
Client#933 connected from (removed) (18 connections) on interface (removed)
[12/31 23:26:39] Account (removed) logged in from (removed)
[12/31 23:26:41] Account (removed) selecting character (removed)
Client#933: Switching to queued data mode (1, 17 bytes)
*Thread Info*
Semaphore PID: 192
Scripts Thread Checkpoint: 0
Last Script: pkg/PacketHooks/sendAscii.ecl PC: 1250
Escript Instruction Cycles: 718681226
Tasks Thread Checkpoint: 1
Active Client Thread Checkpoint: 116
Current Threads:
192 - Client#933
300 - Tasks
348 - Client#825
428 - Client#840
884 - Client#901
976 - Client#910
1592 - Client#678
1604 - Client#829
1724 - Client#669
1728 - Decay_malas
1788 - Client#800
1848 - Client#849
2044 - Client#906
2072 - Client#869
2744 - Client#917
3024 - Client#931
3180 - Client#926
3220 - Client#922
3340 - Reap
3388 - SocketClientThread
3516 - Decay_tokuno
3588 - Client#930
3636 - Client#859
3748 - Listen
3752 - HTTP
3772 - Client#836
3812 - Scripts
3816 - Decay_ilshenar
3820 - Decay_britannia_alt
3832 - Main
3840 - Decay_britannia
3880 - AuxService
4012 - ThreadStatus
|
sendASCII.lst
| Code: |
Exported Functions:
PC Args Name
14 2 HandleAsciiText
C:\pol096\pkg\PacketHooks\sendAscii.src, Line 40
var COLOR_BYTE := 10;
0: decl global #0
1: 10L
2: :=
3: #
var STAFF_COLOR := 1;
4: decl global #1
5: 1L
6: :=
7: #
C:\pol096\pkg\PacketHooks\sendAscii.src, Line 44
program sendAscii()
Print( "LSD: Hooking Send Ascii Text Packet..." );
8: "LSD: Hooking Send Ascii Text Packet..."
9: Func(1,0): Print
10: #
return 1;
11: 1L
12: progend
13: progend
C:\pol096\pkg\PacketHooks\sendAscii.src, Line 48
exported function HandleAsciiText( who, byref packet )
14: makelocal
15: jmp userfunc @17
16: progend
17: pop param byref 'packet'
18: pop param 'who'
who := who;
19: local #1
20: local1 :=
var textlen := packet.GetInt16(PACKETLEN) - TEXT;
21: decl local #2
22: local #0
23: 1L
24: Call Method id getint16 (#60, 1 params)
25: 45L
26: -
27: :=
28: #
var thetext := packet.GetString((TEXT-1), textlen);
29: decl local #3
30: local #0
31: 44L
32: local #2
33: Call Method id getstring (#65, 2 params)
34: :=
35: #
if(thetext["[invulnerable]"])
36: local #3
37: "[invulnerable]"
38: [] 1
39: if false goto 42
return 1;
40: 1L
41: return
var theserial := packet.GetInt32(ITEMID);
42: decl local #4
43: local #0
44: 3L
45: Call Method id getint32 (#61, 1 params)
46: :=
47: #
var theobject := SystemFindObjectBySerial(theserial);
48: decl local #5
49: local #4
50: 0L
51: Func(2,0): SystemFindObjectBySerial
52: :=
53: #
if (((Distance(who, theobject) > 18) || (theobject.concealed > who.cmdlevel)) &
54: local #1
55: local #5
56: Func(2,1): Distance
57: 18L
58: >
59: local #5
60: get member id 'concealed' (33)
61: local #1
62: get member id 'cmdlevel' (45)
63: >
64: ||
65: local #5
66: get member id 'container' (15)
67: get member id 'objtype' (4)
68: 65281L
69: <>
70: &&
71: if false goto 74
return 1;
72: 1L
73: return
if ( theobject.isA(POLCLASS_EQUIPMENT) && GetObjProperty(theobject, "materialin
74: local #5
75: 14L
76: Call Method id isa (#0, 1 params)
77: local #5
78: "materialinfo"
79: Func(2,2): GetObjProperty
80: &&
81: local #3
82: 1L
83: 4L
84: [,]
85: "*HP:"
86: <>
87: &&
88: if false goto 101
start_script(":packethooks:sendhp" , { who, packet, theobject });
89: ":packethooks:sendhp"
90: array
91: local #1
92: +=
93: local #0
94: +=
95: local #5
96: +=
97: Func(3,0): Start_Script
98: #
return 0;
99: 0L
100: return
if((theobject.cmdlevel != 0) && (theobject.acct) && (theobject.concealed > 1) &
101: local #5
102: get member id 'cmdlevel' (45)
103: 0L
104: <>
105: local #5
106: get member id 'acct' (44)
107: &&
108: local #5
109: get member id 'concealed' (33)
110: 1L
111: >
112: &&
113: local #5
114: get member id 'concealed' (33)
115: local #1
116: get member id 'cmdlevel' (45)
117: <=
118: &&
119: local #5
120: get member id 'name' (3)
121: local #3
122: ==
123: &&
124: if false goto 145
var charname := thetext;
125: decl local #0
126: local #3
127: :=
128: #
charname := charname + " ["+theobject.concealed+"]";
129: local #6
130: " ["
131: +
132: local #5
133: get member id 'concealed' (33)
134: +
135: "]"
136: +
137: local6 :=
packet.SetString((TEXT-1), charname, 1);
138: local #0
139: 44L
140: local #6
141: 1L
142: Call Method id setstring (#67, 3 params)
143: #
144: leave block(1)
var STAFF_SET := 0;
145: decl local #6
146: 0L
147: :=
148: #
if(theobject.isA(POLCLASS_MOBILE))
149: local #5
150: 3L
151: Call Method id isa (#0, 1 params)
152: if false goto 224
if(STAFF_COLOR)
153: global #1
154: if false goto 201
if((theobject.cmdlevel != 0) && (theobject.acct) && (theobject.enabled("invul")
155: local #5
156: get member id 'cmdlevel' (45)
157: 0L
158: <>
159: local #5
160: get member id 'acct' (44)
161: &&
162: local #5
163: "invul"
164: Call Method id enabled (#10, 1 params)
165: &&
166: if false goto 201
case(theobject.cmdlevel)
167: local #5
168: get member id 'cmdlevel' (45)
169: casejmp
1: @170
2: @173
3: @176
4: @179
5: @182
default: @184
STAFF_COLOR := STAFF_COLOR_COUN;
170: 2538L
171: global1 :=
172: goto184
STAFF_COLOR := STAFF_COLOR_SEER;
173: 2507L
174: global1 :=
175: goto184
STAFF_COLOR := STAFF_COLOR_GM;
176: 2503L
177: global1 :=
178: goto184
STAFF_COLOR := STAFF_COLOR_ADMIN;
179: 2572L
180: global1 :=
181: goto184
STAFF_COLOR := STAFF_COLOR_DEV;
182: 2571L
183: global1 :=
if(thetext == theobject.name)
184: local #3
185: local #5
186: get member id 'name' (3)
187: ==
188: if false goto 201
packet.SetInt16(COLOR_BYTE, STAFF_COLOR);
189: local #0
190: global #0
191: global #1
192: Call Method id setint16 (#63, 2 params)
193: #
packet.SetInt16(12,4);
194: local #0
195: 12L
196: 4L
197: Call Method id setint16 (#63, 2 params)
198: #
STAFF_SET := 1;
199: 1L
200: local6 :=
if(STAFF_SET)
201: local #6
202: if false goto 205
return 0;
203: 0L
204: return
if(theobject.enabled("invul"))
205: local #5
206: "invul"
207: Call Method id enabled (#10, 1 params)
208: if false goto 224
if(thetext == theobject.name || thetext == theobject.title_guild )
209: local #3
210: local #5
211: get member id 'name' (3)
212: ==
213: local #3
214: local #5
215: get member id 'title_guild' (52)
216: ==
217: ||
218: if false goto 224
packet.SetInt16(COLOR_BYTE, INVUL_COLOR);
219: local #0
220: global #0
221: 55L
222: Call Method id setint16 (#63, 2 params)
223: #
return 0;
224: 0L
225: return
|
|
|