minoca / os

Minoca operating system
Other
2.71k stars 231 forks source link

Assertion Failure: KernelUsage->HardPageFaults <= KernelUsage->PageFaults #165

Closed roytam1 closed 2 years ago

roytam1 commented 2 years ago

Hello,

While we are porting mksh to Minoca OS, we found that our test suite hits an assertion inside kernel:

FAIL ./check.t:heredoc-tmpfile-5
    Description:
        Check that heredoc temp files aren't removed too soon or too late.
        Backgrounded subshell command with here doc
    unexpected exit status 134 (signal 6), expected 0
    unexpected stdout - got too little output
    wanted:
        A
        hi
        B
        Left overs: *
    got nothing
    unexpected stderr - got too much output
    wanted nothing
    got:

         *** Assertion Failure: KernelUsage->HardPageFaults <= KernelUsage->PageFaults
         *** File: /auto/working/14332/src/os/apps/libc/dynamic/resource.c, Line 388

        �
    [incomplete last line]
FAIL ./check.t:heredoc-tmpfile-6
    Description:
        Check that heredoc temp files aren't removed too soon or too late.
        Heredoc in pipeline.
    unexpected stdout - first difference: line 1, char 1 (wanted 0x48 ('H'), got 0x41 ('A')
    wanted:
        HI
        Left overs: *
    got:
        A
        hLeft overs: *

OS version: 0.4-pc, downloaded from project home page.

evangreen commented 2 years ago

Thanks for reporting this. With your steps in hand I'm able to reproduce this as well. Let me see if I can figure out what's going on here.

evangreen commented 2 years ago

Ok I figured it out. This should be fixed with 76685d045219229be8765ab069aa0892dd3f1505. Feel free to reopen if the issue recurs.

roytam1 commented 2 years ago

Ok I figured it out. This should be fixed with 76685d0.

Fix confirmed! Thanks!

EDIT: also reflected in mksh side. https://github.com/MirBSD/mksh/commit/b20d4a514979f5a0e61e722685e01bf03233339f