#bentobox

1 messages ยท Page 2 of 1

burnt stream
#

This is the 1000th message

craggy nacelle
#

fixed the relocation issues (1 loc fix)

craggy nacelle
#

what if i implement evdev into the pl011 driver

#

(i'm using this mostly as a keyboard until i write an xhci stack)

#

its quite jank but its better than no input

craggy nacelle
#

ill have to let doom play itself

obtuse glen
#

why does each CPU have a different time

craggy nacelle
obtuse glen
craggy nacelle
#

nah it was my printf spinlock

obtuse glen
#

ah

daring tendon
#

Non reentrant printf LKEKW

craggy nacelle
#

it is reentrant, i meant my flanterm spinlock lol

obtuse glen
#

yeah flanterm isn't thread safe

#

although I added independent string drawing calls to mine that were

craggy nacelle
#

huh? the PS/2 self test failed and now i have no name

craggy nacelle
#

working on unix domain sockets

#

i'll leave send and receive for tomorrow

craggy nacelle
#

its been a long day

craggy nacelle
#

(yes ik it should say bound but i'm too lazy to change it)

rose turret
#

How do you have all those CPUs

#

Are you running a server

primal quest
rose turret
#

Oh! Do you actually need to have 256 CPUs?

primal quest
#

no

#

i guess not

rose turret
#

Okay, thanks

primal quest
#

especially not if you're running using software

#

cause all the cores are simulated via threads on your hosts

#

so... it'll just run slow

rose turret
#

Yep

obtuse glen
#

how many actual real cpus do you have on the host?

craggy nacelle
obtuse glen
#

pleanty to test it then

craggy nacelle
#

doing a lil thing

primal quest
craggy nacelle
primal quest
#

wow

#

are you doing it in C, or C++?

#

or what else

#

and what IPC mechanism do you use

rose turret
craggy nacelle
craggy nacelle
primal quest
#

I would like to use C++, but I'd want to port the C++ STL which requires me to write at least a little bit of libc code

#

I know I have mlibc mostly ported but I'd want this part of the OS to run purely on my own code

#

(except specifically libstdc++?)

#

(idk)

obtuse glen
#

you probably dont need that much of libc, unless you want threads and stuff which arent really part of libc but are an additional thing

#

you can probably get by with just string manipulation, memory, heap, etc until you start wanting to use stuff like std::chrono

craggy nacelle
#

ive been cooking

craggy nacelle
#

dang 10k loc

craggy nacelle
#

just did a full system upgrade and nasm won't compile my idt anymore wtf

daring tendon
#

Idt init... fail I guess

craggy nacelle
#

it seems like i was doing push dword instead of push qword, and before it didn't complain about this

#

i'm not sure why i was even pushing a dword instead of a qword, probably a remnant from the old 32-bit bentobox

craggy nacelle
#

we now have signals, and i fixed the tty deadlock and added more abstraction

#

so instead of having the tty write directly to the screen it now has a worker thread that does it

craggy nacelle
#

running from the ext2 filesystem

#

when the build system detects that you made an initrd (with the livecd make rule) it will make the default option of the limine config be the livecd option

craggy nacelle
craggy nacelle
#

i need to work on this again

craggy nacelle
#

i have no idea what i could port

#

does fastfetch require procfs?

dusk coyote
#

neofetch can run without procfs if you really want a fetch and dont care about running software maintained by a ghost

craggy nacelle
#

i ported neofetch before the rewrite but its so slow

#

hmmm, i may need locks in my ext2 fs KEKW

#

i think my ahci driver also needs synchronization

dusk coyote
craggy nacelle
#

not yet

dusk coyote
#

thats like the biggest time sink

#

for neofetch

craggy nacelle
#

yeah

dusk coyote
#

cuz shell script

craggy nacelle
#

i mean, 8 seconds is not that bad for non-CoW fork

craggy nacelle
inland glen
#

Or it's forking very often I guess, but your statement made it sound like a single one takes 8s

craggy nacelle
#

under non-kvm it would take 24 seconds in the old kernel

craggy nacelle
#

i'll do a simple spinlock for now

#

yup that works

craggy nacelle
#

i wonder how much ram the rewrite uses

#

its probably more because mlibc allocates a bunch of buffers at startup iirc and i dont have CoW

#

yeah, expected

#

i should probably write a slab allocator for better memory usage too, but i'm lazy

craggy nacelle
#

i could try to compile binutils and gcc, but isn't that a lot of work and requires recompiling gcc like 3 times?

#

my ryzen 7 5800x could probably compile gcc at decent speeds, but an overclocked threadripper hooked up to a BMW radiator would probably be better

craggy nacelle
#

finally got this working

#

oh wait the tty froze

#

oh because its probably pid 1 ๐Ÿ’€

#

yeah killing pid 2 kills the serial tty LOL

craggy nacelle
craggy nacelle
#

ported fastfetch

primal quest
#

What is the "C" locale?

inland glen
#

AFAIK that one just takes whatever random crap the devs wrote

craggy nacelle
craggy nacelle
#

hmm sometimes when i run fastfetch i have a deadlock where fastfetch won't get woken up

#

hmmmmm

#

i wonder what is causing this tho

#

i cant replicate the issue on nosmp

craggy nacelle
#

ugh i need to debug signals again

craggy nacelle
#

and the junk uptime is /proc/uptime not existing

#

(i did touch /proc/uptime)

#

perfect

craggy nacelle
#

cooking something

craggy nacelle
#

i'm planning to make this limine compliant

#

why not multiboot2 or my own protocol? cba to support other protocols in bentobox

inland glen
#

Damn

#

Real bootloader development

craggy nacelle
#

so i thought bash was crashing somehow? but its actually my init ignoring who woke it up

#

wait no nvm, my waitpid is bugged

#

ok fixed

craggy nacelle
#

fixed a GPF when removing a socket while it was being used (i forgot to initialize two pointers)

craggy nacelle
#

since im too lazy to write my own GUI library, i might try to port nanox because im too lazy to port full xorg

#

maybe i'll port xorg later but not for the time being

craggy nacelle
#

can merge trl

craggy nacelle
#

Ncurses has been ported

#

We may get vim today

#

But there is an issue called being in class

craggy nacelle
#

where did my permissions go ๐Ÿ˜ญ

#

oh oops i was always overwriting them in file_open ๐Ÿ’€

#

@tacit mirage

tacit mirage
#

Congrats

craggy nacelle
#

ty

tacit mirage
#

I am jealous

craggy nacelle
#

lol, you'll get it working soon enough i bet

tacit mirage
#

Maybe

craggy nacelle
#

i may have some issues

#

that's for future me to figure out :p

#

so this works? that's weird

craggy nacelle
#

oh maybe its because i don't have rename()

#

i'll implement it tomorrow because i have to sleep because school

tacit mirage
timid wraith
#

exactly!

craggy nacelle
crimson flame
#

BentoBox is goated

craggy nacelle
craggy nacelle
#

yup. my ext2 impl had some nasty bugs

#

they're all fixed now and i also implemented renaming

#

and vim works perfectly

#

i also fixed a LOT of other bugs, including memory leaks

#

i think i'll add some screenshots to my readme

craggy nacelle
#

i completely forgot i had ported figlet because i forgot to add it to the readme ๐Ÿ’€

craggy nacelle
#

for some reason scrolling in vim is really laggy, like it slowly gets laggier and lagger to the point where you have 800ms lag spikes

#

but it still scrolls at the same speed, but its displaying like 1fps

#

its still usable because the scrolling doesn't die, but its weird

craggy nacelle
#

ok so its vim's syntax highlighting causing massive lag

#

everything else is fine

#

oh wait why the fuck is it using regex engine #0

#

setting it to 1 fixed it ๐Ÿ˜ญ

craggy nacelle
#

should i add mouse support to my tty trl

slender talon
#
  • called bentobox - has fork -- why is this so satisfying? ๐Ÿ˜„
craggy nacelle
#

lol

craggy nacelle
primal quest
craggy nacelle
#

because i run qemu with bios & kvm

soft charm
#

great work tho

#

awesome progress

craggy nacelle
#

we now have ACPI reboot & shutdown thanks to lai (before everyone starts screaming at me, i chose lai so i didn't have to migrate my acpi stuff to uACPI)

dusk coyote
obtuse glen
#

not Cross enough ๐Ÿฅƒ emojis ๐Ÿ’ฉ

pearl dagger
#

Your ๐Ÿซต OS ๐Ÿ’ป is ๐Ÿ™cool ๐Ÿ˜Ž

craggy nacelle
#

for some reason when i use the mouse in vim, either in the serial tty or the graphical tty, sometimes the whole scheduler will freeze and the cpu will be pegged at 100%

#

aha its a tty fifo deadlock

#

ahhh i think i know what's going on

#

my fifo has a spinlock and acquiring it from irq contexts is not good

#

should i just drop the character i'm trying to enqueue or make an irq safe acquire()?

craggy nacelle
#

i think i'll implement symlinks and then maybe setfont

craggy nacelle
#

todo: implement symlinkat

craggy nacelle
#

i also need to implement readlink

craggy nacelle
#

symlinks are now fully implemented

craggy nacelle
#

i hate tuesdays and thursdays

#

i don't have much time to do anything

primal quest
#

for me, tuesdays and wednesdays especially (because the schedule is loaded with classes)

craggy nacelle
#

i finally have free time

craggy nacelle
#

i finally fixed an ext2 corruption bug i had for a long time

#

and added a few more assertions

craggy nacelle
#

this thing multitasks surprisingly well running with no smp under tcg

#

i can run two instances of doom at the same time and still use the system on the serial tty

#

sure its quite laggy but it seems like my new scheduler is quite stable

craggy nacelle
#

just fixed a polling issue that would make the tty hang sometimes

craggy nacelle
#

now with font setting

clear warren
#

oh wait no

#

it did

#

the fonts are just very similar

#

lol

craggy nacelle
#

ye

craggy nacelle
#

On an ssh connection from my phone :p

#

Using vim with a touch screen is funny

#

I'm not sure why it looks weird

#

Maybe termux doesn't support all ansi escape codes

inland glen
#

This looks like something that would happen if you switched between dark and light theme

craggy nacelle
#

Ah

craggy nacelle
#

left telnet nyancat running while i was eating dinner, its quite stable

craggy nacelle
#

ugh i have some memory issues

#
[   14.550321] kernel/misc/../../lib/dlmalloc.c:4751: free: aborted
[   14.551048] Call Trace:
[   14.551412]  #0 0xffffffff800097ac in free+2092
[   14.551969]  #1 0xffffffff8000aac5 in kfree+37
[   14.552524]  #2 0xffffffff8000d1f1 in vma_destroy+369
[   14.553107]  #3 0xffffffff8000db99 in sched_cleaner+505
[   14.558938] kernel/misc/../../lib/dlmalloc.c:4777: free: aborted
[   14.559598] Call Trace:
[   14.559934]  #0 0xffffffff8000aac5 in kfree+37
[   14.560459]  #1 0xffffffff8000dbb3 in sched_cleaner+531
[   14.561002] kernel/misc/../../lib/dlmalloc.c:4751: free: aborted
[   14.561638] Call Trace:
[   14.561971]  #0 0xffffffff800097ac in free+2092
[   14.562498]  #1 0xffffffff8000aac5 in kfree+37
[   14.562993]  #2 0xffffffff8000dc03 in sched_cleaner+611
#

i have no idea what is causing this

craggy nacelle
#

maan i thought this didn't have memory issues ๐Ÿ˜”

#

so seems like if i dont spam vim a lot it works just fine?

#

what the fuck is this

#

the issue only happens when i run vim

#

maybe i could implement syscall tracing and check every syscall for memory issues

craggy nacelle
#

so i've gotten it to crash less but it still crashes sometimes

#

god dammit

craggy nacelle
#

i thought i had found the bug, but i did not.

craggy nacelle
#

ok i think i found the bug

#

i just don't know how to fix it

craggy nacelle
#

so my process struct is getting corrupted

#

ooo

[    1.573833] x86 Fault: general protection fault on CPU 1
[    1.575256] // Oops.
[    1.576062] rdi: 0xffffc00000401f20 rsi: 0x0000000000000001 rbp:    0xffffc00000420c10
[    1.577359] rsp: 0xffffc00000420be0 rbx: 0x000055555593fcc0 rdx:    0xffffffffffffffff
[    1.578860] rcx: 0x0000000000000001 rax: 0xcccccccccccccccc rip:    0xffffffff8001b377
[    1.580098] r8:  0x0000000000000001 r9:  0x0000000000000000 r10:    0x000000000000000a
[    1.581289] r11: 0x0000000000000246 r12: 0x0000000000000000 r13:    0x0000000000000000
[    1.582443] r14: 0x0000000000000000 r15: 0x0000000000000000 cr2:    0x0000000000000000
[    1.583583] cs:  0x0000000000000008 ss:  0x0000000000000010 rflags: 0x0000000000010286
[    1.584738] Call Trace:
[    1.586355]  #0 0xffffffff8001cb9e in isr_handler+1072
[    1.587289]  #1 0xffffffff80046819 in int_stub13+33
[    1.588315]  #2 0xffffffff80014114 in sys_read_write+261
[    1.589514]  #3 0xffffffff8001423c in sys_read+48
[    1.590686]  #4 0xffffffff80016efd in syscall_handler+195
[    1.591958]  #5 0xffffffff800202e5 in do_syscall+153
[    1.592967]  #6 0xffffffff8004b03a in syscall_entry+58

(i added heap poisoning)

craggy nacelle
#

fml

craggy nacelle
#

oh my fucking god

#

i found the issue

#

it was a one line fix.

#

this use-after-free would corrupt everything so badly

#

this also fixed a freezing bug in vim

craggy nacelle
#

oooh i may be able to get a proper keyboard working on arm with virtio

craggy nacelle
#

ok nvm im too tired to do this today

craggy nacelle
#

at least i fixed the arm build

#

arm is kinda unstable (i dont handle segfaults and user copy fails) and coreutils ls is weirdly bugged

#

ls -l will give the kernel a null path

#

and running bash nested will page fault

craggy nacelle
#

at least we have nyancat

#

doom should work as well but my keyboard driver is the pl011 console rn ๐Ÿ’€ so i cant really play it

craggy nacelle
craggy nacelle
#

ls -l seems to be crashing in FutexLockImpl<false>::lock()

#

it seems to be trying to lock a null futex?

craggy nacelle
#

for some reason the mlibc allocator has a corrupted slab pool

drifting spruce
#

let me direct you to the good ol' reliable frg::slab_pool corruption bug diagnosis flow chart meme

craggy nacelle
#

ah yes

craggy nacelle
#

implemented an mmio virtio-input driver

craggy nacelle
dusk coyote
craggy nacelle
#

my kernel only supports that for fbdev rn

#

so no

primal quest
craggy nacelle
#

mmapping files instead of using read to read them

dusk coyote
craggy nacelle
#

oh its an option?

dusk coyote
#

Yeah

#

MAP_FILE_WINDOWS

#

Or something like that

#

Ive written a line about all of these config options in the wip porting guide

primal quest
#

Why /etc/localtime

#

What's special about that

dusk coyote
#

It contains info about the local time I would guess

#

Like what timezone youre in etc

primal quest
#

Is it like a fake file that you read for the current time or?

craggy nacelle
#
 xrc2 ๎‚ฐ ~ ๎‚ฑ src ๎‚ฑ bentobox ๎‚ฐ hexdump -C /etc/localtime                                                                                                     ๎‚ฒ SIGINT ๎‚ฒ ST 12 ๎‚ณ ๎‚  rewrite 
00000000  54 5a 69 66 32 00 00 00  00 00 00 00 00 00 00 00  |TZif2...........|
00000010  00 00 00 00 00 00 00 0b  00 00 00 0b 00 00 00 00  |................|
00000020  00 00 00 a2 00 00 00 0b  00 00 00 1b 80 00 00 00  |................|
00000030  9e ba c5 f0 9f a0 39 00  a0 90 1b f0 a1 81 6c 80  |......9.......l.|
00000040  aa 05 ef 70 aa e7 6e 00  ad c9 a7 f0 ae a7 32 00  |...p..n.......2.|
00000050  af a0 4f 70 b0 87 14 00  b1 89 7a 00 b2 70 30 80  |..Op......z..p0.|
00000060  b3 72 88 70 b4 50 12 80  c2 c9 ec f0 c3 58 5d 00  |.r.p.P.......X].|
00000070  c4 48 3f f0 c4 6d 1b e0  c5 39 74 60 c7 21 5b 80  |.H?..m...9t`.![.|
00000080  c7 f5 8e f0 cb f5 de 60  cc 95 71 f0 cd c3 4b 60  |.......`..q...K`|
00000090  ce a0 d5 70 cf a3 2d 60  d0 80 b7 70 d1 83 0f 60  |...p..-`...p...`|
000000a0  d2 60 99 70 d3 62 f1 60  d4 40 7b 70 d9 1e 46 e0  |.`.p.b.`.@{p..F.|
dusk coyote
craggy nacelle
#

oh, is it this?

elif host_machine.system() == 'astral'
    rtld_include_dirs += include_directories('sysdeps/astral/include')
    libc_include_dirs += include_directories('sysdeps/astral/include')
    internal_conf.set10('MLIBC_MAP_DSO_SEGMENTS', true)
    internal_conf.set10('MLIBC_MAP_FILE_WINDOWS', true)
    internal_conf.set10('MLIBC_MMAP_ALLOCATE_DSO', true)
    subdir('sysdeps/astral')
#

also no, i dont enable it

craggy nacelle
#

so uh its dying in parse_tzfile_path

craggy nacelle
#

i just did some refactoring of the ps2 driver and in total i've eaten away 150loc

craggy nacelle
craggy nacelle
#

just fixed a race condition in the scheduler that would make fastfetch never get cleaned when i ran qemu with tcg

craggy nacelle
#

much better

craggy nacelle
#

i realized i haven't tried tried running fastfetch on arm yet, but here it is

craggy nacelle
#

Why did discord compress my second fastfetch screenshot so much

craggy nacelle
#

i cant work on this because i fucking cant git pull

#

ok thanks github

craggy nacelle
#

there's quite a few things i want to implement but i have no idea where to start

craggy nacelle
#

Xorg would be really nice but i need to implement quite a bit of stuff before i can get it running at all

#

so i may look into porting gcc instead

#

after gcc i may look into CoW fork and maybe dynamic linking

craggy nacelle
inland glen
#

Doesn't GCC depend on dynamic linkage?

craggy nacelle
#

I don't think so

craggy nacelle
#
root@bentobox [ /tmp ]# mkdir foo
root@bentobox [ /tmp ]# ls
foo  foo
root@bentobox [ /tmp ]# huh?  
bash: huh?: command not found
root@bentobox [ /tmp ]# rmdir foo
root@bentobox [ /tmp ]# ls
'[pipe::read]'
root@bentobox [ /tmp ]#

๐Ÿ’”

craggy nacelle
#

i think i got CoW working

#

but on tcg bash will sometimes die when i run something, and only sometimes

#

there is no error, just death

#

ok i think its my signals

#

yeah it was

craggy nacelle
#

made it work on aarch64 as well

craggy nacelle
#

real hardware

#

for some reason SMP will make it crash, and LAI tries to allocate something of 0 bytes and does a null deref (I should use uACPI), but disabling both of those things makes it work

#

even the trackpad works in vim

craggy nacelle
#

and that's because i ctrl+c'd it

#

it froze at ~7500 forks

craggy nacelle
craggy nacelle
#

ok my cow fork broke some things

#

im not sure what i got wrong

#

oh i managed to fix it

#

lets go

#

errrrr

#

oh wait i forgot to mount /proc

craggy nacelle
#

lmfao i was wondering why the /etc/rc script was running so slowly (fastfetch was fine), and i realized i was running this with tcg

#

fastfetch runs as fast as kvm before i implemented CoW

primal quest
#

and all the backing pages

craggy nacelle
#

yeah

craggy nacelle
#

im not sure if i wanna mount my filesystems with /etc/rc or just mount them in c

#

mounting them in c is way faster but less flexible

craggy nacelle
#

i forgot about this ๐Ÿ’€

clear warren
#

why 156kB

craggy nacelle
#

because it was compiling with _NSIG=1024

clear warren
#

ah

#

lol

craggy nacelle
#

so i got mounting working today

#

along with umask and chmod

#

i also fixed a bug in vfs_rename

#

and separated the base folders for x86_64 and aarch64 so i don't have to rebuild everything every time i want to switch arches

craggy nacelle
#

i need to optimize my exec because its really slow

#

fork is pretty much instant but exec is sloow

craggy nacelle
#

ok that requires demand paging and i dont feel like implementing it today

#

or i could just get rid of /etc/rc and write it in c

craggy nacelle
craggy nacelle
#

i forgot i left this running in the background

drifting spruce
#

is that ssh or something?

#

or serial?

dusk coyote
#

Serial Id imagine

drifting spruce
#

true, looking at the terminal title

craggy nacelle
#

i wish it would be ssh

craggy nacelle
#

I haven't worked on this for a few days

#

I wanna look into GCC and dynamic linking

#

Also, my exec is pretty slow rn because it loads the whole executable at once, how can I optimize this? With demand paging?

sick cove
#

unless you have really slow file io

#

or normally the executable file would be mmapped

primal quest
#

so you basically map all of its sections as CoW, apply your relocations if needed, then change the protections to their proper ones

craggy nacelle
frail fog
sick cove
#

why are you testing tcg at all

#

i always use kvm since tcg is unbearably slow for literally anything

#

while kvm runs perfectly fine

craggy nacelle
craggy nacelle
#

i wanna get a dumb terminal someday, they're sick

craggy nacelle
#

๐Ÿ˜ญ

#

come on at least i have a proper serial tty that hooks up into my tty subsystem

sick cove
#

right i forgot people do inferior architectures KEKW

craggy nacelle
#

aarch64 is fine, i could do just x86-64 but this forces me to make architecture specific code be abstracted

craggy nacelle
#

why do random cpus have no threads?

primal quest
# craggy nacelle

maybe there is a race condition between the thing that gives those CPUs idle threads and the CPUs themselves

#

which makes me say that you should probably have each core create their own idle thread

craggy nacelle
#

i split the loop into two and it fixed the assertion failing but it seems like there's cpus that aren't running for some reason

craggy nacelle
#

oh wtf why is this not working even with nosmp? it worked before

craggy nacelle
obtuse glen
#

im curious that other cpus keep running though

#

isnt that a fatal condition

craggy nacelle
#

there's a bit of delay

#

before they stop

obtuse glen
#

ah

craggy nacelle
#

holy shit cross compiling binutils does NOT have to be this hard

#

im getting tons of random fucking compilation errors

craggy nacelle
#

hold on im troubleshooting

craggy nacelle
#

real hardware baby (on ttyS0)

craggy nacelle
#

fixing some real hw bugs

#

smp works flawlessly

dusk coyote
craggy nacelle
#

lmfao

#

nyancat

craggy nacelle
#

fixed it, it was some fifo bs

craggy nacelle
#

i think everything works properly on real hw now

#

the PS2 driver works on my laptop and i can play doom and also use the mouse in vim

whole falcon
#

Lol nice

craggy nacelle
#

i have somehow managed to compile a bare gcc 16 in like 5 minutes on my ryzen 5 5600x ๐Ÿ˜ญ

robust tulip
#

i mean gcc with only libgcc and libstdc++ and bootstrap disabled compiles really quickly

#

back when it was my main machine, i could build the managarm system-gcc in 15min on an i5-3210m

craggy nacelle
#

ah

robust tulip
#

bootstrap is probably the biggest time sink since it just triples the compile time

#

since it first builds gcc with the host compiler, then builds gcc with the previous gcc, then builds gcc with the previous gcc, and finally compares the last two to make sure they're the same

craggy nacelle
#

yeah

craggy nacelle
#

binutils for some reason has decided that bentobox uses PE

#

i've been fighting this shit for the past 3 hours

primal quest
#

my r5 5600h can compile bootstrap gcc in about 3 or 4 minutes

craggy nacelle
#

i was expecting it to take way longer

craggy nacelle
#

i haven't worked on this for a few days

#

i think i'll work on it again

craggy nacelle
#

so it turns out gcc wasn't finding cc1 because i was using ~ in my PATH instead of $HOME

craggy nacelle
#

time to make binutils and gcc work inside bentobox

craggy nacelle
#

binutils works

#

time to build gcc

craggy nacelle
#

i got distracted watching youtube, i'll finish patching it tomorrow

craggy nacelle
#

genext2fs just took like 5 minutes to make the hdd image for this thing btw

#

and my ext2 driver does not like mkfs.ext2 images for some reason

craggy nacelle
#

ok i forgot to strip cc1

#

it was 464mb ๐Ÿ’€

#

and it was causing my kernel heap to run out of memory

craggy nacelle
#

ok i have some issues with gcc

craggy nacelle
#

fuck yeah

subtle pulsar
#

ermm tried to build it but uh

craggy nacelle
#

you forgot to clone submodules

#

and im still fixing the port scripts to use the new toolchain so you won't be able to compile ports rn

subtle pulsar
#

.

#

oh

#

my bad

craggy nacelle
#

ok wtf

#

my bash build just broke completely

#

ok its because the git mirror i was using applied bash patches 4-8 which broke everything for me

#

what in the actual fuck is going on

#

ok so it does not like my gcc 16 toolchain

drifting spruce
#

no way bro is using lai

daring tendon
#

true believer

craggy nacelle
#

lai was the most plug and play lib i could get

#

although it hasn't worked on any of the real hardware i own

#

i'll move to uacpi soonโ„ข

daring tendon
craggy nacelle
#

On my laptop it tries to allocate 0 bytes and page faults

#

And on my Acer board it gets stuck in an infinite loop

daring tendon
#

uacpi also used to have a bug in some edge cases that would trigger 0 byte allocations

#

But I patched it and also added an assertion in tests to catch such cases

craggy nacelle
#

I caught it because I have an assertion in my malloc

drifting spruce
#

because bash ships patches instead of making a release with them included for some god damn stupid fucking reason

craggy nacelle
#

and i hadn't built bash in a while so it didn't affect me until i tried to rebuild it

#

also i think bash does not like being built with gcc 16, i get so many random errors

craggy nacelle
#

i tried to build zsh, why is it using glibc ๐Ÿ’€

#

wait no this is bash

#

wtf

craggy nacelle
#

ok so zsh works but sometimes its crashing randomly for no reason

#

probably because of my fragile signal implementation

#

so i'll try to patch bash again

craggy nacelle
#

for some reason linking this is really slow, maybe its slow file io?

#

also i think my vfs has a use after free bug in unlink

#

oh wtf why is /tmp persisting after reboot...

craggy nacelle
#

i still need to fix doing file ops on directories that have a mountpoint

#

but that's for later

#

also, removing files is a bit buggy and sometimes triggers use-after-free page faults

#

im not sure if this is my vfs' fault or my ext2 impl's fault

#

we'll see

craggy nacelle
#

i'll have to optimize my ext2 driver more

#

(i dont have block cache and my writes do not check if it can do them sequentially)

craggy nacelle
#

but its fixed now

craggy nacelle
#

binutils is so i/o heavy

#

its screaming for me to optimize my ext2 driver but i cba rn

craggy nacelle
#

hmmm im not sure what to work on

craggy nacelle
#

i implemented pthreads

frail fog
craggy nacelle
#

soon

#

i'm thinking of implementing dynamic linking first because xorg is huge

craggy nacelle
#

welp, i've spent 6 hours building xorg just for it to not really work as it needs dynamic linking for drivers

craggy nacelle
#

Yes

frail fog
craggy nacelle
frail fog
craggy nacelle
#

i haven't implemented it yet lol

frail fog
craggy nacelle
#

the dynamic linker is

#

the kernel side isn't

#

but it shouldn't be too complicated

inland glen
#

The kernel side is literally just loading a second ELF file and pushing context onto the stack

craggy nacelle
#

ok, i've tried to fix my toolchain for the past few hours to support dynamic linking, but it refuses to fucking work

frail fog
#

also dont forget to win libtool demons if you want to have shared libraries

craggy nacelle
#

which i don't have because i don't have PIE

frail fog
#

for example i dont support non pie executables

craggy nacelle
#

oh

craggy nacelle
#

so the fix was to make a symlink named Scrt1.o pointing to crt1.o

#

and when i installed mlibc it would install the proper Scrt1.o

#

rn i'm working on ET_DYN support in my elf loader

craggy nacelle
#

ugh i'm stuck here

craggy nacelle
#

wait i'm so fucking stupid

craggy nacelle
#

ok it didn't help

#

omfg i can't get gdb to debug this shit right

craggy nacelle
craggy nacelle
#

omfg my stack wasn't aligned ๐Ÿ˜ญ

#

how did it take me SO LONG to find this

#

well i mean gdb wasn't cooperating AT ALL

#

welp adding another assertion to my scheduler

#

ok well dynamic linking works now

craggy nacelle
#

i managed to drastically reduce my sysroot's size

dusk coyote
#

but but but but static linking the only good thing dynamic linking bad ๐Ÿ˜  ๐Ÿ˜  ๐Ÿ˜ 

#

I find it so silly when people shill static linking like its the best thing in the world

craggy nacelle
#

it wasn't even that complicated tbh i have no idea why i delayed it so much

craggy nacelle
craggy nacelle
#

so my signal code broke out of nowhere yesterday

#

and wait i think i know why

#

or not

#

that's... an issue

#

fixed, i fucked up when updating my mlibc fork

craggy nacelle
#

so, i got Xorg running, but my VMA is page faulting. i think this is a design flaw of it, but shouldn't be too hard to fix.

craggy nacelle
#

holy shit

#

lemme build the mouse and kb drivers

subtle pulsar
#

does this thing have like

#

package management

craggy nacelle
#

nope

subtle pulsar
#

can i make a package manager for it

craggy nacelle
#

rn there's not really a point for one

#

i'm still trying to get X working properly

frail fog
craggy nacelle
#

two things:

  1. i can't move the mouse
  2. if i send a SIGINT, it will stop reading the mouse and will start reading the keyboard, and i don't think its my xf86-input drivers' fault
frail fog
#

ig your poll or unix sockets have some issue

craggy nacelle
#

does it need to have a client connected for the mouse to work?

frail fog
#

wdym

craggy nacelle
#

like rn i'm only running the x server and nothing else, there are no clients hooked up to it, but i think it should work as the cursor does render

frail fog
#

what's your xf86 mouse driver

craggy nacelle
frail fog
#

also i recommend to you to port xev

craggy nacelle
#

alr

frail fog
craggy nacelle
#

maybe

frail fog
#

i looked at your sysdeps and you dont print some message even on mlibc panic

craggy nacelle
#

but its opening my mouse device after it exits that thread

frail fog
craggy nacelle
#

uhh not sure lemme print it rq

#

actually mlibc doesn't have exit codes for threads

#

but wait hold on

#

the hit io_seek() error 9 is from xkbcomp

#

why is it closing fd 0?

frail fog
#

oh its xkbcomp

#

then all is fine if xorg can boot

#

then maybe issue in poll or unix sockets

#

like i had a lot of issues with them

craggy nacelle
#

hmm

dusk coyote
craggy nacelle
#

ah

craggy nacelle
#

ugh i think my pthreads are broken

craggy nacelle
#

Ok so uh when I implemented dynamic linking I fucked up threading, but now it works again

#

But it's weird that xorg didn't crash because creating a thread would make mlibc segfault

obtuse glen
craggy nacelle
#

ugh i slacked off today

#

i haven't worked on it at all

#

but i'll probably work on it a good bit in a few days as i'm going on a road trip and i'll have nothing better to do

daring tendon
#

Me after slacking off for a literal month

craggy nacelle
#

lol

subtle pulsar
#

how do i compile bentobox

#

do i js

#

build the kernel and them build mlibc

#

because mlibc requires x86_64-pc-bentobox-gcc

craggy nacelle
#

i haven't updated the build instructions to include the toolchain

#

basically, first source build/mlibc-root, then run util/binutils.sh and then util/gcc.sh

#

if you see an ln error at the end of the gcc build ignore it

#

then you can build mlibc

#

and then the ports

#

and then the kernel

subtle pulsar
#
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-bentobox
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking for gawk... gawk
checking for gdbserver support... no
checking for gcc... ccache gcc
checking whether the C compiler works... no
configure: error: in `/var/tmp/binutils':
configure: error: C compiler cannot create executables
See `config.log' for more details
#

same error in like

#

gcc

craggy nacelle
#

install ccache or modify the scripts to not use ccache

subtle pulsar
#
cd lib/mlibc && \
PATH="/home/cyntheria/bentobox/util/build/bin:$PATH" \
meson setup build-x86_64 --cross-file ../../build/crossfile-x86_64.txt -Dheaders_only=false \
        -Ddefault_library=shared -Dbuild_tests=false -Dposix_option=enabled \
        -Dlinux_option=disabled -Dglibc_option=enabled -Dbsd_option=enabled \
        --prefix=/home/cyntheria/bentobox/build/base/x86_64/usr/
The Meson build system
Version: 1.10.0
Source dir: /home/cyntheria/bentobox/lib/mlibc
Build dir: /home/cyntheria/bentobox/lib/mlibc/build-x86_64
Build type: cross build
Project name: mlibc
Project version: undefined
Build machine cpu family: x86_64
Build machine cpu: x86_64
Host machine cpu family: x86_64
Host machine cpu: x86_64
Target machine cpu family: x86_64
Target machine cpu: x86_64
C compiler for the build machine: /usr/bin/ccache cc (gcc 15.2.1 "cc (GCC) 15.2.1 20251112")
C linker for the build machine: cc ld.bfd 2.45.1
C++ compiler for the build machine: /usr/bin/ccache c++ (gcc 15.2.1 "c++ (GCC) 15.2.1 20251112")
C++ linker for the build machine: c++ ld.bfd 2.45.1

meson.build:56:1: ERROR: Unknown compiler(s): [['x86_64-pc-bentobox-gcc']]
The following exception(s) were encountered:
Running `x86_64-pc-bentobox-gcc --version` gave "[Errno 2] No such file or directory: 'x86_64-pc-bentobox-gcc'"

A full log can be found at /home/cyntheria/bentobox/lib/mlibc/build-x86_64/meson-logs/meson-log.txt
make: *** [build/mlibc.mk:6: setup] Error 1

what the sigma

#

i ran the mlibc-root command too and then compiled binutils and gcc

#

wait

#

...

#

my binary that it compiled is "x86_64-bentobox-gcc"

#

this mesonbuild script assumes "x86_64-pc-bentobox-gcc"

craggy nacelle
#

no you don't have the compiler added to your path

#

add the full path of util/build/bin to your path

#

adding it to .bashrc works for me

craggy nacelle
subtle pulsar
#

it is

#

im not on pc tho so i will show later

#

well i can just rename it anyways

craggy nacelle
subtle pulsar
#

in the build dir

#

not in util

#

but in the project root

craggy nacelle
#

that's my wrapper script that i forgot to delete

#

that's not the output

subtle pulsar
#

wrong emoji fuck

craggy nacelle
#

build/ is where i put a bunch of random helper scripts and where the limine stuff gets downloaded to

#

util/ exists because build/ was getting too messy

#

anyways

#

so i got xev running after implementing getsockopt and fixing a bug i had in socket_bind, but it isn't rendering in Xorg

#

i'm not sure why

subtle pulsar
craggy nacelle
#

uhhh why when not even Xorg works fully yet

subtle pulsar
#

if xorg is done and works fully i meant

craggy nacelle
#

well then there's not really a point

subtle pulsar
#

i know but like its for fun

#

i wanna run like hyprland for shits and giggles on it

craggy nacelle
#

uhhh well ig you can fork it if you want, and if it's convincing enough i'll merge it, but i don't really accept contributions rn as its more of a personal project

subtle pulsar
#

okay!

#

in the meantime ill like help port x11

#

if thats fine

craggy nacelle
#

i'm fine i can manage it myself

craggy nacelle
#

i finally pushed a bunch of xorg work

craggy nacelle
#

so xorg-server runs and I can move the mouse which required a lot of random small bug fixes everywhere

#

but thank god I managed to debug this with gdb as debugging shared libraries inside qemu is a bit of a pain

#

anyways, what's left to debug is clients not rendering in Xorg (not sure if it's because it's trying to use shared memory but I don't think it is, or my sockets being buggy which is more probably) and the deadlock in xkbcomp when running under KVM

#

god it felt good pushing all of that work, I hadn't pushed in 6 days

#

when I get xorg working I may start working on the aarch64 side as it's a bit abandoned

#

but that's for later

craggy nacelle
craggy nacelle
#

Welp, I went on a trip so I may not be able to work on this as much as I do at home

#

But at least I got arch Linux set up nicely on my laptop

craggy nacelle
#

alright, since i don't feel like building xorg rn i may make the new toolchain work on aarch64 so i can get that working again

#

and holy shit discord is running at 5fps compiling vim

craggy nacelle
#

welp, I ran out of time to work on this this year

craggy nacelle
craggy nacelle
#

wow i've just saved myself from hours of debugging. X would trigger a trap in abort() in mlibc, and i had no idea why, so i thought of rebuilding libgcc after building mlibc (even though i thought since i build a shared libc i wouldn't need to rebuild it) and it worked straight away.

craggy nacelle
#

which i fixed by initializing the fpu state properly when i create the tcb context

#

debugging this on my intel laptop actually made it easier to catch ๐Ÿ˜ญ

craggy nacelle
#

don't think so. when i built libgcc the first time i had to make a libc.so stub as it was trying to link against it when i didn't have mlibc built yet (which requires libgcc). ld didn't care about the fact that it was an empty file

#

but when i rebuilt it, i had mlibc already built properly and all, so maybe that magically fixed it

#

either way, it works now so i'm happy :^)

craggy nacelle
craggy nacelle
craggy nacelle
dusk coyote
#

I can see it became a tradition to have your first test wm twm :P

craggy nacelle
#

:P

craggy nacelle
craggy nacelle
#

seems to work fine on an initrd system so its 100% my ext2 driver causing the page fault

craggy nacelle
#

ahhhh silly mistake in vfs_link, i wasn't checking if old_node->ops->link was valid ๐Ÿ’€

#

works now

craggy nacelle
#

apparently doomgeneric's xlib code is so bad that it will not check if the display opened successfully and will proceed to segfault if you don't have an x server open ๐Ÿ˜ญ

craggy nacelle
#

damn it freezes on the doom screen

craggy nacelle
#

i have cleaned up my laptop as i didn't really feel any airflow coming out of it and the temps were quite high. turns out when i asked my dad to clean it a while ago he didn't take out the fan and clean the heatsink fins and there was a huge dust carpet.

#

now i can build gcc at 48C with the fans at full speed

craggy nacelle
#

the aarch64 toolchain has been fixed and i'm surprised i've only done 1 abi break in my kernel since i last compiled it on arm

#

i may try to run Xorg on it but for that i need to complete the arch-specific signal code (i couldn't be bothered to write it when i implemented signals)

craggy nacelle
#

man i forgot how spaghetti 90% of my aarch64 code is

#

i really need to comment this shit ๐Ÿ’€

craggy nacelle
#

bro i closed qemu and my cpu temp dropped a whole 25C ๐Ÿ’€

craggy nacelle
#

i cannot put into words how much i despise arm

craggy nacelle
#

so uhhh i want to get Xorg working on arm, but rn signals are too unstable on it

#

i also want to get pci(e) working on it too but i kinda wanna fix signals

craggy nacelle
craggy nacelle
#

so uhhhh

#

i completely threw out my current code, rewrote it, and now it worked first try ๐Ÿ˜ญ๐Ÿ˜ญ

#

and the code is way cleaner too

craggy nacelle
#

got pci working on arm

craggy nacelle
#

we now have kmsg

craggy nacelle
#

hell yeah (ext2 root on arm)

craggy nacelle
#

fixed some socket polling bugs, now when i launch something like xeyes it will spawn immediately instead of waiting for me to move my mouse

craggy nacelle
#

dang, the kernel is already ~12k loc and including the build scripts and everything its ~15k loc

craggy nacelle
#

should i add xsave support to this?

frail fog
craggy nacelle
#

so doom does try to run, but it freezes here (doom, not the vm)

#

i think it's just running absurdly slowly, maybe due to the lack of shared memory

dusk coyote
#

I dont think that would be the problem

craggy nacelle
#

Well it takes a while to draw the main screen so idk

#

Maybe it's the freebsd doom code that needs some fixing

#

I do need to fix a deadlock that happens when the system is under heavy load and I move the mouse (it gets stuck in a spinlock in an IRQ handler)

craggy nacelle
#

i ended up slacking off

#

i did do outside and touch some grass asphalt

craggy nacelle
#

also xclock ticking may be some setitimer stubs I have in mlibc that I forgot about doing nothing

next forum
craggy nacelle
#

Oh, then I'm not sure

next forum
craggy nacelle
craggy nacelle
# frail fog did you fixed this

while working on something completely unrelated i found the issue. my sys_gettime syscall doesn't set tv_nsec when the clock is CLOCK_REALTIME, which is what doomgeneric's xlib code uses (it uses gettimeofday), and the reason my doomgeneric code worked is because i manually call clock_gettime with CLOCK_MONOTONIC

#

i don't even zero tv_nsec so it's clearly an oversight

craggy nacelle
#

finally dude

#

i had to create a stupid script to fix the x keymap after launching xorg

#

its being gay

craggy nacelle
primal quest
craggy nacelle
#

nes_emu

#

i don't have sdl2 so i told a clanker to port it to xlib and it actually worked

primal quest
#

well, i kinda abandoned that one since it only supported a total of one (1) mapper

#

you should port the other emulator i ported to nanoshell

craggy nacelle
primal quest
#

yeah

craggy nacelle
#

huh, i may have an issue

#

sometimes it will just freeze but i realized that if i let it for a while it will eventually run out of memory

craggy nacelle
#

holy shit its using so much cpu for tlb shootdowns ๐Ÿ˜ญ๐Ÿ˜ญ

craggy nacelle
#

tlb invalidations

drifting spruce
#

more specifically, making sure that the tlb entries for a given address are consistent across all processors

craggy nacelle
#

nooo my mario

#

i've NO idea why it did that

#

and the fact that rsp is a user address

craggy nacelle
#

why is it still playing ๐Ÿ˜ญ๐Ÿ˜ญ

hexed violet
crimson flame
# frail fog what is tlb shootdown

Sending a page invalidation to all CPUs. You can do this using an ipi, but a lot of people create a queue of pages to be invalidated and invalidate them on their own time

craggy nacelle
#

i use an ipi, which is better?

primal quest
crimson flame
#

Until it gets invalidated

primal quest
#

If the target CPU gets a page fault then you can just read the PTE and see that it's invalid

floral wigeon
#

I personally like the name of this project so like im gonna star it

craggy nacelle
#

implemented load balancing in my scheduler, super mario bros runs soo much better than before with 2 cores

craggy nacelle
#

real productivity

craggy nacelle
#

so its pretty good for what it is

craggy nacelle
#

aight well, here's a list of things i may want to do, some in a long time:

  • pci virtio drivers (so i can use them on x86 as well)
  • a network stack (probably gonna use virtio)
  • port htop (should be fairly easy, just need to implement a proper procfs)
  • shared memory
  • move to uacpi
  • tsc & kvm clock
#

i may also want to make smp safer, as sometimes it crashes randomly and performance could be better

thin sluice
#

You don't even need a procfs

craggy nacelle
#

how would that work without one then?

thin sluice
#

You use other methods of getting the necessary info

#

Sometimes that's syscalls, other times it's /sys

#

OpenBSD has no concept of a procfs

#

Htop works just fine though :)

craggy nacelle
#

ah i see, tho i'll probably implement a proper procfs anyways because i already have /proc/meminfo and some other stuff

#

and it would make it easier to get stuff that already works with procfs working

thin sluice
#

True, but most of that already works on BSD or will need to be written in a kernel specific way anyways

craggy nacelle
#

true

#

i'll see

thin sluice
#

But yeah every officially supported platform of htop has a subdirectory in the root of the source tree that houses platform specific code

craggy nacelle
#

ahh i see

craggy nacelle
#

this was WAY too easy

#

heheheheheheh

craggy nacelle
#

for some fucking reason when i close xeyes in dwm xorg will still try sending shit to it resulting in a freeze when it reaches the packet cap

#

it ONLY does that with xeyes SPECIFICALLY, other shit works fine

#

and on linux it all works just fine

slender talon
#

x has some kind of mask for events a process wants to receive. maybe that's not getting cleared, somehow?

craggy nacelle
#

it seems like when i close xeyes its not closing cleanly as its my cleaner process that is closing the socket

#

at least i think that's what's happening

slender talon
#

yeah, and i'm thinking it's only xeyes because of that mask; xeyes needs the mouse position all the time.

#

i mean, other processses sockets might not be closing cleanly either, but no more data is sent to them.

craggy nacelle
#

hmmm

craggy nacelle
slender talon
#

yeah, but what i mean is xeyes could be the only one which x has more data to send to because it's still registered for mouse movement via the event mask.

craggy nacelle
#

maybe

craggy nacelle
#

why does vim --help segfault

frail fog
craggy nacelle
#

no idea

craggy nacelle
craggy nacelle
#

๐Ÿ’”

obtuse glen
#

imagine if you had to send messages somehow back to a main thread to fork kekeke

craggy nacelle
#

i slack off way too much ๐Ÿ˜ญ

daring tendon
#

trust me u dont

craggy nacelle
#

true true

frail fog
#

what emulator you used for mario

#

i want to play mario too

craggy nacelle
#

nes_emu

#

its not a great emulator but it's extremely easy to port

primal quest
floral wigeon
craggy nacelle
#

i'll port it when i stop being lazy

craggy nacelle
#

so the nes emulator has been making my xorg freeze from time to time (it also happens sometimes with doom but far less) and it seems like x just stops receiving frames or goes to sleep or something happens that makes it freeze until i send a signal to it

#

i managed to make it freeze less often by doing some shit differently but it still freezes sometimes

#

thing is that it doesn't freeze at all with nosmp

#

so it has to be some race condition but i literally have no fucking clue what it could be

#

also bentobox is now a year and 6 days old

frail fog
craggy nacelle
#

oh that's really close

craggy nacelle
craggy nacelle
#

poll

#

i did look into my futex impl but that seems fine

craggy nacelle
#

true

craggy nacelle
#

yeah

#

it's not missing features as i said its random

floral wigeon
#

did timeout you implement poll

frail fog
floral wigeon
#

I have an idea

craggy nacelle
floral wigeon
#

oops wrong person

floral wigeon
#

duh

craggy nacelle
#

no shit

floral wigeon
#

so like debug ur smp shit

#

use fireworks test, stress test your scheduler

craggy nacelle
#

true

craggy nacelle
#

because now it seems like the nes emulator freezes, presumably in a spinlock

#

i forgot to mention that sometimes i will get these random crashes

floral wigeon
craggy nacelle
#

i've NO idea what causes these random crashes

#

and they're really rare too

hexed violet
floral wigeon
craggy nacelle
#

wait why tf is it using a user stack in kernel mode

floral wigeon
#

inb4 its some sort of weird thing with gs base that happens in like 1 out of 10000 cases

craggy nacelle
#

it happened again, this time after the nes emulator froze and i tried to move it

craggy nacelle
#

hmmmmm

#

come on i got so far

#

it seems to last way longer by just disabling my heap poisoning code

#

but the emulator will still freeze after a while of playing and then xorg will go with it after a few seconds

frail fog
craggy nacelle
#

oh absolutely

craggy nacelle
#

i ported uacpi today

daring tendon
#

wait didnt u have lai

craggy nacelle
daring tendon
#

how was the transition

craggy nacelle
#

well there was more glue code than i expected, but it wasn't that bad after all

craggy nacelle
#

not ready reading drive A ๐Ÿ˜ญ

craggy nacelle
#

so uh i started implementing ptys today, but i cant stop slacking off

floral wigeon
craggy nacelle
#

nah i actually wanted to do this for a while lol

#

i ported st so technically i'm not copying you :P

floral wigeon
#

I found ptys really easy just do it

craggy nacelle
#

yeah but i keep watching youtube on my second screen lol

floral wigeon
#

lol

craggy nacelle
#

crap

#

ok ill lock in

#

rn doing a bit of refactoring of my current tty code

#

oh my fucking god shut up

#

no way i cant fucking close this

#

dude

floral wigeon
#

lmao i just got that too

next forum
#

doing ptys concurrently with STREAMS made it more pleasant for me

craggy nacelle
#

waaaait a minute

#

oh come on my theme hid the x button

craggy nacelle
#

i'm so fucking lazy

#

but i'll have tons of free time in a few days so i'll be forced to stop being lazy otherwise i'll be bored

craggy nacelle
#

im so fucking dumb

#

ughhhh

craggy nacelle
#

so i've been slacking off for the past few days, but i noticed that a lot of my issues when starting up xorg are actually related to my ahci driver?

#

a lot of times my startwm script will clear the screen fine but when starting xorg it will just kill itself and leave the ahci driver in a state that will deadlock if i try to read/write anything

craggy nacelle
#

i finally got the motivation to just do it

craggy nacelle
#

for some reason the pty won't wake up st to wake up xorg

craggy nacelle
#

added a twmrc

craggy nacelle
craggy nacelle
#

but yeah this is way more stable with nosmp

full leaf
#

is it using openrc or it just looks like it

thin sluice
#

Or is there something I'm missing that makes you think it's openrc

full leaf
#

thats why i said or it just looks like it

thin sluice
#

Then how would it look like it uses openrc if openrc doesn't affect how things look

full leaf
#

im saying the output looks like openrc

thin sluice
#

Which part?

full leaf
craggy nacelle
#

i moved to this style of logging

craggy nacelle
#

so i though i fixed the freezing in xorg, but on my faster machine it still seems to freeze a lot

craggy nacelle
#

its ALWAYS polling istfg

#

nyanyanyanyanya

full leaf
#

how long did it took for you to run a proper x window manager on it btw

#

very cirous

floral wigeon
#

it took him 6 years

craggy nacelle
#

this kernel for the past 5 months

craggy nacelle
#

multitasking

craggy nacelle
#

hmmm that's a weird crash

#

i've had this happen 3 times already

sullen crag
#

Bentobox lowkey inspires me to come back to osdev again and work on something

craggy nacelle
#

thank you

craggy nacelle
#

fixed grep not outputting anything on ptys (it will refuse to do so if the pty inode is 0)

#

i had already fixed this issue on ttys but forgot to do so for ptys

#

dang the kernel rn is 13035loc

whole falcon
craggy nacelle
#

so today i fixed some stability issues that i had already fixed but accidentally broke

#

and i also made it so st and some other programs close properly

#

the issues left rn are minimizing in fvwm deadlocking xorg and starting up fvwm when running the kernel with smp takes way too long

frail fog
#

lockless*

#

it gave to me some performance

craggy nacelle
#

well i'm actually adding locks because otherwise its more unstable

#

this may be some wakeup issue actually because moving the mouse makes it start up faster

#

oh yeah i don't know why this happens sometimes, its random

frail fog
#

// but it works on my machine

#

in kernel panic

craggy nacelle
craggy nacelle
craggy nacelle
#

sorta

frail fog
#

(its available in aur btw)

craggy nacelle
#

Lol I need to get it when I get outta bed

craggy nacelle
#

I need to implement pty cleanup

lilac hearth
#

I get ./util/binutils.sh: line 10: /home/connor/bentobox/util/binutils-gdb/configure: No such file or directory

frail fog
craggy nacelle
#

git submodule update --init, it'll take a while

craggy nacelle
#

adding hdr->msg_controllen = 0; fixed it and i won't bother implementing fd passing yet

#

although i really need to move these sysdeps to my kernel

#

minimizing in fvwm also works now

frail fog
#

i had this issue too

craggy nacelle
#

ah

frail fog
craggy nacelle
#

yeah

craggy nacelle
#

ok time to slop slacking off and implement the syscalls (i was watching a video)

craggy nacelle
#

so I just implemented the syscall, works great, now the only issues left are dwm freezing xorg when closing windows because it probably just kills them instead of asking nicely for them to kill themselves, and fvwm taking longer than usual to start up with smp

lilac hearth
# craggy nacelle `git submodule update --init`, it'll take a while

now i get

connor@unknownb29e6058d884:~/bentobox$ ./util/binutils.sh
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-bentobox
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking for gawk... gawk
checking for gdbserver support... no
checking for gcc... ccache gcc
checking whether the C compiler works... no
configure: error: in `/var/tmp/binutils-x86_64':
configure: error: C compiler cannot create executables
See `config.log' for more details
connor@unknownb29e6058d884:~/bentobox$ 
craggy nacelle
#

install ccache

#

i always forget to add it to the readme

#

you could also probably just export CC to gcc

craggy nacelle
#

lol

lilac hearth
craggy nacelle
#

No work has been done today because I've been watching anime since I got home

craggy nacelle
#

hell yeah

sullen crag
#

Im jealous bro

#

Good fucking work

craggy nacelle
#

thanks

craggy nacelle
#

i like fvwm so much more than twm ๐Ÿ˜ญ

craggy nacelle
#

i was working on pty cleanup today when i started getting gpfs everytime i closed st

#

well it turns out that even after undoing all of my changes it still gpfs ๐Ÿ˜ญ

#

i think the issue is that there's some double free or use after free somewhere

#

but god is this annoying me

craggy nacelle
#

I forgot to mention that there will be no work on this until this Saturday since I'm going on a trip

craggy nacelle
#

Bro someone put their head through my hotel rooms door and fucking broken a rectangular section of it ๐Ÿ’€

obtuse glen
#

when they said use your head I don't think this is what they meant

craggy nacelle
#

Lol it seems like they kicked it and since it's made of paper it immediately broke

craggy nacelle
#

hey yall, it's been a while. i'm finally home debugging my favorite thing again: race conditions

craggy nacelle
#

as if i comment out this one line here:

static void sched_cleanup_thread(struct thread *tcb) {
    if (tcb->cpu && tcb->cpu->current_tcb->value == tcb) {
        tcb->state = THREAD_ZOMBIE;
        arch_yield(tcb->cpu);
        while (__atomic_load_n(&tcb->state, __ATOMIC_ACQUIRE) != THREAD_ZOMBIE_ACK) {
            #ifdef __x86_64__
            __builtin_ia32_pause();
            #endif
        }
    }
    
    arch_context_free(tcb);
    sched_free_tid(tcb->tid);
    if (tcb->cpu)
        list_remove_value(tcb->cpu->threads, tcb);
    // kfree(tcb);
    __atomic_sub_fetch(&zombies_pending, 1, __ATOMIC_SEQ_CST);
}

it won't crash anymore

#

i think this issue may be specific to multithreaded programs

#

or just st triggering a specific race condition

#

but now that i'm looking at this, i think i'll have to do a bit of a redesign of my thread cleanup

craggy nacelle
#

well even after redesigning my whole fucking thread cleanup code i still have the same exact issue

#

wtf

frail fog
#

race conditions is the most annoying to fix

solemn axle
#

ie not in the context of the thread being cleaned up

craggy nacelle
#

yeah

craggy nacelle
#

man i love this fucking kernel

#

oh i just realized i only give this 16kb of kernel stack, maybe i should give it more lol

#

but i'm not sure if that's the issue

craggy nacelle
#

yeah it wasn't lol it was my reaper being fucked

#

i still increased the stack size to 64kb tho

craggy nacelle
#

hmmm i'm at a decent state but i'm starting to get into mentality of a rewrite yet again

solemn axle
#

16kb is a lot

#

The biggest kernels managed to get away with less than that for decades

craggy nacelle
#

ah, i thought it was a bit small since limine's default is 64kb and some rust kernels have over a megabyte of stack, but i guess it's rust being rust.

solemn axle
#

It's nonswappable memory so you want to minimize it

#

Each page taken up by kernel stack is a page that can't be used for caching the disk

#

Those rust kernels are jokes