#Nyaux

1 messages ยท Page 61 of 1

surreal path
#

alr have fun :)

thorn bramble
#

bit 0 of the command port tells you if there's anything to read

surreal path
#

yea i know

thorn bramble
#

you should also flush the keyboard buffer when you initialize the keyboard

surreal path
#

yes i do tho?

#

i think

thorn bramble
#

i mean i don't know lol

#

i'm just saying

surreal path
# surreal path yea i know

ill just the bytes keyboard sends me onto some buffer (reading until there is no more data left), do the state machine until the buffer is no more and then send the eoi

surreal path
thorn bramble
thorn bramble
#

i know

#

good luck

surreal path
#

thanks

#

good luck on ur kernel too

thorn bramble
#

nothing ever happens

surreal path
#

nahhh u'll do well trust

#

i believe in you

thorn bramble
#

this shit is not gonna do anything until next year

surreal path
#

nahhhh

thorn bramble
#

it's not like i've been doing it for couple years atp

surreal path
#

thats completely wrong lol

#

the amount of contributions you've done torwards other projects + ur own shit as well

#

anyways brb i go brush teeth and drink wata

#

like a british

thorn bramble
#

sounds good

surreal path
#

ive done something a british person has never done

#

brush'd their teeth

silver yarrow
#

the ps2 buffer is more than one byte?

surreal path
silver yarrow
#

wtf, what type of cement block have I been living under

#

nah it's def one byte, the one in the controller

surreal path
silver yarrow
#

maybe there is another buffer feeding into it tho idk

#

ah yeah

thorn bramble
#

well then maybe it's not a multi-byte buffer

#

but you should still read until the controller says there's nothing to read anymore

surreal path
#

what did i fall asleep watching

#

๐Ÿ˜ญ ๐Ÿ™

surreal path
#

ok @thorn bramble weird thing, i did the thing u suggested but it just belives theres an infinite number of the byte you pressed? my while loop is correct and i do update scancode so this is weird as shit

thorn bramble
#

crazy

#

read ur code again

#

oh nvm

#

im blind

surreal path
#

lol

thorn bramble
#

wait am i

surreal path
#

i dont know

thorn bramble
#

why did u write it so weird

surreal path
#

how so

thorn bramble
#

oh yeah

#

its like u did not read waht i told u

#

while (inb(cmdPort) & 0x1) handleByte(inb(dataPort));

#

read again

#

carefully

surreal path
#

but i need to get the value

#

into somewhere right

thorn bramble
#

read again

#

carefully

surreal path
#

oh you do 2 reads?

#

why??

thorn bramble
#

read AGAIN

#

and again

#

compare this to your code

surreal path
#

oh

#

cmdport

#

right

thorn bramble
#

exactly

surreal path
#

yea im retarded

#

lol

thorn bramble
#

just read

surreal path
#

ill just read the status reg for shit

thorn bramble
#

oh yeah status register

surreal path
#

lol

thorn bramble
#

wait

#

command and status register is the same one

surreal path
#

pretty much i htink

thorn bramble
#

no it is

surreal path
#

yea

thorn bramble
#

it's just that it's status for read

#

and command for write

surreal path
#

yea pretty much

#

nope @thorn bramble

#

doesnt solve ze issue

thorn bramble
#

idk

surreal path
#

yea may be cooked here

#

still deadlocking with ze mem lock

#

not epic

#

i wonder why im not getting any interrupts in general

#

i feel like kmalloc here is being called after interrupts are disabled in some part of the code

#

therefore the lock never gets released, nyaux gets stuck and deadlock time

surreal path
# thorn bramble idk

okay i think i may know why, for some reason interrupts are disabled on the mmap syscall

#

however enabling them explcitly page faults nooo

#

rip 0x0 my worst enemy

silver yarrow
surreal path
#

ill have to breakpoint on the mmap syscall

#

and see where it dies exactly

surreal path
thorn bramble
#

most normal page fault

surreal path
#

real

#

not only is demend paging fucked

#

but if i just dont demend page some weird shit happens

#

2 more bugs

#

i literarly found EVEN more bugs

#

i literarly have 1000000 bugs bro

surreal path
#

i want to cryyy in a cornerr

#

wtf...

#

and sometimes if i rerun the vm i dont get the page fault??/

#

wtf

#

:c

#

im afraid im gonna need some help with this

#

