Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

balloc: out of blocks when compiled with -O3 #59

Open
efenniht opened this issue Jan 19, 2021 · 9 comments
Open

balloc: out of blocks when compiled with -O3 #59

efenniht opened this issue Jan 19, 2021 · 9 comments

Comments

@efenniht
Copy link

efenniht commented Jan 19, 2021

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.

@gygzhang
Copy link

gygzhang commented Mar 28, 2022

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.

@horbyn
Copy link

horbyn commented Apr 13, 2022

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

@gygzhang
Copy link

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

@horbyn
Copy link

horbyn commented Apr 13, 2022

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

@gygzhang
Copy link

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

you slove it ! i gonna try it later

@u2386
Copy link

u2386 commented May 4, 2022

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

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

@sudk1896
Copy link

sudk1896 commented Aug 7, 2022

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.

@ttzytt
Copy link

ttzytt commented Aug 21, 2022

Met the same problem when adding -g3, here is the detailed description: #133

@SourVoice
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants