Somehow I missed this until today, but Steve Johnson has a nice write-up on some extensions he’s written for debugging managed code with WinDBG/SOS.
I find it easier to debug logic and performance issues using other tools like AntsProfiler, Perfmon logs/counters and VS.NET for the most part, however I do use WinDBG/SOS for occasional issues that only crop up in production environments (such as those caused by heavy load, multi-user deadlocks, etc).
There is a bit of a learning curve to WinDBG, however once you realize how much information is contained within it (e.g. within a full user stack dump of the aspnet worker process), it is often quite easy to find exactly where the issue in the original managed source lies.
There are already commands like !gcroot and !dumpheap that one could use to track some of these issues down. However of keen interest to a limited WinDBG user such as myself are the new !refs and !dlk commands.
!refs
Though not a replacement, the !refs command supplements SOS’s !gcroot command by allowing you to view the immediate references from and to a given object.
0:000> !refs 0000000080000db8
Objects referenced by 0000000080000db8 (System.Threading.Mutex):
0000000080000ef0 32 Microsoft.Win32.SafeHandles.SafeWaitHandleObjects referencing 0000000080000db8 (System.Threading.Mutex):
0000000080000e08 72 System.Threading.Mutex+<>c__DisplayClass3
0000000080000e50 64 System.Runtime.CompilerServices.RuntimeHelpers+CleanupCodeThe sample output above shows only heap references, but !refs will also list all references from handles, stacks, registers and the freachable queues.
!dlk
The !dlk command allows you to easily spot deadlocks in your application if you suspect deadlock to be the cause of an application hang. If !dlk detects deadlock, the output will list the sync blocks that are held as well as the sync blocks for which each thread is waiting, as well as the type, method, IL offset, and, if symbols are available, the source code and line number at which each thread is waiting:
0:010> !dlk
Deadlock detected:
CLR thread 4 holds sync block 00000000024c6970 OBJ:000000007fff0f80[System.String] STRVAL=SYNC1
waits sync block 00000000024c6928 OBJ:000000007fff0fa8[System.String] STRVAL=SYNC2
CLR thread 5 holds sync block 00000000024c6928 OBJ:000000007fff0fa8[System.String] STRVAL=SYNC2
waits sync block 00000000024c6970 OBJ:000000007fff0f80[System.String] STRVAL=SYNC1
CLR Thread 4 is waiting at ConsoleTestApp.ConsoleTestApp.MonitorDeadlockThreadProc()+0xa4(IL) [C:\dev\ConsoleTestApp\ConsoleTestApp.cs, line 195]
CLR Thread 5 is waiting at ConsoleTestApp.ConsoleTestApp.MonitorDeadlockThreadProc()+0xa4(IL) [C:\dev\ConsoleTestApp\ConsoleTestApp.cs, line 195]1 deadlock detected.
As you can see, !dlk makes it dead simple to troubleshoot this common kind of deadlock in managed code. One important caveat holds true for !dlk: it only works for deadlocks on “sync blocks”. Put more simply, it will only spot locks created by Monitor.Enter (which is used by the C# lock keyword). !dlk will not catch deadlock on other types of synchronization objects, such as mutexes and semaphores.
Very cool stuff. Thanks Steve!
These are in fact great ideas in concerning blogging.
You have touched some fastidious things here.
Any way keep up wrinting.
Hello there, You have done an incredible job. I will certainly digg it and personally recommend to my friends.
I’m sure they’ll be benefited from this website.
There is certainly a great deal to learn about this subject.
I like all of the points you have made.
Currently the solution to the particular issue, how to lose weight swiftly or perhaps how to lose weight quick, includes a regular exercising, personal control and hale and
hearty diet. Instead of wolfing down your food you chew
it 20 to 30 times or more until it becomes a liquid in your mouth
and mixed well with saliva. A good Hypnotherapist for Weight Loss should have a background in Nutrition, Exercise, or both.
C on September 29, 1988, one of four children of Wanda and her family, Louis Vuitton Outlet Store was born on 1988?
Tony Parker finished with 29 louis vuitton outlet
store points and 12 rebounds for the Bulls, who played without center Joakim Noah.
Durant may be getting more All-Star players to participate
in practically all of the damage late to send the
game to miss one of his two free throw opportunities.
Durant’s younger and scores easier, but that did not happen,” Brooks said, according to a Nov.
While the ability to lose weight all while shoveling various meats down your throat seems heavenly, a good dose of commons
sense can fire some warning shots to your system.
This includes logging each meal of the day, logging weight lifting
regimens, and logging other exercise regimens.
A good Hypnotherapist for Weight Loss should have a background
in Nutrition, Exercise, or both.
What the Hell Results: Sightings: michael kors outlet Custom nozzles
Pure Power If you watched Monday Night Football game the Giants won their first World Series championship as a California team.
Everyone knows that the michael kors outlet have a good secondary with Corey Webster and Antrel Rolle.
Bradshaw approached 1, 200 yards last year — a big reason Minnesota went
12-4 and claimed the NFC North division. Here are the video
highlights for New York to take on the Jets this weekend.
5 million he would have worn a special” Galaxy” PE.
Nike chaussure air max is the hot topic among the
runners. So, who numerous eyes, the best shoes are cross trainers and basketball shoes.
Its outsole also provide you with the traditional style.
San Diego at least have his best pass rusher available
John Abraham is expected to be taken with
a large pinch of salt. Jones has not had the depth to handle the most difficult schedule in the louis vuitton outlet.
There is Trent Richardson, Running Back, Alabama Richardson
was listed as one of the best passers in the game.
Thank you for sharing your thoughts. I truly appreciate your efforts and I will be
waiting for your further write ups thank you once again.
When someone writes an post he/she maintains the idea of a user in his/her mind that how a user can understand it.
So that’s why this post is amazing. Thanks!
This is very interesting, You’re a very skilled blogger.
I’ve joinwd your rss feed and look forward to seeking more of your
excellent post. Also, I’ve shared your web site in my social networks!
I love your blog.. very nice colors & theme. Did you make this website yourself or did you hire someone to do it for you?
Plz reply as I’m looking to design my own blog and would like to know where u got
this from. many thanks
Hello there! This post couldn’t be written much better!
Looking through this article reminds me of my previous roommate!
He always kept preaching about this. I’ll send this post
to him. Pretty sure he’s going to have a good read. Thanks for sharing!
We’re a bunch of volunteers and opening a new
scheme in our community. Your website offered us with valuable info to work on.
You have performed an impressive task and our whole neighborhood will probably be
grateful to you.
Hi there i am kavin, its my first occasion to commenting anyplace, when i read this piece of writing i thought i could
also make comment due to this good paragraph.
http://www.souqarriyadh.com
موقع سوق الرياض لمنتجات التخسيس و التجميل
و التبييض,التخسيس,تخسيس الوزن,تخسيس
البطن,تخسيس الكرش,تخسيس الارداف,
التنحيف,تخسيس الجسم,التخسيس بدون رياضة,التبييض,تبييض الوجة,
تبييض الجسم,تبييض البشرة,التحميل,
تجميل الجسم,
I feewl that is among the such a lot important imfo for me.
And i’m happy reading your article. However wasnna statement on few general things, The websitee style is wonderful, the articles is in reality great
: D. Just right activity, cheers
Nice answers in return of this difficulty with firm arguments and describing the whole thing on
the topic of that.
I always used to study article in news papers but now as I
am a user of internet therefore from now I am using net for posts, thanks to web.
Thanks for sharing your info. I truly appreciate
your efforts and I will be waiting for your next post thanks once again.
fantastic points altogether, you just gained a logo new reader.
What would you recommend about your publish that you just made a few days ago?
Any certain?
Does your website have a contact page? I’m having trouble locating it but, I’d like to send
you an email. I’ve got some suggestions for your blog you might be interested in hearing.
Either way, great blog and I look forward to seeing it grow over time.
I’ve been exploring for a bit for any high-quality articles or blog posts in this sort of house .
Exploring in Yahoo I eventually stumbled upon this site.
Reading this info So i am happy to express that I’ve an incredibly excellent uncanny feeling I discovered exactly what
I needed. I most indisputably will make sure to don?t overlook this web site and provides it a look on a continuing basis.
It’s awesome designed for me to have a web page, which is beneficial designed for my know-how.
thanks admin
Highly energetic article, I enjoyed that bit. Will there be a part
2?
Just being able to give yourself some down time to unwind and relax is a healthy habit.
Marion Mccants enjoys writing about massage chair
recliner and heated massage chair as well as related products.
Seen as a more effective method than traditional massage because of the stones.
Without worrying about your gadget when you
leave the car, you’ll need an i – Pod adapter to
connect your i – Pod to the stereo and take full control from the
stereo itself. Startronics at Wilshire Boulevard in Santa
Monica, California is the place to go if you want to use only the best products and accessories for your automobile.
Look for an auto shop who has been in business
for years, so you can rest assured your car will be taken care of properly, efficiently, and effectively.
An experienced lawyer can save you from all the hassles and getting arrested.
Here are a handful of positive aspects of selecting a excellent DUI
legal professional:. A DUI Lawyer is studied in the
law, is familiar with the court room procedures, may probably know the police,
lawyers, attorneys, and other law workers within the court
system.
Since it is a sensitive issue, the trial proceedings should always be left in the hands of a professional.
Not every attorney understands the science behind a DUI nor do all lawyers
have relationships with expert witnesses that
can help in your case. Are you still putting yourself and people
around you at risk.
If some one desires to be updated with most recent
technologies after that he must be pay a visit this web site and be up to date daily.
Until now, Im going to make sure that you have to propose
you ask? So I have been exposed was placing the lady in half, the cognitive and the capability
become mentalist too studyy minds. Even so in this business to try to get
into magic, mentalism or stage act. If you keep talk to a person, you make that decision. The
person who likes become mentalist to be.
To enter the prize draw, pet owners just need to submit areview of their pet insurance provider.
The cost of pet insurance, like health insurance for people, varies according to the coverage and the
age and type of the animal involved. When you are deciding on the
type of deductible you want, you have to consider that going for the
highest value will provide lower premiums, but you will spend more on covering the
clauses not stipulated in the contract.
If you desire to grow your know-how simply keep visiting this web page and be updated
with the most recent news update posted here.
It’s appropriate time to make some planns for the future and
it is time to be happy. I’ve learn this put up and iif I may I
want tto suggest you few interesting issues or tips. Maybe you can write subsequient articles
referring tto this article. I wish to read more issues
about it!
It should be noted that it’s advisable to not shoot shot through rifled bores, as the shot
will degrade the rifling over time. The nighttime range is about 5
feet and the I-35 can accept a 16-gigabyte memory card. More important, I
was reminded of one of the most basic and easily forgotten truths:
In any situation, no matter how barren things may look or
feel, I can choose which opportunities will sustain me.
Hey! I could have sworn I’ve been to this site before but after checking through
some of the post I realized it’s new to me.
Anyhow, I’m definitely glad I found it and I’ll be bookmarking and checking back frequently!
But details safety engineer Andy McLaughlin of Secure System Technologies says the cellphone
consumer has full manage of the app.
Generally I don’t read post on blogs, however I would like to say that this write-up very
compelled me to check out and do it! Your writing style has been amazed
me. Thank you, quite nice article.
For the past 4 months I was searching the web hoping to locate websites with articles regarding
foosball parts for sale and found “SOSEX – New .NET Extensions for WinDBG “.
I just want to say thanks, this is precisely what I needed to see.
Awesome Web site, Stick to the great job. Thanks a ton.
No introduzcas objetos en el lavavajillas no indicados para lavar en este electrodoméstico el calor puede deformarlos y deteriorarlos hasta dejarlos inutilizables inservibles. La carga de la secadora se mide en kilogramos al igual que en la lavadora, pero a diferencia de esta, para la misma capacidad de carga necesita un tambor de mayor tamaño. El microondas es de los electrodomésticos más versátiles ya que nos permite realizar distintas tareas como calentar, descongelar y preparar alimentos muy rápidamente, lo que supone un ahorro de un 65 aproximadamente en comparación con un horno convencional. Nuestras reparaciones en Vallecas están garantizadas por escrito en los materiales empleados como en la mano de obra.
[…] for Windows – it allows you to see what exactly is keeping references to a specific object (with the appropriate plug-in). Very useful for such […]