i am too scared to ask for anyones help with this cause i have fuckin done that too much

#

kinda stuck ig

maiden ridge
#

Eat a 5 star

tender gorge
silver yarrow
#

my code has bugsยฒ

broken depot
#

My code has :{:|:&};: bugs

edgy pilot
surreal path
#

maybe turning on ubsan might hlep

#

idk

#

im out of ideas

#

okay i turned on ubsan

#

its catching a few things related to pvclock

#

ima fix and see what changes

#

okay how is that out of bounds??

#

thats lit on the osdev wiki

#

and its deadlocking on uacpi with ubsan on?

#

changing it from 1 << 31 to 1 << 30 fixes it???

#

the deadlock for uacpi

#

and it still thinks theres pvclock

#

wtf

surreal path
#

we still having the same issue and ubsan caught jackshit

#

@brisk zenith i know i ask help from you a lot but im like really really stuck with this, it would be helpful if you could take a look, apologies for the ping

broken depot
broken depot
#

Were you to do 1u << 31 you wouldn't have this issue.

surreal path
broken depot
#

What's the thing you're debugging right now?

surreal path
surreal path
#

read more below

broken depot
#

I see. The mmap syscall is broken and crashes when interrupts get enabled, but deadlocks otherwise?

surreal path
#

yep

broken depot
surreal path
broken depot
#

I see

supple robin
#

unfortunate naming

surreal path
supple robin
#

๐Ÿ’€

broken depot
#

Anyway do you know where it crashes and potentially the backtrace?

surreal path
broken depot
#

Is it consistent enough you could re-run and debug until it crashes?

surreal path
#

heres the thing

#

its consistent a lot but sometimes it just works randomly

surreal path
broken depot
#

RIP becoming 0 can mean one of a couple things:

  • Return address corrupted into 0
  • Noreturn function does return
  • Null function pointer called
#

I would suspect that last one first

surreal path
#

if it was a null function pointer with the vfs

#

that would happen on kernel land

#

i dont use function pointers anywhere else

#

as for noreturn function, i usually have panics on functions that arent supposed to return

broken depot
#

It's userland that goes RIP=0?

surreal path
#

page fault is error 0x14

#

instruction fetch on userspace

broken depot
#

ok

ebon needle
surreal path
#

i do???

ebon needle
#

what its trying to do

surreal path
#

that lit cannot happen

surreal path
ebon needle
#

i dont finding qemu log

surreal path
#

what

ebon needle
#

do you post your qemu log

surreal path
#

i dont need the qemu log for this as my idt catches the exception??

ebon needle
#

oh

#

im dumb what is the problem

broken depot
#

Presumably userspace gets RIP=0 immediately after the syscall drops back to ring 3? Wouldn't that suggest that either something corrupted the syscall return address to 0 or that you restore it wrongly?

#

I'm looking at your syscalls.asm for x86_64 rn

surreal path
broken depot
#

I cannot immediately see any problem in that file.

surreal path
broken depot
#

And this relatively directly calls syscall_mmap

surreal path
#

pretty much

broken depot
#

How large is the stack this runs on? Is there any possibility there's an undetected stack overflow?

surreal path
#

#define KSTACKSIZE 16384
#define USTACKSIZE 1048576

#

thats the stack

#

sizes

broken depot
#

That won't overflow like this

ebon needle
broken depot
#

Do you know the mmap parameters that cause the crash?

surreal path
ebon needle
#

ok

surreal path
#

ill check for ya

#

syscall_mmap(): size 602112 flags 32
Page Fault! CR2 0x0
RIP is 0x0. Error Code 0x14

#

flags in hex btw

broken depot
#

Hint nonnull? Or null?

surreal path
#

ill print hint hold on

ebon needle
surreal path
#

yes?

surreal path
# surreal path ill print hint hold on

syscall_mmap(): size 4096 flags 32, hint 0x41600000
syscall_mmap(): size 90112 flags 32, hint 0x41601000
syscall_mmap(): size 847872 flags 32, hint 0x41617000
again its kinda inconsistent

#

but there is hint

surreal path
#

usually page fault

broken depot
surreal path
#

i want preemption to happen during a syscall

#

thats why i enable it lol

ebon needle
flat nymph
surreal path
#

so i need preemption on syscalls

broken depot
#

