Getting bsod Frequently - Need Help

Cazador999

New Member
Hello all

I have been getting BSODs about every 10 hour or so (usually with the message SYSTEM_SERVICE_EXCEPTION and something with afd.sys). This usually happens when i am downloading stuff or surfing around. (I don't know if it is relevant but it never happened while i am playing a game) A week ago my hd died, so i had to reinstall OS again, but still get bsods in same frequency.:sick: I have tried few things so far,
  • Reinstalled OS (Vista Home Premium 64bit)
  • Updated all drivers
  • Updated Bios
  • Checked the rams - no errors
I have the dump file and sysdata but i cannot attach them here.
 

My Computer

System One

  • CPU
    Intel Core 2 Quad Q9550
    Motherboard
    Gigabyte X48T-DQ6
    Memory
    4GB OCZ DDR3 12800 URBAN 1600 mhz
    Graphics Card(s)
    GIGABYTE ATI RADEON 4870x2
    Sound Card
    Realtek HD Onboard
    Monitor(s) Displays
    Samsung T260HD
    Screen Resolution
    1920x1200@60Hz
    Hard Drives
    Seagate 7200.11 1.5TB SATA
    PSU
    Real Power Pro 1250W
    Case
    Thermal Take XaserIV
    Keyboard
    Logitech G15
    Mouse
    Microsoft Sidewinder
    Internet Speed
    4096/1024
If you zip up a few of the latest DMP files from \windows\minidump you'll then be able to upload them here.
 

My Computer

Thanks for the tip mate :). I have uploaded the 3 dmp files as .zip and also attached the message in Control Panel/Problem Reports for the shutdown problem.
 

Attachments

  • minidumps.zip
    62.9 KB · Views: 12
  • Unexpectedshutdown.png
    Unexpectedshutdown.png
    10 KB · Views: 41

My Computer

System One

  • CPU
    Intel Core 2 Quad Q9550
    Motherboard
    Gigabyte X48T-DQ6
    Memory
    4GB OCZ DDR3 12800 URBAN 1600 mhz
    Graphics Card(s)
    GIGABYTE ATI RADEON 4870x2
    Sound Card
    Realtek HD Onboard
    Monitor(s) Displays
    Samsung T260HD
    Screen Resolution
    1920x1200@60Hz
    Hard Drives
    Seagate 7200.11 1.5TB SATA
    PSU
    Real Power Pro 1250W
    Case
    Thermal Take XaserIV
    Keyboard
    Logitech G15
    Mouse
    Microsoft Sidewinder
    Internet Speed
    4096/1024
Hi,

A quick look at the dump analysis reveals, unfortunately for you, that these three dumps are different and caused by different drivers. :sarc:

The latest dump (03) shows that the crash came from the driver afd.sys (used by utorrent.exe), I suggest you update uTorrent to the latest version (I'm running 1.8.2).
The earliest dump (01) shows that the driver tdx.sys caused the crash, Googling for tdx.sys I found some posts about utorrent is involved, so again, update utorrent.

In the earliest dump (01) I saw that you have Symantec antivirus installed, make sure you update it too.
Also, run Windows Update to make sure all of your windows drivers are updated and recheck that you have the latest drivers installed for the rest of your hardware.

I'm running Vista Ultimate x64 and I have no such problem when using uTorrent or any other web application. :cool:


Good Luck,

Damage:devil:Jackal
 

My Computer

These are all caused by SYMTDI.SYS. The AFD and TDX link is indirect. uTorrent has nothing to do with it. It's a user-mode app with no kernel-mode componentry, but it happens to be talking Winsock (AFD) at the time, which in turn goes through a TDI-translation layer (TDX) which is in turn hooked by the Symantec TDI filter, and from there on down to TCPIP.sys - except it never gets that far because of the crashes.


To the OP: try updating your Norton AV to the latest version, and in particular this driver:

Image path: \SystemRoot\System32\Drivers\SYMTDI.SYS
Image name: SYMTDI.SYS
Timestamp: Tue Feb 05 18:19:53 2008 (47A80E19)

If you can't update it, for whatever reason, try removing it. The crashes should go away. Symantec might be interested in seeing these same dumps.
 

My Computer

Thanks alot to both of you, will try your suggestions.:)
 

My Computer

System One

  • CPU
    Intel Core 2 Quad Q9550
    Motherboard
    Gigabyte X48T-DQ6
    Memory
    4GB OCZ DDR3 12800 URBAN 1600 mhz
    Graphics Card(s)
    GIGABYTE ATI RADEON 4870x2
    Sound Card
    Realtek HD Onboard
    Monitor(s) Displays
    Samsung T260HD
    Screen Resolution
    1920x1200@60Hz
    Hard Drives
    Seagate 7200.11 1.5TB SATA
    PSU
    Real Power Pro 1250W
    Case
    Thermal Take XaserIV
    Keyboard
    Logitech G15
    Mouse
    Microsoft Sidewinder
    Internet Speed
    4096/1024
H2SO4,

How do you see that from the dumps he uploaded?
I went over them and each one indicates a different driver causing the bug check. If SYMTDI.sys was the one responsible for the crash, wouldn't it be blamed by !analyze?

One of the dumps doesn't even mention a driver, just an unexpected kernel mode trap, what does that mean?

Also, in dump #2 in the call stack I see that symtdi is called before tdx, how could that mean that symtdi is the one to blame?
Could it be related to DEP? I say that because the bug check is ATTEMPTED_EXECUTE_OF_NOEXECUTE_MEMORY.


Best Regards,

Damage:devil:Jackal
 

My Computer

It's not a C/Asm forum and I think this is of very little interest to most folks here, but you're seemingly keen and I love to prattle so why not... :)

The answers to most of your questions stem from the distinction between privileged (ring 0, "kernel-mode") and non-privileged (ring 3, "user-mode") operation. The code running in ring 0, including low-level portions of the OS and many drivers, exist only to do the bidding of the various user-mode apps. To do that, they frequently need data supplied by the app, such as for example the name of a file which is to be opened.

If an app crashes in user-mode, no big deal as far as the other apps are concerned. They just continue to run. Kernel-mode crashes are much more serious because they take out everything, and thus kernel-mode code has to be very careful to protect itself against being fed bad data by an app. As a simple example, if an app indicates that the contents of a file are to be copied to a particular buffer, and that memory pointer is bogus (a zero maybe), the entire OS could crash if the interface between user-mode and kernel-mode failed to detect the bad memory pointer being supplied. That would be considered an OS bug - it failed to protect itself against non-privileged code - even though the bad pointer was supplied by the app. The self-protection mechanism works like one of those security drawer devices in banks... you put the documents into a steel tray which the teller then slides over to their side and examines in safety before deciding whether it all looks OK and whether they should therefore fulfill your request.

For performance reasons, that kind of error checking is minimal in between the various components in kernel-mode. It's all considered privileged code and it had better be good, because it would simply cost too many processor cycles to continuously validate every bit of info passed from one driver to another. The machine would crawl. Hence, it's up to every computer owner/administrator to be judicious about what they install on their machine, especially if the package they're installing contains one or more kernel-mode drivers.

uTorrent does not contain kernel-mode code. It's an app which calls Winsock APIs in the OS, and they in turn make the U/K transition down to the AFD.SYS Winsock driver. Hence, almost by definition uTorrent and other similar apps cannot cause a BSoD. (If an app runs with admin privileges it can theoretically sink a driver down into kernel-mode to do its bidding, but that's beside the point.)

On to !analyze. It's not perfect. Although it does an excellent job of trying to guesstimate the cause of a crash, there is SO MUCH complexity down there, and crashes can happen in so many ways - including paths which wipe out most traces of the culprit, that it cannot possibly hope to always be right. In fact, even the best driver developers/debuggers on Earth cannot always find the root cause of every crash from looking at a crash dump. Take dump 03 as an example. There's no prizes for figuring out the direct cause of the crash:

2: kd> .trap fffffa60`068f2270
NOTE: The trap frame does not contain all registers.
Some register values may be zeroed or incorrect.
rax=fffffa60068f25d8 rbx=0000000000000000 rcx=fffffa8007632c70
rdx=fffffa60068f2498 rsi=fffff80001faf160 rdi=fffffa600432dd98
rip=fffffa6004335f18 rsp=fffffa60068f2400 rbp=fffffa60068f2498
r8=0000000000000001 r9=0000000000000006 r10=0000000000000001
r11=0000000000000014 r12=0000000000000000 r13=0000000000000000
r14=0000000000000000 r15=0000000000000000
iopl=0 nv up ei ng nz na po nc
afd!AfdGetTransportInfo+0x28:
fffffa60`04335f18 ff158281feff call qword ptr [afd!_imp_ExEnterCriticalRegionAndAcquireResourceShared (fffffa60`0431e0a0)] ds:3180:fffffa60`0431e0a0=000000000006316e
2: kd> ln .
(fffffa60`04335ef0) afd!AfdGetTransportInfo+0x28

The OS crashed because afd!AfdGetTransportInfo attempted to gain shared access to a critical region protected by a synchronisation mechanism. There was a CALL to a memory address stored at fffffa60`0431e0a0, and since we're running in kernel-mode at the time that function pointer must reference more kernel-mode code, except in this case it doesn't:

2: kd> dd fffffa60`0431e0a0 l2
fffffa60`0431e0a0 0006316e 00000000

It points to 0x6316e and that is a completely invalid address somewhere up in user-mode. Was AFD the driver which crashed the box? Absolutely. Is it responsible for the breakdown? Almost certainly not, because all it did was to CALL to an offset which is expected to contain a legit pointer, but that memory had been corrupted before AFD got there. Tracing things back to the real culprit can be fun and frustrating, and even impossible, sometimes all at the same time.

In the second dump the same type of breakdown manifests itself as a DEP error, but that's again a side-effect rather than the cause. It just so happens that the bad pointer in the second crash was into a region of kernel-mode memory tagged as NO_EXECUTE, so instead of BSoDing because of a wild pointer to user-mode, the OS crashed because DEP stepped in and said "no-no, you can't execute that". The original bad memory reference is the problem, not the DEP kicking in post factum.

Trust me, it's almost certainly SYMTDI in this case :)
 

My Computer

THANKS for that explanation, I know that this is a not a C/Asm forum (as you said) but I like to know what caused the problems and not just the quick solution to it.
Also, knowing how the system works is a good way to analyze problems and reading your post was certainly satisfying.

Besides, anyone who's not interested will skip it, the thread was already here anyway ;).

Can you point me to some direction of what to learn to know all that you were talking about? I already have a really good knowledge of the Windows OS, and I'm always looking out to learn a lot more (reading Windows Internals these days).


Thanks,

Damage:devil:Jackal
 

My Computer

Well, I'm glad you got something out of that.

About the best thing you can do is resist the urge to focus on the debugger itself at the start. That's a mistake that many people make, because they assume that what's keeping them back is (lack of) knowledge of arcane debugger syntax: !lmi, bu kernel32!virtualalloc "kvL; g @$ra; reax;g" ... They get frustrated because it's pure memorisation and it just doesn't seem to make much sense, and there's no understanding of why the 4th dword is significant... and they give up.

The debugger is just a tool. Surgeons don't start their medical career with "Introductory Scalpel Use 101". Likewise, to be good at examining software and OS innards, it's necessary to be proficient in three key areas:

1) The processor instruction set. Nowadays, I'd guess that less than 1% of computer owners have any notion of what EAX and EIP are, or how a stack unwind is accomplished. There are plenty of computer experts who wouldn't know a calling convention if it bit them on the nose, and yet it's otherwise not possible to really understand how software works.

2) Software development in C and maybe C++. Every OS worth mentioning is written largely in C, with a smattering of assembly for the ultra-low-level routines, and maybe a bit of C++ in userland modules. Knowledge of .Net, Java and similar "nicer" programming languages is helpful, but they abstract you away from the machine itself.

3) OS architecture. It's great that you're reading WinInternals because that book will teach you a lot about what the mechanisms look like when they're all working. After that, you'll want to move on to this book to understand how to troubleshoot when it stops working:

www.advancedwindowsdebugging.com

And after all that, have a read of the kernel_debugging_tutorial.doc that's installed with the "Debugging Tools for Windows" package.

Have fun with it :)
 

My Computer

Back
Top