#Orange
1 messages Β· Page 4 of 1
interesting
it looks like it some issue on libx11
cuz its keep getting messages with 120 len with recvmsg
and doesnt respond, just polls again
i need to try to use xev
cuz st works and xeyes works
also i want to do something like strace
(instead of serial doing debug printfs to parent process stdout)
cuz serial is slow asf
things that ig are broken:
- poll
- sockets
- thread stuff
mm is fine
wtf
xev is fine
issue in gtk
hmmm
it gets GenericEvent from xorg
but there's no mention about thiis in gtk
wait if i disable xi2 issue is fixed (with GDK_CORE_DEVICE_EVENTS=1)
maybe issue in that xorg is too new for gtk or idk
maybe ill just export this env
gtk3 port

look weird with two titlebars
wdym
the main window has two titlebar bar
the one from twm and the one from gtk
kde when
my poor initrd is not fan of this solution
nvme and ext2 when
You can mask your shit sucking by adding a page cache 
what if page cache sucks too
Add another page cache ontop
i3wm and geany ports
i wanted to port gedit butt
it requires introspection
which is retarded and doesnt works in cross compiling
i want to port some terminal

Try to compile it with in your OS maybee
i have one issue rn
echo something > somefile is broken on bash
its just dup2 instead of writing something to somefile and restoring stdout back and after just returns to shell
wtf
only built in commands > is broken
ls or other command works perfectly
but i need to fix this cuz 1) i want to do self hosting later 2) maybe this bug will make dbus broken too
found issue
i was cloning cloexec flag in dup/dup2
time to do rename()
its required by python, dbus uuidgen and mv
what the fuck
how i can say to mlibc to use close_range
idk
issue was in getrlimit
i jsut hardcoded fd count to 1024
dbus requires getsockname so ill implement it tomorrow
so now it calls close 1024 times only? 
time to socketpair
ig i can find issue if i look at dbus src
I need to figure out how sockets work
wait im dumb
i didnt implemented SCM_CREDENTIALS for socket pairs, only for normal unix sockets
how is that possible
isnt socket pair just 2 normal unix sockets connected to each other
i made them different fd type cuz why not
actually wtf
dbus never calls sendmsg on orange
but on linux dbus calls it
(im comparing linux strace and my syscall logs rn)
when other dbus thread waits for SCM_CREDENTIALS for auth
maybe i found issue
maybe its some cross compile issue so ill hardcode it
i have no idea why dbus doesnt works
it just says rejected external and after client fails to connect
also i still dont have vma for kenrel
time to stop using buddy for everything >4kb
sounds tempting
time to abuse clanker to know why dbus auth can fail
so my todo is
- port cool stuff
- stop using buddy and use vma
- implement linux specific sysdeps like eventfd
- patch instrospection to be able to cross compile with my os
2 bugs that you know of
im returning ebadf on -1 fd
when i should just ignore it
and second i have no idea where it deadlocks without debug
store the owner in your mutex and print stack trace on double lock
that can find one type of bugs
It helped once or twice with my tty code
it requires pipe pollhup too
gnome-terminal port