Certain code can't safely run with interrupts disabled actually. That's the case for a lot of internal things in my kernel because it's made to be preempted basically everywhere.

ebon needle
surreal path
surreal path
broken depot
#

Anyway, back on topic, hint is nonnull

surreal path
#

yep

broken depot
surreal path
ebon needle
surreal path
#

yes?

#

i lit have a per thread kstack and ustack

broken depot
#

-# that would make your asnwer "no"

surreal path
#

and i keep pointers to shit with the syscall shi

#

oh right, no not rlly

broken depot
#

If you are able, maybe you should print the stuff that gets used by syscall for return address when running mmap?

broken depot
#

At enter and also just before returning.

broken depot
surreal path
#

that involes

#

some shit

#

i dont wanna do

broken depot
#

Both when just entering syscall_mmap and just before returning.

surreal path
#

im too braindead

broken depot
#

Well, rcx gets stored at an offset of from the value of [gs:8], which would be your kernel syscall stack top.
So that would be *(uint64_t*)(stack_top_here - 3*8)

surreal path
#

ill try that

ebon needle
#

maybe its zeroing ?

surreal path
#

ill see hold on

broken depot
#

That would be the address I just told him to read

surreal path
#

^

broken depot
#

Literally what I was figuring out the pointer to.

surreal path
#

i print on entry and exit of syscall

ebon needle
broken depot
#

Error code still 0x14?

surreal path
#

yep

broken depot
#

So IRQ 14 (decimal), error code 20 (decimal)

surreal path
#

yes

broken depot
#

SDM agrees that this is user instruction fetch

surreal path
#

yep ik

ebon needle
broken depot
#

I'm not super familiar with x86 so I wanted to check

surreal path
surreal path
broken depot
#

Check that your user stack is correct. If that stack pointer got moved somewhere that made the return address 0, you could see this fault.

surreal path
#

i can print that on mmap ig

#

@broken depot yea okay

#

something cooks the user stack ptr

broken depot
#

Uhh

#

Missed or extra swapgs?

surreal path
#

no because the cpu structure is stored in kernel gs

#

the dereference wouldnt work

edgy pilot
#

bro how does your kernel even run ๐Ÿ’€

surreal path
#

wdym

broken depot
#

That is the same at enter and exit, which implies it's actually something else that causes the thing at the last mmap

surreal path
surreal path
#

bro is not explaining

broken depot
#

Because how can this be a valid user stack pointer? I think that something is going wrong in a context switch somewhere.

edgy pilot
surreal path
broken depot
#

Be that syscall enter/exit or thread switch, this cannot be correct.

surreal path
#

yea

broken depot
surreal path
#

i can attempt to disable interrupts there

broken depot
#

Does this thread yield or get preempted between these two mmap calls?

broken depot
#

I think now would be about time to get the debugger to figure out what corrupts the stack pointer.

surreal path
#

fun

brisk zenith
surreal path
#

DELTARUNE IS FUCKING BASED

#

yooo monkuous have fun

brisk zenith
#

Thanks

surreal path
#

youll love chapter 3 and 4

#

especially 4

#

trust

brisk zenith
#

Accidentally lost my save some time over the last few years so I have to play through the whole game again

surreal path
#

that makes sense lol

brisk zenith
surreal path
#

you will

surreal path
#

I SAW THAT STAR INFY, DELTARUNE PLAYER TOO?

kind root
#

nah lol

#

its a misclick

surreal path
#

you should play it

kind root
#

not my thing

surreal path
#

nooo nooo fair

kind root
#

i like games with graphics trl

surreal path
#

@broken depot

#

so something happens and the rsp is swapped with syscall_stack_ptr_tmp

#

thats fucking weird as shit

#

oh

#

@broken depot I FIXED THE PAGE FAULT ISSUE!!!!

#

nvm

kind root
#

@surreal path btw u know u can debug from vscode directly right

surreal path
#

but im too lazy to set that shit up

kind root
#

a made a script to autogenerate vscode configs for that for my kernel

#

works pretty well

surreal path
#

where can i find it

kind root
#

im gonna implement idt and gdt in my kernel now, should I add gdt.. ok and idt.. ok @surreal path ?

surreal path
broken depot
kind root
#

naah

#

slient gdt

surreal path
#

slient gdt init...ok

edgy pilot
daring juniper
#

Write the string "gdt init... ok" to a random memory address trl

kind root
#

