#Astral

1 messages · Page 17 of 1

analog berry
#

Sure but its not practical to enforce, like we cant force someone to run on their machine for every new os

fierce forge
#

I think I know what's going on with my timers

gritty shore
fierce forge
#

I'm not pinning the measuring thread to a particular CPU

gritty shore
#

eh next kernel I will port it

gritty shore
#

what

analog berry
#

I thought you were asking me to convert lol

gritty shore
#

no

obsidian pivot
#

LAI 🤮

gritty shore
#

I wouldnt do that

analog berry
#

If you know what you're doing probably a few hours

fierce forge
#

No it's still off

#

Can someone look at my timer code? cryingmeme

#

It's off by x10 almost precisely

obsidian pivot
#

Reading the init code, it is impossible for that code to fault provided valid input

#

Before the log statement

analog berry
#

Maybe instead of reading it add a halt and a basic print?

#

Or just a halt for that matter

obsidian pivot
#

A basic print cannot happen until that first log statement

#

So I will halt it

analog berry
#

Yeah lets try that at least

#

Then we'll know whats up

fierce forge
#

I'm stupid

obsidian pivot
#

what

obsidian pivot
#

first thing

#
Arch_KernelEntryBootstrap:
    jmp $
    ; blah
hearty fulcrum
analog berry
obsidian pivot
#

btw if it does

#

the next thing that can triple fault

#

would also be a hyper bug

#

because it didn't give me the right ultra protocol magic

#
Arch_KernelEntryBootstrap:
    jmp $
    cmp rsi, 0x554c5442
    je .ok ; should triple fault on failure
    xor rax,rax
    jmp rax ; All hope is lost.
.ok:```
#

the next thing that could crash is a fucked stack

#

which'd be also hyper's fault

fierce forge
obsidian pivot
#

after that, it's a page fault because the kernel was mapped incorrectly

grand shadow
#

todo: redo interrupt system before rewriting scheduler and redoing devices

#

for now while I dont do that though, its better

#

wtf that was such a big issue

#

yeah I really need to redo this

#

the other benchmark I have, glxgears, went up by like 50 fps

#

just by doing this

analog berry
#

uacpi benchmark paying off

analog berry
grand shadow
#

nah my computer sucks balls and theres probably a thing or two that can be made better

analog berry
#

dont add for now then?

grand shadow
#

yeah I first need to see what more can I do and then get a test subject with a very good computer to run it halfmemeright

analog berry
#

lol

gritty shore
#

I'll get my friend with a 9800x3d

#

to run mine

analog berry
#

That's based

gritty shore
#

no

#

well yes

#

but in my new iteration ™️

#

which will not suck

#

as much

analog berry
#

Nice

grand shadow
#

I kinda do wanna see if it builds gcc faster now

#

probably not much

#

this time I will build it with --disable-docs

#

I think if I do -pipe it'll be faster

#

because of i/o being abysmal on astral

#

nvm

#

alright compiling

carmine swallow
#

getting close to managarm speeds meme

grand shadow
analog berry
#

wtf

analog berry
grand shadow
#

@carmine swallow what is your cpu to you have a nasa computer

prime juniper
supple hatch
#

damnn

#

timer for sure is not the problem, im unsure why its inconsisent but hey

#

its not 150 ops per second

#

💀

grand shadow
#

@analog berry I think my submission will be qwinci's 2411598/sec on his i5 13600k

analog berry
#

nice

#

can u pls leave a comment under the PR

grand shadow
#

alright

analog berry
#

cool!

supple hatch
#

my submission will be mints

analog berry
#

one day

hearty fulcrum
supple hatch
#

lemme add a comment

#

to the pr

analog berry
#

yeah take your time i'll wait for everyone to get the best result they can

supple hatch
#

yea done

grand shadow
#

@analog berry it is done

analog berry
#

nice!

craggy tide
#

that my CPU is slower than a 13600k

grand shadow
#

Magic

carmine swallow
#

yeah idk, there are things like the host kernel config that could potentially affect it like I have all vuln mitigations disabled and whatever (and a slight undervolt which makes the perf of the cpu a little better but afaik that's mostly just under heavy multicore workloads where the temp would be an issue)

fleet osprey
#

I just use copiously overkill cooling to deal with that

#

I have a dual-fin-stack cooler with a chonky fan.... to cool an i3-12100f

#

it never goes above 50C under max load

carmine swallow
#

undervolted to like 1.2v or whatever its 80c under max load

fleet osprey
#

lol

#

all of my stuff has good enough cooling to not throttle under max load

#

my laptop gets right up against the limit (like 1-2C shy of the thermal limit), but doesn't quite throttle

#

Ryzen 7 PRO 4750U, best CPU meme

craggy tide
grand shadow
craggy tide
carmine swallow
#

that's basically exactly the same as what I get

craggy tide
#

yeah that's about expected i guess

hearty fulcrum
#

Ilobilix #2 !!!!!!!!!!

analog berry
#

Congrats

grand shadow
grand shadow
#

I forgor I had to destdir

grand shadow
#

@analog berry in what situation would a mutex with a timeout be called

analog berry
#

AML

#

AcquireOp takes in a timeout value

proper meteor
analog berry
#

yeah its been a footgun and a source of confusion since the inception of acpi

#

they should've added TryAcquire and Acquire instead of this garbage

grand shadow
#

Ah well it will be a slow path

#

Ill loop on a try and sleep

#

And print a message "heres a nickel kid go buy yourself a better firmware"

fleet osprey
#

Simply install Coreboot, it's free troll

analog berry
carmine swallow
grand shadow
#

I am free from the chains that held me to the ground for now I shall be free until the wicked attempt against my free will once more

#

(I have a break from university

carmine swallow
#

yeah me too for 2 weeks (though not from uni but from the civil service server management job that I am doing)

sacred gyro
#

Why do I want to torture myself with porting something like XFCE to Astral…

#

Why is this an urge I have

#

Send help

robust geyser
#

xfce is pretty easy to port iirc

#

probably just a matter of building it

#

and it isn't even that big

sacred gyro
#

Trying to port something as massive as GNOME or KDE sounds like pure suffering

robust geyser
#

gnome is pure pain

#

because of gobject-introspection

#

kde is manageable but it does have some linux specific apis it needs i think

fleet osprey
#

I'd love to see a way to run Astral on PowerPC (if basic PPC support were a thing I'd totally port it to the Wii meme)

sacred gyro
#

I seem to remember that being a pain for me while doing LFS

robust geyser
#

sounds like a mild skill issue tbf tf

sacred gyro
#

Yeah probably

robust geyser
#

managarm did have some work done towards kde6

#

and gnome too

#

managed to run mutter (or gnome shell??)

#

but it crashed

sacred gyro
#

Yeah, Mutter is the window manager for GNOME last I checked

robust geyser
#

yeah i think that crashed

#

it showed like a big message

#

that something crashed

#

on screen

sacred gyro
#

But I might look into XFCE porting when I get home

robust geyser
#

best of luck 🙏

sacred gyro
#

(I’d need to build an image probably, and then figure out what to do from there)

robust geyser
#

a bit outdated but they should work

#

just keep in mind they are for linux

sacred gyro
#

Oh no

#

I see gobject in there 💀

robust geyser
#

nah that's for gnome

sacred gyro
#

Ah

robust geyser
#

thankfully it's not needed for xfce

#

i should really look into making gobject-introspection more cross-compilable for everyone

pseudo shore
#

As far as I can tell there is no proper audio yet, any plans to add it in the near future? I think that could be the last missing piece for this to be a proper desktop OS as far as I am concerned

analog berry
#

there is audio via HDA

pseudo shore
#

hda.h and hda.c on the rewrite branch look incomplete

#

Am I missing something?

analog berry
#

@carmine swallow was working on that so maybe he knows

carmine swallow
supple hatch
#

uhda on nyaux when

carmine swallow
#

after you have pci

supple hatch
#

yess soonn

pseudo shore
#

TIL that uHDA exists

carmine swallow
#

I should get back to it now that I have more time for a while again

supple hatch
#

btw i saw something called udrm

#

someone was working on

carmine swallow
#

yes Marvin is working on it

supple hatch
#

yes

#

that is marvin leaked face reveal

carmine swallow
#

lol

grand shadow
#

which I will be trying to improve

supple hatch
#

its spreading

prime juniper
robust geyser
#

manageable in comparison to gnome*

grand shadow
#

which is why between gnome or kde I will probably do a secret, third thing in the future

#

(CDE port

prime juniper
fleet osprey
#

no new Astral progress in 2 days death

supple hatch
hearty fulcrum
grand shadow
#

Ive slowly been studying something which I want to implement soon for speeeeeeeeeed

#

(it wont actually make that much of a difference)

grand shadow
#

the funni lock

#

tyr-glquake and tyr-quake are both perfectly playable on qemu now

#

big win

#

Broke: kmscon
Woke: xterm on fullscreen

grand shadow
#

lol I think the doc issue with the make install on gcc is due to me missing fucking perl

carmine swallow
#

btw one suggestion for astral, make astral/syscall.h a part of the astral package so other pkgs can use it without needing to copy the code from there and hardcoding syscall numbers to patches

grand shadow
#

I thoguth I installed it with mlibc in /usr/include/astral/syscall.h

#

huh apparently not

#

though yeah I will probably make it be part of astral so mlibc can use it

#

idk

grand shadow
carmine swallow
#

openjdk meme it builds fine at least (with basically the same patches that I already had for managarm with minor changes), idk if its going to work tho

grand shadow
#

ooooooo

#

if it needs some signal stuff like ucontext or siginfo it wont

carmine swallow
#

I am not completely sure about that but it might (at least for the jit, maybe the very slow non-jit version could work without)

grand shadow
#

wtf

#

probably somewhere is doing vmm_map with a size of 0

#

try a syscall log

#

you can enable it in the kernel makefile

#

(needs e9 logging too)

carmine swallow
#
syscall: pid 37 tid 38: execve: path /usr/lib/jvm/java-17/bin/java uargv 000000000057EF60 uenvp 00000000009FFE00 (444 cached pages, 1007374 free pages)
syscall return: pid 37 tid 38: 18446744073709551615 ENOMEM (446 cached pages, 1007374 free pages)
``` does this mean that the execve itself failed with ENOMEM?
grand shadow
#

