Mount Handler - System Hang...

Hi!
I have a problem with mounting my (disk) File
System. The problem is that when I return
STATUS_SUCCESS from the Mount Handler, the system goes
into a hang. It does not crash but goes into an idle
loop (I think). If I try to break in, this is the
stack I see.

nt!RtlpBreakWithStatusInstruction
nt!KeUpdateSystemTime+0x13e
hal!HalProcessorIdle+0x2

I tried tracing out of the Mount handler. I see
the call nt!KeWaitForSingleObject and the following
call stack.

nt!IopMountVolume+0x194
nt!IopCheckVpbMounted+0x38
nt!IopParseDevice+0x3ba
nt!ObpLookupObjectName+0x283
nt!ObOpenObjectByName+0xbb
nt!IoCreateFile+0x436
nt!NtOpenFile+0x25
nt!KiSystemService+0xc4
NTDLL!NtOpenFile+0xb
0x1094ede
0x1094ede
0x10956ba
0x10917a7
0x10dba4e

I go, pretty much, by Rajeev Nagar (I think) in the
mount handler. The only thing I do differently is that
I read and verify the meta-data before attempting to
create the Volume device object. This is what I do.

  1. Read in the meta-data.
    I use IoBuildDeviceIoControlRequest to read in the
    first and third 512 bytes from the volume. Then I do a
    verify. If I succeed, I proceed. Else I return
    STATUS_UNRECOGNIZED_VOLUME

  2. I create the VolumeDeviceObject with the VCB as the
    DeviceExtension.

  3. I Clear the DO_DEVICE_INITIALIZING in the
    VolumeDeviceObject.

  4. I set the stack size in the VolumeDeviceObject.

  5. I initialize a VCB (pretty much Rajeev Nagar
    suggests).
    I create a stream file object
    IoCreateStreamFileObject for the VCB.

  6. Create an FCB for the Root Directory.

  7. I Dereference the TargetDeviceObject
    ObDereferenceObject.

  8. I return STATUS_SUCCESS.

Does anyone see anything wrong with what I do? Any
ideas?

Thanks in advance!
Manoj Paul Joseph

=====

Manoj Paul Joseph,
Master of Computer Applications (final year student),
School of Computer Science and Engineering,
Anna University,
Chennai (Madras),
India.


Do You Yahoo!?
Everything you’ll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Hi!
I just figured out my problem. Thought I would get
back to this list, just in case someone had thought
about what I had written.
I had forgotten to complete the IRP! :wink: Stupid me!
Manoj

— Manoj Paul Joseph
wrote: > Hi!
> I have a problem with mounting my (disk) File
> System. The problem is that when I return
> STATUS_SUCCESS from the Mount Handler, the system
> goes
> into a hang. It does not crash but goes into an idle
> loop (I think). If I try to break in, this is the
> stack I see.
>
> nt!RtlpBreakWithStatusInstruction
> nt!KeUpdateSystemTime+0x13e
> hal!HalProcessorIdle+0x2
>
> I tried tracing out of the Mount handler. I see
> the call nt!KeWaitForSingleObject and the following
> call stack.
>
> nt!IopMountVolume+0x194
> nt!IopCheckVpbMounted+0x38
> nt!IopParseDevice+0x3ba
> nt!ObpLookupObjectName+0x283
> nt!ObOpenObjectByName+0xbb
> nt!IoCreateFile+0x436
> nt!NtOpenFile+0x25
> nt!KiSystemService+0xc4
> NTDLL!NtOpenFile+0xb
> 0x1094ede
> 0x1094ede
> 0x10956ba
> 0x10917a7
> 0x10dba4e
>
> I go, pretty much, by Rajeev Nagar (I think) in
> the
> mount handler. The only thing I do differently is
> that
> I read and verify the meta-data before attempting to
> create the Volume device object. This is what I do.
>
> 1. Read in the meta-data.
> I use IoBuildDeviceIoControlRequest to read in the
> first and third 512 bytes from the volume. Then I do
> a
> verify. If I succeed, I proceed. Else I return
> STATUS_UNRECOGNIZED_VOLUME
>
> 2. I create the VolumeDeviceObject with the VCB as
> the
> DeviceExtension.
>
> 3. I Clear the DO_DEVICE_INITIALIZING in the
> VolumeDeviceObject.
>
> 4. I set the stack size in the VolumeDeviceObject.
>
> 5. I initialize a VCB (pretty much Rajeev Nagar
> suggests).
> I create a stream file object
> IoCreateStreamFileObject for the VCB.
>
> 6. Create an FCB for the Root Directory.
>
> 7. I Dereference the TargetDeviceObject
> ObDereferenceObject.
>
> 8. I return STATUS_SUCCESS.
>
> Does anyone see anything wrong with what I do?
> Any
> ideas?
>
> Thanks in advance!
> Manoj Paul Joseph