maybe i should detect avx512 support and then that would enable verbose gdt

elder shoal
surreal path
#

okay i feel like its in relation to syscall stack tmp and syscall user sp

#

but doing what i should do breaks mlibc (which means my kernel is broken)

#

i dont know what im supposed to do in the actual scheduler itself with syscall stack tmp and syscall user sp

#

do i just leave them

#

idk

#

okay

#

i think i have a general idea whats happening

#

because i enable interrupts for the syscalls, at the start of the syscall i throw the user rsp into syscall_stack_ptr_tmp and load kernel_stack_ptr from gs then before sysret i load from syscall_stack_ptr_tmp into rsp

now what is probs happening is that on preemption i save the context, but that saves the user context not wherever the syscall is, sched yield works because it manually builds its own stackframe. so basically when preemption happens i go to another thread and whenever i switch back to the thread i load the USER stack and rip, now the user thread assumes the syscall went well and just dies

#

how to fix this idrk

surreal path
brisk zenith
#

idk enough about your kernel design to say

surreal path
#

right

brisk zenith
#

if that is indeed what's happening then it'd definitely cause issues

surreal path
#

could that also be in part related to the oom issue as well

#

somehow

brisk zenith
#

idk

surreal path
#

fair

brisk zenith
#

sorry for the short responses im busy fighting jevil

surreal path
#

its op

#

and dont apologise lol glad ur having fun

surreal path
brisk zenith
#

this is where im at rn, just finished the giant fullscreen attack

#

not looking too good item wise

mossy belfry
#

wait u ported this to ur os

#

neat

surreal path
#

what?

brisk zenith
#

no this is on linux with proton

surreal path
brisk zenith
#

nah i'm doing peaceful

#

did pirouette, defend, heal kris

surreal path
#

yea good

brisk zenith
#

well then

surreal path
#

you made a program to keep track of this?

brisk zenith
#

it's just kwrite

#

keeping track of it manually

surreal path
#

oh right

#

makes sense

#

im assuiming you got a bunch of heals

#

if not

#

buy tons

brisk zenith
#

yeah my inventory is full of them

surreal path
#

okay

#

use them sparringly

#

during the fight

#

you wanna take advantage of ralseis heal prayer

#

if your like <20hp then yea def heal with an item

surreal path
#

idk anymore

#

time to cry in a cornerrr

kind root
surreal path
kind root
#

yes

surreal path
#

i haev no more ideas on what to do

#

so i cant really

#

do much lol

kind root
#

try to imagine what u would do if u were monkuous

surreal path
#

im not monkuous i cant imagine what goes in their head lol

kind root
#

try really hard

surreal path
#

all i can think of is printing the rip and rsp of a frame every preempation

#

but thats not because i imagined i am monkuous

#

i lit just came up with that rn

kind root
#

good start

surreal path
#

in mmap

#

rip and rsp looks sane

kind root
#

try different opt levels as well maybe?

broken depot
surreal path
#

WHO TOUCHED MY FUCKIN

#

ptr tmp

#

thats a completely different threads ptr tmp

kind root
surreal path
#

im already using o2

broken depot
kind root
#

now try that on linux trl

broken depot
#

-O0 Linux kernel sounds slow as mollasses

kind root
#

nah it just wont compile

broken depot
#

XD

#

what

kind root
#

the code breaks in various ways

#

they dont support anything besides o2

surreal path
#

thats insane

#

why wouldnt they??/

broken depot
#

That is very surprising

kind root
broken depot
#

Are they relying on different behaviours of I suppose specifically GCC on -O2

surreal path
kind root
#

but it probably wont boot

#

99%

broken depot
#

Ahhhh

surreal path
# surreal path

the addr are always the same but sometimes ptrtmp doesnt print

broken depot
#

Not optimized out -> uses some functions that are compiler built-ins?

kind root
surreal path
#

ill turn on O0

surreal path
kind root
#

wait wtf were u using

broken depot
surreal path
kind root
#

bruh

surreal path
kind root
#

bro is debugging with O2 SKULL

gray hill
#

lol

#

i had some bad experiences with it

surreal path
#

who doesnt?

#

huh

gray hill
#

but even with O0 some values still get optimized out

kind root
#

Og

surreal path
#

if u ignore the preemption taking shit it seems to be that syscall user tmp gets changed on the same thread

#

by something

gray hill
#

