saving all files to disk before a BSOD

Is there any way of forcing Windows to save all files ***safely*** to disk
before running a user mode VS2005 debug session?

I’m developing an app to stress my driver, currently all on my dev machine.
Every few days I get a BSOD and I usually lose the latest files I was
editing. Sometimes I also use my VS layouts, etc.

I assume this is because Windows was caching them and they hadn’t got
completely back to disk yet.

The alternative of copying every test to a debug machine is a big slow down
for the low frequency of BSODs.

Thanks, Mike

Visual studios remote debugging console thingy is your friend…

Means you could also use windbg to catch that BSOD and debug it… which
you’re gonna have to do anyways to eliminate the BSOD!

2 birds, one stone…

If you set it up right the ‘copying’ to a remote machine etc shouldn’t
be that much of a pain… Or even not needed if you run the app from the
output directory on your dev pc…

BR,

Rob Linegar
Software Engineer
Data Encryption Systems Limited
www.des.co.uk | www.deslock.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Mike Kemp
Sent: 12 September 2006 11:32
To: Windows System Software Devs Interest List
Subject: [ntdev] saving all files to disk before a BSOD

Is there any way of forcing Windows to save all files ***safely*** to
disk
before running a user mode VS2005 debug session?

I’m developing an app to stress my driver, currently all on my dev
machine.
Every few days I get a BSOD and I usually lose the latest files I was
editing. Sometimes I also use my VS layouts, etc.

I assume this is because Windows was caching them and they hadn’t got
completely back to disk yet.

The alternative of copying every test to a debug machine is a big slow
down
for the low frequency of BSODs.

Thanks, Mike


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Thanks Rob, I’ll read up on it. I have some another developer writing our
main customer app and so also subject to the driver’s occasional BSOD -
would be nice to be able to force windows to complete any pending disk
writes before each debug, but I guess there’s no way to do this(?)

Mike

From: Rob Linegar
To: Windows System Software Devs Interest List
Sent: Tuesday, September 12, 2006 11:46 AM
Subject: RE: [ntdev] saving all files to disk before a BSOD

Visual studios remote debugging console thingy is your friend…

Means you could also use windbg to catch that BSOD and debug it… which
you’re gonna have to do anyways to eliminate the BSOD!

2 birds, one stone…

If you set it up right the ‘copying’ to a remote machine etc shouldn’t
be that much of a pain… Or even not needed if you run the app from the
output directory on your dev pc…

BR,

Rob Linegar
Software Engineer
Data Encryption Systems Limited
www.des.co.uk | www.deslock.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Mike Kemp
Sent: 12 September 2006 11:32
To: Windows System Software Devs Interest List
Subject: [ntdev] saving all files to disk before a BSOD

Is there any way of forcing Windows to save all files ***safely*** to
disk
before running a user mode VS2005 debug session?

I’m developing an app to stress my driver, currently all on my dev
machine.
Every few days I get a BSOD and I usually lose the latest files I was
editing. Sometimes I also use my VS layouts, etc.

I assume this is because Windows was caching them and they hadn’t got
completely back to disk yet.

The alternative of copying every test to a debug machine is a big slow
down
for the low frequency of BSODs.

Thanks, Mike


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

If it is not the boot/system drive, the one with the \Windows directory, you
can do a chkdsk /f on it.

“Mike Kemp” wrote in message news:xxxxx@ntdev…
> Thanks Rob, I’ll read up on it. I have some another developer writing our
> main customer app and so also subject to the driver’s occasional BSOD -
> would be nice to be able to force windows to complete any pending disk
> writes before each debug, but I guess there’s no way to do this(?)
>
> Mike
>
> From: Rob Linegar
> To: Windows System Software Devs Interest List
> Sent: Tuesday, September 12, 2006 11:46 AM
> Subject: RE: [ntdev] saving all files to disk before a BSOD
>
>
>
> Visual studios remote debugging console thingy is your friend…
>
> Means you could also use windbg to catch that BSOD and debug it… which
> you’re gonna have to do anyways to eliminate the BSOD!
>
> 2 birds, one stone…
>
> If you set it up right the ‘copying’ to a remote machine etc shouldn’t
> be that much of a pain… Or even not needed if you run the app from the
> output directory on your dev pc…
>
> BR,
>
> Rob Linegar
> Software Engineer
> Data Encryption Systems Limited
> www.des.co.uk | www.deslock.com
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Mike Kemp
> Sent: 12 September 2006 11:32
> To: Windows System Software Devs Interest List
> Subject: [ntdev] saving all files to disk before a BSOD
>
> Is there any way of forcing Windows to save all files safely to
> disk
> before running a user mode VS2005 debug session?
>
> I’m developing an app to stress my driver, currently all on my dev
> machine.
> Every few days I get a BSOD and I usually lose the latest files I was
> editing. Sometimes I also use my VS layouts, etc.
>
> I assume this is because Windows was caching them and they hadn’t got
> completely back to disk yet.
>
> The alternative of copying every test to a debug machine is a big slow
> down
> for the low frequency of BSODs.
>
> Thanks, Mike
>
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>

Have you checked out http://www.sysinternals.com/Utilities/Sync.html?

----- Original Message -----
From: “David J. Craig”
Newsgroups: ntdev
To: “Windows System Software Devs Interest List”
Sent: Tuesday, September 12, 2006 7:56 AM
Subject: Re:[ntdev] saving all files to disk before a BSOD

> If it is not the boot/system drive, the one with the \Windows directory,
> you can do a chkdsk /f on it.
>
> “Mike Kemp” wrote in message news:xxxxx@ntdev…
>> Thanks Rob, I’ll read up on it. I have some another developer writing our
>> main customer app and so also subject to the driver’s occasional BSOD -
>> would be nice to be able to force windows to complete any pending disk
>> writes before each debug, but I guess there’s no way to do this(?)
>>
>> Mike
>>
>> From: Rob Linegar
>> To: Windows System Software Devs Interest List
>> Sent: Tuesday, September 12, 2006 11:46 AM
>> Subject: RE: [ntdev] saving all files to disk before a BSOD
>>
>>
>>
>> Visual studios remote debugging console thingy is your friend…
>>
>> Means you could also use windbg to catch that BSOD and debug it… which
>> you’re gonna have to do anyways to eliminate the BSOD!
>>
>> 2 birds, one stone…
>>
>> If you set it up right the ‘copying’ to a remote machine etc shouldn’t
>> be that much of a pain… Or even not needed if you run the app from the
>> output directory on your dev pc…
>>
>> BR,
>>
>> Rob Linegar
>> Software Engineer
>> Data Encryption Systems Limited
>> www.des.co.uk | www.deslock.com
>>
>> -----Original Message-----
>> From: xxxxx@lists.osr.com
>> [mailto:xxxxx@lists.osr.com] On Behalf Of Mike Kemp
>> Sent: 12 September 2006 11:32
>> To: Windows System Software Devs Interest List
>> Subject: [ntdev] saving all files to disk before a BSOD
>>
>> Is there any way of forcing Windows to save all files safely to
>> disk
>> before running a user mode VS2005 debug session?
>>
>> I’m developing an app to stress my driver, currently all on my dev
>> machine.
>> Every few days I get a BSOD and I usually lose the latest files I was
>> editing. Sometimes I also use my VS layouts, etc.
>>
>> I assume this is because Windows was caching them and they hadn’t got
>> completely back to disk yet.
>>
>> The alternative of copying every test to a debug machine is a big slow
>> down
>> for the low frequency of BSODs.
>>
>> Thanks, Mike
>>
>>
>>
>>
>> —
>> Questions? First check the Kernel Driver FAQ at
>> http://www.osronline.com/article.cfm?id=256
>>
>> To unsubscribe, visit the List Server section of OSR Online at
>> http://www.osronline.com/page.cfm?name=ListServer
>>
>> —
>> Questions? First check the Kernel Driver FAQ at
>> http://www.osronline.com/article.cfm?id=256
>>
>> To unsubscribe, visit the List Server section of OSR Online at
>> http://www.osronline.com/page.cfm?name=ListServer
>>
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer

You need to separate dev systems from test systems. VS remote debugger
(at least the 2005 version) installs and works quite well and it is
trivial to keep test systems updated. Sometimes the obvious answer to a
problem really is the right way to go.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Mike Kemp
Sent: Tuesday, September 12, 2006 7:28 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] saving all files to disk before a BSOD

Thanks Rob, I’ll read up on it. I have some another developer writing
our
main customer app and so also subject to the driver’s occasional BSOD -
would be nice to be able to force windows to complete any pending disk
writes before each debug, but I guess there’s no way to do this(?)

Mike

From: Rob Linegar
To: Windows System Software Devs Interest List
Sent: Tuesday, September 12, 2006 11:46 AM
Subject: RE: [ntdev] saving all files to disk before a BSOD

Visual studios remote debugging console thingy is your friend…

Means you could also use windbg to catch that BSOD and debug it… which
you’re gonna have to do anyways to eliminate the BSOD!

2 birds, one stone…

If you set it up right the ‘copying’ to a remote machine etc shouldn’t
be that much of a pain… Or even not needed if you run the app from the
output directory on your dev pc…

BR,

Rob Linegar
Software Engineer
Data Encryption Systems Limited
www.des.co.uk | www.deslock.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Mike Kemp
Sent: 12 September 2006 11:32
To: Windows System Software Devs Interest List
Subject: [ntdev] saving all files to disk before a BSOD

Is there any way of forcing Windows to save all files ***safely*** to
disk
before running a user mode VS2005 debug session?

I’m developing an app to stress my driver, currently all on my dev
machine.
Every few days I get a BSOD and I usually lose the latest files I was
editing. Sometimes I also use my VS layouts, etc.

I assume this is because Windows was caching them and they hadn’t got
completely back to disk yet.

The alternative of copying every test to a debug machine is a big slow
down
for the low frequency of BSODs.

Thanks, Mike


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Thanks for the tip - this Sync tool looks like a good move as a post build
event when I can’t have two machines, and now having read the VS remote
debug stuff I’ll certainly set that up when I move back to focus on the
driver itself (thanks Mark et al)

Mike

From: sh_alex
To: Windows System Software Devs Interest List
Sent: Tuesday, September 12, 2006 1:55 PM
Subject: Re: Re:[ntdev] saving all files to disk before a BSOD

Have you checked out http://www.sysinternals.com/Utilities/Sync.html?

----- Original Message -----
From: “David J. Craig”
Newsgroups: ntdev
To: “Windows System Software Devs Interest List”
Sent: Tuesday, September 12, 2006 7:56 AM
Subject: Re:[ntdev] saving all files to disk before a BSOD

> If it is not the boot/system drive, the one with the \Windows directory,
> you can do a chkdsk /f on it.
>
> “Mike Kemp” wrote in message news:xxxxx@ntdev…
>> Thanks Rob, I’ll read up on it. I have some another developer writing our
>> main customer app and so also subject to the driver’s occasional BSOD -
>> would be nice to be able to force windows to complete any pending disk
>> writes before each debug, but I guess there’s no way to do this(?)
>>
>> Mike
>>
>> From: Rob Linegar
>> To: Windows System Software Devs Interest List
>> Sent: Tuesday, September 12, 2006 11:46 AM
>> Subject: RE: [ntdev] saving all files to disk before a BSOD
>>
>>
>>
>> Visual studios remote debugging console thingy is your friend…
>>
>> Means you could also use windbg to catch that BSOD and debug it… which
>> you’re gonna have to do anyways to eliminate the BSOD!
>>
>> 2 birds, one stone…
>>
>> If you set it up right the ‘copying’ to a remote machine etc shouldn’t
>> be that much of a pain… Or even not needed if you run the app from the
>> output directory on your dev pc…
>>
>> BR,
>>
>> Rob Linegar
>> Software Engineer
>> Data Encryption Systems Limited
>> www.des.co.uk | www.deslock.com
>>
>> -----Original Message-----
>> From: xxxxx@lists.osr.com
>> [mailto:xxxxx@lists.osr.com] On Behalf Of Mike Kemp
>> Sent: 12 September 2006 11:32
>> To: Windows System Software Devs Interest List
>> Subject: [ntdev] saving all files to disk before a BSOD
>>
>> Is there any way of forcing Windows to save all files safely to
>> disk
>> before running a user mode VS2005 debug session?
>>
>> I’m developing an app to stress my driver, currently all on my dev
>> machine.
>> Every few days I get a BSOD and I usually lose the latest files I was
>> editing. Sometimes I also use my VS layouts, etc.
>>
>> I assume this is because Windows was caching them and they hadn’t got
>> completely back to disk yet.
>>
>> The alternative of copying every test to a debug machine is a big slow
>> down
>> for the low frequency of BSODs.
>>
>> Thanks, Mike
>>
>>
>>
>>
>> —
>> Questions? First check the Kernel Driver FAQ at
>> http://www.osronline.com/article.cfm?id=256
>>
>> To unsubscribe, visit the List Server section of OSR Online at
>> http://www.osronline.com/page.cfm?name=ListServer
>>
>> —
>> Questions? First check the Kernel Driver FAQ at
>> http://www.osronline.com/article.cfm?id=256
>>
>> To unsubscribe, visit the List Server section of OSR Online at
>> http://www.osronline.com/page.cfm?name=ListServer
>>
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

So use two machines with .kdfiles set to the path for your latest driver
builds. When the target loads your driver it will load from the path that
.kdfiles is set too.

Gary G. Little

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Mike Kemp
Sent: Tuesday, September 12, 2006 5:32 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] saving all files to disk before a BSOD

Is there any way of forcing Windows to save all files ***safely*** to disk
before running a user mode VS2005 debug session?

I’m developing an app to stress my driver, currently all on my dev machine.
Every few days I get a BSOD and I usually lose the latest files I was
editing. Sometimes I also use my VS layouts, etc.

I assume this is because Windows was caching them and they hadn’t got
completely back to disk yet.

The alternative of copying every test to a debug machine is a big slow down
for the low frequency of BSODs.

Thanks, Mike


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Tiny C app which calls CreateFile on \.\c: and FlushFileBuffers is OK.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Mike Kemp”
To: “Windows System Software Devs Interest List”
Sent: Tuesday, September 12, 2006 2:31 PM
Subject: [ntdev] saving all files to disk before a BSOD

> Is there any way of forcing Windows to save all files safely to disk
> before running a user mode VS2005 debug session?
>
> I’m developing an app to stress my driver, currently all on my dev machine.
> Every few days I get a BSOD and I usually lose the latest files I was
> editing. Sometimes I also use my VS layouts, etc.
>
> I assume this is because Windows was caching them and they hadn’t got
> completely back to disk yet.
>
> The alternative of copying every test to a debug machine is a big slow down
> for the low frequency of BSODs.
>
> Thanks, Mike
>
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

A test system that is not your development system is a much better idea.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S. Shatskih
Sent: Wednesday, September 13, 2006 3:47 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] saving all files to disk before a BSOD

Tiny C app which calls CreateFile on \.\c: and FlushFileBuffers is
OK.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Mike Kemp”
To: “Windows System Software Devs Interest List”
Sent: Tuesday, September 12, 2006 2:31 PM
Subject: [ntdev] saving all files to disk before a BSOD

> Is there any way of forcing Windows to save all files safely to
disk
> before running a user mode VS2005 debug session?
>
> I’m developing an app to stress my driver, currently all on my dev
machine.
> Every few days I get a BSOD and I usually lose the latest files I was
> editing. Sometimes I also use my VS layouts, etc.
>
> I assume this is because Windows was caching them and they hadn’t got
> completely back to disk yet.
>
> The alternative of copying every test to a debug machine is a big slow
down
> for the low frequency of BSODs.
>
> Thanks, Mike
>
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Hi. Both answers are useful. I now have sysinternal’s “Sync” tool as a post
build step to give some safety when I have to use one machine and for the
other app developers, and I am setting up remote debug for my low
level/driver stuff.

Still having problems with 1394 drivers failing in Windows debug mode that
run perfectly with debug off, even other people’s. Seems the isoch fails.

Also, is it just me or is debug spew much slower on a dual core debug target
than a single core. Looks like 100 chars per second or so, whether using
1394 or serial 115200 debug connection. Really slows any test app. Can I
buffer more on the target?

Mike

----- Original Message -----
From: Roddy, Mark
To: Windows System Software Devs Interest List
Sent: Wednesday, September 13, 2006 8:55 PM
Subject: RE: [ntdev] saving all files to disk before a BSOD

A test system that is not your development system is a much better idea.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S. Shatskih
Sent: Wednesday, September 13, 2006 3:47 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] saving all files to disk before a BSOD

Tiny C app which calls CreateFile on \.\c: and FlushFileBuffers is
OK.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Mike Kemp”
To: “Windows System Software Devs Interest List”
Sent: Tuesday, September 12, 2006 2:31 PM
Subject: [ntdev] saving all files to disk before a BSOD

> Is there any way of forcing Windows to save all files safely to
disk
> before running a user mode VS2005 debug session?
>
> I’m developing an app to stress my driver, currently all on my dev
machine.
> Every few days I get a BSOD and I usually lose the latest files I was
> editing. Sometimes I also use my VS layouts, etc.
>
> I assume this is because Windows was caching them and they hadn’t got
> completely back to disk yet.
>
> The alternative of copying every test to a debug machine is a big slow
down
> for the low frequency of BSODs.
>
> Thanks, Mike
>
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

There was a whole thread on that on Windbg about a month ago. The kernel
debugger needs to stop the entire system to do pretty much anything, and
stopping the system is pretty expensive, and debug prints just use that
sync mechanism, rather than a less expensive one, so debug printing on an
MP system is slow. One the other hand, debug spew from a uniprocessor
system over 1394 is lightning fast.

My recommendation:

Do your development that depends on the debug spew on an MP system that’s
been booted with /onecpu, and continually test with spew off without the
/onecpu, until you don’t need the spew anymore.

Phil

Philip D. Barila

Seagate Technology LLC

(720) 684-1842


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of “Mike Kemp”


Sent: Thursday, September 14, 2006 3:14 AM

To: “Windows System Software Devs Interest List”

Subject: Re: [ntdev] saving all files to disk before a BSOD

Hi. Both answers are useful. I now have sysinternal’s “Sync” tool as a post

build step to give some safety when I have to use one machine and for the

other app developers, and I am setting up remote debug for my low

level/driver stuff.

Still having problems with 1394 drivers failing in Windows debug mode that

run perfectly with debug off, even other people’s. Seems the isoch fails.

Also, is it just me or is debug spew much slower on a dual core debug
target

than a single core. Looks like 100 chars per second or so, whether using

1394 or serial 115200 debug connection. Really slows any test app. Can I

buffer more on the target?

Mike