/srv/irclogs.ubuntu.com/2023/12/19/#lubuntu-devel.txt

RikMillssomeone reported the epiphany crash https://bugs.launchpad.net/ubuntu/+source/epiphany-browser/+bug/204684400:14
-ubottu:#lubuntu-devel- Launchpad bug 2046844 in epiphany-browser (Ubuntu) "Epiphany browser does not launch on Ubuntu 24.04: core dumped" [Undecided, New]00:14
RikMillsbut time for sleep here00:14
arraybolt3ok so I'm getting a SIGILL even with host CPU passthrough, so it's not a problem with CPU features.00:14
arraybolt3did some Wayland experiments with labwc, which more-or-less failed miserably. I think Wayfire is likely going to be better.00:46
arraybolt3perhaps I'm just doing it wrong though, or maybe stefonarch's scripts are out of date00:46
arraybolt3nothing like discovering that your keyboard is stuck in German when trying to do a Wayland experiment XD01:30
tsimonq2Miriway?01:42
lubot[matrix] <roberalz> Tested, the empty bar appears in the middle of the screen.01:43
lubot[matrix] <roberalz> :(01:43
lubot[matrix] <roberalz> It seems that lxqt-panel is not ready yet01:44
arraybolt3lxqt-panel requires window rules to work.01:45
arraybolt3but it can work01:45
arraybolt3I made some progress but for some reason the xdg-Lubuntu-Wayland folder isn't getting picked up01:46
lubot[telegram] <Roberalz> According to stefonarch it doesn't work in wayland, that's why he uses another bar01:47
arraybolt3oh really? On his repo he commends about lxqt-panel, "Window rules are needed until Qt 6.5 is fully implemented." And I found https://labwc.github.io/integration.html#:~:text=In%20order%20to%20integrate%20componenents,always%20support%20per%2Doutput%20configuration.01:47
arraybolt3(excuse the Chrome-mangled link)01:47
lubot[telegram] <Roberalz> Ouch01:48
lubot[telegram] <Roberalz> I see01:48
lubot[matrix] <roberalz> For miriway and lxqt there is a script, but it doesn't work for me.01:51
arraybolt3hey, making progress!01:52
arraybolt3I finally got theming right01:52
arraybolt3https://i.imgur.com/hRqjsQz.png01:52
arraybolt3bar is horribly mangled but that's on the to-do list :P01:52
lubot[matrix] <roberalz> https://github.com/Miriway/Miriway/blob/main/example-configs%2Fmiriway-config-LXQT.bash01:54
lubot[matrix] <roberalz> Wouuuuu!!01:54
arraybolt3The main issue is that these scripts are horribly horribly horribly *focused* - they're made as if they're a proof-of-concept to get one dev's machine working and that's it.01:54
arraybolt3I guess they kind of are...01:54
arraybolt3but they need a lot of work to become Lubuntu-ready, which is what I'm trying to do now. I may just end up with another dev homebrew hacky mess, but we can hope not...01:55
arraybolt3One issue here is that it doesn't look like this stuff has very good support for XDG at all yet, either that or else I'm doing something wrong01:57
arraybolt3hmm, I may just be doing it wrong01:59
tsimonq2arraybolt3: Remember, XDG stuff comes from SDDM, which is a layer up :)02:02
arraybolt3hmm02:02
arraybolt3really.02:02
tsimonq2The .desktop file must exactly match Lubuntu-Wayland.desktop in this case.02:02
arraybolt3Well it does...02:02
tsimonq2yeah lemme grab the docs02:02
arraybolt3...and it's not getting added to $XDG_CONFIG_DIRS02:02
arraybolt3anyway most of this is relatively low-priority compared to the fact that lxqt-session just flat out fails silently on almost everything.02:03
arraybolt3I have to launch every single component manually in a startup script which is waaaay less than ideal.02:03
tsimonq2Here's a step-by-step on what pulls from what:02:03
tsimonq2SDDM pulls the session name from /usr/share/xsessions when logging in. In our case, it's Lubuntu.desktop. Therefore, the DESKTOP_SESSION environment variable is set to Lubuntu, from this filename. Please note that we had to patch SDDM to do this properly; it used to make DESKTOP_SESSION an absolute path, which, when we continue in these steps, breaks things. TODO: send this upstream.02:03
tsimonq2xorg sets the XDG_CONFIG_DIRS environment variable to /etc/xdg/xdg-DESKTOP_SESSION and /etc/xdg and XDG_DATA_DIRS to /usr/share/DESKTOP-SESSION and usr/share at minimum. NOTE: this is an Ubuntu-specific patch in xorg.02:03
tsimonq2[startlxqt](https://github.com/lxqt/lxqt-session/blob/master/startlxqt.in) then grabs the values of XDG_CONFIG_DIRS and XDG_DATA_DIRS to use in the call to startlxqt, which then does a one-time copy of the settings from the first entry in both.02:03
tsimonq2For a while before we could figure it out, the Lubuntu Next 18.04 image had a black screen on the live CD and on bootup of a new Lubuntu Next system. The LXQt system had been logged in, but nothing was visible. This is why we had to patch SDDM, because the value of XDG_CONFIG_DIRS didn't have our valid XDG path; it was an absolute path put onto /etc/xdg/xdg-. So therefore, if the situation ever 02:04
tsimonq2comes up again, it means that XDG_CONFIG_DIRS can't find valid settings. This also caused Simon to confront upstream; they had moved the default settings to /usr/share from /etc/xdg because they believed that it would apparently make it easier for distributors. Not only did they not consider that /usr/share is not in the XDG spec, they did no verification in LXQt itself to ensure that /usr/share 02:04
tsimonq2at minimum is always there. When Simon submitted a patch, it was rejected on the grounds that it was too distro-specific, which was ironic because they didn't follow the XDG spec. Alf has since reconsidered and asked Simon to resubmit the patch.02:04
lubot[matrix] <roberalz> Ammm02:04
lubot[matrix] <roberalz> 02:04
lubot[matrix] <roberalz> 02:04
tsimonq2If you rename /usr/share/xsessions/Lubuntu.desktop to something else, please do change /etc/xdg/xdg-Lubuntu/ to the same name. Otherwise none of our settings will be applied.02:04
lubot[matrix] <roberalz> Miriway is an effort for bringing Wayland to desktops not currently having native Wayland support02:04
arraybolt3ah, xorg sets XDG_CONFIG_DIRS.02:04
arraybolt3Bingo.02:04
arraybolt3labwc doesn't :D02:04
lubot[matrix] <roberalz> :O02:04
arraybolt3so therefore startlxqtlabwc will have to02:05
arraybolt3which is very easy02:05
tsimonq2I wrote all of those notes *five* *years* ago. I knew we'd need them someday.02:05
arraybolt3nicely done02:05
tsimonq2And hey, if you wanna add anything to these notes, feel free :D02:05
tsimonq2thanks02:05
arraybolt3well at least it unravels the current mystery.02:06
arraybolt3Right now if I can just get lxqt-session to work, I'll be way closer to success.02:06
tsimonq2I remember spending like a full-time week banging my head against the wall on this, so I vowed that nobody shall have to deal with this pain again. :P02:06
tsimonq2(This was the one time where I had to touch X11 itself, SDDM, casper, ubuntu-cdimage, debian-cd, etc. all at once)02:07
arraybolt3grief02:07
arraybolt3sounds like "fun"02:07
tsimonq2When I say it gets worse, I mean it. :P02:07
tsimonq2(As in, things that may go wrong.)02:08
tsimonq2Anyway, let me know how far you get. I also appreciate the energy (and the efforts, this is cool!) but we likely have bigger fish to fry this time of cycle.02:10
tsimonq2I think the idea would be that we focus hard on this and bugfixing post-FF.02:11
tsimonq2That being said, please, continue your work and document your findings, so we at least have a starting point. Just don't sink days into it please :)02:11
tsimonq2Just trying to look at things from a bigger point of view, not to de-motivate by the way: that's my job as Release Manager, I think? :)02:12
arraybolt3I'm mainly working on this because it's something to do after some stress from earlier today (in multiple areas).02:15
tsimonq2Not a problem at all, thank you for what you do arraybolt3 :)02:15
tsimonq2arraybolt3: That's partly why I asked where the critical bug was, because I know we've both made a day of it... XD02:16
arraybolt3right?02:18
tsimonq2arraybolt3: I'm hitting the hay, I'll loop back bright and early for ya.02:36
tsimonq2Did LoB ever sponsor qtilities btw?02:36
* tsimonq2 checks NEW heh02:36
arraybolt3I think he did.02:36
tsimonq2Ah, yep I see it :)02:38
tsimonq2Perfect!02:38
tsimonq2Anyway, o/ :)02:38
arraybolt3OK, vote on it. Do I dare attempt to build qtwebengine? >:-)15:08
lubot[telegram] <kc2bez> Like a NCR?15:13
arraybolt3Not quite, I'm going to try dropping to FORTIFY_SOURCE=2.15:14
arraybolt3I suspect that's what's going wrong... maybe...15:14
lubot[telegram] <kc2bez> Oh fun. It is only time right :P15:15
arraybolt3heh15:16
arraybolt3maybe epiphany-browser won't take so long to build, idk15:16
arraybolt3webkit is actually way faster. Not fast, but fast*er* at least.15:16
lubot[telegram] <kc2bez> Valid point.15:17
arraybolt3Since they're both hitting the same SIGTRAP, one assumes it will work in both places, though granted Epiphany seems to *almost* not die if you try to `continue` it past the breakpoint, whereas Falkon dies horribly with an illegal instruction signal.15:19
arraybolt3so they might not be closely related enough15:19
arraybolt3at any rate both are a problem so I'll try and do Epiphany first.15:20
lubot[telegram] <kc2bez> Your theory is sound to me.15:20
lubot[telegram] <kc2bez> "If _FORTIFY_SOURCE is set to 1, with compiler optimization level 1 (gcc -O1) and above, checks that shouldn't change the behavior of conforming programs are performed."15:21
lubot[telegram] <kc2bez> "With _FORTIFY_SOURCE set to 2, some more checking is added, but some conforming programs might fail."15:22
arraybolt3This could also be the fault of the new GCC come to think of it.15:24
lubot[telegram] <kc2bez> I was diverting down that rabbit hole too.15:24
arraybolt3The only way I can even think that SIGILL could be hit on modern hardware is if a jump was made into the middle of an instruction, thereby shifting things all around.15:24
arraybolt3At least with Epiphany there appears to be a real breakpoint set (which is getting built for... some reason?), but with Falkon, I wonder if the SIGTRAP is because the processor hit a misaligned instruction that just so happened to be a software breakpoint.15:25
* arraybolt3 does not understand assembly in general all that well and doesn't understand x86_64 instructions at all, so I might be misguided here15:25
arraybolt3I watched Ben Eater's "Hello World on a 6502" series and learned some 6502 assembly from that, that's about it :P15:26
lubot[telegram] <kc2bez> I haven't touched assembly since college. That was... a while ago.15:27
arraybolt3https://fedoraproject.org/wiki/Changes/Add_FORTIFY_SOURCE%3D3_to_distribution_build_flags looks like Fedora's been using FORTIFY_SOURCE=3 all year without ill effects...15:27
arraybolt3I suppose I can check their spec file for epiphany and see what they're doing15:28
lubot[telegram] <kc2bez> Yeah, I think they are O3 for everything too15:28
lubot[telegram] <kc2bez> by default15:28
arraybolt3yuck15:28
lubot[telegram] <kc2bez> I know Suse moved in that direction as well15:28
arraybolt3Fedora's Epiphany package seems surprisingly straightforward...15:30
arraybolt3...so that leads me to suspect the compiler more than the FORTIFY_SOURCE flag15:30
arraybolt3though both changes were made at once so technically anything is possible15:31
arraybolt3well anyway, I'm going to start by dropping back to FORTIFY_SOURCE=2 since that's easier. If that fails, then I get to rebuild GCC15:33
arraybolt3which could be fun if the current compiler is b0rked15:33
lubot[telegram] <kc2bez> Um yeah.15:35
arraybolt3interestingly Epiphany in Ubuntu has -O1 set15:35
arraybolt3in DEB_LDFLAGS_MAINT_APPEND15:35
arraybolt3alright, build started15:48
arraybolt3umm, Epiphany must depend on a webkit package because that was *way* too fast15:52
arraybolt3not sure why I didn't think of that15:53
arraybolt3Build is going. Of course it's only using like one core, but meh, good enough.16:06
arraybolt3maybe two cores, I hope so16:06
arraybolt3looks like my FORTIFY_SOURCE hack is working, though hilariously on at least one file, it gets set to 2, then redefined to 3, then back to 2 again :P17:56
tsimonq2-O118:00
tsimonq2(Not a typo or a fat finger.)18:00
tsimonq2arraybolt3: Can we reproduce this on Debian Sid?18:03
tsimonq2If we can, it's most certainly something DeltaOne would like to know about.18:03
arraybolt3the weird failures?18:03
tsimonq2yeah18:03
arraybolt3Dunno yet, could you try it?18:03
arraybolt3My machine is fully engaged in building WebKit.18:03
* tsimonq2 grabs some kind of Debian ISO...18:04
arraybolt3tsimonq2: meh, don't bother, use this:18:04
arraybolt3https://github.com/ArrayBolt3/debflex18:04
arraybolt3tsimonq2: ^ generates Debian VMs for you with a single command18:04
arraybolt3they're very minimal, you need to specify the list of packages you want in fairly gory detail (like you can accidentally leave out sudo if you're not careful), but it works well and I'm using it all the time.18:05
tsimonq2niceeeee18:05
arraybolt3(debflex is the eventual name of the project, right now the actual script is gen-debvm, but I hope to develop it into something more fully fledged.)18:05
arraybolt3oh btw it can generate Ubuntu VMs too :D18:05
arraybolt3just be careful with that if you use qemu-nbd, it assumes it can hork /dev/nbd0 for itself18:06
lubot[telegram] <teward001> *sips on coffee as he watches his computer spin up 20 LXD-powered minimal system containers for build envs*18:06
arraybolt3@teward001: LXD is a bloated overrated mess, don't use it18:07
* arraybolt3 ducks18:07
lubot[telegram] <kc2bez> ๐Ÿ‘€18:07
* genii twitches18:08
tsimonq2arraybolt3: I don't wanna hear anything about "bloated" coming from the guy who literally runs bare qcow2 files :D18:11
arraybolt3lol, if it's any consolation I mostly use bare qcow2 files because of frustration with libvirt and VirtualBox.18:13
arraybolt3(every so often libvirt or a connection thereof randomly dies on me and needs a full host reboot to fix, VirtualCrud is a glitchy, crashy mess even on Linux, and while LXD is nice, it's just so horribly complicated I can't hardly make heads or tails of the command lines I'm reading unless they're like the absolute basics.)18:14
arraybolt3(QEMU is powerful and has much that I don't understand, but everything in it is relatively easy to piece together so I'm able to comfortably use and memorize the features I need often, and learn the ones I need seldom. And it seems to be more stable for me.)18:15
tsimonq2arraybolt3: You do realize the difference between LXD and QEMU is that LXD shares the system kernel and QEMU doesn't right?18:28
tsimonq2I'd argue that's WAY more lightweight heh18:29
tsimonq2And the shed for the bike should be blue...18:29
tsimonq2:P18:29
arraybolt3that's a valid point, but still, it's MENTAL BLOAT because it makes me remember too much!!!!!!1111!!!1118:29
* tsimonq2 sends arraybolt3 some flash cards XD18:29
arraybolt3in all seriousness I just know my toolkit and like it already. I'll use LXD when the time comes that I really need it and can learn how to use it properly.18:32
* arraybolt3 still remembers agonizing over the QEMU for Windows documentation back when I was still on Win8 and thought QEMU was a good alternative to VBox on Windows...18:33
tsimonq2omg I forgot how much customization we do in Lubuntu >_<18:41
tsimonq2Ctrl + Alt + T doesn't even work out of the box.... 18:41
tsimonq2starts just fine here?18:42
tsimonq2That being said, don't blindly take my word for it. If I can't reproduce it on a Noble VM, it's probably something deeper.18:43
lubot[telegram] <kc2bez> I've been able to replicate it on different (L)Ubuntu machines.18:44
arraybolt3sigh, your point about LXD taking less resources is wearing on me...18:46
lubot[telegram] <kc2bez> Don't let it18:46
lubot[telegram] <kc2bez> I use both18:46
arraybolt3I'm going to have to recreate my whole build environment AGAIN just to get faster speeds XD18:46
arraybolt3(Currently all of my sbuilds are done inside a VM)18:47
arraybolt3(which runs headless and I SSH into)18:47
lubot[telegram] <kc2bez> Don't chase waterfalls18:47
arraybolt3haha18:47
arraybolt3valid point18:47
tsimonq2aaaaHA I got it18:47
tsimonq2kay time to dig deep18:47
lubot[telegram] <kc2bez> If you have something that makes you efficient carry on18:47
arraybolt3tsimonq2: got it to crash?18:47
* arraybolt3 is on file 6837 of 6863 that needs compiled for WebKit18:48
lubot[telegram] <kc2bez> >.< Almost thhere18:48
tsimonq2arraybolt3: yes18:49
arraybolt3oh no that was just one component of WebKit that finished18:50
arraybolt3sigh18:50
* arraybolt3 needs to figure out why it's only using two of eight processors to do its job... eventually18:50
tsimonq2arraybolt3: WebKit or WebEngine?18:52
arraybolt3WenKit18:52
arraybolt3Epiphany browser18:52
tsimonq2ahhhhh okay18:52
arraybolt3supposedly was going to take 30 minutes or so to build, now hours later...18:53
arraybolt3but hey, better than a whole day18:53
tsimonq2https://paste.ubuntu.com/p/h3SPJMFRpP/19:04
lubot[matrix] <arraybolt3> Hmm, jump depends on uninitialized value... that sounds like it could cause something to jump into the middle of an instruction alright19:06
lubot[matrix] <arraybolt3> did we just have a Qt update that might be at fault here? I'm realizing I'm quick to blame compilers and whatnot because of the problem with Epiphany, but I wonder if both of them going buggy at the same time is a red herring.19:07
tsimonq2==5231==    by 0x69799EE: QStandardPaths::writableLocation(QStandardPaths::StandardLocation) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.10)19:09
tsimonq2Makes me think it's a Qt bug.19:09
tsimonq2We should eliminate PyQt5 as a variable in the process19:09
lubot[matrix] <arraybolt3> easy, test Falkon, it's pure Qt/C++ right?19:10
tsimonq2Very similar errors: https://paste.ubuntu.com/p/HGQmkRpbBM/19:12
tsimonq2These two lines are exactly the same:19:12
tsimonq2[5405:5405:1219/191120.152880:FATAL:credentials.cc(125)] Check failed: . : Permission denied (13)19:12
tsimonq2==5405==    by 0x62E19D4: QWebEngineProfile::defaultProfile() (in /usr/lib/x86_64-linux-gnu/libQt5WebEngineWidgets.so.5.15.15)19:12
tsimonq2(Meaning, between the two pastebins.)19:12
lubot[telegram] <teward001> i should just give you the five minute tutorial for LXD containers lol.  Its *really* not that complicated for basic use xD   *sips coffee, realizes he ran out* (re @lubuntu_bot: (irc) <arraybolt3> (every so often libvirt or a connection thereof randomly dies on me and needs a full host reboot to fix, VirtualCrud is a glitchy, crashy mess even on Linux, and while LXD is nice, it's just so horribly complicated I can't hardly make19:22
lubot[telegram] <teward001> genii go fetch coffee.19:22
* genii snarls ferally and lopes off to the coffeepot19:23
tsimonq2XD19:24
arraybolt3interestingly GNOME Web seems to be *working* once inside Valgrind over here...19:26
arraybolt3like I got a window with a new tab page and am now loading Google.com in it19:27
arraybolt3so that's beyond weird19:27
arraybolt3yep, Google seems to be loading right19:27
tsimonq2This incredibly basic script also fails: https://paste.ubuntu.com/p/C7VTnBqkdY/19:28
arraybolt3nice19:28
arraybolt3Wow. So if you ever need reminded how painfully slow GTK is, keep in mind that *all of KDE* can be run under Valgrind for testing, yet GNOME Web is just about brought to its knees by it.19:35
tsimonq2hahahahahahaha19:36
arraybolt3So yes indeed, GNOME Web is *almost* usable under Valgrind, and crashes with SIGTRAP when run directly.19:38
arraybolt3Whether that's because it's just so painfully slow I interrupted it too soon is TBD19:38
arraybolt3oh and also webkit is still building19:39
arraybolt3interesting, bwrap is involved when running GNOME Web without Valgrind19:41
arraybolt3but it doesn't get involved when running with Valgrind19:41
arraybolt3so I think this thing's faking me out19:42
tsimonq2arraybolt3: I found the issue.19:42
tsimonq2At least for QtWebEngine-based browsers.19:43
arraybolt3what is it?19:43
tsimonq2Wanna confirm that running export QTWEBENGINE_DISABLE_SANDBOX=1 works?19:43
arraybolt3sure19:43
tsimonq2Could potentially not work for WebKit, although that could be a different error entirely.19:43
arraybolt3Works over here, Falkon now loads.19:43
arraybolt3nice find19:44
tsimonq2\o/19:44
arraybolt3I bet that's why GNOME Web works under Valgrind, it's probably disabling sandboxing when it detects Valgrind.19:44
tsimonq2So, here's the deal on that.19:44
tsimonq2We're using an old QtWebEngine; we're a version behind.19:44
tsimonq2mitya57 is sick and lisandro is without power until the weekend, so, well, I become the de-facto Qt 5 maintainer in Ubuntu and Debian, just going off of co-maintainership. :P19:45
tsimonq2I'm willing to bet that updating to the latest QtWebEngine will do something. This is too big of an issue for them not to notice.19:46
tsimonq2So, the internal Chromium right now is 108.0.5359.124, the new one would be 119.0.6045.123 :P19:46
arraybolt3tsimonq2: well hold on now, I have an idea. If this is sandboxing related, I don't think it's going to help to upgrade QtWebEngine. It might, but I doubt it.19:47
arraybolt3Because there's a sandbox in both places, and disabling it seems to fix it in both places19:47
arraybolt3(both QtWebEngine and WebKit)19:47
arraybolt3If that's the case, we *may* be up against a kernel bug.19:47
tsimonq2NOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOo19:48
arraybolt3So are there any other sandboxed apps you can try to confirm?19:48
* arraybolt3 installs Flatpak and tries some hackery19:48
tsimonq2WebKit doesn't have Chromium does it19:48
arraybolt3nope19:49
arraybolt3WebKit is a fully independent browser engine (well, almost fully independent, Blink/Chromium is based off of it or was long ago)19:49
tsimonq2hah so https://qt-kde-team.pages.debian.net/images/qt5_build_deps.png webview depends on webengine which depends on webchannel :P19:49
tsimonq2but both webkit and webengine depend on webchannel19:49
tsimonq2it might be in webchannel...19:49
arraybolt3mmm, doubt it from the GDB backtraces we got yesterday19:50
arraybolt3the failure was in a destructor within QtWebEngine itself for Falkon, and in something in glib called from WebKit in Epiphany19:50
arraybolt3IIRC anyway, the screenshots are up above19:50
arraybolt3I'm installing Firefox as a Flatpak currently since bwrap looked like it might have had something to do with the issues and I know Flatpak uses bwrap under the hood19:51
* tsimonq2 sends a qtwebengine to experimental19:51
arraybolt3btw aren't Flat19:52
arraybolt3pak's inaccurate progress meters awesome? https://i.imgur.com/9m1MELl.png19:52
arraybolt3Like 146.5 MB vs 156.8 MB, ok I get it, but 17.8 KB / 333.4 MB O_O19:52
arraybolt3sigh, Flatpak'd Firefox works19:53
arraybolt3Confirmed, disabling the sandbox on Epiphany works even without Valgrind.19:56
arraybolt3had to use WEBKIT_DISABLE_SANDBOX_THIS_IS_DANGEROUS=1 to make it work ๐Ÿคช19:57
arraybolt3interestingly a different WebKit-based browser, "surf", works just fine with sandboxing.19:58
tsimonq2I have no idea if this is related:20:01
tsimonq214:02 < ahasenack> beware, https://pastebin.ubuntu.com/p/98hftZCHBd/ crashes the kernel20:01
tsimonq214:02 < ahasenack> https://gitlab.com/apparmor/apparmor/-/issues/34620:01
-ubottu:#lubuntu-devel- Issue 346 in apparmor/apparmor "kernel null pointer dereference loading an invalid AppArmor profile, regression since 6.1" [Opened]20:01
tsimonq214:02 -ubottu:#ubuntu-security- Issue 346 in apparmor/apparmor "kernel null pointer dereference loading an invalid AppArmor profile, regression since 6.1" [Opened]20:01
tsimonq2jinx :P20:01
arraybolt3oh that might be similar20:02
tsimonq2Lemme try an install with the kernel in proposed real quick...20:03
arraybolt3I don't think it's related - Falkon launches just fine on 22.04 with kernel 6.2.0.20:04
tsimonq2BTW, I have about 10 minutes left for right now. My car is in the shop so I'll need to go get that picked up.20:04
tsimonq2hmm20:04
arraybolt3source - I just ran it20:04
arraybolt3I tried strace'ing both Falkon and Epiphany and didn't see a syscall in common that triggers the weirdnes20:05
arraybolt3*weirdness20:05
arraybolt3which I guess makes sense but...20:05
lubot[telegram] <kc2bez> I was wondering about apparmor20:05
tsimonq22023-12-19T20:07:38.091817+00:00 lubuntu kernel: [  170.840872] audit: type=1400 audit(1703016458.083:45): apparmor="DENIED" operation="userns_create" class="namespace" info="User namespace creation restricted" error=-13 profile="unconfined" pid=2409 comm="qutebrowser" requested="userns_create" denied="userns_create"20:08
tsimonq22023-12-19T20:07:38.091818+00:00 lubuntu kernel: [  170.840934] traps: qutebrowser[2409] trap int3 ip:7f05a3c4cb13 sp:7ffed669c4d0 error:0 in libQt5WebEngineCore.so.5.15.15[7f05a1a29000+6931000]20:08
tsimonq2Yuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuup. It's apparmor20:08
lubot[telegram] <kc2bez> Boom20:08
tsimonq2https://launchpad.net/ubuntu/+source/apparmor/4.0.0~alpha2-0ubuntu720:09
tsimonq2  [Alex Murray]20:09
tsimonq2  * Enable user namespace restrictions by default (LP: #2046477)20:09
tsimonq2    - d/p/u/userns-runtime-disable.patch: add logic to disable user20:09
tsimonq2      namespace restrictions if kernel lacks support20:09
tsimonq2    - debian/usr/lib/sysctl.d/10-apparmor.conf: set sysctl value to 1 and20:09
-ubottu:#lubuntu-devel- Launchpad bug 2046477 in apparmor (Ubuntu) "Enable unprivileged user namespace restrictions by default" [Undecided, Fix Released] https://launchpad.net/bugs/204647720:09
tsimonq2      update comment to match20:09
tsimonq2    - debian/apparmor.service: run After systemd-sysctl.service20:09
arraybolt3ahahahahaha20:09
tsimonq2https://discourse.ubuntu.com/t/spec-unprivileged-user-namespace-restrictions-via-apparmor-in-ubuntu-23-10/3762620:10
arraybolt3so it IS a kernel bug20:10
tsimonq2arraybolt3: apparmor =/ kernel tho :)20:10
tsimonq2A specific upload did this.20:10
arraybolt3so did this get implemented for 23.10?20:10
arraybolt3looks like not20:10
tsimonq2nah the upload says noble20:10
tsimonq2release on 2023-12-1520:11
tsimonq2So, it's been like this for about 4 days.20:11
arraybolt3but you're right, the trap always happens right after an audit failure for both Epiphany and Falkon.20:11
arraybolt3So I guess the appropriate solution is to make AppArmor profiles for those particular apps?20:11
arraybolt3anyway, I can file the bug20:12
lubot[telegram] <kc2bez> That tracks. I noticed it over the weekend (re @lubuntu_bot: (irc) <tsimonq2> So, it's been like this for about 4 days.)20:12
arraybolt3unless kc2bez wants to, tsimonq2 I think you said you're busy20:12
arraybolt3(I ignored the apparmor thing thinking "yeah yeah you always are griping about things, AppArmor" :P)20:12
lubot[telegram] <kc2bez> I think there was a bug you can pile on20:12
arraybolt3ah right, I remember that20:12
* tsimonq2 reaches out to my security team contact20:12
tsimonq2See -members; tl;dr we need to start writing AppArmor profiles.20:17
lubot[telegram] <kc2bez> If my brain is working correctly, there needs to be more profiles for all the browsers now. That seems tedious.20:17
tsimonq2Yeah Dan, I just confirmed as such20:18
tsimonq2AppArmor confinement is enabled by default anyway20:18
lubot[telegram] <RikMills> It would be much more than just browsers. (re @kc2bez: If my brain is working correctly, there needs to be more profiles for all the browsers now. That seems tedious.)20:18
lubot[telegram] <kc2bez> Good point (re @RikMills: It would be much more than just browsers.)20:19
lubot[telegram] <RikMills> run # `reverse-depends src:qtwebengine-opensource-src`20:20
lubot[telegram] <kc2bez> Ouch20:20
lubot[telegram] <RikMills> I would suggest people try some random apps from that to see if they are affected20:21
lubot[telegram] <RikMills> That is what I did yesterday20:22
lubot[telegram] <RikMills> digikam for example also crashes20:22
arraybolt3Evolution also has issues according to someone there.20:22
arraybolt3https://bugs.launchpad.net/ubuntu/+source/qutebrowser/+bug/2046844 (I overhauled the bug20:22
-ubottu:#lubuntu-devel- Launchpad bug 2046844 in qutebrowser (Ubuntu) "AppArmor user namespace creation restrictions cause many applications to crash with SIGTRAP" [High, Confirmed]20:22
* RikMills subs20:23
arraybolt3basically since this was caused by AppArmor but intentionally, I set it to Critical/Won't Fix, then added known-affected apps and set them to Confirmed/High20:23
arraybolt3Thus matching with the requirement for Critical, "Severely affects applications beyond the package responsible for the root cause"20:23
arraybolt3I'm considering changing the apparmor one to Confirmed/Critical, since what if we need to roll the change back before release to have something usable?20:25
arraybolt3I think that's the right way to go here, surely the work they did to find packages that needed help missed a lot.20:25
lubot[telegram] <RikMills> https://bugs.launchpad.net/ubuntu/+source/falkon/+bug/204679620:26
-ubottu:#lubuntu-devel- Launchpad bug 2046796 in falkon (Ubuntu) "falkon crashed with signal 5 in _nl_make_l10nflist()" [High, Confirmed]20:26
lubot[telegram] <RikMills> ^^ was private. now public20:26
arraybolt3and now marked as dupe since it's another Signal 5 SIGTRAP mess.20:29
arraybolt3Considering the widespread effects this has, I put messages in #ubuntu-flavors and #ubuntu-devel asking people to contribute to the bug report. The more packages we can find and add AppArmor profiles to, the better. That way we won't have to deal with a broken release or have to beg for the AppArmor change to be reverted.20:36
lubot[telegram] <teward001> *does a chaos and spins a custom Lubuntu 22.04.3 ISO as a general repair system20:51
arraybolt3:q20:54
arraybolt3oops20:54
lubot[telegram] <kc2bez> arraybolt3 waves goodbye secretly :P20:56
lubot[telegram] <teward001> lol20:57
lubot[telegram] <tsimonq2> Yeah, especially given that some upstream apparmor people work for Canonical, I don't think they'd like it at all if we asked for a revery21:00
lubot[telegram] <tsimonq2> *revert21:00
lubot[telegram] <tsimonq2> Curveballs happen, everyone. I don't like how this breaks so many things either, but let's be honest, it came at a pretty darn convenient time to be able to do this kind of work. If you've been around for long enough, you know that not everyone respects Feature Freeze and that's caused issues before. Last cycle was the XDG stuff, I'd imagine this cycle will be full of apparmor and installer stuff21:02
arraybolt3Considering the level of disruption this may cause, it's still something to keep in the back of our heads (even if we do just start writing AppArmor profiles). People were furious when we chose to do something as simple as not ship Flatpak on the ISOs. If we break an entire class of highly useful AppImages, that could very well come back to bite21:09
arraybolt3Canonical in a way.21:09
arraybolt3I also wonder if this breaks Snaps :P21:10
arraybolt3*downloads Element Desktop via Snap to find out*21:10
arraybolt3ok, Element Desktop works, so at least there's that21:12
lubot[telegram] <tsimonq2> Flatpaks are too21:31
arraybolt3hmm, /usr/bin/flatpak has the needed AppArmor profile, doesn't that propagate to apps that are installed under it?22:07
arraybolt3Maybe not...22:07
lubot[telegram] <teward001> not necessarily no22:07
lubot[telegram] <teward001> consider snapped applications, even if snapd has the proper apparmor profile, the individual snaps need their own AppArmor profiles22:07
lubot[telegram] <teward001> same for appimages22:07
arraybolt3oof22:07
lubot[telegram] <teward001> LXD's one example, it has a whole AppArmor profile for itself22:08
arraybolt3This is going to be a fun mess.22:08
lubot[telegram] <teward001> (many of the AA profiles are predefined by the snaps connectors at build time but still)22:08
lubot[telegram] <teward001> enjoy the storm arraybolt322:08
arraybolt3At least it sounds like something that can be worked through though. We're going to give developers a hard time, but with some documentation and SEO perhaps that can be worked around.22:08
lubot[telegram] <teward001> you opened the can of worms :P22:08
arraybolt3@teward001: I love storms :D22:08
lubot[telegram] <teward001> well this is why 'flatpaks' on their own are not defaults22:08
arraybolt3Nah, Canonical opened it, I just pointed at the worms crawling out22:09
lubot[telegram] <teward001> sure 'flatpak' exists, but there aren't *default* flatpaks anywhere without profiles22:09
arraybolt3well Epiphany Flatpak works even without any AppArmor config22:17
lubot[telegram] <kc2bez> ๐Ÿคจ22:24
lubot[telegram] <Eickmeyer> That makes me unhappy. (re @RikMills: digikam for example also crashes)22:56
lubot[telegram] <RikMills> Tip of the iceberg22:57
lubot[telegram] <Eickmeyer> Yeah. When it goes from browser and gets into the photography realm, that's when I get involved and things get interesting.22:58
lubot[telegram] <RikMills> Will also crash plasma if you try to add some widgets that use qtwebengine22:58
lubot[telegram] <Eickmeyer> Yep. At that point the entire DE is affected. Unfortunately, one could say "that's using something outside the repos, so idgaf", and, pedantically as we've experience in the past, "kde, so idgaf."22:59
lubot[telegram] <tsimonq2> Well, in this case we simply need to add an AppArmor profile per application.23:00
lubot[telegram] <Eickmeyer> In that case, the entire Plasma Desktop would need to be added.23:00
lubot[telegram] <tsimonq2> We should upstream as much as we possibly can, but it's going to be fun trying to identify all the edge case packages23:00
lubot[telegram] <tsimonq2> LXQt works fine (re @Eickmeyer: In that case, the entire Plasma Desktop would need to be added.)23:00
lubot[telegram] <tsimonq2> I'm not sure where the line is drawn, to be completely honest with you23:00
arraybolt3He's saying, add a plasmoid that calls QtWebEngine, Plasmashell goes up in SIGTRAP most likely.23:01
lubot[telegram] <Eickmeyer> Read what Rik just wrote. Adding a widget that uses qtwebengine would crash Plasma.23:01
lubot[telegram] <tsimonq2> It may be different for DEs than for individual applications23:01
arraybolt3Adding Plasmashell to the list of allowed applications means that anyone can circumvent the new security by just writing a KDE plasmoid.23:01
lubot[telegram] <tsimonq2> I really want to know what widgets these are :P23:01
lubot[telegram] <Eickmeyer> Specifically, there's a picture frame one that I'm sure uses qtwebengine to make a slide show. That one comes with Plasma, and would be dead as a result of this.23:03
lubot[telegram] <tsimonq2> We also have to remember that KDE isn't GNOME... it doesn't run in a single thread, so I doubt that it would freeze Plasma entirely23:03
lubot[telegram] <tsimonq2> I dunno, let's find out XD23:03
lubot[telegram] <tsimonq2> If it does affect Plasma, this will also nuke Neon, so I'd escalate appropriately there too23:04
lubot[telegram] <RikMills> https://matterbridge.lubuntu.me/30a25b70/file_10272.jpg23:04
lubot[telegram] <tsimonq2> What happens when you click it :P23:05
lubot[telegram] <RikMills> Plasma dies23:05
lubot[telegram] <tsimonq2> Oh it does?23:05
arraybolt3woohoo23:05
arraybolt3ok this is even worse than some AppImages going belly-up.23:05
lubot[telegram] <tsimonq2> Niceeeeeeeeeeeeeeeeeeeeeeee23:05
arraybolt3Eickmeyer, RikMills: Care to share those findings at https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/2046844?23:06
-ubottu:#lubuntu-devel- Launchpad bug 2046844 in apparmor (Ubuntu) "AppArmor user namespace creation restrictions cause many applications to crash with SIGTRAP" [Critical, Confirmed]23:06
lubot[telegram] <RikMills> I think it crashes and restart23:06
arraybolt3Add Plasmashell to the list of affected packages23:06
lubot[telegram] <Eickmeyer> No, because it's not a bug in plasmashell. (re @lubuntu_bot: (irc) <arraybolt3> Add Plasmashell to the list of affected packages)23:06
lubot[telegram] <RikMills> So no completely session fatal (re @RikMills: I think it crashes and restart)23:06
arraybolt3Eickmeyer: True, but it is a bug that can be *fixed* there. The solution that Canonical intended here is to add an AppArmor profile for everything that needs it.23:06
arraybolt3They tried to identify those things and fix them, and, well, they missed a bunch.23:07
arraybolt3They're willing to help fix anything that needs it though, so if things get listed they may fix it for us.23:07
arraybolt3"I will get a patch together to add these to the set of known applications that need unprivileged user namespaces that we are now shipping profiles for."23:07
arraybolt3(so says https://launchpad.net/~jjohansen)23:07
lubot[telegram] <kc2bez> I tried Quassel and it worked fine but I am now wondering if I needed to hover over a link or something to invoke a crash.23:08
lubot[telegram] <tsimonq2> QUrl doesn't trigger it (re @kc2bez: I tried Quassel and it worked fine but I am now wondering if I needed to hover over a link or something to invoke a crash.)23:08
lubot[telegram] <kc2bez> Interesting23:08
lubot[telegram] <Eickmeyer> Honestly, I think this is more of a security shortcut than anything since writing an apparmor profile for plasmashell essentially circumvents the purpose. I don't think someone thought this issue through enough when patching apparmor.23:08
arraybolt3I mean... I wouldn't put it in those terms for the sake of avoiding conflict, but I tend to agree with you.23:09
lubot[telegram] <tsimonq2> Kay, nobody is allowed to use nukes on this one until January. Am I clear?23:09
* arraybolt3 watches Eickmeyer label January 1st as the Day of Attack23:09
lubot[telegram] <Eickmeyer> Nah, I'm just putting this on my list of to-dos.23:10
lubot[telegram] <RikMills> Lets just methodically go through all, apps that use qwebengine somewhere and see if they either degfault at startuo, or if trying a common task.23:10
lubot[telegram] <tsimonq2> URLs without a dependency on QtWebEngine are pretty ubiquitous (re @kc2bez: Interesting)23:11
lubot[telegram] <tsimonq2> +1 (re @RikMills: Lets just methodically go through all, apps that use qwebengine somewhere and see if they either degfault at startuo, or if trying a common task.)23:11
lubot[telegram] <RikMills> Then in the new year when canonical people are back we will have a string case for whatever action might be best23:12
lubot[telegram] <Eickmeyer> +1 (re @RikMills: Then in the new year when canonical people are back we will have a strong case for whatever action might be best)23:13
lubot[telegram] <kc2bez> Makes sense to me as well.23:13
lubot[telegram] <Eickmeyer> Oh, Electron apps too? There goes my entire workflow.23:14
lubot[telegram] <Eickmeyer> Including an Ubuntu Studio seeded package.23:15
arraybolt3Electron **AppImages**... though it might affect usual Electron too.23:15
arraybolt3If you can run Element right now, it's probably not all Electron apps in general.23:16
lubot[telegram] <Eickmeyer> Truth be told, I haven't upgraded anything to Noble yet. Being really cautious.23:16
arraybolt3Alright, confirmed that Angelfish web browser SIGTRAP's23:17
kc2bezadd privacybrowser and notepadqq23:17
arraybolt3Trying Cantor...23:18
lubot[telegram] <RikMills> Not surprised at this stage23:18
arraybolt3Eickmeyer: ^ might be Edubuntu territory23:18
arraybolt3oh actually it definitely is23:18
Eickmeyerarraybolt3: Can you install the freeshow snap and see if it works?23:18
arraybolt3will try in a sec23:18
kc2bezsnaps might be ok, they have their own apparmor baggage I think.23:19
EickmeyerOh yeah, there's tons in Edubuntu that use qtwebengine and gtkwebkit both.23:19
arraybolt3Cantor is SIGTRAP on startup23:19
Eickmeyer*sigh*23:19
arraybolt3Freeshow installing...23:19
Eickmeyerkc2bez: True, but still worth checking.23:19
arraybolt3(my VM is going to blow up so quickly :P)23:19
EickmeyerFreeshow is fairly lightweight.23:20
kc2bezAbsolutely worth checking, I wasn't trying to suggest otherwise.23:20
arraybolt3Interestingly Cantor's sigtrap showed up in the log before the AppArmor block23:20
arraybolt3probably just a race condition23:20
arraybolt3Eickmeyer: Freeshow loads!23:21
Eickmeyerarraybolt3: \o/23:21
arraybolt3https://i.imgur.com/IdsC3hh.png23:21
arraybolt3No guarantee that it works perfectly, but it's a start23:21
EickmeyerConsidering it's a snap, it's confined, so that makes sense.23:21
arraybolt3It seems to be working so far23:22
EickmeyerYou'd actually like that one, arraybolt3.23:22
arraybolt3heh, looks neat23:22
arraybolt3I played with some of its features to see what would happen23:22
arraybolt3Alright, next victim is morph-browser23:22
arraybolt3btw lemme know what you're testing and what happened, I'm compiling a list here23:23
arraybolt3morph-browser actually works23:23
lubot[telegram] <RikMills> ktorrent?23:24
arraybolt3it uses webengine?23:24
arraybolt3That would be weird but I'll try it23:24
lubot[telegram] <RikMills> I am tired here, and can't really be asked to get started on VM testing23:25
arraybolt3meh, that's what I'm for23:25
arraybolt3KTorrent seems to work, I'm dl'ing Lubuntu23:25
kc2bezNo worries @RikMills get some rest23:25
arraybolt3Going to stop though since my ISP isn't necessarily torrent-friendly23:25
RikMillsnextcloud-desktop?23:26
RikMillsthat is fairly high profile23:26
arraybolt3that sounds like trouble :)23:26
kc2bezInstalling23:26
arraybolt3Somehow it seems to be surviving23:27
arraybolt3(my earlier thing about Epiphany working in a Flatpak may have been a red herring - it seems the apt version is working even without apparmor now, so maybe I did something wrong)23:28
RikMillsthis is why we test23:28
RikMillsI guess it is where and why qtwebengine is used23:28
arraybolt3but yeah, Nextcloud Desktop's web browser features seem to be surviving23:28
arraybolt3PageEdit...23:29
RikMillsit could also be releated to what that app is asking it to do23:29
arraybolt3SIGTRAPs.23:29
RikMillsurhg23:29
arraybolt3yuzu is next (a Nintendo Switch emulator... the weird things you have to install as an open-source dev...)23:30
arraybolt3can't break it easily, so might be OK23:31
RikMillsI have been doing this for years and still find weird stuff in the archive I never knew existed23:31
arraybolt3I installed a puzzle game on accident while trying to get Epiphany installed :P23:31
kc2bezOoops23:32
RikMillsok. goodnight all23:32
kc2bezTake care23:32
arraybolt3syncthingtray... looks like it has a web view, so it's probably affected, but I can't trigger it easily right now23:32
arraybolt3trying...23:35
lubot[telegram] <tsimonq2> <RikMills> I have been doing this for years and still find weird stuff in the archive I never knew existed - this, 100x over23:36
arraybolt3Killed it with SIGTRAP trying to open Syncthing.23:36
arraybolt3So it is affected.23:36
arraybolt3Sigil -> dies instantly23:37
arraybolt3rssguard -> dies instantly23:38
arraybolt3konqueror testing...23:39
arraybolt3...dies instantly23:40
RikMillsthis really is a shitty thing on a stick23:40
arraybolt3This is a nightmare, no doubt. Hopefully one that can be cleaned up, but of all the things done in the name of security, this is one of the most disruptive I've ever seen.23:40
arraybolt3Ironically the easiest workaround is to just disable QtWebEngine sandboxing, which is the exact *opposite* of secure.23:41
arraybolt3In the name of security, they disabled a critical security feature for most things.23:42
arraybolt3Kontact -> dies instantly23:42
arraybolt3KMail -> dies instantly23:43
EickmeyerThis is bad.23:43
arraybolt3Now in theory most of these can just have new AppArmor profiles, so this isn't the end of the world. It's just the end of our world at the moment23:44
arraybolt3kiwix -> dies instantly23:44
Eickmeyerarraybolt3: Kontact and Kmail aren't technically separate apps. Kontact is a layer on top of a bunch of apps, so that increases the complexity.23:44
arraybolt3kchmviewer -> dies instantly (which is weird, this one didn't even need JavaScript according to the description so I'm a bit surprised it's sandboxed, maybe I shouldn't be though)23:45
EickmeyerReally, all of the KDE PIM suite being affected is more complex than you realize.23:45
arraybolt3Oh I'm sure. KDE PIM always looked like a complicated beast.23:46
RikMillsYeah, it may be one on the libs or lower deps 23:46
EickmeyerIt is. If one component is affected, all of it is affected, and an apparmor profile for each app won't do it.23:46
arraybolt3goldendict-webengine -> dies instantly23:46
RikMills:/23:47
RikMillsshitshow23:47
Eickmeyer^ This, tby23:47
Eickmeyer*tbh23:47
arraybolt3And I see there's a QtWebEngine plugin for the Gambas programming language which probably will send anything that uses it up in flames.23:47
arraybolt3The big problem here is that you can't set exclusions on the library level, it has to be on the executable binary level.23:48
arraybolt3So anything, anywhere, regardless of source, *could* explode now, if it uses QtWebEngine for any feature.23:48
RikMillsgotta go to sleep as I have some critical errands to run for a sick relative in the morning/afternoon tomorrow23:48
EickmeyerYep. That's kinda my point with the PIM.23:48
EickmeyerGood night, RikMills .23:48
arraybolt3Same with anything that touches Webkit.23:48
RikMillsrunning blood sample around the countyr as the NHS are too slow :/23:48
RikMillsEickmeyer: good night :)23:49
arraybolt3RikMills: Thanks for everything! May it all go well with you.23:49
RikMillsty23:49
arraybolt3The more I think about it, the more this change just looks unsustainable.23:50
arraybolt3It was a fantastic idea, but this is not going to work AFAICT.23:50
EickmeyerConsidering all of the apps you just went through are a gigantic chunk, I agree. 23:50
EickmeyerAnd when Amy gets home, I'm going to have to break the bad news to her that a majority of the Edubuntu apps for Noble are broken.23:51
EickmeyerEducational apps tend to use QtWebEngine a lot.23:52
arraybolt3Remmina seems to survive when using its WWW plugin.23:54
arraybolt3(which uses webkit)23:54
Eickmeyerarraybolt3: Is that a web server or a web client?23:56
arraybolt3Web client.23:56
EickmeyerInteresting.23:56
arraybolt3It looks like most WebKit stuff is probably safe. It's things that depend on bwrap that are at risk.23:56
arraybolt3(Epiphany happening to be one of them)23:56
EickmeyerIt might already have an apparmor profile, which makes sense considering what it does.23:56
arraybolt3let's see if I can get Nautilus to break23:57
arraybolt3I don't see a profile for it23:57
EickmeyerI didn't know Nautilus had any browsing capabilities *at all*.23:59
Eickmeyers/browsing/html rendering/23:59

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!