i use O0 and -g

surreal path
#

and then

#

ptrtmp 0x100a48 t 3

broken depot
surreal path
#

before meaning before allocation

#

thats O0

kind root
#

-ggdb3 for most debug info

surreal path
gray hill
kind root
gray hill
#

works with clang too?

broken depot
kind root
#

yeah lol

surreal path
#

it made it a hw watchpoint?

kind root
surreal path
surreal path
broken depot
kind root
gray hill
#

i also finally managed to start debugging with CLion

broken depot
gray hill
#

and it's gdb integration is SO GOOD

kind root
#

with qemu

#

i found some old extension but it didnt work

gray hill
#

no extension needed

#

don't mind the mappings

#

they are not needed for me

#

they are a leftover from windows

#

i had a ton of trouble trying to use it from wsl tho

surreal path
gray hill
#

but native linux works very well

kind root
#

oh so its native linux

gray hill
#

yes

#

arch

kind root
#

and u have to run qemu manually right

gray hill
#

yes

kind root
#

i have a more automated thng with vscode

gray hill
#

i could do that too

#

with clion

kind root
#

how?

gray hill
#

make a .sh

#

and make it run that first

kind root
#

ig, sucks that this only works on naitve linux

gray hill
#

using before launch

surreal path
#

sometimes that doesnt happen

kind root
#

couldnt make it work on wsl

surreal path
#

and it still page faults for the same reason

gray hill
#

maybe it was bc i had gef installed

surreal path
#

ill add -ggdb3

#

and see if that help

#

s

gray hill
#

anyway, native linux is WAYY faster then wsl

#

10x with kvm

kind root
#

strange because it should be the exact same speed

gray hill
#

and basically instant with cmake config and compilation

gray hill
surreal path
gray hill
#

can run the whole os till scheduler start in less than 1s

frigid cliff
#

I usually recognize people by pfp and I was extremely confused who this random person monopolizing the nyaux thread and then I realized KEKW

gray hill
#
  • i got at least double the speed of uacpi loading
surreal path
#

huh

#

me confusion

gray hill
#

i think it's me

#

lol

surreal path
#

crazy

frigid cliff
surreal path
#

lmao

gray hill
#

oh XDD

frigid cliff
#

I didnโ€™t recognize you because you changed you pfp ๐Ÿ˜ญ

surreal path
#

yea lol

#

murder drones fire

#

anyway

gray hill
#

yes

surreal path
#

we lock in

gray hill
#

agree

frigid cliff
#

Anyway

kind root
#

imagine using the nyaux thread to debug nyaux

surreal path
#

๐Ÿ˜ฑ

gray hill
#

anyway, good resources on ipc?

frigid cliff
#

Iโ€™m a little slow sometimes

gray hill
#

i need to find out how to add it

#

lol

kind root
#

fast memcpy

gray hill
#

?

surreal path
kind root
#

= good ipc

gray hill
#

yeah i have a "fast" memcpy

surreal path
#

nvm

#

im retarded

kind root
surreal path
#

its this values before preemption

gray hill
#

for user i'll use libc one

kind root
#

i mean copy_from_user

gray hill
#

with xmm and other improvements

surreal path
#

it fucking changed

gray hill
kind root
surreal path
#

my kernel is trolling me

#

idk why its changing

#

like the only time i touch it is fork()

gray hill
#

so just load the context

kind root
#

ah that would explain it lol

#

you'll figure it out when u get there

gray hill
#

i am trying to get there now

#

lol

surreal path
#

ill print before fork happens cause i didnt get a fork log

gray hill
#

and is overwriting data

surreal path
#

no idea

kind root
gray hill
#

rn i have a bigger issue

surreal path
#

fork goes fine???

gray hill
#

the stupid kvm clock resets itself

surreal path
#

and userspace code runs fine

#

until the funny mmap

gray hill
#

ghosts hunted your kernel

surreal path
#

yep NOW im

#

out of ideas

gray hill
#

for drivers

mossy belfry
edgy pilot
#

or why not all of them

mossy belfry
#

rep vmovdqu16

kind root
mossy belfry
#

oh... ๐Ÿ’ฅ

maiden ridge
#

and can you ask him specifically this: "can you send an iso of your os with doom included so my buddy can beat episode 1 while using the same computer to heat water for his tea?"

@linuxmaster2.0

#

@surreal path

surreal path
#