=====
-----------------------------------
Manoj Paul Joseph,
Master of Computer Applications (final year student),
School of Computer Science and Engineering,
Anna University,
Chennai (Madras),
India.

__________________________________________________
Do You Yahoo!?
Everything you’ll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Maybe you forgot to call IoCompleteRequest?

Max

----- Original Message -----
From: “Manoj Paul Joseph”
To: “File Systems Developers”
Sent: Thursday, January 24, 2002 8:10 PM
Subject: [ntfsd] Mount Handler - System Hang…

> Hi!
> I have a problem with mounting my (disk) File
> System. The problem is that when I return
> STATUS_SUCCESS from the Mount Handler, the system goes
> into a hang. It does not crash but goes into an idle
> loop (I think). If I try to break in, this is the
> stack I see.
>
> nt!RtlpBreakWithStatusInstruction
> nt!KeUpdateSystemTime+0x13e
> hal!HalProcessorIdle+0x2
>
> I tried tracing out of the Mount handler. I see
> the call nt!KeWaitForSingleObject and the following
> call stack.
>
> nt!IopMountVolume+0x194
> nt!IopCheckVpbMounted+0x38
> nt!IopParseDevice+0x3ba
> nt!ObpLookupObjectName+0x283
> nt!ObOpenObjectByName+0xbb
> nt!IoCreateFile+0x436
> nt!NtOpenFile+0x25
> nt!KiSystemService+0xc4
> NTDLL!NtOpenFile+0xb
> 0x1094ede
> 0x1094ede
> 0x10956ba
> 0x10917a7
> 0x10dba4e
>
> I go, pretty much, by Rajeev Nagar (I think) in the
> mount handler. The only thing I do differently is that
> I read and verify the meta-data before attempting to
> create the Volume device object. This is what I do.
>
> 1. Read in the meta-data.
> I use IoBuildDeviceIoControlRequest to read in the
> first and third 512 bytes from the volume. Then I do a
> verify. If I succeed, I proceed. Else I return
> STATUS_UNRECOGNIZED_VOLUME
>
> 2. I create the VolumeDeviceObject with the VCB as the
> DeviceExtension.
>
> 3. I Clear the DO_DEVICE_INITIALIZING in the
> VolumeDeviceObject.
>
> 4. I set the stack size in the VolumeDeviceObject.
>
> 5. I initialize a VCB (pretty much Rajeev Nagar
> suggests).
> I create a stream file object
> IoCreateStreamFileObject for the VCB.
>
> 6. Create an FCB for the Root Directory.
>
> 7. I Dereference the TargetDeviceObject
> ObDereferenceObject.
>
> 8. I return STATUS_SUCCESS.
>
> Does anyone see anything wrong with what I do? Any
> ideas?
>
> Thanks in advance!
> Manoj Paul Joseph
>
> =====
> -----------------------------------
> Manoj Paul Joseph,
> Master of Computer Applications (final year student),
> School of Computer Science and Engineering,
> Anna University,
> Chennai (Madras),
> India.
>
> __________________________________________________
> Do You Yahoo!?
> Everything you’ll ever need on one web page
> from News and Sport to Email and Music Charts
> http://uk.my.yahoo.com
>
> —
> You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

You should get into the habit of using Driver Verifier (which you can
find at “C:\WINDOWS\SYSTEM32\Verifier.exe”). Verifier would have caught
this bug immediately.

  • Nicholas Ryan

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:bounce-ntfsd-
xxxxx@lists.osr.com] On Behalf Of Manoj Paul Joseph
Sent: Thursday, January 24, 2002 11:12 PM
To: File Systems Developers
Subject: [ntfsd] Re: Mount Handler - System Hang…

Hi!
I just figured out my problem. Thought I would get
back to this list, just in case someone had thought
about what I had written.
I had forgotten to complete the IRP! :wink: Stupid me!
Manoj