Wtf

#

Cna you do a readelf of the PHs of the elf

wild marsh
#

inb4 1TB p_memsz

carmine swallow
grand shadow
#

GNU STACK

#

ARGH

#

Yeah thats it I think

#

Size is 0

carmine swallow
#

but why would you do anything with that as its not PT_LOAD?

grand shadow
#

Wait true

#

Wtf

carmine swallow
#

ig Ill try to add prints to figure out where exactly it comes from

grand shadow
#

Why is it trying to load at 0

carmine swallow
#

its a pie

grand shadow
#

I dont do relocations in the kernel

carmine swallow
#

you don't need to either, they are done by the ld

grand shadow
#

Oh

#

Blegh

#

When qemu did that it always complained

#

Ig you can add a check if its a pie and set the base in elf load

#

Just to see if itd work

#

Cuz it loading to 0 breaks the load logic

wild marsh
#

yeah for pie you just pick a base and add it to all virt addrs

fierce forge
grand shadow
#

I can see if I add support for them if you want @carmine swallow

#

I wont be home for a few hours

carmine swallow
#

what I did for now is checking if the supplied base is zero and the file type is ET_DYN and if they are then just unconditionally applying a static base

#

I ran into an another problem tho and its that LD_LIBRARY_PATH's $ORIGIN is broken because of no AT_EXECFN so I am trying to add that rn

grand shadow
#

Ahhh nice

carmine swallow
#

at least it now starts KEKW

obsidian pivot
#

Based

analog berry
grand shadow
#

Wonder if its the ucontext meme

#

I dont have it implemented

carmine swallow
#

it might be, Ill try with the slow non-jit one if it makes any difference

grand shadow
carmine swallow
#

so yeah ig it needs ucontext regardless

grand shadow
#

probably not that hard to implement, just need to define the struct and push it into the signal stack info

#

and then convert the astral context_t into an ucontext

#

like a function that does it

carmine swallow
#

yeah

#

and to restore just convert it back

#

wine also wants that, maybe it would work after that too

grand shadow
#

it'd still be missing siginfo I think

carmine swallow
#

might be

#

also one other thing that it needs is defining MLIBC_MMAP_ALLOCATE_DSO in mlibc meson.build or else you are going to get funny bugs because of mlibc allocating dsos at fixed addresses overlapping the ones that wine uses using MAP_FIXED

grand shadow
#

my mmap works so that probably would work just fine

#

I already use MLIBC_MAP_DSO_SEGMENTS and MLIBC_MAP_FILE_WINDOWS

#

do you want to implement the ucontext stuff or can I do it

carmine swallow
#

you can do it if you want

grand shadow
#

alright

#

my signal code is a mess anyways I dont want you to suffer

carmine swallow
#

lol

grand shadow
#

in the meantime you can probably add a CTX_PRINT in mmu.c to see where it segfaults

#

or was it PRINT_CTX

#

bleh

carmine swallow
#

I think this is a vsyscall for getcpu and its using that because astral doesn't implement the mlibc getcpu sysdep

#

ig I can just add that as a stub in mlibc for now to make it not use that vsyscall

grand shadow
#

yeah

#

what does getcpu do

carmine swallow
#

gets the number of the cpu that the thread is currently executing on

grand shadow
#

oh

#

yeah for now just stub it

#

eventually I can add a syscall or something

carmine swallow
#

now I think its running to the ucontext stuff, the ip is sane and rdx is 0

#

it also wanted CLOCK_MONOTONIC, I just made it the same as CLOCK_REALTIME (and MAP_NORESERVE mmap flag but that can just be ignored, just had to add it to the KNOWN_FLAGS define)

analog berry
#

a little trolling

grand shadow
#

for CLOCK_MONOTONIC you can just return like

#

timekeeper_ns_from_boot

#

or whatever the macro was

#

or function

#

oh wait

#

timespec_ns(timekeeper_timefromboot())

carmine swallow
#

wouldn't plain timekeeper_timefromboot() be fine too as it returns a timespec?

analog berry
#

i added that meme

grand shadow
#

alright

#

I went ahead and also fixed another signal bug lol

#

when a syscall got interrupted the signal return rax and rdx got trashed

#

or rather

#

the signal rax and rdx

#

so the ucontext pointer was wrong because of it

#

but now its fixed

carmine swallow
#

meanwhile I took an another look at the hda stuff, I think the buffer size was too small as it seems to pretty much work when I make it bigger (though cancelling the write and then restarting doesn't really work very well)

grand shadow
#

oooo nice

#

I can take a look at the code later to see wrt the cancelling stuff

#

if its something astral related

#

alright, ucontext stuff pushed

carmine swallow
#

nice, Ill try it

#

is it restoring the context from the uctx?

grand shadow
#

No

#

I probably should do that

#

Ill eat dinner and then implement it, should be quick

carmine swallow
#

also the fpu state inside mcontext should be a ptr

#

I also took a look at the java code to see what exactly it wants from the signal stuff and it looks like it wants siginfo too nooo tbh I don't think its too bad as it basically only uses si_addr which is cr2 for sigsegv

#

or well idk if it even needs that, maybe just having the struct present as all zeros is enough

grand shadow
grand shadow
#

idk if it would go as far as do map stuff on a page fault

carmine swallow
#

it looks like it uses it for things like stack overflow detection, null exception and some other stuff like that

#

but yeah I don't think its necessary as managarm doesn't populate it either afaik

grand shadow
#

hmm yeah I can probably just memset it to 0

#

I already allocate it in the frame anyway

grand shadow
#

@carmine swallow done

#

now it takes the context and fpu stuff from the ucontext and also has a dummy siginfo memset to 0

carmine swallow
#

nice, though it looks to still be faulting. Ill take a look at it more tomorrow

grand shadow
#

damn, should try to find out what the rip of the fault is

carmine swallow
#

apparently sometimes it faults within sys_sigaction when memcpying the act pointer to a stack copy of it (with cr2 pointing to the stack) but its not consistent, sometimes it also says "vmm: no range"

grand shadow
#

Waaiit

#

Blegh what

#

Why is the stack not mapped

analog berry
#

memory not kernec meme

obsidian pivot
grand shadow
#

@carmine swallow what address does it use as the stack

#

By default I map it at the end of the user space for the main thread

carmine swallow
#

its def not that, Ill see what it is

grand shadow
#

Could be that its in another thread and that handling is borked

#

Maybe too small of a stac

#

?

carmine swallow
grand shadow
#

Why is it aborting so much

carmine swallow
#

idk, maybe I will try the jit version again if it would have less spam

grand shadow
#

I think it might be aborting on loop or something? Idk

#

The stack looks fine

#

Bad action

#

Wait

#

Write to a read only address possibly

#

I forgot what the flags mean

analog berry
#

try running java on obos

obsidian pivot
analog berry
#

sure meme

obsidian pivot
analog berry
#

indeed

carmine swallow
#

I wonder if it works enough to be able to run minecraft server meme

#

apparently not, it complains about corrupted jar file

grand shadow
#

Funky

#

Wonder why

carmine swallow
#

idk Ill have to add printfs

grand shadow
#

Nice work

carmine swallow
#

I think its caused by SEEK_END not taking offset into account

grand shadow
#

Oh shit

#

Youre right

carmine swallow
#

at least I got it to run until the eula part (though sometimes it hangs somewhere, idk why)

#

also it ran into some kind of memory meme again before getting this far, I just worked around it by making mmap always return rwx memory troll

analog berry
#

thats pretty cool

carmine swallow
#

yeah

grand shadow
#

Epic

carmine swallow
#

it looks like it worked after I added eula=true to the file manually before starting it for the first time pogchamp idk if I can connect to it tho, time to try ig

#

bruh it crashed the moment I said that lol

analog berry
#

whats going on with these logs

carmine swallow
#

I launched java with -verbose to diagnose the hangs

#

the spam about it using online processor count is always there though

analog berry
#

what is agh$... agh

carmine swallow
grand shadow
#

Souece agh

#

Its in pain

carmine swallow
carmine swallow
#

no

grand shadow
#

It might be stuck on name resolution or something

#

You need to run the dhcp stuff

#

For some reason the routing table doesnt return a failure in udp when theres no route

#

And so the resolution just hangs

carmine swallow
#

Ill try running that to see if it fixes the thing so I can try connecting to it

#

apparently it didn't ig I can still try disabling the online mode

grand shadow
#

Weird

carmine swallow
#

or maybe its just that one tick takes so much time that it decides to kill it, ig I can try disabling the max tick time

#

though I don't think that's actually about the tick time and rather that auth stuff

grand shadow
#

Probably yeah the backrrace is o auth stuff

carmine swallow
#

at least I managed to join it for like 5s before the server died KEKW disabling the online mode didn't help either

robust geyser
#

holy shit is that a minecraft server running on astral

carmine swallow
#

yes

robust geyser
#

that is so cool

#

any idea why it's dying?

carmine swallow
#

and I have no idea about the random hangs that sometimes occur when starting the server either

grand shadow
#

Could probably try to run with syscall logging on

#

Would be slow but bleh

#

Worth a try

#

Crazy that it even connects

carmine swallow
#

yeah, on managarm I didn't get it this far (though it might have been because of some bug that was fixed after that or alternatively my tcp server impl)

analog berry
#

Daaamn should I host my gtnh server on astral

grand shadow
analog berry
#

its fine i run it in a vm

obsidian pivot
#

I should daily drive astral

#

what could possibly go wrong?

grand shadow
obsidian pivot
#

I explode

analog berry
#

we should host the entire world infrastructure in obos

obsidian pivot
#

midair

carmine swallow
#

just make it automatically restart the os

analog berry
#

just call uacpi_reboot in the pf handler

obsidian pivot
#

fr

fierce forge
#

(broken firmware)

fierce forge
#

(I'm not laughing about obos)

grand shadow
#

Wonder what subsystem even causes the hangs

carmine swallow
#

it looks like its futex waits + clockget + nanosleep that its stuck doing

#

or well it just does those in a loop

grand shadow
#

Huh weird

#

Does any of these rrturn any weird codes

carmine swallow
#

I don't think

grand shadow
#

Blegh

#

Some thread might be getting stuck?

#

Can you give me a bit of the looping logs

carmine swallow
grand shadow
#

wonder if tghats in mlibc or in java

carmine swallow
#

well that's easy to check ig, I can just add a print in the java futex fn that does the astral futex syscall

grand shadow
#

true

#

try to save the logs into a file and see what other threads do and if any of them get stuck in a syscall

carmine swallow
#

the syscall log?

grand shadow
#

yeah

carmine swallow
#

that's going to be big lol

grand shadow
#

I've done it before its not that bad

obsidian pivot
#

does astral have anything special in it's pf handlers

#

other than stuff for CoW and file mapping

#

and crashing

obsidian pivot
#

like

#

what features does astral vmm have

grand shadow
#

Probably the bare minimum

#

Mapping, cow, lazy allocation, signaling on bad access, etc

#

File mapping

#

Its actually a pretty small function you can just read it yourself

obsidian pivot
#

we just love the 1k line file called vmm.c

carmine swallow
#

"only" 651280 lines

grand shadow
#

You can send me it and I can take a look in a bit :p

#

I am used to the trouvle

#

Trouble

carmine swallow
#

60k futex calls in there btw

grand shadow
#

Ty Ill take a look

carmine swallow
#

and I think its from mlibc as I didn't see any printf spam on the screen

grand shadow
#

syscall: pid 45 tid 60: ioctl: fd 38 request 35090 argument 000000001A9A5E50 (46019 cached pages, 978676 free pages)
syscall return: pid 45 tid 60: 18446744073709551615 ENOTTY (46019 cached pages, 978676 free pages)

#

last thing it seems to try to do

#

then it closes the socket and just

#

does nothing more

#

(tid 60)

#

and tid 61 keeps spinning

#

so I wonder if it was waiting for a response from tid 60

#

and I suppose the bit of activity at the end is the watchdog?

#

seems to be SIOCGIFCONF

#

@carmine swallow can you take a look if anything uses SIOCGIFCONF in openjdk

carmine swallow
grand shadow
#

weird

grand shadow
#

huh its meant to throw an exception but it doesnt

#

so something is getting locked up before that I assume

#

I also see these pthread_getattr_np(): Implementation is incomplete! but I dont think it should be an issue

#

wonder if its because of a missing sysinfo?

#

probably not too

#

I really need to make a tool to parse this stuff

#

yeah I need to make at least something like "find last syscall or return of every pid+thread pair"

grand shadow
#
1_2: syscall: pid 1 tid 2: openat: dirfd -100 path /tmp/.initcmd flags 0 mode 0 (373 cached pages, 1009020 free pages)
31_32: syscall: pid 31 tid 32: read: fd 3 buffer 00007FFFFFFFFE5F size 1 (370 cached pages, 1007549 free pages)
33_34: syscall: pid 33 tid 34: waitpid: pid -1 statusp 00007FFFFFFFF9EC options 10 (578 cached pages, 1007375 free pages)
41_42: syscall: pid 41 tid 42: waitpid: pid -1 statusp 00007FFFFFFFF9CC options 0 (590 cached pages, 1006052 free pages)
45_46: syscall: pid 45 tid 46: futex: futex 000000000047F9FC op 0 value 0 timespec 0000000000000000 (3091 cached pages, 1001598 free pages)
45_47: syscall: pid 45 tid 47: futex: futex 000000000067E818 op 0 value 2 timespec 0000000000000000 (46026 cached pages, 970627 free pages)
45_48: syscall: pid 45 tid 48: nanosleep: time 00000000186AB740 remaining 00000000186AB740 (46026 cached pages, 970666 free pages)
45_49: syscall: pid 45 tid 49: futex: futex 000000000067E288 op 0 value -2147483588 timespec 0000000000000000 (46026 cached pages, 970627 free pages)
45_50: syscall: pid 45 tid 50: futex: futex 00000000009FB538 op 0 value 2 timespec 0000000000000000 (3237 cached pages, 1001288 free pages)
45_51: syscall: pid 45 tid 51: futex: futex 000000000087FFB0 op 0 value -18446744071562067968 timespec 0000000000000000 (46025 cached pages, 978656 free pages)
45_52: syscall: pid 45 tid 52: futex: futex 000000000087FFCC op 0 value 111 timespec 0000000000000000 (46026 cached pages, 970666 free pages)
45_53: syscall: pid 45 tid 53: futex: futex 000000000067F198 op 0 value 1 timespec 00000000193FFB40 (46026 cached pages, 970666 free pages)
45_54: syscall: pid 45 tid 54: futex: futex 000000000087FFCC op 0 value 111 timespec 0000000000000000 (46026 cached pages, 970666 free pages)
45_55: syscall: pid 45 tid 55: futex: futex 000000000087FFCC op 0 value 111 timespec 0000000000000000 (46026 cached pages, 970666 free pages)
45_56: syscall: pid 45 tid 56: futex: futex 000000000067F518 op 0 value 1 timespec 00000000196FF8D0 (46026 cached pages, 970666 free pages)
45_57: syscall: pid 45 tid 57: futex: futex 000000000067F098 op 0 value 1 timespec 0000000000000000 (46026 cached pages, 970666 free pages)
45_58: syscall: pid 45 tid 58: futex: futex 000000000067D998 op 0 value 1 timespec 0000000019B857F0 (46026 cached pages, 970666 free pages)
45_59: syscall: pid 45 tid 59: futex: futex 000000000087FFCC op 0 value 111 timespec 0000000000000000 (46026 cached pages, 970666 free pages)
45_60: syscall: pid 45 tid 60: futex: futex 000000000067E698 op 0 value 207 timespec 0000000000000000 (46026 cached pages, 970627 free pages)
45_61: syscall return: pid 45 tid 61: 0 OK (46026 cached pages, 970705 free pages)
45_253: syscall: pid 45 tid 253: futex: futex 000000000087FFCC op 0 value 111 timespec 0000000000000000 (46026 cached pages, 970626 free pages)
45_254: syscall: pid 45 tid 254: futex: futex 000000000087FFCC op 0 value 111 timespec 0000000000000000 (46026 cached pages, 970627 free pages)
#

quick and dirty python script never fails

#

seems like tid 48 is sleeping idfk for how long

#

idk what 48 is

#

61 is doing something?

#

its not in a syscall

#

the rest are all on futex_wait

#

I'll take a look in a bit if that tid 48 sleep is recent

#

ok yeah that nanosleep is recent

#

makes me wonder if theyre waiting on a thread which exited?

#

there are so many to look through tho ugh

#

there are some threads that seem to do literally nothing which wtf

#

bleh idk

#

wonder if its something related to pthread_getattr_np not having a proper implementation?

carmine swallow
#

I kinda doubt that as I didn't run into this kind of stuff on managarm

grand shadow
#

hmmm

#

yeah I have nooo idea

#

there are too many threads and moving variables for me to have any idea wtf is going on

#

this spawns over 200 threads

#

@carmine swallow what are all the cases it hangs/crashes?

#

like this one is before the world loading

carmine swallow
#

the other one was also sometime close to this one, idr at which point exactly

#

and the crash was just sometime after the server is fully started

#

and the mmap stuff is a separate issue on its own, I just worked around it by making it always return rwx memory

grand shadow
#

what exactly was the mmap stuff doing?

carmine swallow
#

I am not completely sure, it creates errors like this

grand shadow
#

its trying to write to a page which doesnt exist?

#

wtf

#

returning it as wrx should have no effect on that

#

so weird

grand shadow
carmine swallow
#

and its the same cr2 + error

#

I think this is also the same thing that javac runs into as it works just fine when mmuflags is changed to always be rwx

grand shadow
#

wtf maybe obos curse has hit me

#
syscall: pid 41 tid 43: mmap: hint 0000000100000000 length 65536 prot 3 flags 50 fd -1 offset 0 (4078 cached pages, 999361 free pages)
syscall return: pid 41 tid 43: 4294967296 OK (4078 cached pages, 999361 free pages)
#

it allocates 64k there

carmine swallow
#

I wonder how does changing the mmu flags fix it tho

grand shadow
#

maybe its like some defrag stuff I do

#

if two ranges are right next to each other and compatible they get merged into one to save memory and processing speed

#

here

#

I've had bugs here before and I dont doubt there might still be 💀

carmine swallow
#

shouldn't range->next->prev also be updated inside the if that's inside the while loop?

#

else its still going to point to range which isn't correct when newrange is between it and range

#

I think that was it, it doesn't crash there anymore

grand shadow
#

shit youre right

#

where does it crash now?

carmine swallow
#

well it doesn't really crash anywhere, there are the hangs and possibly the watchdog thing

grand shadow
#

well at least thats one more bug fixed

#

javac works now I assume?

carmine swallow
#

yes

#

you can compile and run a java hello world

grand shadow
#

EPIC

#

gj qwinci

carmine swallow
#

I also found one futex-related bug, vmm_getphysical always returns page aligned addresses (it does try to add the offset within the page but it aligns the address before that so it ends up doing nothing)

#

didn't fix the hang tho

grand shadow
#

damn nice catch

#

I think I had just put that align there cuz I forgot to align it back but then forgot I undid it at the start 💀

#

I dont think this sentence was understandable

#

I need more hours of sleep

analog berry
#

no it makes sense actually

obsidian pivot
carmine swallow
#

if you get lucky you can run it for like 5s (also breaking blocks don't drop anything in that time)

#

after that its going to get killed by the watchdog

grand shadow
#

I wonder if those openjdk fixes would make qemu work properly

#

right now it hangs while loading from limine

obsidian pivot
#

damn

#

astral is 🆒

carmine swallow
grand shadow
#

I can wait until we can figure out the futex stuff

carmine swallow
#

oh also I forgot to mention, it wanted F_SETLK64/F_SETLKW64, I didn't implement those properly yet

obsidian pivot
grand shadow
#

astral is cool indeed

carmine swallow
#

apparently they lock segments within open files

#

ig its like flock but for specific range of bytes

grand shadow
#

I dont think this would have a big impact

carmine swallow
#

yeah likely not

obsidian pivot
#

@grand shadow I found a possible way you could optimize your sys_tcb_set function
Instead of always syscalling, use the wrfsbase instruction, if it exists, which does the same as your archctl syscall, but without a syscall.

#

Note that it needs to be enabled explictly

grand shadow
#

That sounds like a non issue

obsidian pivot
#

yes

#

it's a microoptimization

grand shadow
#

If you set the tcb that much you deserve whats coming for you.

obsidian pivot
#

fair

prime juniper
carmine swallow
prime juniper
#

Interesting

grand shadow
#

My new mutex has been laid out on paper, now I just have to make it realoty

analog berry
#

lol

#

can you post a photo of said paper

grand shadow
#

No you would not understand my handwriting and it was my company name on it

supple hatch
#

MUHAHAH PERRY THE PLATYPUS PREPARE TO SEE MY LATEST INVENTION

#

THE ASTRAL INATOR

supple hatch
#

IT WILL WIPE EVERY DISK DRIVE ON THE ENTIRE TRI STATE AREA AND INSTALL ASTRAL ON IT!

analog berry
supple hatch
grand shadow
grand shadow
#

Oh my GOD I left it at my desk at work

prime juniper
grand shadow
prime juniper
#

That’s what you get for being a selfish prick and not sharing meme

fierce forge
grand shadow
#

yes I hold the key to a femtosecond lock, the fastest lock ever invented by humankind. the discovery of this lock will allow us to travel the stars

supple hatch
fierce forge
#

MIT - Midway Incorporating To pmos

grand shadow
#

well since I had already finished how I was gonna do it I'm just doing it from memory lol

grand shadow
#

its using my new locks and it made absolutely n ochange to anything

gritty shore
#

What does the contention look like?

grand shadow
#

there wasnt even contention it was just one thread running

prime mulch
#

oh youre doing pushlocks

fervent fjord
#

yooo welcome back will

prime mulch
#

hello streaks

fervent fjord
#

long time no see, how is life

prime mulch
#

i got FAT! i got OBESE!

#

not really

#

im chilling

fervent fjord
#

I did get fat

#

lol

#

nice to hear you are chilling

prime mulch
fervent fjord
#

true that

#

more eugh eugh

grand shadow
prime mulch
#

hello MATHEW

grand shadow
#

Hru

prime mulch
#

im gooood

#

u should do priority inheritance in ur locks

grand shadow
#

Yeah it sounds like something thatd be good, especially when I do ule

prime mulch
#

ule has a fun extra wrinkle which is interactivity inheritance

robust geyser
#

how does that work, do you have to specify a priority of a lock when locking it?

#

or like even when declaring it

#

do you just assert(new_priority >= last_priority)

prime mulch
#

its where if you have two threads A and B where the priority of thread A > priority of thread B

robust geyser
#

ohhhh

prime mulch
#

and thread B owns a lock, and thread A blocks on the lock

#

it raises B to its priority temporarily

robust geyser
#

damn that's cool

#

i assume that's to allow thread B to finish quicker and release the lock?

prime mulch
#

its to prevent priority inversion

robust geyser
#

or, well, hopefully let it finish whatever it's doing quicker

#

ok yeah that stuff goes way over my head

prime mulch
#

i mean its basically just where an interfering thread(s) with a priority inbetween A and B never blocks to allow B to run and so A waits for lower priority activity

#

which is not ideal

#

this prevents that by allowing B to immediately run and preempt all those other guys

robust geyser
#

ah okay that makes sense

#

yeah i understand the concept of thread priorities, i just didn't understand the reason behind bumping B's priority

#

but that is smart i like it

prime mulch
#

for priority inheritance to be a "complete" solution it has to be transitive tho

#

like

#

you can still get priority inversion if you have a chain of threads waiting for locks

#

and you only boost the first thread in the chain (the immediate owner of the lock youre blocking on)

#

and not further threads down the chain

#

ie, threads that own locks that are being blocked on by threads that own locks that are being blocked on by etc etc

#

u have to boost them all

#

before u block

#

and there are other kinds of inter-thread dependencies other than just locks and they all have the potential for priority inversion

#

so its a complicated problm

robust geyser
#

yay more stuff i have no damn clue about, fun

#

unfortunately i do not have a phd in schedulers

fervent fjord
#

priority inversion is when you have 2 threads, one is just a low priority daemon, and the other is a high priority watchdog that, if it doesnt run in X time, will panic the system, and the low priority daemon takes the longest lock ever when the watchdog guy needs it

robust geyser
#

yeah i get that, but i don't really understand the dependencies of dependencies things

#

it just sounds like a really complex problem lol

prime mulch
#

priority inheritance doesnt work there the only good solution is to somehow break up or remove that dependency

fervent fjord
#

priority inheritance can band-aid it

#

ideally you do several things

prime mulch
#

well if theres just two threads and the higher priority one blocked then affecting the priority of the other one is ineffectual

#

itll run anyway

#

the real problem is the length of the critical section

#

in ur scenario

fervent fjord
#

changing the priority of the low priority task or changing the length of the section is the same, both things lead to lower execution time, its just that in one you make it so the blocking task gets to run more, and thus take less in the grand scheme of things, while in the other you make the actual code take less

#

you can also do things like rando boost that windows loves as another solution

#

at least used to love, idk if they do it anymore

prime mulch
#

windows has full priority inheritance now since the late '00s apparently

#

they might still do random boosting to catch some of the more complex nearly unsolvable "other" inter-thread dependencies i mentioned

#

especially with stuff like memory manager page-in and whatever where the first faulting thread "owns" the page IO and subsequent threads have to wait for it to complete that and this can chain as well and whatever

fervent fjord
#

it sounds dumb and cool I hope they do

prime mulch
#

VMS did priority ceiling where when a thread holds a kernel mutex it is raised to the highest priority

prime mulch
#

this makes priority inversion impossible but is more costly bc you have to do a priority raise/lower every time you acquire your first kernel mutex or leave your last one

#

not to mention its not very fine grained

#

the windows kernel was originally spec'd to do this as well and i confirmed this behavior exists in some of the earliest builds but by release in 1993 theyd switched to random boosting and discarded this approach

#

prob bc it sucks for a gui-oriented OS

fervent fjord
#

it sounds a bit bad for responsiveness yeah

prime mulch
#

u use VMS over a command line where nobody notices anyway so they still do that afaik

#

wow it took me like 1 hour to bring up VMS or NT

#

new record

fervent fjord
#

shouldve made your first word when you joined VMS

#

for the memes

#

anyways nice to have you back, interesting talk

prime mulch
#

thx glad to be back

obsidian pivot
grand shadow
supple hatch
#

check out my thread

#

#1230349543623757845

#

daily nyaux shilling complete

grand shadow
#

alright so now before I redo the irq system I decided I will go around and make the souce code a bit better to read as to not drive other people away from it lmao

#

@robust geyser other than the fucked up naming convention what other parts did you think was bad

prime mulch
#

which is some complicated shit i dont understand

robust geyser
#

i usually like clang format but

#

if not then i tend to try and follow the style

#

but yeah a clang format is usually nice because i dont have to think :^)

grand shadow
#

hmmm I will look into it

grand shadow
prime mulch
#

i switched to turnstiles bc autoboost seemed wacky

orchid fog
#

Effectively is priority inheritance according to https://learn.microsoft.com/en-us/windows/win32/procthread/priority-inversion

analog berry
#

@grand shadow so is the warning still there?

#

even with this patch

grand shadow
#

ok so

#

I found a way that removes the warning

analog berry
#

what is it

grand shadow
#

adding #include <uacpi/platform/libc.h> to kernel_api.h

analog berry
#

huh

grand shadow
#

idfk

analog berry
#

im confused

grand shadow
#

but the zeroed define comes from libc.h

#

and the kernel_api uses it

analog berry
#

wait why would it come from libc

grand shadow
#

where am I supposed to define it

analog berry
#

in your makefile...

grand shadow
#

BRUHJHHHHHHHHHHHHHHHHHHHHHHH

#

kms

analog berry
#

-DUACPI_NATIVE_ALLOC_ZEROED

#

bruh

#

of course its not propagated everywhere

#

not every c files includes libc.h

grand shadow
#

I may be stupid

#

just might be

#

just a maybe

#

perhaps even

analog berry
#

lmaooo

#

at least u got free contrib points

obsidian pivot
#

@grand shadow ur thing might be broke

#

on latest astral

grand shadow
#

you have to do make clean because I updated all of jinx

obsidian pivot
#

fuck

grand shadow
#

do you really just not want an iso

obsidian pivot
#

can you send me that minimal astral

#

iso

#

I can't be bothered to build gcc again

#

(x2)

#

for astral

analog berry
#

Inb4 astral ps2 driver bricks your laptop trl

obsidian pivot
#

still borked

#

with teh astral iso I have

#

from a long time ago

#

yeah the self tests failed

#

for both ports

analog berry
#

Bruh 💀

grand shadow
#

cant really debug when the only computers I have for debugging it works

obsidian pivot
#

yeye

dim arrow
grand shadow
#

I mean if you want

#

dont expect it to work

obsidian pivot
#

good news and bad news

#

good news: self test did not fail

#

bad news: still no input

analog berry
#

Its probably a race

grand shadow
#

it works on my laptop which has a real controller, it works on my desktop both on real controller and on emulation

#

its just a curse from the heavens

obsidian pivot
#

btw the ops/s is 400k/s

#

for uacpi

grand shadow
dim arrow
#

my usb is so slow, so it is taking a while to copy

obsidian pivot
#

3849 ops

dim arrow
#

I haven't turned my laptop on in 5 weeks, so I hope it has some charge

#

and it is dead

#

it can't mount the root with the default boot selection

#

which makes sense

#

I'll try the initrd option instead

#

it works

#

typing works fine

grand shadow
#

WHAT

dim arrow
#

so maybe oberrow's laptop is cursed...

#

222k ops/s btw

#

my laptop is very slow though

#

only 1.10GHz

obsidian pivot
#

a blessing from the heavens!

#

glory be to god

dim arrow
dim arrow
#

caps lock doesn't work at all actually

#

shift does

grand shadow
#

yeah caps lock is unimplemented on the terminal

#

tho on xorg it works fine

#

(except the lights)

dim arrow
#

pressing the power button did shutdown my laptop after waiting a couple of seconds for init to kill the tasks

grand shadow
#

it only takes that long because bash is an annoying lil bitch who doesnt die on a SIGTERM

#

it sets up a custom action to do idk what

dim arrow
#

I'd already exited out of bash

grand shadow
#

interesting

grand shadow
#

today I'll probably just unshit the style of the x86-64 code

#

I really dont feel like going 200 files but my action have consequences or something

fervent fjord
#

just update the style as you modify the files

#

no need to be insane

grand shadow
#

true

supple hatch
#

mathew

#

u awake

grand shadow
supple hatch
#

or a pc idrc

grand shadow
#

Not rn

supple hatch
#

fair

supple hatch
#

no astral progress in

#

2 days

#

😡

#

get BACK to work /j

grand shadow
#

Soon

#

Also what the fuck is that gif

supple hatch
#

💀

#

i searched

#

get back to work in tenor

fierce forge
#

Where do you find these gifs? sus

grand shadow
#

That looks like youtube kids slop

supple hatch
#

this came up

supple hatch
craggy tide
#

literally dead project

hearty fulcrum
#

dead os xd

fierce forge
fierce forge
#

dead os xd
I petition to remove Astral from the uACPI leaderboard trl

grand shadow
#

why does lto not like this assert __assert(page->refcount == 0);

#

bruh

fierce forge
#

SMP?

grand shadow
#

this happens in very early init

fierce forge
#

My kernel doesn't even enter main? lol

grand shadow
#

wha

#

wrong thread?

analog berry
prime juniper
#

Brb setting fallback commits to bootstrap-Managarm for something simple each year meme

analog berry
#

Lmao

#

I'm sure Managarm will remain active lol

prime juniper
#

Yeah lol

#

I would be sad if it died out. Especially if with it all its subprojects died too. Losing mlibc would be a big loss

obsidian pivot
#

if anything if we lost mlibc someone would fork it and continue maintaining it

#

and maybe add a backdoor or two

prime juniper
#

XZ moment

fierce forge
obsidian pivot
#

skill issue meme

#

you're welcome

grand shadow
#

bruh ubsan is silent about whatever is happening in the pmm

#

useless piece of

analog berry
#

Ubsan only catches most blatant ub

grand shadow
#

well at least I have ubsan now after like almost 2 years

#

(I stole most of it from @elfin turtle meme) ((I gave proper attribution))

#

and it caught some stuff so

fierce forge
elfin turtle
#

lmao

hearty fulcrum
#

Astral disappeared from the active threads list nooo

grand shadow
#

dead os xd

crude agate
#

need to save astral in active threads

prime juniper
#

sets timeout to 1 hour…

lean kettle
#

sets timeout to 1 week...

grand shadow
#

I think Im just gonna do devices next. I really wanna do device stuff

#

Like a proper driver subsystem

prime juniper
lean kettle
obsidian pivot
#

I was looking into why I had so little storage on my PC left

#

and it turns out

#

astral takes 16G

#

(this is a minimal build)

prime juniper
#

cries in Managarm source tree

tulip zinc
#

is this dead

obsidian pivot
#

no

#

kinda /j

#

main dev got addicted to factorio

#

cc @grand shadow

tulip zinc
grand shadow
wild marsh
#

cogmind moment

grand shadow
#

truly

grand shadow
#

Worth procrastinating, this was a super good run. Usually I do stealth but I tried a treaded combat run and it was very fun and got like 47k points

#

Died due to alert spiral right next to the fkin exit 💔

prime juniper
#

Start again

crude agate
#

.

grand shadow
#

dead project

#

(I've just slowly been thinking of how I'm gonna approach the whole device driver stuff)

#

with hotplug and modules and etc

weary scaffold
unreal merlin
#

hi @grand shadow! I made a small PR for Astral to use the IA32_APIC_BASE MSR to get the LAPIC address instead of grabbing it from MADT, if you can have a look

proper meteor
obsidian pivot
#

the MADT's LAPIC address can be bogus

#

sometimes

#

although idk of any cases where it has been

#

but always remember the golden rule of dealing with anything osdev: firmware devs are braindead

proper meteor
#

lmao

unreal merlin
analog berry
tribal dust
#

yea the MSR can be updated to move the LAPIC address

grand shadow
grand shadow
#

@unreal merlin merged ty

analog berry
#

A day with a new astral commit is a good day

grand shadow
#

@carmine swallow is the openjdk work in any fork?

carmine swallow
#

I don't think but I can push it rq

grand shadow
#

Would be cool if you could make a pr

unreal merlin
carmine swallow
grand shadow
#

Merged tyyyy

#

I asked for it both cuz I wanna see if I can get openjdk to fully work and if some of these bugfixes fix qemu

carmine swallow
#

here is also an archive of the files that I put to distro-files for the mc server (mostly just eula.txt, server.properties with online mode disabled though I don't think that really helped with anything and a script that I used to start it) , you also need -netdev user,id=net0,hostfwd=tcp::25565-:25565 in Makefile QEMUFLAGS (the hostfwd part is the only change)

unreal merlin
#

are you trying to run minecraft on Astral?

carmine swallow
#

the server already kinda works (though iirc sometimes it hangs while loading waiting on some futex) but if it loads then you can get to the world on a client on your host system for a couple seconds before the server dies because of some auth related watchdog timeout

grand shadow
#

Though with openjdk working I wouldnt doubt mc works

grand shadow
unreal merlin
#

nice

#

how long did it take to port openjdk?

carmine swallow
#

originally I ported it to managarm and at that point it took somewhat longer because there were some mlibc bugs iirc

supple hatch
#

its been

#

2 days

#

😡

lean kettle
#

Astral is dead death

crude agate
#

nooo

#

If the astral is dead, who will stop nyaux ?

prime juniper
#

Managarm of course! We’ll send the assertOS to him and then he is doomed to get a PhD first meme

analog berry
crude agate
crude agate
obsidian pivot
crude agate
fierce forge
#

who pagefaults the last

supple hatch
supple hatch
fleet osprey
#

Astral thread is archived, it's so over death

grand shadow
#

Ive had cogs on my mind lately

#

My plans for when I go back into working on this is finally unfuck my device driver handling which is something I have wanted to do for a while

fleet osprey
#

maybe Astral will finally have working PS2 support from that meme

grand shadow
#

Nah thatd go against the laws of nature

obsidian pivot
supple hatch
#

3 days no progress 😡

grand shadow
#

FACT: 90% of osdevs quit right before replacing windows

robust geyser
#

mintia on x86 more progress than astral

#

tragic

#

(pls come back i miss astral)

analog berry
#

ikr i miss astral progress

#

and i wanted to use it for the future project

#

but its dead now sad

bronze nexus
analog berry
#

PoC 3d acceleration on an igpu

bronze nexus
#

Damn, Astral must be quite far along then

analog berry
#

it has a mesa port so yeah

grand shadow
#

I still have plans

analog berry
prime juniper
analog berry
#

this is more of a fun poc to see what i can achieve

#

if i make a proper library similar to udrm then ofc

prime juniper
analog berry
#

lol

analog berry
#

@grand shadow i have downstream stuff to make astral work with uacpi 1.0

#

i can update if u want

grand shadow
#

Sure go ahead

grand shadow
#

I was planning on doing some more work this weekend but I ended up doing something completely unimaginable

#

I touched grass

#

Crazy I know

fierce forge
analog berry
#

Nothing, I just dont want to touch them personally

proper meteor
hearty fulcrum
#

teach me this power

obsidian pivot
#

what's this grass thing your mouth speaks of!

#

kill the witch!

obsidian pivot
#

when astral

#

@grand shadow

grand shadow
#

soon + a few business days

obsidian pivot
sacred gyro
#

At least it’s not soon + a few business years

analog berry
#

a few business centuries

hearty fulcrum
#

too soon

obsidian pivot
#

when will mathewnd port debian to astral

#

debian mlibc/astral