Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / CLR / June 2006

Tip: Looking for answers? Try searching our database.

SOS.dll loses symbol information

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JR - 28 Jun 2006 23:25 GMT
I originally posted this in the windbg forum but the folks suggested it
was more SOS than windbg so i should post over here.

I attach to the aspnet_wp process to debug a v1.1.4322 asp.net app. I
load the sos.dll and set my breakpoint inside a managed function call
via 'bp' command.
When it breaks i dump the stack and it looks great, Param names, source

line numbers and all. When i navigate to other sections of the site and

then return to hit the breakpoint again, all symbol information is
gone.

So i go from this ->
---------------------------

0x0086f714  0x05a99778 [DEFAULT] [hasThis] Void CEC.Staff..ctor(I4,I4)
 at [+0x0] [+0x0] C:\All_prod_Source\CEC_MC\CEC\Staff.vb:329
   PARAM: this: 0x012d5514 (CEC.Staff)
   PARAM: int32 StaffID: 3228
   PARAM: int32 CampusID: 0
0x0086f71c  0x05a99639 [DEFAULT] Class CEC.Staff
CEC.Academics.EnrollmentClass.GetAcademicAdvisor(I4)
 at [+0x169] [+0x7b]
   PARAM: int32 adEnrollID: 91591
0x0086f76c  0x05a98a34 [DEFAULT] [hasThis] Void
VC._default.AddStudentAcademicAdvisor()
 at [+0x324] [+0x13f] C:\All_prod_Source\VC_MC\default.aspx.vb:244
   PARAM: this: 0x012875e4 (ASP.default_aspx)
0x0086f838  0x05a9826e [DEFAULT] [hasThis] Void
VC._default.Page_Load(Object,Class System.EventArgs)
 at [+0x66] [+0x12] C:\All_prod_Source\VC_MC\default.aspx.vb:87
   PARAM: this: 0x012875e4 (ASP.default_aspx)
   PARAM: class System.Object sender: 0x012875e4 (ASP.default_aspx)
   PARAM: class System.EventArgs e: 0x00ed02f4

to this->
------------ :-(

to this 0x0086f714  0x05a99778 [DEFAULT] [hasThis] Void
CEC.Staff..ctor(I4,I4)
0x0086f71c  0x05a99639 [DEFAULT] Class CEC.Staff
CEC.Academics.EnrollmentClass.GetAcademicAdvisor(I4)
0x0086f76c  0x05a9888e [DEFAULT] [hasThis] Void
VC._default.AddStudentAcademicAdvisor()
0x0086f838  0x05a9826e [DEFAULT] [hasThis] Void
VC._default.Page_Load(Object,Class System.EventArgs)

Can anyone help me understand why SOS.dll loses the symbol info?
as always, thanks in advance for any and all help.
Dan Nemesek - 29 Jun 2006 00:04 GMT
Hi,

Are your pages set to debug=true?
Are your assemblies that you are calling from the page set to debug build?

Just a guess here but perhaps the first time you hit the page due to JIT
compilation SOS can better resolve symbols, but every subsequent hit it
can't.
From my experience without the debug settings = true you shouldn't get any
symbolic info for managed stuff.

Thanks,

Dan

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2002 Microsoft Corporation.
All rights reserved.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
Please reply to the newsgroups only.  
JR - 29 Jun 2006 00:57 GMT
Yes, all webconfigs have debug=true and the dlls are built as debug.
The info im talking about is actually pulled from the pdb files (souce
code file and line # ect). I have multiple apps on the site that use
the same dlls in the local bin. I think when i jump from one to another
and then come back it confuses it somehow.

> Hi,
>
[quoted text clipped - 17 lines]
> http://www.microsoft.com/info/cpyright.htm
> Please reply to the newsgroups only.
Dan Nemesek - 29 Jun 2006 20:16 GMT
Hi,

Execute the following commands to get the debugger to tell you what it's
doing during resolution
"!sym noisy"

Then execute ".reload" to get the debugger to re-resolve symbols using the
current sym path. Execute a "k" command to resolve a stack that contains
the image your interested so you can see what it does. If your image is not
in a current stack you can force it to load by executing ".reload /f
myimage.ext"

Do this when the symbols resolve and then repeat when the symbols don't
resolve to see if you notice any difference.  

Thanks,

Dan

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2002 Microsoft Corporation.
All rights reserved.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
Please reply to the newsgroups only.  
JR - 29 Jun 2006 23:20 GMT
Thank you for your reply.
Ok, here we go from the start

Start windbg
Attach to the aspnet_wp process (loads all modules)

At the command line I type ".load clr10\sos.dll"

Then "!sym noisy"
noisy mode - symbol prompts on

then ".reload"
Reloading current modules
..................................................................................................................................................
DBGHELP: ntdll - public symbols

c:\symbols\ntdll.pdb\36515FB5D04345E491F672FA2E2878C02\ntdll.pdb

then "k"
ChildEBP RetAddr
05a6ffc8 7c9507a8 ntdll!DbgBreakPoint
05a6fff4 00000000 ntdll!DbgUiRemoteBreakin+0x2d

Now I set a breakpoint for CLR exceptions. The bp will dump the managed
stack and then continue.
"sxe -c "!cen;!clrstack -p;g" CLR"

Then I hit go and load the main page. The debugger outputs the managed
stack along with the param names and actual source code line numbers.

System.InvalidCastException (0x15bba80)
Thread 1
ESP         EIP
0x0086f6f4  0x7c81eb33 [FRAME: HelperMethodFrame]
0x0086f720  0x04effa67 [DEFAULT] ValueClass System.DateTime
Microsoft.VisualBasic.CompilerServices.DateType.FromObject(Object)
0x0086f760  0x04eff92f [DEFAULT] ValueClass System.DateTime
CEC.Data.DBConvert.CvDate(Object)
 at [+0x4f] [+0x1b]
   PARAM: class System.Object obj: 0x00e7b8e0 (System.DBNull)
0x0086f7b0  0x0496c409 [DEFAULT] [hasThis] Void CEC.VC.User..ctor(I4)
 at [+0x4b1] [+0x277]
   PARAM: this: 0x015b7c10 (CEC.VC.User)
   PARAM: int32 UserID: 3064790
0x0086f880  0x05866781 [DEFAULT] [hasThis] Void
VC.BreadCrumb.Page_Load(Object,Class System.EventArgs)
 at [+0xa1] [+0x52]
C:\All_prod_Source\VC_MC\Controls\Components\BreadCrumb.ascx.vb:25
   PARAM: this: 0x0151fa60 (ASP.BreadCrumb_ascx)
   PARAM: class System.Object sender: 0x0151fa60 (ASP.BreadCrumb_ascx)
   PARAM: class System.EventArgs e: 0x00ed0558
0x0086f8d4  0x00b2b55b [FRAME: MulticastFrame] [DEFAULT] [hasThis] Void
System.EventHandler.Invoke(Object,Class System.EventArgs)
0x0086f8e8  0x056437dc [DEFAULT] [hasThis] Void
System.Web.UI.Control.OnLoad(Class System.EventArgs)

Now this works again and again if I refresh the page. When I click on a
different link that brings me to another section of the site I get the
same invalid cast exception dump but without the lines and param names.

System.InvalidCastException (0x12ae12c)
Thread 1
ESP         EIP
0x0086f584  0x7c81eb33 [FRAME: HelperMethodFrame]
0x0086f5b0  0x04effa67 [DEFAULT] ValueClass System.DateTime
Microsoft.VisualBasic.CompilerServices.DateType.FromObject(Object)
0x0086f5f0  0x04eff92f [DEFAULT] ValueClass System.DateTime
CEC.Data.DBConvert.CvDate(Object)
0x0086f640  0x091e8611 [DEFAULT] [hasThis] Void CEC.VC.User..ctor(I4)
0x0086f710  0x091e7b6f [DEFAULT] Void
CEC.VC.UserCache.CacheUserInfo(I4,SZArray String,Class
System.Web.SessionState.HttpSessionState)
0x0086f7b0  0x091e6fb8 [DEFAULT] [hasThis] Void
VC.Navigation.Page_Load(Object,Class System.EventArgs)
0x0086f8d4  0x00b2b55b [FRAME: MulticastFrame] [DEFAULT] [hasThis] Void
System.EventHandler.Invoke(Object,Class System.EventArgs)

.reload

Reloading current modules
..................................................................................................................................................
DBGHELP: ntdll - public symbols

c:\symbols\ntdll.pdb\36515FB5D04345E491F672FA2E2878C02\ntdll.pdb

k

ChildEBP RetAddr
07f9ffc8 7c9507a8 ntdll!DbgBreakPoint
07f9fff4 00000000 ntdll!DbgUiRemoteBreakin+0x2d

The output from those commands looks exactly the same. I'm at a loss as
to why it cannot use the symbol information.

> Hi,
>
[quoted text clipped - 21 lines]
> http://www.microsoft.com/info/cpyright.htm
> Please reply to the newsgroups only.
Dan Nemesek - 29 Jun 2006 23:50 GMT
Justin,

I will see if I can repro.   I will keep you posted as to what the results
are.

Thanks,

Dan

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2002 Microsoft Corporation.
All rights reserved.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
Please reply to the newsgroups only.  
Dan Nemesek - 30 Jun 2006 00:12 GMT
I wasn't able to repro using a simple two page test.  See if you can repro
this using a simple two page test.  If you can't give me more specifics on
your web app deployment, for example are you browsing through pages that
would be in different app domains?

Thanks,

Dan

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2002 Microsoft Corporation.
All rights reserved.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
Please reply to the newsgroups only.  
JR - 30 Jun 2006 00:48 GMT
Yes, different app domains with local DLLS in the bin of each app dir.
The dlls are the exact same though, symbols and all. I will keep
looking at it and try to give you more info.

> I wasn't able to repro using a simple two page test.  See if you can repro
> this using a simple two page test.  If you can't give me more specifics on
[quoted text clipped - 11 lines]
> http://www.microsoft.com/info/cpyright.htm
> Please reply to the newsgroups only.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.