libera/#devuan-dev/ Saturday, 2021-05-08

rrqtuxd3v: was that a native 32-bit, or 32bit install in 64bit? (I would be able trial the latter)01:42
tuxd3vrrq, its 32 bits x86, but its for debootstraping arm 32bits, the first stage goes well, when we run '/debootstrap/debootstrap --second-stage' in the chroot, it gives us that error02:10
tuxd3v/debootstrap - is arm 32 bits02:11
tuxd3vI am also using qemu-user-static to emulate arm 32bits..02:12
onefangSo you chroot into a system installed to run on ARM, but your chroot is still running on x86.  You might want to try doing that on a VM that's translating ARM to x86.02:12
* onefang goes back to resting up after grocery hunting.02:13
tuxd3vSO I don't know if the error comes from debootstrap or if it somes from qemu-user-static, I really bet in the second, but don'tknow02:13
tuxd3vonefang, let the certify, but I believe all inside chroot is arm32 bits..02:16
tuxd3vin debootstrap, I am using '--foreign'02:16
onefangAnd the chroot command itself?02:16
onefangAnd /proc?  Etc.02:17
tuxd3vonefang, in beowulf it works ok, in cimaera amd64 also..02:17
tuxd3vin Chimaera i686 it gives error02:17
tuxd3vonefang, yes those and bind mounted02:18
onefangOK, it's something else then.  I debootstrap my installs, but never triad cross platform.02:18
tuxd3vfor cross platform you need bin-fmt, and qemu-user-static, so that you can emulate the guest platform :)02:20
onefangMy last debootstrap I did into a VM image, then booted that in qemu.02:21
onefangOh wait, second last.  lol02:21
rrqnext trial should be a qemu install into a bare-metal partition and then boot the bare-metal with that...02:48
rrqtuxd3v: .. I'll see if I can repeat your problem..02:51
rrqtuxd3v: btw wouldn't it also work (the same) with a multiarch setup ?02:58
rrq(though I suppose the multiarch setup wouldn't transcend chroot)02:59
rrqtuxd3v: is that qemu-user-binfmt or binfmt-tools or both?03:06
rrqI meant binfmt-support03:07
rrqyes: I got the issue.. in an i386 VM with chimaera, on chroot into the --foreign debootstrap of arm chimaera03:15
rrqarmhf03:16
rrqbut it seems to be due to i386 VM .. not the debootstrap03:20
rrqaccording to strace wrror happens during the pre-exec loading of the arm binary03:25
rrqw=e03:26
tuxd3vonefang, I execute:03:58
tuxd3v/usr/sbin/debootstrap --keyring /usr/share/keyrings/devuan-archive-keyring.gpg --variant=minbase --exclude='systemd,systemd-sysv,dialog,libsystemd0,openssh-server' --include='apt-transport-https,apt-utils,apt-file,ca-certificates,devuan-keyring,sysvinit,sysvinit-core,sysvinit-utils,lsb-release,parted,dbus,alsa-utils,rng-tools,eudev,locales,util-linux-locales,vim-tiny,sudo,openssh-client,mawk,whiptail,device-tree-compiler,u-boot-tools,con03:59
tuxd3vsole-setup' --arch=armhf --foreign --verbose beowulf /tmp/tmp.NrWnortP0L/rootfs http://deb.devuan.org/merged03:59
rrqtuxd3v: .. doesn't happen when running a static binary (/sbin/ldconfig) in the chroot .. something with /lib/arm-linux-gnueabihf/ld-2.31.so .. calling mmap2(0xffff1000,4096,...)03:59
tuxd3vits only on i686 Chimaera that the problem hapen..04:01
tuxd3vin i686 beowulf, no problem04:01
tuxd3vin amd64 beowulf/Chimaera no problem04:02
tuxd3vI suspect of qemu-user-static..04:02
tuxd3vthis is the ooutput of a successful first and second crossdebootstrap stages( made in Chimaera amd64 - creating rootfs for armhf 32bits ):04:06
tuxd3vhttps://paste.debian.net/hidden/463e4afb/04:06
rrqmmm stracing suggests it happends during the dynamic loading of the binary (eg /bin/bash)04:08
tuxd3vthe "chRoot: Executing '/debootstrap/debootstrap --second-stage'" executes fine on amd64, but in i686 it gives us a 'commpage' failing to allocate memory..04:09
tuxd3vrrq, many thanks,04:12
tuxd3vit could be dynamic linker related..04:13
tuxd3vI need to create a first stage, and then by hand jump into the chroot, to execute by hand the second stage and see what hapens..04:13
tuxd3vIneed to create a first stage including inside strace:armhf and execute a strace on '/debootstrap/debootstrap --second-stage' :)04:26
rrqI made the i386 multiarch and strace outside of chroot when executing arm binaries04:39
tuxd3vI believe you made it right, the host is the problem, so I would need to do it ouside :)04:43
rrqthe string "Allocating guest ..." does come from qemu-arm-static though04:51
rrqapparently originating in its "../../linux-user/elfload.c" source04:53
tuxd3v/usr/bin/qemu-arm-static is the one used for armhf indeed :)04:54
rrqhmm that source has a type cast "(unsigned long)" for a pointer that gets assigned to uint64_t variable(s)05:04
rrqtuxd3v: qemu-arm-static code wants to mmap(0xffff0000,4096,..) ... which is the BIOS ROM address space (for i386) ... does the i386 kernel refuse that?05:48
rrq.. or libc6 maybe ?05:49
tuxd3vprobably that is the cause :)05:49
rrqprobably: small test program returns 0xffff0000 on amd64 and 0xffffffff on i38606:02
rrqi.e. success on amd64 and fail on i38606:02
tuxd3vI believe it could be related with exausting the 32 bits address space..06:05
tuxd3vqemu loads its own bios, but yes at that address or close to that 0xfffff00006:06
tuxd3vit also has a software MMU to translate pages via a pointer to the OS..06:07
rrqmight be something new in libc=2.31-11 since it worked with i386/beowulf (=2.28-10)06:08
rrqI need to do something (else) for a few hours but I'll spin up an i386/beowulf later to check my test program...06:11
tuxd3vyeah, in beowulf it works, it could be the glibc, or by some reason I don't have enough address space, I noticed that my host cannot present the entire 4GB Ram06:11
tuxd3vit ends close but I cannot have the 4GB, but it gets better with lpae kernel06:11
tuxd3vwithout lpae, only ~3.5GB Ram06:12
rrqbiab06:12
rrqbtw the test program is just the single call:06:14
rrqmmap( (void*) 0xffff0000,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS,-1,0)06:14
rrqthen print the void* return value06:14
rrqthat's the failing call of quemu-arm-static06:15
rrqbiab06:15
tuxd3vby some reason it cannot map the 4096 bytes there, the linux kernel should had provided an alternative map address space, but it seems that doesn't happen06:32
rrqit looks like qemu-arm-static source has changed between beowulf and chimaera wrt guest-to-host memory mapping (esp commpage)09:05

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