IRC channel logs

2023-03-07.log

back to list of logs

<pder>stikonas: I was trying to debug some segfaults with bash and found that if I try to simply run bash from outside the chroot it segfaults in make_variable_value()
<stikonas[m]>That's C function in bash source?
<pder>yeah
<pder>Program received signal SIGSEGV, Segmentation fault.
<pder>0x08076487 in make_variable_value () at variables.c:3017
<pder>it doesnt launch interactively for me
<stikonas[m]>Hmm, that is strange...
<stikonas[m]>pder: I just ried running bash 5 outside chroot and it works here
<pder>This is with bash-5.2.15?
<stikonas[m]>Yes
<stikonas[m]>I just unpacked that .tar.bz2 binary package and ran it interactively
<pder>interesting, not sure yet whats going on then
<pder>do you see gnulib-tool segfaults with bash?
<pder>if you run in a chroot you should be able to see them running dmesg
<stikonas>pder: I think I saw something in the logs...
<stikonas>though somehow everything still works even if gnulib-tool segfaults
<stikonas>which is a bit strange
<stikonas>or maybe because of original files in the tarball
<stikonas>they just don't get regenerated
<stikonas>pder: yes, I can see stuff like "conftest[92274]: segfault at 0 ip 00000000080486e8 sp 00000000ffc28560 error 4 in conftest[8048000+3000] likely on CPU 0 (core 0, socket 0)" in dmesg
<pder>stikonas: with latest commit in master, I ran ./rootfs.py --chroot --preserve and commented out everything in run.sh after building bash
<pder>f096b8e99ed5a93e350f860af2428e6d4e3ccbcf8133fe06fb2dd5ede52e1005 bash
<pder>thats the sha256sum of bash
<pder>If i try to run it segfaults
<pder>Just to be clear, with no arguments bash segfaults
<pder>I am running it in live-bootstrap/tmp/sysa/usr/bin
<fossy>hey, stikonas, when you get time could you please review #258 (no rush of course, just wanna make sure you know it exists)
<fossy>pder: i have the same bash and i cannot repro
<fossy>what kernel are you running on? can you get a core dump?
<fossy>core dump might not be useful if its not compiled with -g
<fossy>umm, also try env - live-bootstrap/tmp/sysa/usr/bin
<fossy>see if something in your env is breaking
<stikonas[m]>fossy: oh I briefly skimmed through it already. Seemed fine but I wanted to look a bit more carecully and forgot...
<pder>ok so apparently bash doesnt crash with run as root, but as my normal user it does- even though I have execute permissions on it
<stikonas[m]>And with empty env?
<stikonas[m]>Something is strange in your environment...
<stikonas>and id doesn't segfault here either
<stikonas>though given that is segfaults in live-bootstrap, there must be something buggy in it