Only XP 64 hang while calling IoCallDriver But other OS working fine ?

In DriverEntry included like as follows

for (i = 0; i <= IRP_MJ_MAXIMUM_FUNCTION; i++)
{
DriverObject->MajorFunction[i] = PassThrough;
}

DriverObject->MajorFunction[IRP_MJ_CREATE] = Create;
DriverObject->MajorFunction[IRP_MJ_CREATE_NAMED_PIPE] = Create;
DriverObject->MajorFunction[IRP_MJ_CREATE_MAILSLOT] = Create;

Then
In Create & PassThrough functions
I used the following code

PSFILTER_DEVICE_EXTENSION devExt = (PSFILTER_DEVICE_EXTENSION)(DeviceObject->DeviceExtension);
for the Device object’ devExt->NLExtHeader.StorageStackDeviceObject ’

I called
NewIrp = IoBuildDeviceIoControlRequest(IOCTL_STORAGE_QUERY_PROPERTY, StorageStackDeviceObject, (PVOID)&Query, sizeof(STORAGE_DEVICE_DESCRIPTOR), (PVOID)Buffer, sizeof(STORAGE_DEVICE_DESCRIPTOR) * 4,FALSE, &WaitEvent,IoStatus);

IoSetCompletionRoutine(NewIrp, MyOnIrpComplete, (PVOID)&WaitEvent, TRUE, TRUE, TRUE);

Status = IoCallDriver(StorageStackDeviceObject, NewIrp);

But this call IoCallDriver(StorageStackDeviceObject, NewIrp) hangs in XP 64 bit os

I builded the Driver with WinDDK (version 7600.16385.1 ) Windows7 X64 free build Environment It works windows 2008. server X64 OS . Same driver hangs in XP x64.

Please help me to solve this problem for XP x64.

its 32 bit version I builded withWinDDK (version 7600.16385.1 ) Windows Xp x86 freebuild Environment . It works in all 32 bit windows OS.

Expecting immediate reply

Thanks & Regards,
Dileep Subramanian

So that shows you have a severe attitude problem. BTW did you also know the
earth is turning and there is something like day and night time and time
zones ? As for your query, you should have included the code which
declares, initializes and waits for the event.associated with your IRP.

//Daniel

wrote in message news:xxxxx@ntfsd…
>
> Expecting immediate reply
>

In my completion routine (MyOnIrpComplete) I included as like

if (Irp->PendingReturned)
KeSetEvent((PKEVENT) Context, IO_NO_INCREMENT, FALSE);

return STATUS_MORE_PROCESSING_REQUIRED

So event signaled and no wait after that is it correct ?

That can be OK but I what I was asking for is where and how is your event
declared and initialized, if that is not global but on the stack you must
make sure it stays around until all processing is done, normally one would
wait on the event after IoCallDriver.

//Daniel

wrote in message news:xxxxx@ntfsd…
>
> In my completion routine (MyOnIrpComplete) I included as like
>
> if (Irp->PendingReturned)
> KeSetEvent((PKEVENT) Context, IO_NO_INCREMENT, FALSE);
>
> return STATUS_MORE_PROCESSING_REQUIRED
>
> So event signaled and no wait after that is it correct ?
>

> Expecting immediate reply

Why should anyone help you? If you need an ‘immediate reply’ pull that cash
wad out
of your ass.

> But this call IoCallDriver(StorageStackDeviceObject, NewIrp) hangs in XP

64 bit os

Hangs where? There are enough hardware-heads in here that a stack might
help.

What does the irp look like when it has hung? Do we think it might hev been
posted?

Thank You Daniel Terhell,

I had declared locally in create and & PassThrough like

KEVENT WaitEvent;
KeInitializeEvent(&WaitEvent, NotificationEvent, FALSE);

But I modified my completion routine

I called
KeSetEvent((PKEVENT) Context, IO_NO_INCREMENT, FALSE); without any checking like
if (Irp->PendingReturned)

Now there is no hang inXP 64
Regards,
Dileep S

It is still hanging.
I made a global variable KEVENT NewIrp_WaitEvent and in DriverEntry it is intialized as
KeInitializeEvent(&NewIrp_WaitEvent, NotificationEvent, FALSE);

In IoCompletion Routine
I called KeSetEvent(&NewIrp_WaitEvent, IO_NO_INCREMENT, FALSE);

Then also it is hanging in XP x64

Regards,
Dileep S

What is hanging? Can you post your call stack? How will anyone know what is
going on?
Atleast two people have directly pointed out that you are not giving
sufficient information. So, please respect the forum and start off by
atleast posting the call stacks, IRP dump, etc.

Regards,
Ayush Gupta
Software Consultant & Owner,
AI Consulting

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@yahoo.com
Sent: Tuesday, May 17, 2011 4:02 PM
To: Windows File Systems Devs Interest List
Subject: RE:[ntfsd] Only XP 64 hang while calling IoCallDriver But other OS
working fine ?

It is still hanging.
I made a global variable KEVENT NewIrp_WaitEvent and in DriverEntry it is
intialized as KeInitializeEvent(&NewIrp_WaitEvent, NotificationEvent,
FALSE);

In IoCompletion Routine
I called KeSetEvent(&NewIrp_WaitEvent, IO_NO_INCREMENT, FALSE);

Then also it is hanging in XP x64

Regards,
Dileep S


NTFSD is sponsored by OSR

For our schedule of debugging and file system seminars visit:
http://www.osr.com/seminars

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

I am respectful to the forum , But I am new to driver development and unware of getting
call stacks, IRP dump, etc.

I will try to get them. if not can anyone to mention document which describes it. There after I will post them in the forum.

Thanks & Regards,
Dileep S

One of the things that are expected in NTFSD or NTDEV is that you are using WinDbg for kernel development. It comes in the WDK, should be installed, and at least available to produce things such as !analyze -v dumps. Along with that it is also expected that you will have made the effort to setup symbols so that the !analyze -v dump is meaningful. WinDbg has decent documentation and runs quite well, depending upon your driver type in a VM.

So, to get the call stacks you will need to run WinDbg in your host and have debugging enabled on the target, with the symbol server path set to allow WinDbg to properly function.

Gary G. Little
C 952-454-4629
H 952-223-1349

On May 17, 2011, at 8:27, xxxxx@yahoo.com wrote:

I am respectful to the forum , But I am new to driver development and unware of getting
call stacks, IRP dump, etc.

I will try to get them. if not can anyone to mention document which describes it. There after I will post them in the forum.

Thanks & Regards,
Dileep S


NTFSD is sponsored by OSR

For our schedule of debugging and file system seminars visit:
http://www.osr.com/seminars

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

> I made a global variable KEVENT NewIrp_WaitEvent

Pass the event to IoSetCompletionRoutine as Context, or make it a part of larger structure which will be passed as Context.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

Pass the event to IoSetCompletionRoutine as Context, This I had already tried.

Whether windbg 64 bit version is needed for debuging x64 driver / x64 driver 's crash dump ?

I am trying to post IRP dump. But there is no crash dumps like MEMORY.DMP in C:\windows folder

Thanks & Regards,
Dileep S