IRC channel logs

2023-12-26.log

back to list of logs

<fossy>i think the 6 hrs is new... i think it was lower in the past
<fossy>oh, no archive.org says it has alwyas been 6hrs
<Googulator>fossy: is there something going wrong with GitHub CI now? https://github.com/fosslinux/live-bootstrap/actions/runs/7324492000/job/19948430465?pr=361 has been running for over 2 hours, but still printing messages dated 2023-12-25T22:48:18.6121439Z
<fossy>oh, that's not all too uncommon, sometimes the log bugs out a bit during CI runs. when the run finishes the full log will be there
<fossy>what's the status of your PR
<fossy>cause i see gradually more and more things being added to it
<stikonas>hmm, I think after returning from syscall, we end up with some unclean state which works fine while we are in our code, but randomly bombs out (probably on timer interrupt) while in UEFI code (e.g. printing to console)
<Googulator>Hopefully it's finished now, I'm just waiting for one final clean CI run
<Googulator> https://github.com/fosslinux/live-bootstrap/pull/354 is fully done
<fossy>oh! i missed that
<fossy>my brain had #354 and #361 as the same PR
<Googulator> https://github.com/fosslinux/live-bootstrap/pull/361 is the one that's still running CI
<Googulator>361 includes / depends on 354
<fossy>yep, i see that
<fossy>also - just one thing im noting in the 361 commit history, when getting changes from one branch into another branch, prefer rebase over merge - merge creates these merge commits which pollute the commit history
<fossy>dont worry about removing the one that's there but just for future reference
<fossy>stikonas: if you get a few minutes could you review https://github.com/fosslinux/live-bootstrap/pull/359. it's pretty typical/straightforward. gprofng is disabled because it's autotools is busted lol and it's not important
<stikonas>sure, let me check
<Googulator>I rather disagree with the notion that merges "pollute" the history - in fact, having merge commits enables a more accurate way of representing development history, as opposed to falsifying it to fit an imperfect VCS tools's time linearity requirements
<Googulator>probably has to do with the fact that I'm coming from a Mercurial background
<stikonas>fossy: yeah, looks alright
<stikonas>I know plenty of people from mercurial background who don't like merges...
<Googulator>I know, this is sort of a religious issue
<stikonas>yeah...
<Googulator>merges are indeed a PITA to get right in something like SVN (was a big reason why we switched from SVN to Hg at my old employer)
<fossy>i agree with that in terms of representing development history - i'm ok with them for that purpose. but the typical git workflow i've used in most projects ive contributed to is that commit history *is not* time linear, but rather each commit represents a distinct change to the codebase. personally i like that more because it makes commit history much more ergonomic to work with; i know
<fossy>that if i cherry-pick XYZ commit then I am getting exactly what I think I am and i don't have to read all of the surrounding context in the commit log to determine if i need to care about merge commits etc
<stikonas>well, we used Hg at my work when I started, but soon switched to git (probably within a year) and most people somehow don't like merges
<fossy>(another thing is that git merges aren't implemented very well :P)
<stikonas>well, better than svn merges...
<fossy>i haven't had the displeasure of working with svn too much
<stikonas>it's not too bad, there are way worse systems...
<stikonas>I know hardware engineers often use perforce, that one is a total disaster
<fossy>yeah i have not heard good things about that one
<Googulator>perforce is the one that requires a constant nailed-up network connection, right?
<fossy>i believe so
<Googulator>can't even list working copy status without talking to The One Great Server
<Googulator>SVN can at least make do with requiring a connection only when running commands, and even then only some commands need to talk over the network
<stikonas>also it is often used as glorified FTP server rather than version control...
<Googulator>I've seen that done in SVN too
<stikonas>well, I guess any system can be misused
<stikonas>also people commit huge files to git...
<stikonas>which is even worse
<stikonas>ok, so I've got some eveidence that UEFI timer interrupt is causing me problems...
<Googulator>at my old employer, after an incident when someone committed several GB of intermediate build artifacts, we came to calling such content "adultery"
<Googulator>as in "Thou shalt not commit adultery"
<fossy>lol
<Googulator>we maintained a list of "known adulterous commits" in a push hook that would block such commits from being pushed upstream again
<stikonas>setting UEFI process priority to the highest level seems to "temporarily" avoid hang, though as soon as I call in back into UEFI, timer interrupt is reenabled
<stikonas>and system hangs...
<Googulator>some good news: I now see CI logs up to 2023-12-26T00:32:12.5381402Z in raw mode
<Googulator>that's 16 minutes ago
<fossy>Googulator: thanks for your help with maturing simplify btw, i appreciate it alot, you identified some problems it would have taken me a fair bit longer to recognise (the benefit of second pair of eyes!)
<Googulator>...and it's done, uploading pass2 image as we speak
<Googulator>(looks like it might be worth adding compression, rathe than just tar, at this point)
<fossy>for the transfers between passes?
<Googulator>yes
<fossy>quite possibly, a gzip would probably be optimal
<Googulator>the final tarball has compressed images inside, so it's not that important there
<Googulator>gzip is -czf, right?
<fossy>yep
<Googulator> https://xkcd.com/1168/ comes to mind
<fossy>uncompressed = network is too slow, xz = too long to compress, gzip = probably sweet spot
<Googulator>bz2?
<stikonas>bz2 is probably much slower than gzip
<fossy>bz2 can be even slower than xz
<Googulator>ouch
<fossy>in some cases
<fossy>especially for decompression i believe
<fossy> https://www.rootusers.com/gzip-vs-bzip2-vs-xz-performance-comparison/ agrees
<Googulator> https://github.com/fosslinux/live-bootstrap/actions/runs/7324492000/job/19950029040?pr=361 GCC 10 build started... good progress
<Googulator>I was thinking, wouldn't it be enough to do a 2-stage GCC 13 bootstrap when --update-checksums isn't given?
<fossy>what do you mean by 2-stage?
<Googulator>GCC 13 stage 3 is meant to rebuild the exact same binaries as stage 2 - indeed, a mismatch is considered a build failure -, but the binaries are already verified by the checksum
<fossy>as in removing the third stage from gcc build where it compars?
<fossy>hmm, yes, that makes sense
<fossy>does GCC configure supoprt that
<Googulator>not configure, but make
<Googulator>using "make bootstrap2"
<matrix_bridge><Andrius Štikonas> Yeah, we can remove it
<Googulator>(plain "make" is equivalent to "make bootstrap")
<Googulator>I'd still do 3-stage when updating checksums
<Googulator>fossy: what's the use case for the current default of deleting the bootstrap ("tmp") directory after bootstrap is done?
<Googulator>As I understand it, there's nothing temporary about it, since it's where the sole final product of the bootstrap process ends up created.
<Googulator>Is this residue from a concept similar to how builder-hex0 was originally meant to be used (i.e. writing the result back to the virtual disk at sector 0, shutting down the VM, then extracting the build result from the disk, and finally deleting the virtual disk as cleanup)?
<Googulator>IMO the directory name should default to "build" (by analogy with GNU build system) or "target" (by analogy with Maven)
<Googulator>ouch, GitHub is being buggy again: https://github.com/Googulator/live-bootstrap/releases/tag/where-i-started
<Googulator>"fosslinux tagged this Nov 7" - no, I've tagged it, right now...
<fossy>yes, it's a residue, that is a bad default
<fossy>tmp is also a residue, i just haven't thought of a better name
<fossy>target i think is probably my preference?
<fossy>wow, wtf
<fossy>how did you do that?
<fossy>seems to be taking the commit author and date?!
<Googulator>$ git tag where-i-started 47feb75; git push origin where-i-started
<Googulator>("origin" is Googulator/live-bootstrap in this case)
<Googulator>GitHub... more like HitBug
<Googulator>"target" sounds good to me, especially since even the directory layout ends up very similar to Maven's "target"
<fossy>ohh.. git doesn't store author information for a "lightweight" tag, the default, only for a "annotated" tag, created with -a
<fossy>github, should not be interporlating author information from a lightweight tag
<Googulator>I'd definitely default to preserving target, the question is, do we even need an option?
<fossy>nah, i reckon let's just kill --preserve and make it the default
<Googulator>yeah, an option for "waste several hours building, then nuke the result from orbit" doesn't seem to make any sense
<Googulator>maybe ignore --preserve for backwards compatibility
<fossy>eh, we have enough churn at the moment that i don't really care if it's not backward compatible
<Googulator>should we also remove tmpfs support?
<Googulator>Or does that have some real use case?
<Googulator> https://github.com/fosslinux/live-bootstrap/actions/runs/7324492000/job/19950029040?pr=361 ladies and gentlemen, the first legit green CI run since simplify :)
<Googulator>created https://github.com/fosslinux/live-bootstrap/pull/368 for removing --preserve
<Googulator>I kept tmpfs support for now, as it's not actively harmful, and may even be useful on systems with slow storage and lots of RAM
<Googulator>looks like total CI time right now is just barely below 6h
<Googulator47>Looks like others have also had issues downloading sources using Requests: https://gitlab.com/freedesktop-sdk/freedesktop-sdk-binary-seed/-/blob/main/plugins/sources/live_bootstrap_manifest.py?ref_type=heads#L109
<Googulator>"BuildStream/2" working as a user agent suggests that requests specifically is blacklisted
<Googulator>in which case we can just say "User-Agent: live-bootstrap/2023"
<fossy>i use tmpfs regularly, RAM is faster than storage, i have a fair bit available, and reduces wear on my SSD
<fossy>(even though SSDs do admittedly have a fairly high TBW these days)
<Googulator>OK, then it's indeed a valid usecase
<Googulator>although a simple change I included in that patch (mkdir -> makedirs) means it's now possible to do "-t /tmp/bootstrap"
<fossy>ok, i'm happy with #361
<Googulator>Thanks!
<Googulator>I guess it's time for me to rebase & clean up the bare metal work on top of that now :)
<Googulator>I made gzipping a separate PR (https://github.com/fosslinux/live-bootstrap/pull/367), it seems to not break things, but also it seems GH Actions is already using gzip on the fly, so the actual amount transmitted through the network ends up being exactly the same
<fossy>github actions, you suck, "The workflow is not valid. .github/workflows/bwrap.yml: Anchors are not currently supported.", this is just a YAML parsing thing, literally just use a yaml parsing library that supports it -.-
<Googulator>is that in my code?
<Googulator>or something else?
<fossy>no, https://github.com/fosslinux/live-bootstrap/pull/370 i just tried this
<fossy>Googulator: hm, do you think there is any point in #367 then?
<Googulator>I was thinking maybe if someone wanted to download the internal stage2 artifact for any reason, it would be smaller - but actually even that's not the case, because GH zips artifacts for download, even if said artifact is already itself an archive
<Googulator>so feel free to drop it I guess
<Googulator>unless that zipping is actually just STORE
<Googulator>I'm downloading one of those zips just to be sure
<Googulator>if it's STORE, then there's a benefit there, if it's DEFLATE, then it doesn't matter at all
<Googulator>OK, the zips are truly compressed (DEFLATE)
<Googulator>meanwhile, fixed up https://github.com/fosslinux/live-bootstrap/pull/368/
<Googulator>GH now has conflict resolution on the Web, but it messes things up terribly :(
<Googulator>had to redo it in local clone
<Googulator> https://github.com/fosslinux/live-bootstrap/pull/356 is waiting for upstreaming of the fix for the double build issue (alternatively, we could convert it to simple-patch)
<Googulator> https://lists.gnu.org/archive/html/bug-mes/2023-12/msg00009.html
<fossy>oh, yes, GH conflict resolution is poor on the web
<Googulator>one more force push to https://github.com/fosslinux/live-bootstrap/pull/368 - hopefully CI completes now
<Googulator>still had the "tmp" default expected in bwrap.yml, when it's actually "target" now
<fossy>stikonas: i know this was a fair while ago; but do you know *where* in the libtool-2.4.7 tree https://github.com/fosslinux/live-bootstrap/issues/203 is? i am having a lot of difficulty finding it
<stikonas>fossy: was it not in gnulib?
<stikonas>hmm, yeah, I don't see it in tarball either
<stikonas>hmm
<stikonas>fossy: yeah, gnulib does have those files...
<stikonas>gnulib-a521820
<fossy>oh, okay... but do they actually make it into the libtool-2.4.7 tree?
<stikonas>hmm, I thought they do
<stikonas>perhaps they do in out import
<stikonas>(but not in official tarball...)
<stikonas>s/out/our/
<fossy>lets have a look at a finished build, brb
<fossy>yeah, i don't think it gets in there.. or at minimum, something changed so that it doesn't anymore
<fossy>even if i completely nuke the uniwidth directory everything still works identically
<fossy>wth, but they are used somehow?!
<fossy>because checksum changes
<fossy>or it's entirely unrelated
<fossy>oop, and something is wrong with binutils 2.41 ??
<fossy>looks like my package cache is outdated, time to do a full run i guess'
<stikonas>yaeh, I was trying to import it locally
<stikonas>and it doesn't
<stikonas>maybe it never was
<stikonas>I was just going over the list of new gnulibs
<stikonas>and opened a bug for each package
<stikonas>fossy: so what should we do with #203?
<stikonas>just close it?
<stikonas>then there are still nyacc pregenerated files...
<oriansj>hmm so go is now distributing rust binaries?: https://xeiaso.net/blog/carcinization-golang/
<Googulator>fossy: looks like binutils-2.41 shows a CI regression: https://github.com/fosslinux/live-bootstrap/actions/runs/7327377682/job/19957156368?pr=368
<Googulator>nevermind, you already have a fix committed
<stikonas>hmm, looks like I might have figured out how to do syscall on UEFI...
<stikonas>first thing after syscall I need to adjust SS register...
<GoogulatorMobile>What's currently the major blocker for upgrading to a newer Linux kernel?
<GoogulatorMobile>4.9 is EOL, and it's directly interacting with attacker-controlled TCP streams
<stikonas>GoogulatorMobile: probably blockers are already fixed
<stikonas>binutils 2.14a used to be a blocker
<stikonas>but now we are on much newer version
<stikonas>GoogulatorMobile: but you'll only be able to upgrade to 5.6 or something like that
<stikonas>after that GCC requirement goes up
<stikonas>oh actually we might need to first upgrade GCC 4.0.4 to GCC 4.6
<GoogulatorMobile>5.4 gets us 2 more years of support
<GoogulatorMobile>4.19 is good for 1 year
<stikonas>GoogulatorMobile: https://www.kernel.org/doc/html/v5.7/process/changes.html
<stikonas>that's the last before GCC 4.9 is required
<stikonas>and GCC 4.9 is C++...
<stikonas>even 4.19 needs GCC 4.6
<stikonas>so I think that's the first thing we should target...
<stikonas>(it's also the version that ekaitz was targeting for riscv backport...)
<ekaitz>yes
<GoogulatorMobile>4.14 is the only thing we can build rn that's still in support - for 1 more month :(
<stikonas>we'll eventually be on versions that are out of support
<stikonas>as we are kind of hard limited to 5.4
<stikonas>at least on x86...
<stikonas>otherwise we need to build multiple GCC's before linux...
<GoogulatorMobile>"building just one GCC before linux" is IMO a less important target than "not giving attackers network access to a vulnerable kernel"
<GoogulatorMobile>Especially with plain HTTP downloads, where even an MITM compromise is possible
<GoogulatorMobile>But with 5.4, we can postpone that to 2025 at least
<GoogulatorMobile>The alternative is maintaining a fork of 4.14 with bootstrap-relevant security fixes
<GoogulatorMobile>Or implementing an option to download from a local HTTP source instead of from the original mirrors themselves
<stikonas>well, should probably switch to 5.15 first
<stikonas>*5.4
<stikonas>and then deal with EOL later
<stikonas>5.15 will bring us more features/fixes too
<stikonas>ok, 1 syscall UEFI kernel: https://git.stikonas.eu/andrius/stage0-uefi/src/branch/posix-runner/posix-runner/posix-runner.c
<stikonas>oriansj: is this function doable in M2-Planet without assembly? https://git.stikonas.eu/andrius/stage0-uefi/src/commit/44f490cc42e4aa9f23b696487e85fc5aaec2efb0/posix-runner/posix-runner.c#L24
<stikonas>hmm, I guess we don't have function pointers...
<stikonas>and goto *ptr; is not even standard C, it's GCC extension
<oriansj>stikonas: M2_Planet has FUNCTION; so you only need to use FUNCTION
<oriansj>if you look in M2-Planet's cc_core.c you'll see function pointers are passed and used in: common_recursion and general_recursion
<oriansj>but yeah goto *ptr; will work sorta but it isn't one of our test cases
<matrix_bridge><Andrius Štikonas> goto only seems to work with labels...
<matrix_bridge><Andrius Štikonas> I'll try FUNCTION
<oriansj>you need FUNCTION_name if you want to use goto but I don't recommend it
<stikonas>well, FUNCTION_name wouldn't work here...
<stikonas>I don't have a name...
<stikonas>it's really jumping into address that was previously malloc'ed
<stikonas>oriansj: anyway, thanks for reminding me about "FUNCTION"
<stikonas>that seems to work
<stikonas>I have a few other assembly functions, though not sure whether they are suitable for M2libc...
<stikonas>it's very x86_64 specific... Even if we put assembly code to M2libc, it wouldn't be portable
<oriansj>stikonas: M2libc has architecture specific directories explicitly for that purpose
<oriansj>but yeah, only should be adding functions to M2libc if it would be generally useful and not task specific
<matrix_bridge><Andrius Štikonas> You can't even read or write to those registers from ring 3... So yes...
<matrix_bridge><Andrius Štikonas> Though this posix-runner won't be switching to ring 3... I think it would be simple to stay in ring 0
<matrix_bridge><Andrius Štikonas> Just like builder-hex0 does on BIOS systems
<Googulator>I need some help with https://github.com/fosslinux/live-bootstrap/issues/365
<Googulator>just managed to reproduce it - configure.ac is properly patched to remove the offending check, but configure isn't
<fossy>Googulator: is it running autoreconf?
<Googulator>no, it uses bootstrap.sh
<Googulator>or rather, the script is just called bootstrap
<Googulator>no .sh
<fossy>stikonas: i think we can just close #203 then, while there are pregened files in the gnulib tarball they very obviously don't touch the final system
<fossy>(well very obviously now, not before :D)
<Googulator>it uses real autoconf-2.69 and autom4te-2.69, but Perl versions of aclocal and automake in place of the real ones
<Googulator>autoconf is called like this: $AUTOCONF -Wall -Werror
<fossy>Hmmmm
<Googulator>where $AUTOCONF == autoconf-2.69 in our case
<Googulator>$ ./automake/usr/bin/autoconf-2.69 --help
<Googulator>Usage: ./automake/usr/bin/autoconf-2.69 [OPTION]... [TEMPLATE-FILE]
<Googulator>...
<Googulator>  -f, --force               consider all files obsolete
<Googulator>Why, oh why, autoconf?!
<Googulator>let me guess: timestamp issue
<fossy>yeah i was about to say the same
<fossy>oriansj: re that blog post, not really sure how that means go is distributing rust binaries, this is just showing a way to integrate rust into golang using webassembly
<fossy>an increasingly common paradigm for FFI, particularly in golang, which is typically horrible at FFI
<fossy>this wouldn't ever be used in core golang though too many problems with it
<Googulator>let's see if AUTOCONF="autoconf-2.69 -f" helps
<Googulator>all I want to know is, Why... Isn't... That... The... Default?!
<stikonas>fossy: yeah, that's fine regarding #203...