bru

#

its broken rn

#

i cant rn

#

it lit wont work lol

maiden ridge
#

Damn when can he expect a working iso

surreal path
#

when its fixed

maiden ridge
#

๐Ÿคฏ

#

Anyways he is down to test and play a game of doom

surreal path
#

i will send when its fixed

maiden ridge
surreal path
#

we ball at 5 or smt

#

little tired

#

im gonna try to watchpoint the fucking syscall ptr tmp like @mossy belfry said

#

if that doesnt work

#

out of ideas again

mossy belfry
#

good luck ๐Ÿ’ฅ

surreal path
#

thanks

surreal path
#

yo mb

#

its just a bit too hot

#

im just waiting for the temp to cool

#

its really hot today

mossy belfry
#

average day in the southern us

surreal path
#

okay bro

mossy belfry
#

good luck on the weather

surreal path
#

execution date today

mossy belfry
#

it's a little warm where I am as well

#

had to translate it to f*hrenheit

flat nymph
#

it's 31 Celsius where I live

gray hill
#

35 here

silver yarrow
#

12C

gray hill
#

wow

daring juniper
#

22 Centigrade for me

edgy pilot
#

pre 1948 ahh

daring juniper
elder shoal
#

It was 3ยฐC in the morning today, you can take some cold

surreal path
#

okay so i tried the watchpoint on the syscall user tmp

#

var

#

no luck, gdb catches nothing

#

guess we gotta wait for monkuous i suppose?

#

fucking hell bro nooo nooo

surreal path
#

yea i am lit desperate

#

fucking nothing

#

i just want this solved

#

there has to be SOMETHING im missing

mossy belfry
surreal path
#

mmap

mossy belfry
#

i have an idea, you can break it right before that and manually step step step and print it out until it changes

surreal path
#

i lit did

#

many times lol

mossy belfry
#

did it not show up ๐Ÿ’€

surreal path
#

doesnt help

surreal path
mossy belfry
#

so u were able to catch the change tho right

surreal path
#

im even on O0 as @kind root suggested

surreal path
mossy belfry
#

is it around /kernel/src/arch/x86_64/syscalls/syscall.c

#

looking at latest commit

surreal path
#

yes

#

epic

mossy belfry
#

is monokous able to run your kernel too or do i just have to stare at code lol

#

i'll try to run it ๐Ÿ’ฅ

#

ok i think the building is going well ๐Ÿง€

surreal path
mossy belfry
#
Creating config file /etc/mercurial/hgrc.d/hgext.rc with new version
/jinx: line 656: cd: /base_dir/base-files: No such file or directory
make[1]: *** [GNUmakefile:13: nyaux.iso] Error 1
make[1]: Leaving directory '/home/gummi/NyauxKC'
make: *** [GNUmakefile:10: all] Error 2
make: Leaving directory '/home/gummi/NyauxKC'
#

๐Ÿ™

#

uh oh

#

maybe i will rm the git repo and try again

mossy belfry
#

it's compiling just fine

#

rayan your build system takes a little while

#

is this why the build dir was 20gb or something

#

very many time

gray hill
#

LOL WHAT

mossy belfry
#

idk man i managed to write 3 unit tests, eat dinner, and build nodejs and nyaux still isnt done

#

"build nodejs" isn't a joke here, gentoo decided to update it today

gray hill
#

XD

mossy belfry
#

ok ok it spent 1 hours compiling gcc and 20 seconds building nyaux

#

understandable

surreal path
#

its called having a build system

mossy belfry
#

linux kernel scheduler was probably in a bad mood today, it's ok

surreal path
#

wtf are u one abt lol

mossy belfry
#

it didnt feel like running the build system

surreal path
#

i see

#

add more swap

surreal path
mossy belfry
#

hmmm

#

i shall fix diz

kind root
# mossy belfry mood.

@surreal path btw you should write Co-authored-by: username in your commit messages if you want to give attribution

#

It will even display monkuous pfp and stuff next to the commit

surreal path
#

ah i see

mossy belfry
#

is this supposed to do this

surreal path
#

rm -rf subprojects/uacpi

mossy belfry
#

same issue

surreal path
#

make clean

#

your in the kernel yes?

#

or the sysroot

mossy belfry
#

sysroot

#

do i run make in kernel again

surreal path
#

go into the kernel?

#

ls for me

mossy belfry
#

