破译.NET clr20r3异常参数P1..P10
我正在尝试解读与 clr20r3 关联的 P1...P10 参数的含义,当我的应用程序遇到异常时,该参数会写入事件日志。
我能够找到的最好的是:
- P1:托管进程(例如
w3wp.exe
) - P2:托管进程版本(例如
6.0.3790.1830
) - P3:??? (例如
42435be1
) - P4:引发异常的程序集(例如
mrtables.webservice
) - P5:汇编版本(例如
2.1.2.0
) - P6:??? (例如
4682617f
) - P7:??? (例如
129
) - P8:??? (eg
50
) - P9:引发的异常类型(eg
system.argumentexception
) - P10: ??? (例如
NIL
)
谷歌搜索 clr20r3 提供数千个样本参数值,有人可以尝试从中导出模式。
但我希望获得有关参数含义的文档,而不是有根据的猜测。
编辑:虽然我希望得到规范的文档,但我真的很高兴看到在哪一行抛出异常,并带有堆栈跟踪。
额外阅读
- 导致应用程序崩溃的未处理异常日志中包含“EventType clr20r3,P1 w3wp.exe”,但没有详细信息 (寻求问题帮助,同时我们要求对参数含义进行规范解释) EM>
I'm trying to decipher the meaning on the P1...P10 parameters associated with a clr20r3
that is written to the event log when my application experiences an exception.
The best I've been able to find is:
- P1: the hosting process (e.g.
w3wp.exe
) - P2: the hosting process version (e.g.
6.0.3790.1830
) - P3: ??? (e.g.
42435be1
) - P4: the assembly from which the exception was raised (e.g.
mrtables.webservice
) - P5: the assembly version (e.g.
2.1.2.0
) - P6: ??? (e.g.
4682617f
) - P7: ??? (e.g.
129
) - P8: ??? (e.g.
50
) - P9: the exception type raised (e.g.
system.argumentexception
) - P10: ??? (e.g.
NIL
)
Googling for clr20r3 provides thousands of sample parameter values, from which someone can try to derive a pattern.
But I'm hoping for documentation on the parameter meanings, as opposed to educated guesses.
Edit: While I can hope for canonical documentation, really I'd be happy to see the exception being thrown, at what line, complete with a stack trace.
Bonus Reading
- Unhandled exception that caused the application to crash with "EventType clr20r3, P1 w3wp.exe" in the log, but no details there (asking for help with a problem, while we're asking for a canonical explanation of what the parameters mean)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
P7和P8是找出P9异常在哪里引发的重要部分。使用 P4 了解要查找的程序集。运行 ildasm.exe 并打开该程序集。文件 + 转储,勾选“令牌值”复选框,确定并将 .il 文件保存在某处。
在文本编辑器中打开该文件。 P7 为您提供方法令牌,它以 0x06 开头,产生令牌值“06000129”。搜索:
为您提供方法名称,从那里查找 .class,为您提供类名称。
P8 为您提供 IL 偏移量。从找到的 .method 中,查找 IL_0050 以查找引发异常的指令。将其映射回源代码有点棘手,但您可能会弄清楚。如有必要,请使用反射器。
一般来说,为
AppDomain.UnhandledException
编写一个事件处理程序,以避免对这些 Watson 崩溃桶进行逆向工程的痛苦。记录e.ExceptionObject.ToString()
的值以获取异常消息和堆栈跟踪。P7 and P8 are the important ones to find out where the P9 exception was raised. Use P4 to know what assembly to look for. Run ildasm.exe and open that assembly. File + Dump, tick the "Token values" checkbox, OK and save the .il file somewhere.
Open the file in a text editor. P7 gives you the method token, it starts with 0x06, producing token value "06000129". Search for:
Which gives you the method name, look up from there to find the .class, that gives you the class name.
P8 gives you the IL offset. From the found .method, look for IL_0050 for the instruction that raised the exception. Mapping it back to your source code is a bit tricky but you'll probably figure it out. Use Reflector if necessary.
In general, write an event handler for
AppDomain.UnhandledException
to avoid the pain of reverse-engineering these Watson crash buckets. Log the value ofe.ExceptionObject.ToString()
to get both the exception message and a stack trace.以下是有关 Watson Buckets 的信息
这里还有一个 MSDN 文章相同。
样本:
Here is the information on Watson Buckets
And also here is a MSDN article on the same.
Sample: