#Astral
1 messages · Page 17 of 1
I think I know what's going on with my timers
@analog berry https://github.com/nyx-os/gaia/blob/master/src/dev/acpi/acpi.cpp#L38 how much time would it take to convert lai to uacpi

I'm not pinning the measuring thread to a particular CPU
eh next kernel I will port it
Oh god
what
I thought you were asking me to convert lol
no
LAI 🤮
I wouldnt do that
If you know what you're doing probably a few hours
No it's still off
Can someone look at my timer code? 
It's off by x10 almost precisely
Reading the init code, it is impossible for that code to fault provided valid input
Before the log statement
Maybe instead of reading it add a halt and a basic print?
Or just a halt for that matter
I'm stupid
what
this iso hangs
first thing
Arch_KernelEntryBootstrap:
jmp $
; blah
dude writes a microkernel
"I'm stupid"
you are not
Pls hang I dont want to debug hyper
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
I've been setting pit to 10ms and doing calculations assuming it's 1ms
as the line right after .ok: is push rdi
after that, it's a page fault because the kernel was mapped incorrectly
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
uacpi benchmark paying off
is this your final submission 
nah my computer sucks balls and theres probably a thing or two that can be made better
dont add for now then?
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 
lol
Nice
here is it if anyone wants to try
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
Wtf goated
wtf
maybe 2.4M is ok as a first submission: 
@carmine swallow what is your cpu to you have a nasa computer
i5 13600k lol
ha LLLLL I beat that on the 7800X3D
(barely tho)
damnn
timer for sure is not the problem, im unsure why its inconsisent but hey
its not 150 ops per second
💀
@analog berry I think my submission will be qwinci's 2411598/sec on his i5 13600k
alright
cool!
I cant outphd managarm
my submission will be mints
one day
ask nasa to lend you a pc for a bit :p
lol
lemme add a comment
to the pr
yeah take your time i'll wait for everyone to get the best result they can
yea done
@analog berry it is done
nice!
i am still not sure how this is possible
that my CPU is slower than a 13600k
Magic
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)
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
I have an arctic liquid freezer 2-fan 280mm aio water cooler
even with it without the undervolt it gets to like 100deg with unlimited power limit
undervolted to like 1.2v or whatever its 80c under max load
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 
give me the same ISO and same qemu flags
@craggy tide
qemu-system-x86_64 -cdrom astral.iso -M q35 -enable-kvm -cpu host,migratable=off
that's basically exactly the same as what I get
yeah that's about expected i guess
Ilobilix #2 !!!!!!!!!!
Congrats
Very nice
@analog berry in what situation would a mutex with a timeout be called

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
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"
Simply install Coreboot, it's free 
its not used that much in the real world so thats fair
there would actually be coreboot for the mobo that I have, I have been wanting to try it but haven't yet bothered
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
Same
yeah me too for 2 weeks (though not from uni but from the civil service server management job that I am doing)
Why do I want to torture myself with porting something like XFCE to Astral…
Why is this an urge I have
Send help
xfce is pretty easy to port iirc
probably just a matter of building it
and it isn't even that big
Trying to port something as massive as GNOME or KDE sounds like pure suffering
gnome is pure pain
because of gobject-introspection
kde is manageable but it does have some linux specific apis it needs i think
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
)
I seem to remember that being a pain for me while doing LFS
sounds like a mild skill issue tbf 
Yeah probably
managarm did have some work done towards kde6
and gnome too
managed to run mutter (or gnome shell??)
but it crashed
Yeah, Mutter is the window manager for GNOME last I checked
yeah i think that crashed
it showed like a big message
that something crashed
on screen
But I might look into XFCE porting when I get home
best of luck 🙏
(I’d need to build an image probably, and then figure out what to do from there)
if you need recipes for xfce stuff: https://github.com/48cf/jinix/tree/trunk/recipes
a bit outdated but they should work
just keep in mind they are for linux
nah that's for gnome
Ah
thankfully it's not needed for xfce
i should really look into making gobject-introspection more cross-compilable for everyone
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
there is audio via HDA
@carmine swallow was working on that so maybe he knows
yes they are just the skeletons with basically no functionality, I had a more proper impl for it in a branch (that isn't merged) and I wanted to make it use uhda instead but haven't figured out a weird noise issue with it that happens specifically on astral
for reference if you want to look, https://github.com/Qwinci/Astral/blob/rewrite/kernel-src/io/audio/hda.c and https://github.com/Qwinci/Astral/blob/uhda/kernel-src/io/audio/hda.c
after you have pci
yess soonn
TIL that uHDA exists
I should get back to it now that I have more time for a while again
yes Marvin is working on it
lol
if it would be usable thats another story
which I will be trying to improve
its spreading
It’s really not. You’re gonna want ConsoleKit (deprecated) or logins (systemd or derived). Or perhaps some BSD meme which surely isn’t much better
manageable in comparison to gnome*
which is why between gnome or kde I will probably do a secret, third thing in the future
(CDE port
Both need systemd (or logind split off) anyway. So meh. We almost have goi solved (FUCKING GRAPHENE SEGFAULT DURING LINKING)
no new Astral progress in 2 days 
flash urself some maidens

talk is cheap, send patches
Ive slowly been studying something which I want to implement soon for speeeeeeeeeed
(it wont actually make that much of a difference)
and what would that be?
the funni lock
tyr-glquake and tyr-quake are both perfectly playable on qemu now
big win
Broke: kmscon
Woke: xterm on fullscreen
lol I think the doc issue with the make install on gcc is due to me missing fucking perl
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
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
where did this come from btw what are you cooking
openjdk
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
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)

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)
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?
DownloadMoreRAM.com - CloudRAM 2.0
Yeah
Wtf
Cna you do a readelf of the PHs of the elf
inb4 1TB p_memsz
but why would you do anything with that as its not PT_LOAD?
ig Ill try to add prints to figure out where exactly it comes from
Why is it trying to load at 0
its a pie
I dont do relocations in the kernel
you don't need to either, they are done by the ld
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
I urgently need to port mlibc to pmOS
I can see if I add support for them if you want @carmine swallow
I wont be home for a few hours
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
Ahhh nice
at least it now starts 
Based
the kernec gets me every time 
it might be, Ill try with the slow non-jit one if it makes any difference
Its a feature now lmao
apparently not
so yeah ig it needs ucontext regardless
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
yeah
and to restore just convert it back
wine also wants that, maybe it would work after that too
it'd still be missing siginfo I think
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
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
you can do it if you want
lol
in the meantime you can probably add a CTX_PRINT in mmu.c to see where it segfaults
or was it PRINT_CTX
bleh
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
gets the number of the cpu that the thread is currently executing on
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)
a little trolling
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())
wouldn't plain timekeeper_timefromboot() be fine too as it returns a timespec?
i added that 
oh wait yeah
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
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)
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
No
I probably should do that
Ill eat dinner and then implement it, should be quick
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
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
wait what
maybe it only uses it for like printing an error or something?
idk if it would go as far as do map stuff on a page fault
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
hmm yeah I can probably just memset it to 0
I already allocate it in the frame anyway
@carmine swallow done
now it takes the context and fpu stuff from the ucontext and also has a dummy siginfo memset to 0
nice, though it looks to still be faulting. Ill take a look at it more tomorrow
damn, should try to find out what the rip of the fault is
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"
memory not kernec 
obos curse has finally caught up to you, I see
@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
its def not that, Ill see what it is
Could be that its in another thread and that handling is borked
Maybe too small of a stac
?
Why is it aborting so much
idk, maybe I will try the jit version again if it would have less spam
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
well astral does a lot more soo
try running java on obos
give me a couple months
sure 
technically, I have more LoC so that OBVIOUSLY means I do a lot more
indeed
on the jit version at least java somewhat works, javac dies tho
I wonder if it works enough to be able to run minecraft server 
apparently not, it complains about corrupted jar file
idk Ill have to add printfs
Nice work
I think its caused by SEEK_END not taking offset into account
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 
thats pretty cool
yeah
Based
Epic
it looks like it worked after I added eula=true to the file manually before starting it for the first time
idk if I can connect to it tho, time to try ig
bruh it crashed the moment I said that lol
whats going on with these logs
I launched java with -verbose to diagnose the hangs
the spam about it using online processor count is always there though
what is agh$... agh
watchdog 💀 I think this is related to the auth stuff, maybe disabling online mode would make this not happen
obfuscated class/method names
Did you run netd vionet0 before
no
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
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
Weird
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
Probably yeah the backrrace is o auth stuff
at least I managed to join it for like 5s before the server died
disabling the online mode didn't help either
holy shit is that a minecraft server running on astral
yes
other than its because of some kind of watchdog no
and I have no idea about the random hangs that sometimes occur when starting the server either
Could probably try to run with syscall logging on
Would be slow but bleh
Worth a try
Crazy that it even connects
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)
Daaamn should I host my gtnh server on astral
Probably would explode your computer
its fine i run it in a vm
The vm would explode
I explode
we should host the entire world infrastructure in obos
imagine being a pilot flying a plane, then you suddenly page fault
midair
just make it automatically restart the os
just call uacpi_reboot in the pf handler
fr
(I'm not laughing about obos)
Wonder what subsystem even causes the hangs
it looks like its futex waits + clockget + nanosleep that its stuck doing
or well it just does those in a loop
I don't think
Blegh
Some thread might be getting stuck?
Can you give me a bit of the looping logs
wonder if tghats in mlibc or in java
well that's easy to check ig, I can just add a print in the java futex fn that does the astral futex syscall
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
the syscall log?
yeah
that's going to be big lol
I've done it before its not that bad
does astral have anything special in it's pf handlers
other than stuff for CoW and file mapping
and crashing
Wdym
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
ye I did
we just love the 1k line file called vmm.c
64mb of syscall logs 💀 how do I identity anything important from that
"only" 651280 lines
You can send me it and I can take a look in a bit :p
I am used to the trouvle
Trouble
Ty Ill take a look
and I think its from mlibc as I didn't see any printf spam on the screen
[0m[92msyscall: pid 45 tid 60: ioctl: fd 38 request 35090 argument 000000001A9A5E50 (46019 cached pages, 978676 free pages)
[0m[94msyscall 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
idk about that, this log was it getting stuck before even getting to the world loading
weird
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"
1_2: [0m[92msyscall: pid 1 tid 2: openat: dirfd -100 path /tmp/.initcmd flags 0 mode 0 (373 cached pages, 1009020 free pages)
31_32: [0m[92msyscall: pid 31 tid 32: read: fd 3 buffer 00007FFFFFFFFE5F size 1 (370 cached pages, 1007549 free pages)
33_34: [0m[92msyscall: pid 33 tid 34: waitpid: pid -1 statusp 00007FFFFFFFF9EC options 10 (578 cached pages, 1007375 free pages)
41_42: [0m[92msyscall: pid 41 tid 42: waitpid: pid -1 statusp 00007FFFFFFFF9CC options 0 (590 cached pages, 1006052 free pages)
45_46: [0m[92msyscall: pid 45 tid 46: futex: futex 000000000047F9FC op 0 value 0 timespec 0000000000000000 (3091 cached pages, 1001598 free pages)
45_47: [0m[92msyscall: pid 45 tid 47: futex: futex 000000000067E818 op 0 value 2 timespec 0000000000000000 (46026 cached pages, 970627 free pages)
45_48: [0m[92msyscall: pid 45 tid 48: nanosleep: time 00000000186AB740 remaining 00000000186AB740 (46026 cached pages, 970666 free pages)
45_49: [0m[92msyscall: pid 45 tid 49: futex: futex 000000000067E288 op 0 value -2147483588 timespec 0000000000000000 (46026 cached pages, 970627 free pages)
45_50: [0m[92msyscall: pid 45 tid 50: futex: futex 00000000009FB538 op 0 value 2 timespec 0000000000000000 (3237 cached pages, 1001288 free pages)
45_51: [0m[92msyscall: pid 45 tid 51: futex: futex 000000000087FFB0 op 0 value -18446744071562067968 timespec 0000000000000000 (46025 cached pages, 978656 free pages)
45_52: [0m[92msyscall: pid 45 tid 52: futex: futex 000000000087FFCC op 0 value 111 timespec 0000000000000000 (46026 cached pages, 970666 free pages)
45_53: [0m[92msyscall: pid 45 tid 53: futex: futex 000000000067F198 op 0 value 1 timespec 00000000193FFB40 (46026 cached pages, 970666 free pages)
45_54: [0m[92msyscall: pid 45 tid 54: futex: futex 000000000087FFCC op 0 value 111 timespec 0000000000000000 (46026 cached pages, 970666 free pages)
45_55: [0m[92msyscall: pid 45 tid 55: futex: futex 000000000087FFCC op 0 value 111 timespec 0000000000000000 (46026 cached pages, 970666 free pages)
45_56: [0m[92msyscall: pid 45 tid 56: futex: futex 000000000067F518 op 0 value 1 timespec 00000000196FF8D0 (46026 cached pages, 970666 free pages)
45_57: [0m[92msyscall: pid 45 tid 57: futex: futex 000000000067F098 op 0 value 1 timespec 0000000000000000 (46026 cached pages, 970666 free pages)
45_58: [0m[92msyscall: pid 45 tid 58: futex: futex 000000000067D998 op 0 value 1 timespec 0000000019B857F0 (46026 cached pages, 970666 free pages)
45_59: [0m[92msyscall: pid 45 tid 59: futex: futex 000000000087FFCC op 0 value 111 timespec 0000000000000000 (46026 cached pages, 970666 free pages)
45_60: [0m[92msyscall: pid 45 tid 60: futex: futex 000000000067E698 op 0 value 207 timespec 0000000000000000 (46026 cached pages, 970627 free pages)
45_61: [0m[94msyscall return: pid 45 tid 61: 0 OK (46026 cached pages, 970705 free pages)
45_253: [0m[92msyscall: pid 45 tid 253: futex: futex 000000000087FFCC op 0 value 111 timespec 0000000000000000 (46026 cached pages, 970626 free pages)
45_254: [0m[92msyscall: 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?
I kinda doubt that as I didn't run into this kind of stuff on managarm
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
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
what exactly was the mmap stuff doing?
I am not completely sure, it creates errors like this
its trying to write to a page which doesnt exist?
wtf
returning it as wrx should have no effect on that
so weird
can you recreate this and send me a syscall trace
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
wtf maybe obos curse has hit me
[0m[92msyscall: pid 41 tid 43: mmap: hint 0000000100000000 length 65536 prot 3 flags 50 fd -1 offset 0 (4078 cached pages, 999361 free pages)
[0m[94msyscall return: pid 41 tid 43: 4294967296 OK (4078 cached pages, 999361 free pages)
it allocates 64k there
I wonder how does changing the mmu flags fix it tho
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 💀
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
well it doesn't really crash anywhere, there are the hangs and possibly the watchdog thing
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
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
no it makes sense actually
does that mean I can run my minecraft server on astral now??
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
I wonder if those openjdk fixes would make qemu work properly
right now it hangs while loading from limine
ig you can try, I can send them in a moment
I can wait until we can figure out the futex stuff
oh also I forgot to mention, it wanted F_SETLK64/F_SETLKW64, I didn't implement those properly yet
is this a Mathewnd-approved statement?
astral is cool indeed
what do these even do
apparently they lock segments within open files
ig its like flock but for specific range of bytes
I dont think this would have a big impact
yeah likely not
@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
That sounds like a non issue
If you set the tcb that much you deserve whats coming for you.
fair
Fuck that’s based. Can Managarm do that?
yes, though javac hangs at the end (it still writes the file though so you can just close the terminal and run the produced class in another one)
Interesting
My new mutex has been laid out on paper, now I just have to make it realoty
No you would not understand my handwriting and it was my company name on it
Mathew evil incorparted
MUHAHAH PERRY THE PLATYPUS PREPARE TO SEE MY LATEST INVENTION
THE ASTRAL INATOR
keep your secrets
IT WILL WIPE EVERY DISK DRIVE ON THE ENTIRE TRI STATE AREA AND INSTALL ASTRAL ON IT!


Soon
Oh my GOD I left it at my desk at work
Would’ve been nice to have that picture now huh
Nice
true lmao
That’s what you get for being a selfish prick and not sharing 
Are you sharing company secrets?
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
can u let me *~~steal ~~*oh i mean use it in nyaux
MIT - Midway Incorporating To pmos
well since I had already finished how I was gonna do it I'm just doing it from memory lol
@carmine swallow can you test this to see if its faster now
its using my new locks and it made absolutely n ochange to anything
It may not be about locks but rather how they're used
What does the contention look like?
there wasnt even contention it was just one thread running
have you looked into turnstiles
oh youre doing pushlocks
yooo welcome back will
hello streaks
long time no see, how is life
ur just becoming more like sealkind
Omg its funny hyena man hi
hello MATHEW
Hru
Yeah it sounds like something thatd be good, especially when I do ule
ule has a fun extra wrinkle which is interactivity inheritance
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)
its where if you have two threads A and B where the priority of thread A > priority of thread B
ohhhh
and thread B owns a lock, and thread A blocks on the lock
it raises B to its priority temporarily
damn that's cool
i assume that's to allow thread B to finish quicker and release the lock?
its to prevent priority inversion
or, well, hopefully let it finish whatever it's doing quicker
ok yeah that stuff goes way over my head
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
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
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
yay more stuff i have no damn clue about, fun
unfortunately i do not have a phd in schedulers
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
yeah i get that, but i don't really understand the dependencies of dependencies things
it just sounds like a really complex problem lol
yeah thats the two thread scenario
priority inheritance doesnt work there the only good solution is to somehow break up or remove that dependency
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
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
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
it sounds dumb and cool I hope they do
VMS did priority ceiling where when a thread holds a kernel mutex it is raised to the highest priority
Welcome back
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
it sounds a bit bad for responsiveness yeah
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
shouldve made your first word when you joined VMS
for the memes
anyways nice to have you back, interesting talk
thx glad to be back
hyenasky is back
How did they solve it with pushlocks
oh hey ur back!
check out my thread

#1230349543623757845
daily nyaux shilling complete
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
they used "autoboost"
which is some complicated shit i dont understand
lack of formatting rules
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 :^)
hmmm I will look into it
I see
i switched to turnstiles bc autoboost seemed wacky
What's the deal with it?
Effectively is priority inheritance according to https://learn.microsoft.com/en-us/windows/win32/procthread/priority-inversion
what is it
adding #include <uacpi/platform/libc.h> to kernel_api.h
huh
idfk
im confused
wait why would it come from libc
where am I supposed to define it
in your makefile...
-DUACPI_NATIVE_ALLOC_ZEROED
bruh
of course its not propagated everywhere
not every c files includes libc.h
you have to do make clean because I updated all of jinx
fuck
do you really just not want an iso
can you send me that minimal astral
iso
I can't be bothered to build gcc again
(x2)
for astral
Inb4 astral ps2 driver bricks your laptop 
still borked
with teh astral iso I have
from a long time ago
yeah the self tests failed
for both ports
Bruh 💀
probably the same will happen, I didnt really touch the ps2 code since then
cant really debug when the only computers I have for debugging it works
yeye
I can test it as well if you want
good news and bad news
good news: self test did not fail
bad news: still no input
Its probably a race
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
heres a nickel kid, go buy youself better aml
my usb is so slow, so it is taking a while to copy
3849 ops
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
so maybe oberrow's laptop is cursed...
222k ops/s btw
my laptop is very slow though
only 1.10GHz
4925 ops in 22ms from 12 AML blobs
caps lock light doesn't come on
caps lock doesn't work at all actually
shift does
yeah caps lock is unimplemented on the terminal
tho on xorg it works fine
(except the lights)
pressing the power button did shutdown my laptop after waiting a couple of seconds for init to kill the tasks
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
I'd already exited out of bash
interesting
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
true
I think so
Not rn
fair
no idea
💀
i searched
get back to work in tenor
Where do you find these gifs? 
That looks like youtube kids slop
this came up
dead os xd

dead os xd
I petition to remove Astral from the uACPI leaderboard
SMP?
this happens in very early init
My kernel doesn't even enter main? lol
There should be a policy, something like if there's isnt a commit for a year it gets removed or smth
Brb setting fallback commits to bootstrap-Managarm for something simple each year 
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
if anything if we lost mlibc someone would fork it and continue maintaining it
and maybe add a backdoor or two
XZ moment
Likely
With lto
well at least I have ubsan now after like almost 2 years
(I stole most of it from @elfin turtle
) ((I gave proper attribution))
and it caught some stuff so
I added it, and it made the bug not manifest itself anymore 
lmao
Astral disappeared from the active threads list 
dead os xd
need to save astral in active threads
sets timeout to 1 hour…
sets timeout to 1 week...
I think Im just gonna do devices next. I really wanna do device stuff
Like a proper driver subsystem
Demotes you….
🥺
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)
cries in Managarm source tree
is this dead
valid
wrong game
cogmind moment
truly
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 💔
Start again
.
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
Come back bro this shit Is so fire, giving me inspiration for my project
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
why is it better to do it like this?
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
lmao
neither do I, but in my opinion it's better to trust a MSR over an ACPI table
TLDR: one is static data that is (hopefully) up to date, the other is actual dynamic source used to update it as well
yea the MSR can be updated to move the LAPIC address
Hi I will look into it soon tyy
@unreal merlin merged ty
A day with a new astral commit is a good day
@carmine swallow is the openjdk work in any fork?
I don't think but I can push it rq
Would be cool if you could make a pr
ty too
I made a pr, it turned out to be kinda big because of all the other ports and stuff tho 
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
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)
are you trying to run minecraft on Astral?
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
Not minecraft itself but rather the minecraft server
Though with openjdk working I wouldnt doubt mc works
Yeah I had to do something with hostfwd when I ported openssh
to astral specifically not that much, like a few days as astral already had basically everything that it needed
originally I ported it to managarm and at that point it took somewhat longer because there were some mlibc bugs iirc
Astral is dead 
Managarm of course! We’ll send the
to him and then he is doomed to get a PhD first 
nyaux himself
nyaux's shitcode is a big threat to humanity
quackos is a new nyaux killer 🙄🙄🙄
I will of course
legendary battle
who pagefaults the last
😡
die.

Astral thread is archived, it's so over 
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
maybe Astral will finally have working PS2 support from that 
Nah thatd go against the laws of nature
Obos will take over
3 days no progress 😡
FACT: 90% of osdevs quit right before replacing windows
ikr i miss astral progress
and i wanted to use it for the future project
but its dead now 
Which project would you use it for?
PoC 3d acceleration on an igpu
Damn, Astral must be quite far along then
it has a mesa port so yeah
Its asleep it wont die dw dw
I still have plans

userspace drivers + c++ + already existing drivers etc etc
this is more of a fun poc to see what i can achieve
if i make a proper library similar to udrm then ofc
Fair, can be C, which drivers 
lol
@grand shadow i have downstream stuff to make astral work with uacpi 1.0
i can update if u want
Sure go ahead
I was planning on doing some more work this weekend but I ended up doing something completely unimaginable
I touched grass
Crazy I know
What's bad about userspace drivers?
Nothing, I just dont want to touch them personally
No way
teach me this power
soon + a few business days

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