do i clone

surreal path
#

can u just

mossy belfry
#

ok it worked now

surreal path
#

ls

#

wtf are u doing

mossy belfry
surreal path
#

are not building the sysroot

#

wtf???

mossy belfry
#

i did do that

surreal path
#

bro...

#

rm it all

mossy belfry
#

i did that already and it took 40 minutes to rebuild your project

surreal path
#

so what

#

it builds the sysroot

#

just wait the 40 minutes lol

mossy belfry
#

i dont really feel like waiting that long again and i already built sysroot

surreal path
#

u gave up that was ur fault but ok wtv

mossy belfry
#

your build script is broken, the first time i compiled it i just ran make in sysroot and it created that error

#

i think you forgot to include uacpi as a submodule or something

surreal path
#

i told how to fix it

#

no

#

it is

#

retry building the nyaux distro

mossy belfry
#

i ran make in sysroot

surreal path
#

tell me the error

mossy belfry
#

that was the error

#

i have a very long list of build output commands one sec

#

see here it says it took 38 minutes

surreal path
#

see dms

surreal path
#

last resort chat

#

im just gonna ask the osdev forums

#

and if we get no help there

#

idk

kind root
surreal path
kind root
#

Lol idk

surreal path
#

fair

#

๐Ÿ˜ญ

kind root
#

It has some experienced people

surreal path
#

it does

#

tbf

mossy belfry
#

nyaux.iso ๐Ÿ‘

#

ok time to see if i can even boot this goober

surreal path
#

make run

#

make run-debug for gdb

#

make run-kvm for kvm

mossy belfry
#

i think i have to open a DE now ๐Ÿ˜ข

#

it ok tho

#

12 second boot nice

#

now how do i make the bug happen

tawdry mirage
surreal path
#

run any program that forks

mossy belfry
#

did it happen

tawdry mirage
#

ai scrapers are eating the forum rn

surreal path
gray hill
tawdry mirage
gray hill
#

the devs of claude are the worst ones

#

but you can use cloudflare to filter them out i think

mossy belfry
#

25gb build dir, nice

surreal path
#

thats fine

surreal path
#

then idk what im gonna do

gray hill
surreal path
#

wdym by ?

gray hill
#

wdym what you gonna do?

surreal path
#

i mean what i said, i literally dont know how to solve this issue.

#

i dont know what to do going forward

gray hill
#

is the forum down?

surreal path
#

no its just mostly bots now

gray hill
#

ah

#

well, try something, like feed your whole project into o3 and hope for the best

gray hill
#

maybe it can help a bit

surreal path
#

bro what

#

how does that help with debugging

gray hill
#

it is very good at finding issues

surreal path
#

????

gray hill
#

well, your problem is probably caused by an issue in your os code no?

surreal path
#

yes

gray hill
#

maybe the AI can find it

daring juniper
#

I find that unlikely lol

gray hill
#

so not all hope is lost

surreal path
#

source

gray hill
#

look it up

daring juniper
#

๐Ÿคทโ€โ™‚๏ธ

surreal path
#

i am

#

i dont see shit

daring juniper
surreal path
#

just ai models and people saying NOT to use O2-O3 when debugging

surreal path
daring juniper
#

at first when I heard O3 I thought he was talking about the optimization flag XD

gray hill
#

oh XD

surreal path
#

fucking crazy

#

i am not piping my code through ai garbage

glossy walrus
gray hill
#

well, ofc

glossy walrus
#

just please stop suggesting LLMs for this

gray hill
#

but it might help

glossy walrus
#

don't defer your critical thinking to clankers

glossy walrus
glossy walrus
worldly condor
tawdry mirage
surreal path
#

oh i see

tawdry mirage
#