— Manoj Paul Joseph
> wrote: > Hi!
> > I have a problem with mounting my (disk) File
> > System. The problem is that when I return
> > STATUS_SUCCESS from the Mount Handler, the system
> > goes
> > into a hang. It does not crash but goes into an idle
> > loop (I think). If I try to break in, this is the
> > stack I see.
> >
> > nt!RtlpBreakWithStatusInstruction
> > nt!KeUpdateSystemTime+0x13e
> > hal!HalProcessorIdle+0x2
> >
> > I tried tracing out of the Mount handler. I see
> > the call nt!KeWaitForSingleObject and the following
> > call stack.
> >
> > nt!IopMountVolume+0x194
> > nt!IopCheckVpbMounted+0x38
> > nt!IopParseDevice+0x3ba
> > nt!ObpLookupObjectName+0x283
> > nt!ObOpenObjectByName+0xbb
> > nt!IoCreateFile+0x436
> > nt!NtOpenFile+0x25
> > nt!KiSystemService+0xc4
> > NTDLL!NtOpenFile+0xb
> > 0x1094ede
> > 0x1094ede
> > 0x10956ba
> > 0x10917a7
> > 0x10dba4e
> >
> > I go, pretty much, by Rajeev Nagar (I think) in
> > the
> > mount handler. The only thing I do differently is
> > that
> > I read and verify the meta-data before attempting to
> > create the Volume device object. This is what I do.
> >
> > 1. Read in the meta-data.
> > I use IoBuildDeviceIoControlRequest to read in the
> > first and third 512 bytes from the volume. Then I do
> > a
> > verify. If I succeed, I proceed. Else I return
> > STATUS_UNRECOGNIZED_VOLUME
> >
> > 2. I create the VolumeDeviceObject with the VCB as
> > the
> > DeviceExtension.
> >
> > 3. I Clear the DO_DEVICE_INITIALIZING in the
> > VolumeDeviceObject.
> >
> > 4. I set the stack size in the VolumeDeviceObject.
> >
> > 5. I initialize a VCB (pretty much Rajeev Nagar
> > suggests).
> > I create a stream file object
> > IoCreateStreamFileObject for the VCB.
> >
> > 6. Create an FCB for the Root Directory.
> >
> > 7. I Dereference the TargetDeviceObject
> > ObDereferenceObject.
> >
> > 8. I return STATUS_SUCCESS.
> >
> > Does anyone see anything wrong with what I do?
> > Any
> > ideas?
> >
> > Thanks in advance!
> > Manoj Paul Joseph
>
> =====
> -----------------------------------
> Manoj Paul Joseph,
> Master of Computer Applications (final year student),
> School of Computer Science and Engineering,
> Anna University,
> Chennai (Madras),
> India.
>
> __________________________________________________
> Do You Yahoo!?
> Everything you’ll ever need on one web page
> from News and Sport to Email and Music Charts
> http://uk.my.yahoo.com
>
> —
> You are currently subscribed to ntfsd as: xxxxx@secretseal.com
> To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Hi Nicholas,
I was not able to fine the Verifier utility for NT
(4.0). Is it available only for Win 2k and above?
Manoj

— Nicholas Ryan wrote: >
You should get into the habit of using Driver
> Verifier (which you can
> find at “C:\WINDOWS\SYSTEM32\Verifier.exe”).
> Verifier would have caught
> this bug immediately.
>
> - Nicholas Ryan
>
> > -----Original Message-----
> > From: xxxxx@lists.osr.com
> [mailto:bounce-ntfsd-
> > xxxxx@lists.osr.com] On Behalf Of Manoj Paul Joseph
> > Sent: Thursday, January 24, 2002 11:12 PM
> > To: File Systems Developers
> > Subject: [ntfsd] Re: Mount Handler - System
> Hang…
> >
> > Hi!
> > I just figured out my problem. Thought I would
> get
> > back to this list, just in case someone had
> thought
> > about what I had written.
> > I had forgotten to complete the IRP! :wink: Stupid
> me!
> > Manoj
> >
> > — Manoj Paul Joseph
>
> > wrote: > Hi!
> > > I have a problem with mounting my (disk)
> File
> > > System. The problem is that when I return
> > > STATUS_SUCCESS from the Mount Handler, the
> system
> > > goes
> > > into a hang. It does not crash but goes into an
> idle
> > > loop (I think). If I try to break in, this is
> the
> > > stack I see.
> > >
> > > nt!RtlpBreakWithStatusInstruction
> > > nt!KeUpdateSystemTime+0x13e
> > > hal!HalProcessorIdle+0x2
> > >
> > > I tried tracing out of the Mount handler. I
> see
> > > the call nt!KeWaitForSingleObject and the
> following
> > > call stack.
> > >
> > > nt!IopMountVolume+0x194
> > > nt!IopCheckVpbMounted+0x38
> > > nt!IopParseDevice+0x3ba
> > > nt!ObpLookupObjectName+0x283
> > > nt!ObOpenObjectByName+0xbb
> > > nt!IoCreateFile+0x436
> > > nt!NtOpenFile+0x25
> > > nt!KiSystemService+0xc4
> > > NTDLL!NtOpenFile+0xb
> > > 0x1094ede
> > > 0x1094ede
> > > 0x10956ba
> > > 0x10917a7
> > > 0x10dba4e
> > >
> > > I go, pretty much, by Rajeev Nagar (I think)
> in
> > > the
> > > mount handler. The only thing I do differently
> is
> > > that
> > > I read and verify the meta-data before
> attempting to
> > > create the Volume device object. This is what I
> do.
> > >
> > > 1. Read in the meta-data.
> > > I use IoBuildDeviceIoControlRequest to read in
> the
> > > first and third 512 bytes from the volume. Then
> I do
> > > a
> > > verify. If I succeed, I proceed. Else I return
> > > STATUS_UNRECOGNIZED_VOLUME
> > >
> > > 2. I create the VolumeDeviceObject with the VCB
> as
> > > the
> > > DeviceExtension.
> > >
> > > 3. I Clear the DO_DEVICE_INITIALIZING in the
> > > VolumeDeviceObject.
> > >
> > > 4. I set the stack size in the
> VolumeDeviceObject.
> > >
> > > 5. I initialize a VCB (pretty much Rajeev Nagar
> > > suggests).
> > > I create a stream file object
> > > IoCreateStreamFileObject for the VCB.
> > >
> > > 6. Create an FCB for the Root Directory.
> > >
> > > 7. I Dereference the TargetDeviceObject
> > > ObDereferenceObject.
> > >
> > > 8. I return STATUS_SUCCESS.
> > >
> > > Does anyone see anything wrong with what I
> do?
> > > Any
> > > ideas?
> > >
> > > Thanks in advance!
> > > Manoj Paul Joseph
> >
> > =====
> > -----------------------------------
> > Manoj Paul Joseph,
> > Master of Computer Applications (final year
> student),
> > School of Computer Science and Engineering,
> > Anna University,
> > Chennai (Madras),
> > India.
> >
> >
> > Do You Yahoo!?
> > Everything you’ll ever need on one web page
> > from News and Sport to Email and Music Charts
> > http://uk.my.yahoo.com
> >
> > —
> > You are currently subscribed to ntfsd as:
> xxxxx@secretseal.com
> > To unsubscribe send a blank email to
> leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>
>
>
> —
> You are currently subscribed to ntfsd as:
> xxxxx@yahoo.com
> To unsubscribe send a blank email to
leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

=====
-----------------------------------
Manoj Paul Joseph,
Master of Computer Applications (final year student),
School of Computer Science and Engineering,
Anna University,
Chennai (Madras),
India.


Do You Yahoo!?
Everything you’ll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

As far as I know it’s only available for Win2k/XP (at least it seems
that a lot of the Verifier’s functionality is built into ntoskrnl.exe,
judging from what I see stepping through calls such as IoCallDriver).

  • Nicholas Ryan

==================================
The information contained in this electronic mail message is intended
for the named recipient(s) only. It may contain privileged and
confidential information owned by SecretSEAL Inc. If you are not an
intended recipient, you must not copy, forward, distribute, or take any
action in reliance on it. If you have received this electronic mail
message in error, please notify the sender immediately.

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:bounce-ntfsd-
xxxxx@lists.osr.com] On Behalf Of Manoj Paul Joseph
Sent: Tuesday, January 29, 2002 4:37 AM
To: File Systems Developers
Subject: [ntfsd] Re: Mount Handler - System Hang…

Hi Nicholas,
I was not able to fine the Verifier utility for NT
(4.0). Is it available only for Win 2k and above?
Manoj

