System.Data.OracleClient.dll崩溃的W2K8的w3wp.exe [英] System.Data.OracleClient.dll crashes w3wp.exe on w2k8

查看:224
本文介绍了System.Data.OracleClient.dll崩溃的W2K8的w3wp.exe的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用WinDBG的调试是在一个网站,我们有一个Windows Server 2008,IIS7环境上发生了错误。我已经设置了符号路径为SRV * C:\\ * websymbols http://msdl.microsoft.com /下载/符号

I'm using Windbg to debug an error that is happening in a website that we have on a Windows Server 2008, IIS7 environment. I've set the symbol path to "SRV*c:\websymbols*http://msdl.microsoft.com/download/symbols"

然后我浏览网页,这需要我到登录页面。在那一刻,我连接WinDbg到W3wp.exe进程。然后输入我的凭据到登录页面并提交表单,这是给问题的过程。然后我选择WinDBG的 - >调试 - >转到未处理的异常,它输出在控制台以下内容:

Then I browse the website, which takes me to the login page. In that moment I attach Windbg to the w3wp.exe process. I then enter my credentials into the login page and submit the form, which is the process that is giving problems. I then select Windbg -> Debug -> Go Unhandled Exception, which outputs the following in the console:

ModLoad: 6d720000 6d835000   C:\Windows\assembly\NativeImages_v2.0.50727_32\System.Data.OracleC#\fb8da45f3873169a502db3cb492b25a0\System.Data.OracleClient.ni.dll  
ModLoad: 06a80000 06afb000   System.Data.OracleClient.dll  
ModLoad: 06b00000 06b7b000   System.Data.OracleClient.dll  
ModLoad: 06a80000 06afb000   C:\Windows\assembly\GAC_32  \System.Data.OracleClient\2.0.0.0__b77a5c561934e089\System.Data.OracleClient.dll
ModLoad: 06b80000 06be1000   C:\XEClient\bin\oci.dll  
ModLoad: 7c340000 7c396000   C:\Windows\system32\MSVCR71.dll  
ModLoad: 06c50000 09af9000   C:\XEClient\bin\OraOCIXE10.dll  
ModLoad: 739d0000 73a02000   C:\Windows\system32\WINMM.dll  
ModLoad: 73990000 739cd000   C:\Windows\system32\OLEACC.dll  
Critical error detected c0000374

在那之后我打F10很多次,直到下面是打印的输出和调试器一直在想:

After that I hit F10 many times until the following is print to the output and debugger keep thinking:

eax=05cbe288 ebx=00000000 ecx=76e47463 edx=05cbe025 esi=001a0000 edi=01fb3210  
eip=76ebfaf3 esp=05cbe274 ebp=05cbe2f0 iopl=0         nv up ei pl zr na pe nc  
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000246  
ntdll!RtlReportCriticalFailure+0x56:
76ebfaf3 e89063fbff      call    ntdll!RtlRaiseException (76e75e88)  
0:023> p
(5b0.b5c): Unknown exception - code c0000374 (first chance)

在调试器终于继续,它打印以下到控制台:

Once debugger finally continues, it prints the following to the console:

WARNING: Step/trace thread exited
eax=000000c0 ebx=00000000 ecx=00000400 edx=00000000 esi=04420000 edi=000005b0
eip=76e75e74 esp=05cbdd88 ebp=05cbde0c iopl=0         nv up ei pl nz na po nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000202
ntdll!KiFastSystemCallRet:
76e75e74 c3              ret

然后w3wp.exe的死亡。

Then w3wp.exe dies.

我的问题是...我如何获得有关错误的一些更多的信息?我已经知道,因为错误dissapear如果我只是把在Global.asax的Application_Start方法如下它与甲骨文:

My question is... How can I get some more info about the error? I already knew it was related to Oracle because errors dissapear if I just put the following in the global.asax Application_Start method:


尝试{结果
    新的OracleConnection()的ConnectionString =任何东西。结果
}赶上(例外前){结果
}

这code的简单线条修复应用程序......难以置信,不是吗?

That simple line of code fixes the application... Incredible, right?

在此先感谢

更新:2011.02.09 15:46 的结果
Web应用程序在Windows XP和功放做工精细; Windows Server 2003中,IIS 5和6.

UPDATE: 2011.02.09 15:46
The web app is working fine in Windows XP & Windows Server 2003, IIS 5 & 6.

Global.asax中

Global.asax

protected void Application_Start()
{
    RegisterRoutes(RouteTable.Routes);
    Logger.LogMessage("Application_Start", "Started");
}

protected void Application_End()
{
    Logger.LogMessage("Application_End", "ended");  
} 

LoginController.cs

LoginController.cs

public ActionResult LogOn()
{
            string connString = "Data Source=IP:Port/Service;Persist Security Info=True;User ID=user; Password=user;Unicode=True";
            System.Data.OracleClient.OracleConnection dbConn = new System.Data.OracleClient.OracleConnection();
            dbConn.ConnectionString = connString;

            System.Data.OracleClient.OracleCommand dbComm = new System.Data.OracleClient.OracleCommand();
            dbComm.CommandText = "user.package.procedure";
            dbComm.CommandType = CommandType.StoredProcedure;
            dbComm.Connection = dbConn;
            dbComm.Parameters.Add("MyParam", System.Data.OracleClient.OracleType.Number);
            dbComm.Parameters["MyParam"].Value = DBNull.Value;


            System.Data.OracleClient.OracleDataAdapter dbAdap = new System.Data.OracleClient.OracleDataAdapter(dbComm);

            DataSet ds = new DataSet();

            try {
                Logger.LogMessage("TEST", "1");
                dbConn.Open();
                Logger.LogMessage("TEST", "2");
                dbAdap.Fill(ds);
                Logger.LogMessage("TEST", "3");
            } catch(Exception ex) {
                Logger.LogMessage("TEST", "4");
            } finally {
                Logger.LogMessage("TEST", "5");
                if(dbConn.State != ConnectionState.Closed) {
                    dbConn.Close();
                }
                dbConn.Dispose();
            }           
            return View();
}

现在的奇怪的事情:你安装的网站。浏览它。你带到登录页。 w3wp.exe的是现在生活。输入凭据的提交表单。一切都好。您登录到该网站,并开始通过其网页浏览。所有页面都甲骨文互动。

Now the curious thing: You install the website. Browse it. You're taken to Login page. w3wp.exe is now live. Enter credentials an submit form. Everything is ok. You log on to the site and start navigating through its pages. All pages have Oracle interaction.

停止浏览。

若干分钟就停止浏览后,w3wp.exe的死亡。没关系。除非另行指定必须发生。

Some minutes after you stopped browsing, w3wp.exe dies. It is ok. It must happen unless you specify otherwise.

再次浏览。您将进入登录页面,w3wp.exe的又是活的。输入凭据并点击提交。在执行行时code停止dbConn.Open();

Browse again. You are taken to login page and w3wp.exe is live again. Enter credentials and click submit. Code stops when executing the line "dbConn.Open();"

我在日志中看到的是:


  • 的Application_Start - 入门

  • 测试 - 1

1分钟左右后,我在日志中看到以下内容:

After 1 minute or so, I see the following in the log:


  • 的Application_Start - 入门

  • 测试 - 1

在此之后,应用程序只是显示Internet Explorer无法显示该网页页面。

After that, application just display the "Internet Explorer cannot display the webpage" page.

日志不显示TEST - 4 - 在Global.asax方法的原因抓不住它显示截至Application_End的原因。

Log does not show "TEST - 4" cause of the catch neither it shows "Application_End - Ended" cause of the global.asax method.

事件查看是没有帮助的,因为它仅说的w3wp.exe已失败。

EventViewer is not helpful, since it only says that w3wp.exe has failed.

现在更加的courious的事情。如果我申请在Application_Start方法中下面的行,应用程序的工作:

Now the even more courious thing. If I apply following line in Application_Start method, application works:


尝试{
                    新System.Data.OracleClient.OracleConnection()的ConnectionString =任何东西;
                }赶上(例外前){
                }

它抛出一个异常说连接字符串格式无效。但是,应用程序的工作。

It throws an exception saying that connection string format is invalid. But application works.

什么是我从WinDBG的期待?我期待它来给我的东西,我可以在谷歌浏览,然后谷歌带我去一些博客,一个人写道:你必须重新安装Oracle 10g的或类似的东西...

What am I expecting from Windbg? I'm expecting it to gives me something I can browse in google and then google takes me to some blog where a guy wrote that "you have to reinstall Oracle 10g" or something like that...

再次感谢。

推荐答案

看起来像一个托管异常

步骤诊断管理code异常

Steps to diagnose managed code Exception


  1. 连接到进程

  2. 发出命令 .loadby SOS
    mscorwks
    长达.NET 3.5和.NET 4.0使用 .loadby SOS CLR

  3. 接着发出命令 SXE -cclrstack;!PE; KBCLR克

  1. Attach to the process
  2. Issue the command .loadby sos mscorwks for up to .NET 3.5 and for .NET 4.0 use .loadby sos clr
  3. Next Issue the command sxe -c "!clrstack;!pe;KB" clr ;g

这将打破调试器时,有一个托管异常并为您提供管理/本地调用堆栈以及异常的详细信息。

This would break the debugger when there is a managed exception and provide you with managed /native call-stack as well as exception details.

这篇关于System.Data.OracleClient.dll崩溃的W2K8的w3wp.exe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