Wow! Current SVN (Head)!
Used memory 1015744Kb (mm/mminit.c:375) Kernel Stack Limits. InitTop = 0x80133000, Init = 0x80130000 (mm/virtual.c:214) FIXME: MEMORY_AREA_SYSTEM case incomplete (or possibly wrong) for NtQueryVirtualMemory() (ke/bug.c:56) Found Bugcheck Resource Data! (ke/bug.c:67) Got Pointer to Bugcheck Resource Data! (ke/clock.c:80) KiInitializeSystemClock() (ke/clock.c:99) Finished KiInitializeSystemClock() No current process Entered debugger on last-chance exception number 14 (Page Fault) Memory at 0x9c could not be read: Page not present. No current process KeBugCheckWithTf at ke/catch.c:224 A problem has been detected and ReactOS has been shut down to prevent damage to your computer.
The problem seems to be caused by the following file: ntoskrnl.exe
KMODE_EXCEPTION_NOT_HANDLED
Technical information:
*** STOP: 0x0000001E (0xc0000005,0x8002f410,0x00000000,0x00000018)
*** ntoskrnl.exe - Address 0x8002f410 base at 0x80000000, DateStamp 0x0
Page Fault Exception: 14(0) Processor: 0 CS:EIP 8:8002f410 ntoskrnl.exe:2f410 cr2 18 cr3 26000 Proc: 0 DS 10 ES 10 FS 30 GS 10 EAX: 00000000 EBX: 00000680 ECX: 00026000 EDX: 00000064 EBP: 8013245c ESI: 80132834 ESP: 801323ac EDI: 80132be0 EFLAGS: 00210046 kESP 801323ac Frames: ntoskrnl.exe:300fc ntoskrnl.exe:de31 ntoskrnl.exe:1285 ntoskrnl.exe:1aff ntoskrnl.exe:382d ntoskrnl.exe:c4a3e <46C>
KeBugCheckWithTf at ke/catch.c:224 A problem has been detected and ReactOS has been shut down to prevent damage to your computer.
The problem seems to be caused by the following file: ntoskrnl.exe
KMODE_EXCEPTION_NOT_HANDLED
Technical information:
*** STOP: 0x0000001E (0x80000003,0x80005c47,0x00000000,0x00000000)
*** ntoskrnl.exe - Address 0x80005c47 base at 0x80000000, DateStamp 0x0
Hi,
I get the same error with the up build but the smp build works. It seems that the bug comes from Thomas' handle table improvment. PsInitClientIDManagment is called befor PsInitProcessManagment. PsInitClientIDManagment calls some function which needs a valid current process and which is setup later in PsInitProcessManagment. The smp build works, because the page at address 0 is unmapped later.
- Hartmut
James Tabor schrieb:
Wow! Current SVN (Head)!
Used memory 1015744Kb (mm/mminit.c:375) Kernel Stack Limits. InitTop = 0x80133000, Init = 0x80130000 (mm/virtual.c:214) FIXME: MEMORY_AREA_SYSTEM case incomplete (or possibly wrong) for NtQueryVirtualMemory() (ke/bug.c:56) Found Bugcheck Resource Data! (ke/bug.c:67) Got Pointer to Bugcheck Resource Data! (ke/clock.c:80) KiInitializeSystemClock() (ke/clock.c:99) Finished KiInitializeSystemClock() No current process Entered debugger on last-chance exception number 14 (Page Fault) Memory at 0x9c could not be read: Page not present. No current process KeBugCheckWithTf at ke/catch.c:224 A problem has been detected and ReactOS has been shut down to prevent damage to your computer.
The problem seems to be caused by the following file: ntoskrnl.exe
KMODE_EXCEPTION_NOT_HANDLED
Technical information:
*** STOP: 0x0000001E (0xc0000005,0x8002f410,0x00000000,0x00000018)
*** ntoskrnl.exe - Address 0x8002f410 base at 0x80000000, DateStamp 0x0
Page Fault Exception: 14(0) Processor: 0 CS:EIP 8:8002f410 ntoskrnl.exe:2f410 cr2 18 cr3 26000 Proc: 0 DS 10 ES 10 FS 30 GS 10 EAX: 00000000 EBX: 00000680 ECX: 00026000 EDX: 00000064 EBP: 8013245c ESI: 80132834 ESP: 801323ac EDI: 80132be0 EFLAGS: 00210046 kESP 801323ac Frames: ntoskrnl.exe:300fc ntoskrnl.exe:de31 ntoskrnl.exe:1285 ntoskrnl.exe:1aff ntoskrnl.exe:382d ntoskrnl.exe:c4a3e <46C>
KeBugCheckWithTf at ke/catch.c:224 A problem has been detected and ReactOS has been shut down to prevent damage to your computer.
The problem seems to be caused by the following file: ntoskrnl.exe
KMODE_EXCEPTION_NOT_HANDLED
Technical information:
*** STOP: 0x0000001E (0x80000003,0x80005c47,0x00000000,0x00000000)
*** ntoskrnl.exe - Address 0x80005c47 base at 0x80000000, DateStamp 0x0
Ros-dev mailing list Ros-dev@reactos.com http://reactos.com:8080/mailman/listinfo/ros-dev
Hartmut Birr wrote:
PsInitClientIDManagment is called befor PsInitProcessManagment. PsInitClientIDManagment calls some function which needs a valid current process and which is setup later in PsInitProcessManagment.
Can you please try if rev. 14035 fixes the problem? Unfortunately I haven't been able to reproduce it even though it don't compile it for SMP.
Best Regards, Thomas
Thomas Weidenmueller schrieb:
Can you please try if rev. 14035 fixes the problem? Unfortunately I haven't been able to reproduce it even though it don't compile it for SMP.
Best Regards, Thomas
It doesn't fix the problem. I can reproduce the problem in qemu. I'm booting from the install cd.
- Hartmut
E:\Sandbox\qemu-0.6.0-windows>qemu-win E:\Sandbox\qemu-0.6.0-windows>REM Start qemu on windows. UNKNOWN: 80000000 3c4000 3dd000 UNKNOWN: 80001000 (NTDLL:image.c:31) DosHeader->e_magic 0 (NTDLL:image.c:32) NtHeader 802ca000 (../generic/acpi.c:443) Unable to locate RSDP Used memory 131072Kb (mm/mminit.c:388) Kernel Stack Limits. InitTop = 0x800ee000, Init = 0x800eb000 ******* Dumping non paging pool stats ****** Tag ffffffff Blocks 1 Total Size 3200 Average Size 3200 TotalBlocks 1 TotalSize 3200 AverageSize 3200 Freeblocks 1 TotalFreeSize 816 AverageFreeSize 816 ***************** Dump Complete *************** (mm/virtual.c:214) FIXME: MEMORY_AREA_SYSTEM case incomplete (or possibly wrong) for NtQueryVirtualMemory() (ke/bug.c:56) Found Bugcheck Resource Data! (ke/bug.c:67) Got Pointer to Bugcheck Resource Data! (ke/clock.c:80) KiInitializeSystemClock() (ke/clock.c:99) Finished KiInitializeSystemClock() (mm/mm.c:323) No current process KeBugCheckWithTf at ke/catch.c:224 A problem has been detected and ReactOS has been shut down to prevent damage to your computer.
The problem seems to be caused by the following file: ntoskrnl.exe
KMODE_EXCEPTION_NOT_HANDLED
Technical information:
*** STOP: 0x0000001E (0xc0000005,0x8002586d,0x00000000,0x00000000)
*** ntoskrnl.exe - Address 0x8002586d base at 0x80000000, DateStamp 0x0
Page Fault Exception: 14(2) Processor: 0 CS:EIP 8:8002586d <ntoskrnl.exe:2586d -> ../include/ntos/rtl.h:148> cr2 0 cr3 30000 Proc: 0 DS 10 ES 10 FS 30 GS 10 EAX: 8040a82c EBX: 003dd000 ECX: 00000000 EDX: 00000000 EBP: 800ecc60 ESI: 0002fcf6 ESP: 800ecbc4 EDI: 0001fc00 EFLAGS: 00200296 kESP 800ecbc4 Frames: <ntoskrnl.exe:2583f -> ntoskrnl/ex/handle.c:140> <800A3E88 -> ntoskrnl/ps/cid.c:32> <800A46B3 -> ntoskrnl/ps/psmgr.c:34> <8009DF24 -> ntoskrnl/ex/init.c:457> <ntoskrnl.exe:ef24 -> ntoskrnl/ke/main.c:104> <8009C72A -> ntoskrnl/ke/main.c:282> <ntoskrnl.exe:104b -> ntoskrnl/ke/i386/main.S:51>
KeBugCheckWithTf at ke/catch.c:224 A problem has been detected and ReactOS has been shut down to prevent damage to your computer.
The problem seems to be caused by the following file: ntoskrnl.exe
KMODE_EXCEPTION_NOT_HANDLED
Technical information:
*** STOP: 0x0000001E (0x80000003,0x800056bf,0x00000000,0x00000000)
*** ntoskrnl.exe - Address 0x800056bf base at 0x80000000, DateStamp 0x0
E:\Sandbox\qemu-0.6.0-windows>
Hartmut Birr wrote:
It doesn't fix the problem. I can reproduce the problem in qemu. I'm booting from the install cd.
(ke/clock.c:80) KiInitializeSystemClock() (ke/clock.c:99) Finished KiInitializeSystemClock() (ex/handle.c:96) ExCreateHandleTable (ex/handle.c:96) ExCreateHandleTable (ex/timer.c:173) ExpInitializeTimerImplementation() (ex/handle.c:85) ExpInitializeHandleTables
The reason is that ExCreateHandleTable() is called before ExpInitializeHandleTables, and inserting the handle table into the list fails because the list was not yet initialized. But for some reason it appears to work fine for some systems even though it shouldn't. I'll try to work out a solution.
Best Regards, Thomas
Hartmut Birr wrote:
PsInitClientIDManagment is called befor PsInitProcessManagment. PsInitClientIDManagment calls some function which needs a valid current process and which is setup later in PsInitProcessManagment.
There are more problems. ExCreateHandleTable needs ExpHandleTableHead. ExpHandleTableHead is initialized later in ExInit3. Currently, I doesn't unterstand why my smp machine runs since 3 hours. Vmware works also with the smp build but not with the up one.
- Hartmut
Hartmut Birr wrote:
There are more problems. ExCreateHandleTable needs ExpHandleTableHead. ExpHandleTableHead is initialized later in ExInit3. Currently, I doesn't unterstand why my smp machine runs since 3 hours. Vmware works also with the smp build but not with the up one.
I saw that when adding debug prints but it didn't even dare to crash on my UP system. I re-arranged the system initialization a bit so the handle tables are initialized before the first one was created. I hope rev. 14040 finally solves the problems.
Best Regards, Thomas
Thomas Weidenmueller schrieb:
I saw that when adding debug prints but it didn't even dare to crash on my UP system. I re-arranged the system initialization a bit so the handle tables are initialized before the first one was created. I hope rev. 14040 finally solves the problems.
Sorry for the bad news, but Ros crashs again.
- Hartmut
Page Fault Exception: 14(0) Processor: 0 CS:EIP 8:8007c510 ntoskrnl.exe:7c510 ntoskrnl/ps/tinfo.c:334 cr2 137 cr3 30000 Proc: 8040b9a0 Pid: 0 <System> DS 10 ES 10 FS 30 GS 10 EAX: 00000000 EBX: 003de000 ECX: 00000000 EDX: 8040bce0 EBP: 800eec60 ESI: 0002fcf6 ESP: 800eebc0 EDI: 0001fc00 EFLAGS: 00200292 kESP 800eebc0 Frames: ntoskrnl.exe:72e48 ntoskrnl/ps/create.c:411 <800A58E1> ntoskrnl/ps/thread.c:769 <800A56AD> ntoskrnl/ps/psmgr.c:32 <8009EF24> ntoskrnl/ex/init.c:459 ntoskrnl.exe:ef24 <8009D72A> ntoskrnl.exe:104b
Hartmut Birr wrote:
Sorry for the bad news, but Ros crashs again.
Sigh...it would've been so much easier if our kernel wasn't so horribly screwed and ke/ps wasn't totally mixed up...
ntoskrnl.exe:72e48 ntoskrnl/ps/create.c:411 <800A58E1> ntoskrnl/ps/thread.c:769
Now, this _really_ surprises me. It's almost impossible then it didn't crash before my patches. It crashes in PsInitializeThread() when calling ExGetPreviousMode() trying to initialize the reaper thread, which obviously succeeded earlier when creating the idle thread in PsPrepareForApplicationProcessorInit(). To my understanding the PRCB's CurrentThread should be the idle thread at that point. I'm really starting to become desperate :/
To my understanding, the idle process and idle threads should be one of the first things that should be set up, I believe it should be sufficient to have it in the microkernel only, I don't see a requirement that the executive would be needed for them. But that's not possible because we mixed up the kernel with the executive, it'd be so much easier if it wasn't.
If you want i'll revert all my changes and dump them, our kernel appears not to be mature enough :/ Unfortunately I don't know what else I can do to get it work, everything is just so messed up. I'd appreciate any support.
Best Regards, Thomas
Hartmut,
could you please test the attached patch file? If this doesn't fix it I'm going to revert all my changes from trunk.
Best Regards, Thomas
Index: ps/thread.c =================================================================== --- ps/thread.c (revision 14042) +++ ps/thread.c (working copy) @@ -731,10 +731,8 @@ * FUNCTION: Initialize thread managment */ { - PETHREAD FirstThread, ReaperThread; + PETHREAD FirstThread; ULONG i; - KIRQL oldIrql; - NTSTATUS Status;
for (i=0; i < MAXIMUM_PRIORITY; i++) { @@ -776,7 +774,15 @@ DPRINT("FirstThread %x\n",FirstThread);
DoneInitYet = TRUE; +}
+VOID +PsInitReaperThread(VOID) +{ + PETHREAD ReaperThread; + KIRQL oldIrql; + NTSTATUS Status; + /* * Create the reaper thread */ Index: ps/psmgr.c =================================================================== --- ps/psmgr.c (revision 14042) +++ ps/psmgr.c (working copy) @@ -30,6 +30,7 @@ PsInitProcessManagment(); PsInitThreadManagment(); PsInitIdleThread(); + PsInitReaperThread(); PsInitialiseSuspendImplementation(); PsInitialiseW32Call(); } Index: include/internal/ps.h =================================================================== --- include/internal/ps.h (revision 14042) +++ include/internal/ps.h (working copy) @@ -532,6 +532,8 @@ PsApplicationProcessorInit(VOID); VOID PsPrepareForApplicationProcessorInit(ULONG Id); +VOID +PsInitReaperThread(VOID); VOID STDCALL PsIdleThreadMain(PVOID Context);