IRC logs for #buildstream for Friday, 2023-01-13

*** tristan <tristan!tristan@223.62.216.84> has joined #buildstream03:49
*** ChanServ sets mode: +o tristan03:49
*** tristan <tristan!tristan@223.62.216.84> has quit IRC04:17
*** tristan <tristan!tristan@223.62.188.148> has joined #buildstream05:46
*** ChanServ sets mode: +o tristan05:46
*** tristan <tristan!tristan@223.62.188.148> has quit IRC07:23
*** tristan <tristan!tristan@223.62.188.148> has joined #buildstream07:23
*** ChanServ sets mode: +o tristan07:23
*** tristan <tristan!tristan@223.62.188.148> has quit IRC08:04
*** tristan <tristan!tristan@223.62.188.148> has joined #buildstream08:05
*** ChanServ sets mode: +o tristan08:05
*** tristan <tristan!tristan@223.62.188.148> has quit IRC08:38
*** tristan <tristan!tristan@223.33.164.138> has joined #buildstream09:57
*** ChanServ sets mode: +o tristan09:57
*** tristan <tristan!tristan@223.33.164.138> has quit IRC11:09
nanonymejuergbi:19:18
nanonyme    2023-01-13T21:16:57.174+0200 [7187:140304246190016] [buildboxrun_bubblewrap.cpp:530] [DEBUG] Capturing command outputs...19:18
nanonyme    2023-01-13T21:16:57.175+0200 [7187:140304246190016] [buildboxcommon_localstageddirectory.cpp:122] [DEBUG] Uploading directory buildstream-build/.19:18
nanonyme    2023-01-13T21:16:57.176+0200 [7187:140304246190016] [buildboxcommon_casclient.cpp:396] [DEBUG] Uploading 102b51b9765a56a3e899f7cf0ee38e5251f9c503b357b330a49183eb7b155604 from string19:18
nanonyme    2023-01-13T21:16:57.176+0200 [7187:140304246190016] [buildboxcommon_casclient.cpp:451] [DEBUG] uploads/23b22f29-9754-4bde-a1a9-aef00e7421dc/blobs/102b51b9765a56a3e899f7cf0ee38e5251f9c503b357b330a49183eb7b155604/2: 2 bytes uploaded19:18
nanonyme    2023-01-13T21:16:57.176+0200 [7187:140304246190016] [buildboxrun_bubblewrap.cpp:532] [DEBUG] Finished capturing command outputs19:18
nanonyme    2023-01-13T21:16:57.177+0200 [7187:140304246190016] [buildboxcommon_localstageddirectory.cpp:65] [DEBUG] Unstaging /var/home/nanonyme/.cache/buildstream/cas/staging/overlayLYBkjS/overlay19:18
nanonymeThat's with verbose19:18
nanonymeAh, that's the end. So what's the beginning...19:20
juergbinanonyme: isn't the full runner log part of the build log of the element?19:22
nanonymeYeah. I was just trying to see it19:22
nanonymeI00000000 00:00:00.000000  7187 vlog_is_on.cc:213] RAW: Set VLOG level for "*" to 119:23
nanonyme2023-01-13T21:16:57.042+0200 [7187:140304246190016] [buildboxcommon_runner.cpp:263] [DEBUG] [actionDigest=2286245010d61361d0d6cf56f257d8a0dd62ede77013e36a009a6807b0358af2/178] Initializing CAS client to connect to: "unix:/tmp/buildstreame19:23
nanonymeb3qhywm/cas/casserver-1x4p1b58.sock"19:23
nanonyme2023-01-13T21:16:57.081+0200 [7187:140304246190016] [buildboxcommon_connectionoptions.cpp:262] [DEBUG] Creating grpc channel to [unix:/tmp/buildstreameb3qhywm/cas/casserver-1x4p1b58.sock]19:23
nanonyme2023-01-13T21:16:57.114+0200 [7187:140304246190016] [buildboxcommon_casclient.cpp:95] [INFO] Setting d_maxBatchTotalSizeBytes = 4128768 bytes by default19:23
nanonyme2023-01-13T21:16:57.116+0200 [7187:140304246190016] [buildboxcommon_runner.cpp:412] [DEBUG] [actionDigest=2286245010d61361d0d6cf56f257d8a0dd62ede77013e36a009a6807b0358af2/178] Fetching Command 21eabe3fbf69b69b6a9ebcbb751578cccb969fb9a8829051329e7933784d4c60/330419:23
nanonyme2023-01-13T21:16:57.116+0200 [7187:140304246190016] [buildboxcommon_runner.cpp:433] [DEBUG] [actionDigest=2286245010d61361d0d6cf56f257d8a0dd62ede77013e36a009a6807b0358af2/178] Executing command19:23
nanonyme2023-01-13T21:16:57.150+0200 [7187:140304246190016] [buildboxrun_bubblewrap.cpp:517] [DEBUG] Running in /var/home/nanonyme/.cache/buildstream/cas/staging/overlayLYBkjS/overlay/buildstream-build19:23
nanonyme2023-01-13T21:16:57.150+0200 [7187:140304246190016] [buildboxcommon_runner.cpp:509] [DEBUG] [actionDigest=2286245010d61361d0d6cf56f257d8a0dd62ede77013e36a009a6807b0358af2/178] Created parent output directory: /var/home/nanonyme/.cache/buildstream/cas/staging/overlayLYBkjS/overlay/buildstream-build/..19:23
nanonyme2023-01-13T21:16:57.150+0200 [7187:140304246190016] [buildboxrun_bubblewrap.cpp:524] [DEBUG] Executing /usr/sbin/bwrap --unshare-pid --die-with-parent --bind /var/home/nanonyme/.cache/buildstream/cas/staging/overlayLYBkjS/overlay / --unshare-net --unshare-uts --hostname buildbox --unshare-ipc --dir buildstream-build --chdir buildstream-build --unshare-user --uid 0 --gid 0 --unsetenv SHELL --unsetenv COLORTERM --unsetenv XDG_MENU_PREFIX19:23
nanonyme--unsetenv HOSTNAME --unsetenv SSH_AUTH_SOCK --unsetenv DESKTOP_SESSION --unsetenv PWD --unsetenv XDG_SESSION_DESKTOP --unsetenv XDG_SESSION_TYPE --unsetenv TOOLBOX_PATH --unsetenv XAUTHORITY --unsetenv container --unsetenv HOME --unsetenv LANG --unsetenv XDG_CURRENT_DESKTOP --unsetenv VTE_VERSION --unsetenv WAYLAND_DISPLAY --unsetenv TERM --unsetenv USER --unsetenv DISPLAY --unsetenv SHLVL --unsetenv XDG_RUNTIME_DIR --unsetenv PS119:23
nanonyme--unsetenv XDG_DATA_DIRS --unsetenv PATH --unsetenv DBUS_SESSION_BUS_ADDRESS --unsetenv _ --unsetenv XDG_CACHE_HOME --unsetenv XDG_CONFIG_HOME --unsetenv XDG_DATA_HOME --setenv PATH /usr/bin:/bin:/usr/sbin:/sbin --setenv SHELL /bin/sh --setenv TERM dumb --setenv USER tomjon --setenv USERNAME tomjon --setenv LOGNAME tomjon --setenv LC_ALL en_US.UTF-8 --setenv HOME /tmp --setenv TZ UTC --setenv SOURCE_DATE_EPOCH 1320937200 --setenv CFLAGS19:24
nanonyme-O2 -pipe -g -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer  --setenv CXXFLAGS -O2 -pipe -g -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection19:24
nanonyme-fno-omit-frame-pointer  --setenv LDFLAGS -Wl,-z,relro,-z,now -Wl,--as-needed  --setenv G_SLICE always-malloc --setenv PYTHON /usr/bin/python3 --setenv PYTHONHASHSEED 0 --setenv GZIP --no-name --setenv BSTARCH x86_64 --setenv FORCE_REBUILD 1 --setenv PWD /buildstream-build --proc /proc --tmpfs /tmp --tmpfs /dev/shm --dev-bind /dev/full /dev/full --dev-bind /dev/null /dev/null --dev-bind /dev/urandom /dev/urandom --dev-bind /dev/random19:24
nanonyme/dev/random --dev-bind /dev/zero /dev/zero sh -c -e (set -ex; sh -c -e 'sh Configure -des \19:24
nanonymeI'm so going to be killing the IRC bridge19:24
nanonymejuergbi: did that truncate?19:24
juergbiyes, you really shouldn't paste that much in line19:24
nanonymeMyeah, with matrix it would work fine19:25
nanonymejuergbi: I can put that somewhere but not much useful stuff I can see. No failures or anything.19:26
juergbiand where do you see the `sh` error?19:28
nanonymeIt's the previous line to 2023-01-13T21:16:57.174+0200 [7187:140304246190016] [buildboxrun_bubblewrap.cpp:530] [DEBUG] Capturing command outputs...19:29
nanonymebwrap: execvp sh: No such file or directory19:29
nanonymejuergbi: so it sounds like this is potentially an empty sandbox but hard to say further than that since it was unmounted19:29
nanonymejuergbi: I tried opening just shell after the error and got https://nopaste.net/u84es8ULK019:34
nanonymeSo it clearly looks as if what I'm getting is an empty sandbox19:35
nanonymejuergbi: I don't know though if it's fully empty sadly because this unmounting happens through atomic operation19:48
juergbibased on the log, the overlayfs mount doesn't seem to have failed, no idea why the sandbox would be empty or incomplete19:51
juergbinanonyme: I did another quick test locally. it built a modified fdo-sdk element just fine19:52
juergbiwhat kernel version are you on?19:52
juergbiand can you verify that your `bwrap` is NOT installed setuid root?19:53
nanonymeLinux toolbox 6.0.18-300.fc37.x86_64 #1 SMP PREEMPT_DYNAMIC Sat Jan 7 17:10:00 UTC 2023 x86_64 GNU/Linux19:53
nanonymejuergbi: it is not setuid root19:54
juergbiexactly the same (upstream) kernel version as here19:54
nanonymeAlso absolutely no difference if I make it setuid root19:55
juergbisetuid root might rather break things. just wanted a sanity check19:55
juergbiwondering whether toolbox is the issue somehow but not sure how it could behave that way without the setup failing19:56
nanonymeCan we btw merge the checkout optimization or do you want further review?19:59
juergbiI saw a non-ostree test failure, will take another look20:00
juergbinanonyme: maybe try running buildbox-run with strace -f and then copy the trace to pastebin?20:01
juergbi            buildbox_command = [20:01
juergbi                "strace",20:01
juergbi                "-f",20:01
juergbi                self.__buildbox_run(),20:01
juergbiFAILED tests/artifactcache/expiry.py::test_never_delete_required - AssertionError: assert 'buildable' == 'cached'20:02
juergbiis this a generally flaky test? don't remember20:02
nanonymeEh. I don't have strace in this container20:03
nanonymeI will need to create a new container that has it, I guess20:04
juergbinanonyme: you might be able to use a copied strace binary. not sure if you have the library dependencies already20:05
nanonymeI can try that, kicked container rebuild in the meantime20:06
nanonymejuergbi: this is the strace https://nopaste.net/yitjVKiIdN20:14
juergbihm, the setup looks all fine. don't see anything odd up to the /bin/sh ENOENT20:20
nanonymeI have manually tested overlay mount in toolbox using mount command line and it worked fine except mount binary wanted me to run it with sudo.20:23
juergbiwhat do you mean with 'wanted me to'? it failed without sudo?20:23
nanonymemount: /var/home/nanonyme/foo: must be superuser to use mount.20:24
nanonymeBut this is probably just built-in check in mount20:24
juergbias unprivileged user, you do first have to enter an unprivileged user+mount namespace20:24
juergbiyou can't mount anything (except for fuse) in the top-level mount namespace20:25
nanonymeMakes sense20:25
juergbihowerver, buildbox-run-bubblewrap handles that on its own. and overlay mount succeeds according to strace20:25
juergbinanonyme: a hack for debugging could be to rename bwrap to bwrap.real and create a bwrap shell script that sleeps for a long time before executing bwrap.real20:26
juergbiat that point you could check what the overlay directory contains20:26
juergbiit is possible that the overlay directory is correct at that point but somehow bwrap can't bind it into its sandbox20:27
juergbiI'm not on the latest bubblewrap, still on 0.6.2. I wouldn't expect a significant behavior change in 0.7.0, though20:28
nanonymejuergbi: my bwrap was not executed by build o.O20:29
nanonymeOnly when I try to enter shell20:29
juergbicached build failure?20:30
nanonymeAh, maybe20:30
nanonymeAnyway. /var/home/nanonyme/.cache/buildstream/cas/staging/overlayPvqnnZ/overlay/buildstream-build/ -> overlay  upper  work : three directories that are otherwise empty except work has a directory work in it that is restricted and when I try to ls it as superuser it says incompat20:32
nanonymejuergbi: where's the lower?20:33
juergbinanonyme: a cas-tmpdir* in /var/home/nanonyme/.cache/buildstream/cas/staging20:33
nanonymeIt has data20:34
juergbioh, the issue is that the mount only applies to that mount namespace, of course. from the outside you can't actually access the contents :-/20:34
juergbiincluding bin/sh ?20:35
nanonymeYes20:36
nanonyme /var/home/nanonyme/.cache/buildstream/cas/staging/cas-tmpdirYQKfOA/bin/sh is a relative symlink to /var/home/nanonyme/.cache/buildstream/cas/staging/cas-tmpdirYQKfOA/bin/bash20:36
juergbiok and I assume the latter exists as well20:38
nanonymeYes20:38
juergbithis is the regular fuse mount, so that part seems to be working as expected20:38
juergbiwondering whether either the kernel or toolbox somehow have additional restrictions enabled20:39
nanonymeI still wonder if the problem is that we're already inside a user namespace when we run bwrap. Various tools like flatpak don't work properly inside toolbox20:39
juergbireally depends on how toolbox creates namespaces. that said, I would have expected some syscall to fail, not simply the overlay being empty20:41
juergbido you know / have a pointer why flatpak doesn't work inside toolbox? that definitely seems like a bad sign20:42
nanonymeI can't recall. There was some discussion about it at some point. But now I just tried and it worked fine20:46
nanonymejuergbi: I guess I could try it in our regular CI which is not running inside toolbox. But I would really like it to gracefully fallback to old functionality even in toolbox if that cannot be supported20:50
nanonymeOr, well, I could but our kernel is too old :(21:10

Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!