I have a windows service which is multi threaded using a ThreadPool.QueueUserWorkItem, that does some data capture from several other databases. The service for the production environment runs in a 2003 server which has multiple processors. Every now and then almost once every week (not consistent), I get an error. This error does not get trapped in any of my error handling code. My development box has XP, I have run this service on it for several days but never have encountered this error.
A maximum of 4 threads are spawnedduring each run. All threads attempt to update/delete/inserttwo tables, but never the same record.
The service crashes and theonly entry is in the Application Event Viewer.
Event Type:Error
Event Source:.NET Runtime 2.0 Error Reporting
Event Category:None
Event ID:5000
Date:9/18/2009
Time:3:22:38 AM
User:N/A
Computer:DP01ABRE
Description:
EventType clr20r3, P1 salesincentivedatacapture.exe, P2 1.0.0.0, P3 4a9beed3, P4 system.data, P5 2.0.0.0, P6 4889deaf, P7 2490, P8 2c, P9 system.data.sqlclient.sql, P10 NIL.
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Data:
0000: 63 00 6c 00 72 00 32 00 c.l.r.2.
0008: 30 00 72 00 33 00 2c 00 0.r.3.,.
0010: 20 00 73 00 61 00 6c 00 .s.a.l.
0018: 65 00 73 00 69 00 6e 00 e.s.i.n.
0020: 63 00 65 00 6e 00 74 00 c.e.n.t.
0028: 69 00 76 00 65 00 64 00 i.v.e.d.
0030: 61 00 74 00 61 00 63 00 a.t.a.c.
0038: 61 00 70 00 74 00 75 00 a.p.t.u.
0040: 72 00 65 00 2e 00 65 00 r.e...e.
0048: 78 00 65 00 2c 00 20 00 x.e.,. .
0050: 31 00 2e 00 30 00 2e 00 1...0...
0058: 30 00 2e 00 30 00 2c 00 0...0.,.
0060: 20 00 34 00 61 00 39 00 .4.a.9.
0068: 62 00 65 00 65 00 64 00 b.e.e.d.
0070: 33 00 2c 00 20 00 73 00 3.,. .s.
0078: 79 00 73 00 74 00 65 00 y.s.t.e.
0080: 6d 00 2e 00 64 00 61 00 m...d.a.
0088: 74 00 61 00 2c 00 20 00 t.a.,. .
0090: 32 00 2e 00 30 00 2e 00 2...0...
0098: 30 00 2e 00 30 00 2c 00 0...0.,.
00a0: 20 00 34 00 38 00 38 00 .4.8.8.
00a8: 39 00 64 00 65 00 61 00 9.d.e.a.
00b0: 66 00 2c 00 20 00 32 00 f.,. .2.
00b8: 34 00 39 00 30 00 2c 00 4.9.0.,.
00c0: 20 00 32 00 63 00 2c 00 .2.c.,.
00c8: 20 00 73 00 79 00 73 00 .s.y.s.
00d0: 74 00 65 00 6d 00 2e 00 t.e.m...
00d8: 64 00 61 00 74 00 61 00 d.a.t.a.
00e0: 2e 00 73 00 71 00 6c 00 ..s.q.l.
00e8: 63 00 6c 00 69 00 65 00 c.l.i.e.
00f0: 6e 00 74 00 2e 00 73 00 n.t...s.
00f8: 71 00 6c 00 20 00 4e 00 q.l. .N.
0100: 49 00 4c 00 0d 00 0a 00 I.L.....