Is there a limit to the number of driver handles (one per thread) I can
open from a given process? I'm using Win2k, WinXP, Win03. I remember
seeing a KB article about a crash in Win2k that occures if you open too
many handles to a driver. (Anyone got a source on that?) I have a
project currently being tested on Win03 that causes some strange
crashes. When running with five open handles it works just fine. If I
bump that up to 10, the entire system goes unstable. I just want to
know for sure that it is (a beast of a) bug in my code.

Re: maximum driver handles per process? by soviet_bloke

soviet_bloke
Mon Sep 11 19:52:10 CDT 2006

Hi mate

> Is there a limit to the number of driver handles (one per thread) I can
> open from a given process?

As far as I know, the only limit is that of a process handle table
(i.e. more than 16,000,000), so that, for the practical purposes, the
number is unlimited

>I have a
> project currently being tested on Win03 that causes some strange
> crashes. When running with five open handles it works just fine. If I
> bump that up to 10, the entire system goes unstable. I just want to
> know for sure that it is (a beast of a) bug in my code.

Apparently, you don't open these handles just for the fun of doing it,
do you??? Instead,
you must be sending requests to your driver, so that the
problem,apparently, lies with the code that processes these requests
(it is impossible to say what exactly goes wrong without seeing your
code, but there is a good chance that it lies with synchronization).
Alternatively, the problem may lie with some bug in IRP_MJ_CREATE
handler (in fact, quite unlikely because these routines normally don't
do that much....)



Anton Bassov


Brannon wrote:
> Is there a limit to the number of driver handles (one per thread) I can
> open from a given process? I'm using Win2k, WinXP, Win03. I remember
> seeing a KB article about a crash in Win2k that occures if you open too
> many handles to a driver. (Anyone got a source on that?) I have a
> project currently being tested on Win03 that causes some strange
> crashes. When running with five open handles it works just fine. If I
> bump that up to 10, the entire system goes unstable. I just want to
> know for sure that it is (a beast of a) bug in my code.


Re: maximum driver handles per process? by Doron

Doron
Tue Sep 12 00:41:58 CDT 2006

it is also limited by non paged pool availability (for the PFILE_OBJECT).

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


<soviet_bloke@hotmail.com> wrote in message
news:1158022329.936234.27880@e3g2000cwe.googlegroups.com...
> Hi mate
>
>> Is there a limit to the number of driver handles (one per thread) I can
>> open from a given process?
>
> As far as I know, the only limit is that of a process handle table
> (i.e. more than 16,000,000), so that, for the practical purposes, the
> number is unlimited
>
> >I have a
>> project currently being tested on Win03 that causes some strange
>> crashes. When running with five open handles it works just fine. If I
>> bump that up to 10, the entire system goes unstable. I just want to
>> know for sure that it is (a beast of a) bug in my code.
>
> Apparently, you don't open these handles just for the fun of doing it,
> do you??? Instead,
> you must be sending requests to your driver, so that the
> problem,apparently, lies with the code that processes these requests
> (it is impossible to say what exactly goes wrong without seeing your
> code, but there is a good chance that it lies with synchronization).
> Alternatively, the problem may lie with some bug in IRP_MJ_CREATE
> handler (in fact, quite unlikely because these routines normally don't
> do that much....)
>
>
>
> Anton Bassov
>
>
> Brannon wrote:
>> Is there a limit to the number of driver handles (one per thread) I can
>> open from a given process? I'm using Win2k, WinXP, Win03. I remember
>> seeing a KB article about a crash in Win2k that occures if you open too
>> many handles to a driver. (Anyone got a source on that?) I have a
>> project currently being tested on Win03 that causes some strange
>> crashes. When running with five open handles it works just fine. If I
>> bump that up to 10, the entire system goes unstable. I just want to
>> know for sure that it is (a beast of a) bug in my code.
>



Re: maximum driver handles per process? by Brannon

Brannon
Tue Sep 12 10:20:45 CDT 2006

> Apparently, you don't open these handles just for the fun of doing it,
> do you??? Instead,
> you must be sending requests to your driver, so that the
> problem,apparently, lies with the code that processes these requests
> (it is impossible to say what exactly goes wrong without seeing your
> code, but there is a good chance that it lies with synchronization).
> Alternatively, the problem may lie with some bug in IRP_MJ_CREATE
> handler (in fact, quite unlikely because these routines normally don't
> do that much....)

I'm running a DMA transfer on each handle. Supposing it was a problem
with the synchronization: surely I would see a BSOD, true? Actually it
causes a hard freeze of the whole box. For that reason I think it must
be a hardware issue. The (custom) PCI bus controller must be doing
something illegal. It's supposed to have eight DMA channels per
direction, yet it dies a hard death when you actually have DMA
transfers running on all eight of one direction and one channel of the
other direction.


Re: maximum driver handles per process? by soviet_bloke

soviet_bloke
Tue Sep 12 23:19:44 CDT 2006


Hi mate

>Supposing it was a problem
> with the synchronization: surely I would see a BSOD, true?

Not necessarily - it depends on type of the bug. For example, if it is
somehow related to spinlocks, the system gets deadlocked at elevated
IRQL, so that nothing can happen until the reboot (not even BSOD)......

Anton Bassov


Brannon wrote:
> > Apparently, you don't open these handles just for the fun of doing it,
> > do you??? Instead,
> > you must be sending requests to your driver, so that the
> > problem,apparently, lies with the code that processes these requests
> > (it is impossible to say what exactly goes wrong without seeing your
> > code, but there is a good chance that it lies with synchronization).
> > Alternatively, the problem may lie with some bug in IRP_MJ_CREATE
> > handler (in fact, quite unlikely because these routines normally don't
> > do that much....)
>
> I'm running a DMA transfer on each handle. Supposing it was a problem
> with the synchronization: surely I would see a BSOD, true? Actually it
> causes a hard freeze of the whole box. For that reason I think it must
> be a hardware issue. The (custom) PCI bus controller must be doing
> something illegal. It's supposed to have eight DMA channels per
> direction, yet it dies a hard death when you actually have DMA
> transfers running on all eight of one direction and one channel of the
> other direction.