— Nicholas Ryan wrote: >
> You should get into the habit of using Driver
> > Verifier (which you can
> > find at “C:\WINDOWS\SYSTEM32\Verifier.exe”).
> > Verifier would have caught
> > this bug immediately.
> >
> > - Nicholas Ryan
> >
> > > -----Original Message-----
> > > From: xxxxx@lists.osr.com
> > [mailto:bounce-ntfsd-
> > > xxxxx@lists.osr.com] On Behalf Of Manoj Paul Joseph
> > > Sent: Thursday, January 24, 2002 11:12 PM
> > > To: File Systems Developers
> > > Subject: [ntfsd] Re: Mount Handler - System
> > Hang…
> > >
> > > Hi!
> > > I just figured out my problem. Thought I would
> > get
> > > back to this list, just in case someone had
> > thought
> > > about what I had written.
> > > I had forgotten to complete the IRP! :wink: Stupid
> > me!
> > > Manoj
> > >
> > > — Manoj Paul Joseph
> >
> > > wrote: > Hi!
> > > > I have a problem with mounting my (disk)
> > File
> > > > System. The problem is that when I return
> > > > STATUS_SUCCESS from the Mount Handler, the
> > system
> > > > goes
> > > > into a hang. It does not crash but goes into an
> > idle
> > > > loop (I think). If I try to break in, this is
> > the
> > > > stack I see.
> > > >
> > > > nt!RtlpBreakWithStatusInstruction
> > > > nt!KeUpdateSystemTime+0x13e
> > > > hal!HalProcessorIdle+0x2
> > > >
> > > > I tried tracing out of the Mount handler. I
> > see
> > > > the call nt!KeWaitForSingleObject and the
> > following
> > > > call stack.
> > > >
> > > > nt!IopMountVolume+0x194
> > > > nt!IopCheckVpbMounted+0x38
> > > > nt!IopParseDevice+0x3ba
> > > > nt!ObpLookupObjectName+0x283
> > > > nt!ObOpenObjectByName+0xbb
> > > > nt!IoCreateFile+0x436
> > > > nt!NtOpenFile+0x25
> > > > nt!KiSystemService+0xc4
> > > > NTDLL!NtOpenFile+0xb
> > > > 0x1094ede
> > > > 0x1094ede
> > > > 0x10956ba
> > > > 0x10917a7
> > > > 0x10dba4e
> > > >
> > > > I go, pretty much, by Rajeev Nagar (I think)
> > in
> > > > the
> > > > mount handler. The only thing I do differently
> > is
> > > > that
> > > > I read and verify the meta-data before
> > attempting to
> > > > create the Volume device object. This is what I
> > do.
> > > >
> > > > 1. Read in the meta-data.
> > > > I use IoBuildDeviceIoControlRequest to read in
> > the
> > > > first and third 512 bytes from the volume. Then
> > I do
> > > > a
> > > > verify. If I succeed, I proceed. Else I return
> > > > STATUS_UNRECOGNIZED_VOLUME
> > > >
> > > > 2. I create the VolumeDeviceObject with the VCB
> > as
> > > > the
> > > > DeviceExtension.
> > > >
> > > > 3. I Clear the DO_DEVICE_INITIALIZING in the
> > > > VolumeDeviceObject.
> > > >
> > > > 4. I set the stack size in the
> > VolumeDeviceObject.
> > > >
> > > > 5. I initialize a VCB (pretty much Rajeev Nagar
> > > > suggests).
> > > > I create a stream file object
> > > > IoCreateStreamFileObject for the VCB.
> > > >
> > > > 6. Create an FCB for the Root Directory.
> > > >
> > > > 7. I Dereference the TargetDeviceObject
> > > > ObDereferenceObject.
> > > >
> > > > 8. I return STATUS_SUCCESS.
> > > >
> > > > Does anyone see anything wrong with what I
> > do?
> > > > Any
> > > > ideas?
> > > >
> > > > Thanks in advance!
> > > > Manoj Paul Joseph
> > >
> > > =====
> > > -----------------------------------
> > > Manoj Paul Joseph,
> > > Master of Computer Applications (final year
> > student),
> > > School of Computer Science and Engineering,
> > > Anna University,
> > > Chennai (Madras),
> > > India.
> > >
> > >
> > > Do You Yahoo!?
> > > Everything you’ll ever need on one web page
> > > from News and Sport to Email and Music Charts
> > > http://uk.my.yahoo.com
> > >
> > > —
> > > You are currently subscribed to ntfsd as:
> > xxxxx@secretseal.com
> > > To unsubscribe send a blank email to
> > leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
> >
> >
> >
> > —
> > You are currently subscribed to ntfsd as:
> > xxxxx@yahoo.com
> > To unsubscribe send a blank email to
> leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>
> =====
> -----------------------------------
> Manoj Paul Joseph,
> Master of Computer Applications (final year student),
> School of Computer Science and Engineering,
> Anna University,
> Chennai (Madras),
> India.
>
>

> Do You Yahoo!?
> Everything you’ll ever need on one web page
> from News and Sport to Email and Music Charts
> http://uk.my.yahoo.com
>
> —
> You are currently subscribed to ntfsd as: xxxxx@secretseal.com
> To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com