xv6-riscv
xv6-riscv copied to clipboard
balloc: out of blocks when compiled with -O3
I compiled xv6 with -O3
(modified CFLAGS
in Makefile
), and ran usertests
. I expected it runs successfully, but I got kernel panic: balloc: out of blocks
in writebig
.
I did not change anything but also got the kernel panic: balloc: out of blocks in writebig. BTW, I am working on lock lab, ran xv6 in wsl2.
I did not change anything but also got the kernel panic: balloc: out of blocks in writebig. BTW, I am working on lock lab, ran xv6 in wsl2.
Hello, have you solved it? I am encountering this PANIC with the same env you showed
I did not change anything but also got the kernel panic: balloc: out of blocks in writebig. BTW, I am working on lock lab, ran xv6 in wsl2.
Hello, have you solved it? I am encountering this PANIC with the same env you showed
no, i gave up, I think just pass the bcachetest is enough probably. Actually, i can pass kmemtest, bcachetest, usertests one by one in xv6, but just failed in "writebig" while runing make grade
or ./grade-lab-lock
I did not change anything but also got the kernel panic: balloc: out of blocks in writebig. BTW, I am working on lock lab, ran xv6 in wsl2.
Hello, have you solved it? I am encountering this PANIC with the same env you showed
no, i gave up, I think just pass the bcachetest is enough probably. Actually, i can pass kmemtest, bcachetest, usertests one by one in xv6, but just failed in "writebig" while runing
make grade
or./grade-lab-lock
ohhhhh, i have solved unexpectedly!!! Just modify the macro FSSIZE
to bigger(i modified from 1000 to 10000) in kernel/param.h
I did not change anything but also got the kernel panic: balloc: out of blocks in writebig. BTW, I am working on lock lab, ran xv6 in wsl2.
Hello, have you solved it? I am encountering this PANIC with the same env you showed
no, i gave up, I think just pass the bcachetest is enough probably. Actually, i can pass kmemtest, bcachetest, usertests one by one in xv6, but just failed in "writebig" while runing
make grade
or./grade-lab-lock
ohhhhh, i have solved unexpectedly!!! Just modify the macro
FSSIZE
to bigger(i modified from 1000 to 10000) inkernel/param.h
you slove it ! i gonna try it later
I did not change anything but also got the kernel panic: balloc: out of blocks in writebig. BTW, I am working on lock lab, ran xv6 in wsl2.
Hello, have you solved it? I am encountering this PANIC with the same env you showed
no, i gave up, I think just pass the bcachetest is enough probably. Actually, i can pass kmemtest, bcachetest, usertests one by one in xv6, but just failed in "writebig" while runing
make grade
or./grade-lab-lock
ohhhhh, i have solved unexpectedly!!! Just modify the macro
FSSIZE
to bigger(i modified from 1000 to 10000) inkernel/param.h
Yeah I think that this issue is caused by the fact that FSSIZE
is too small.
When you move forward and in the next "file system" lab you would see the macros below.
#ifdef LAB_FS
#define FSSIZE 200000 // size of file system in blocks
#else
#ifdef LAB_LOCK
#define FSSIZE 10000 // size of file system in blocks
#else
#define FSSIZE 2000 // size of file system in blocks
#endif
#endif
Just FYI, I faced this same issue in xv6-labs-2021
while doing the traps
labs. While the alarmtest
was successful, the usertests
were failing.
I had two solutions for solving the alarmtest
, one that I would describe the normal way and the other one the lazy way. I tried both and although alarmtest
was passing for both, usertests
were failing in the manywrites
test and I was getting the exact same error described in this thread.
I changed the FSSIZE
parameter from 1000 to 10000 and then the usertests
passed.
Met the same problem when adding -g3
, here is the detailed description: https://github.com/mit-pdos/xv6-riscv/issues/133
I came up with the same problem with the environment on GitHub Codespace when doing the Lab Traps. I can pass the alarmtest too. Only need to do is to modify the macro FSSIZE in kernel/param.h form 1000 to 1010 is Ok.