small fps cuz i ran it in debug mode
(syscall log)
i need to fix that deadlock without debug mode and pty stuff
Very cool
i just need to fix some deadlock (my kernel bug) and ptys
it deadlocks in dbus again π
please dbus stop π π
a
it just tries to connect and dbus-daemon doesnt accept it
and bruh
i need to finally do good disk loading
my initrd is fat asf
its not futex issue
and definitely not mm issue
it looks like without debug mode it gets pollhup from xorg ?????
?
im so bored of these undebugable race conditions with single core
maybe its cuz i didn't implemented some flags in recvmsg
like its impossible to have race condition with 1 cpu core
no its not
i need to try to give to processes unlimited cpu time to see what will change (they will anyway yield in poll or other syscalls)
if it will be fine then idk issue in futexes
day 3 fixing this bug
im going to play hoi4
i love abusing clanker
deepseek gave to me some hint
when i sent 5k syscall log to it
i have no idea how to fix this
maybe if i write some sockets and futex test i can find bug ?
finally
i fixed this shit
now i dont have some weird deadlocks
issue was that i didnt implemented signal ret for poll()
didn't you say xorg needed something in sysfs for fbdev?
what is it?
only fbdev directory
to detect it
okay
/sys/class/graphics/fb0 (/sys/class/graphics/*)
but glxgears have 500 fps
ig my scheduling is bit weird
but ill fix this in future β’
now i want to port more gnome apps and fix ptys
and you actually can fill it if you want
everything works with smp
mate-calc port
i wanted to port gnome-calculator but its written in vala
idk how to cross compile this
uncool news I really need to do instrospection and vala
at least cuz gnome stuff require it
my target is now gnome calculator
cuz its written in vala and require introspection
holy shit my tmpfs is so fat
but ig its cuz im allocating everything with buddy
i need to stop this
i waste 5-6 mb on gnome-terminal after exiting it
its so terrible
im going to rewrite my pty line discipline
i had some break now im continuing orange development
gtk apps but no job control π
i didnt implemented SIGPAUSE
ah
that depends
whats your minimum order?
page size
im guessing youre allocating tons of small objects and you have a min order of like 8 or more, so the minimum block size it can allocate is 256
ah, then yeah
issue is buddy aligns to nearest power of 2
like if i alloc 5009 bytes it will allocate 8kb
yes, thats a problem if the things you allocate are weird sizes like that
tmpfs files are allocated with buddy
im going to change it to vma
i use buddy allocators for my BASIC interpreter instances, because often it is storing strings and theyre constantly realloc'ed
realloc that fits into the same buddy order is basically free
what about allocating a block device for your tmpfs?
then formatting it with e.g. fat32 or ext
this makes more sense for buddy allocator, and allows for a ton more flexibility than just a tmpfs made from an array and a tarball
basically, more like /dev/loop*
gnome-terminal output is fixed
i forgot to add 1 to read_bytes when reading from tty packet mode
other
TIOCPKT
its just normal tty but with additional byte in beggining (usually 0)
i need to install some dark theme
my eyes hurt when i see white theme
my eyes are not hurt now
installed orchis-theme and changed gnome-terminal to dark mode
This is goonable
real
hell yea
i want to implement proper EFAULT returning
what do you do rn
bug fixing
nothing
i just check is it in kernel space or not
but im not checking is this valid pointer
bruh lol
I mean I also do that, but I use special functions that the kernel on a fault returns an error instead if it canβt handle it any other way
It is one of the more efficient methods if done right
well yeah i also check if it's kernel space or not but i also handle pfs when copying from/to userspace
Iβve seen people lock the page tables and manually look them up and verify
Which just feels partly redundant when the CPU can do that for you anyways lock free
(Well mostly in the case of no fault)
ye
why put in all the effort when the cpu does it for me
ig its some gtk bug
cuz it pagefaults only on exit
anyway ill just send sigsegv to it
bruh
i cant continue work on orange cuz gitlab.gnome.org is down
im downloading tarballs from it
If python 3 is so good port python 4
i hate gobject instrospection
if you're using mlibc with the linux abi you can do what Managarm does
im doing it but it segfaults somewhere
im fixing it rn
im dumb
fix was just replacing some arguments in linux thread entry

gnome-calculator port
now port the entire gnome stack 
its my goal
porting gnome rn
i want to port gnome 43 at least cuz mutter 43 doesnt require colord or glycin
itttt requires gtk4 
im patching it to not use egl rn
actually its possible to port gtk4 without egl
it looks like it can fallback to glx
gtk4 port
gnome when
ig its because it uses gl stuff for rendering
π π π
gnome requries firefox (spidermonkey)
π π π
it means time to setup rust cross compiler
Told ya so
Oh and do yourself a favor
Get your rust setup working with something smaller than fucking spidermonkey
Like ripgrep or eza
dddkfjjdejej
i completely dont know how rust works
so im going to steal some patches from assertos
lol
when you get firefox or gnome to work, i'll be curious what kind of patches / features we're missing on the Managarm side
i still dont have networking
ill do it after userspace adventures
did some optimizations fps in glxgears increased from 900 to 1000
gtk4 became bit usable
time to do shm stuff
iirc it should make mesa stuff faster
why not move a thread to a dedicated killing queue
so cpus won't jump to it
im so dumb
i forgot to switch cr3 before paging free and it was freeing current cr3
i want to do setitimer
it's not hard
I free the cr3 by freeing the physical frame
But didn't you run MESA without it ?
it can run without it
but it spams with it and gets enosys everytime
Oh okay
getitimer/setitimer is done time to do shm
shm is done
cool!
wtf
why gtk4-demo breaks when i setup cairo as gsk renderer instead of gl
when gtk3 works fine when its cairo handled
maybe its just some unimplemented/i dont have drm or something issue
so now when my kernel not suck in opengl so much i can continue porting pain
maybe its because of my patch that removed egl from gtk4 or some version mismatch
cuz i dont think that its kernel bug (or its missing EINTR return)
or sysconf
i tried to lazy allocate 4 pages instead of 1 page for 1 page fault and it increased glxgears fps from 1300-1400 to 1700-1800
zoom
im building llvm again
i forgot
that i had aarch64 and riscv64 ports
and they are really poor
omg i fixed nvme
i was writing uint32_t instead of uint64_t in nvme write64
100 syscalls
fixed
my writev was returning EAGAIN when there already was written some data
only?
I'm at 195
i only have 75 (only 70 implemented π)
finally i setup clang cross compiler
how does your syscall table look
astral only has 105 system calls
i have 137
how to post it
upload the .c
send a github link
sys_enosys_stub

meoww
i have some important asf biology exam tomorrow
i saw my biology teacher going for a walk in town today in school hours
i went home cause i didn't have class
most of the teachers are manifesting and apparently they do this by hanging off bridges??
(random pic from some random article)
finally
time to try port something in rust
trying to port xshmfence and bruh
time to patch it
(i stole some managarm patches)
am i memory safe now
vulkan
does it run better than opengl when cpu rendering
no
it runs really buggy
and slow
rip
its buggy on linux too bruh
on kvm
maybe its cuz of swrast
or lavapipe idk how it named
im porting something cool rn
on rust
on rust fr
use ksh93
"I enjoy kicking pregnant dogs" what the fuck marvin why would you say something like that

i looked at managarm patch for rust-nix and im not going update this
jirpt]hjgr]phoptrehjekb]bkekbkgfbfglbkdl;bkdflvbmfdvflkd;gldkg
i forgot that i am linux_like in rust
so i can just ignore patches and do it only for errno
finally i can type
my honest reaction when x11 crate requires another version of nix
rustlover0
i will keep kernel in c++ but drivers will be in rust
i still porting something cool
its pain to port every crate that require some platform settings
today i had some important asf russian exam
im doing epoll rn
π π π π π
what's wrong
it's that even remotely portable
btw how did you port rust libc
linux_like
free(exam);
segmentation fault
meow
i completed deltarune chapter 5
Chop chop back to porting gnome

How's that been going btw
im fixing some kernel bugs
for sqlite
for zed
after ill port firefox
and after firefox i will be able to compile some random gnome library
i got some ub bruh
maybe if i setup watchpoint i can know why memory gets corrupted
im so dumb
i setup stack to start of allocated memory instead of end
(i wrote this code year ago)
lol
Asynchronous IO
sqlite requires normal file mmaping bruh
Time to implement a page cache and 70 vulnerabilies
π
Shii im here for it
it looks like it requires file mmaping with map_shared

ill make some kernel thread that will sync mmap allocations with vfs
im thinking how to implement ts
also im thinking about implementing swap
it shouldn't be hard cuz iirc its just getting unused pages and saving/loading this to disk
in some random thread
im sick
that's sick
ah sweet summer child
something something
meow
in future i want to add good aarch64 support and without uefi for rpi
limine on rpi when
i thought you could get uefi working on rpi
after day of playing gta 5 i finally figured out how to sync ts
i want to do rbtree
You can use my library for it if you want
It's a bit like kgz since you already use it
im at the sea now
Irl?
im doing some shit rn
!@!@$#@
π
Managarm in a nutshell
π why no stdint
std::uint32_t looks more beatiful than just uint32_t
i implemented map_shared with disk sync and sqlite still doesnt works
bruh
time to debug ts and read sqlite src
need to try it on linux with mlibc first
to know is this my kernel bug or other
it works on linux with mlibc
its my kernel bug
it looks like i have issue in F_SETLK, F_GETLK
hmmmm
maybe its because i dont automatically unlock file ??
time to read man
holy shit
sqlite works with shm mode
(with some test made by clanker)
fym mlibc panic
maybe its because i didnt implemented MAP_ANONYMOUS with MAP_SHARED
im continuing zed porting
time to find out why ts doesnt creates sqlite tables even on linux
mlibc update finally fixed sqlite shitt
wtf rust