the bots are only reading (since they're guests anyway)

surreal path
#

well ill ask the forum TOMORROW

#

im sleepy

coral dove
daring juniper
#

Eyy!

edgy pilot
#

I removed it after I realised that

glossy walrus
#

shit like GH Copilot is good for autocompleting memcpy and appending comments when closing C++ย namespaces

#

for the rest have fun

#

it can be useful for doing stuff like asking what does linux's function x_y_z() do` tho

mossy belfry
#

i dont need copilot check out how incredibly useful my autocomplete is, you can find the function you need in only around 2-3 business days

#

(no idea why this happens)

surreal path
#

hello

#

i have just waken up

#

give like a few hours and we will post onto the forum

#

wait qwinci why can user tmp change, who changes it???

#

i am reading old messages as to figure out why some parts of my code do this

#

maybe this could be our issue?

thorn bramble
surreal path
thorn bramble
#

it's just a bunch of boomers

#

don't

#

if i were u i'd rather spend an eternity trying to debug it myself than ask the forums

surreal path
#

damn

#

is it really that bad

thorn bramble
#

probably

surreal path
thorn bramble
#

judging by the quality of most posts i've seen

ebon needle
surreal path
broken depot
ebon needle
#

maybe

#

you memcpying

#

and idk how changing this value ?

surreal path
#

also considering my allocator is pretty battle tested (thats not to say its perfect or wont lead to isssues in the future, heck even managarm had slab corruption issues) i wouldnt blame it

surreal path
#

we just dont know why

gray hill
#

use a watchpoint

#

maybe it helps

surreal path
#

i lit did

gray hill
#

ah

surreal path
#

many times

molten grotto
thorn bramble
#

and u haven't

surreal path
#

im not saying its good

#

im just saying its probs not the allocator for this situation

surreal path
surreal path
surreal path
supple robin
#

they will hate on u

#

for having fun

surreal path
#

why

#

thats insane

#

why would they hate people for having fun

daring juniper
#

I mean I've only asked the forums stuff like, twice before, but it doesn't seem that bad

supple robin
surreal path
#

okay interesting

#

commenting out these lines in waitpid causes the same fault

#

i genuinely do not know why

#

i did this before

#

yea doing what waitpid does

#

in mmap

#

does NOT solve the issue lol

#

i thought

#

back to dying

#

yea i have no choice but to ask the forum

#

worth a shot

#

post made

#

hopefully one smart boomer will respond

ebon needle
#

extreme measures

surreal path
#

very much so

ebon needle
surreal path
#

okay so

surreal path
#

id imagine that when mmap got preempted, some other thread made a syscall while interrupts were enabled

#

and that piece of code which i still do not know why i do doesnt execute cause its only on mmap so

#

that probs is what happened

#

i mean plasubile

#

what ill do is add those 2 lines in every syscall, along with disabling and enabling interrupts beforehand

#

if that doesnt work well fuck all

#

im genuinely just throwing shitty idea after shitty idea

#

just to get something to work lol

#

idc tho ill never give up with nyaux

#

even if we dont get help

#

even if we are stuck for years on this

#

idfk

cinder plinth
#

did you log interrupts

surreal path
#

nyaux is my child

surreal path
#

exactly

cinder plinth
#

did you try adding prints

#

on interrupts

surreal path
#

ofc

#

lol

#

did i just...

#

solve my page fault issue...

#

i added cli to the start of the syscall asm

#

i wanna make sure this is real

#

i have solved it...

#

I HAVE SOLVED THE PAGE FAULT ISSUE

#

yea it still deadlocks on the mem lock BUTTTT

#

PROGRESSS

#

@kind root banger right?

surreal path
#

it might work

#

and not deadlock

#

hope is hope bro

#

and why it deadlocks now

#

keyboard interrupt wants to allocate memory for the keyboard packet,

cinder plinth
surreal path
#

the userspace thread is holding the mem lock

surreal path
#

the syscall asm cannot

#

but the syscall function itself can now

cinder plinth
#

Ah

surreal path
#

which is very useful

#

and imporant

surreal path
#

okay we are closer

#

i made the memlock disable interrupts then lock then unlock then enable interrupts

#

seems like forking any program causes some weird ass shit

#

which is better?

#

idk

surreal path
#

yea

silver yarrow
#

otherwise there is a race condition for deadlock

surreal path
#

pretty much

kind root
#

theres a flag for that no?

surreal path
surreal path
surreal path
#

i think i know why

#

i dont check if interrupts were enabled in the first place for the mem lock

#

and just enable them

#

vfs lookup does some allocation so

#

yea

#

lol

#

makes a lot of ze sense

surreal path
#

i would fix if VSCODE WASNT A PIECE OF FUCKING SHIT

#

did arch break it???

#

it wont launch after i updated it

crystal scarab
kind root
surreal path
kind root
#

.so hell trl

surreal path
cinder plinth
#

vscode issue

#

Use a better editor

surreal path
#

okay bro

#

what tf do u use