readdir misbehaves when running 32-bit user space on a 64-bit-kernel - kernel/userspace interface mismatch in getdents64

  • Open
  • quality assurance status badge
Details
3 participants
  • Brett Gilio
  • Danny Milosavljevic
  • Ludovic Courtès
Owner
unassigned
Submitted by
Brett Gilio
Severity
critical
Merged with
B
B
Brett Gilio wrote on 20 Jul 2020 21:44
Issue with Qemu Binfmt and CMake not detecting compiler.
(address . bug-guix@gnu.org)
87y2nej7jk.fsf@gnu.org
Hey all,

Opening a bug report as per a request following this issue identified

To recap, when running

Toggle snippet (3 lines)
./pre-inst-env guix build --system=armhf-linux swi-prolog

the configure phase is failing to identify the C/CXX compiler
toolchains to compile a test CMake file. There is a variety of
CMakeError.log and other object outputs that populate the build
directory when ran with --keep-failed.

This seems to be reported before, but subsequently patched at
https://issues.guix.gnu.org/38454#3.This only occurs when using the
Qemu method of compiling on a foreign architecture, and is not present
when natively compiling on true hardware.

Thanks,
Brett Gilio
B
B
Brett Gilio wrote on 21 Jul 2020 01:04
A possible solution
(address . 42448@debbugs.gnu.org)
87v9ihkcuw.fsf@gnu.org
As Marius Bakke pointed out on IRC, this issue is related to a change in
CMake where after 3.15 they removed the explicit `#define
_FILE_OFFSET_BITS 64`. The solution solution to this is to add

Toggle snippet (4 lines)
CFLAGS="-D_FILE_OFFSET_BITS=64"
CXXFLAGS="-D_FILE_OFFSET_BITS=64"

to CMakes compilation procedure. This is a core-updates change. I will
leave this issue open for now in case this needs more
investigation. Since I am just coming off of a haitus I think there are
changes to the core-updates and staging procedures so I dont think I am
comfortable making this change myself.

Brett Gilio
L
L
Ludovic Courtès wrote on 25 Sep 2020 11:57
control message for bug #43513
(address . control@debbugs.gnu.org)
87eemq2n7g.fsf@gnu.org
merge 43513 42448
quit
L
L
Ludovic Courtès wrote on 25 Sep 2020 12:14
(address . control@debbugs.gnu.org)
87v9g217uk.fsf@gnu.org
retitle 43513 'getdents' misbehaves when emulating 32-bit code on a 64-bit-kernel host
quit
L
L
Ludovic Courtès wrote on 25 Sep 2020 12:14
(address . control@debbugs.gnu.org)
87tuvm17uf.fsf@gnu.org
severity 43513 important
quit
D
D
Danny Milosavljevic wrote on 29 Sep 2020 16:33
(no subject)
(address . control@debbugs.gnu.org)
20200929163351.5f4aaaef@scratchpost.org
retitle 43513 Kernel/userspace interface mismatch between 32 bit user space and 64 bit kernel - readdir
severity 43513 critical
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl9zRc8ACgkQ5xo1VCww
uqXoQwf9E71eEjVgRLRop9FEB21gtLzhbqDSDq3llhh1BTPgOezXvD4F0YcdxTCe
ToecJ5KazcNeNa1TPTOMLGQpXiygARS6ChkHKdDBNwS9X0K6tLw1ISqdAauZywor
nQcwlHPXB728388oYdueR3HMhqyOiEOaDeG4dBBQsvG90zbW2CtqeI4IV4BKzW0d
m2MLF6D8cc686en5VQQJ9k/M5p5tIOF32zsiXJA87r26eUuJgJ35gNM6dDrtfpeQ
1w2Iq2fAkPJlC8EcsxeD6/wkLb/l9Yq8GjnZUoH/VS6qcHBtsFzjDH0OoqDHY81K
6PJSsoP1Chrods0rPMfkeBAIqom+Nw==
=0ldn
-----END PGP SIGNATURE-----


D
D
Danny Milosavljevic wrote on 29 Sep 2020 16:36
(address . control@debbugs.gnu.org)
20200929163651.7919a847@scratchpost.org
retitle 43513 readdir misbehaves when running 32-bit user space on a 64-bit-kernel - kernel/userspace interface mismatch in getdents
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl9zRoMACgkQ5xo1VCww
uqVIngf/V/5uxj7DVEyvzqDiikzSoMTebV2zJF8h7PlFsGG7qPrd9tXodGJ5sMek
oFVK5vZr5zcmOjrJ14ofj8jJrqzDwUzUVTwecacrGhJElhm7DAbZ9P6zaK2v9IQk
RfR9A6snXsfkeoXtXwfFJOvTIi1jYJdw6UaXfdFRLPQfeMriworyLTFisNKlHa7i
BdjdHLO2Yarozn0k0pYwKmGp/x08sUIeybJA2LcDXnKePftSjl8iKIiciswdecsF
BM13psk+0UXmdspTNRBRLPacv4Bqcr+QZcXmVlmA9FvxsDlX+inF6zZa1zCO4d7G
LGmMovzAKDllnIFUe7T5OnW/MQaD0w==
=NHr1
-----END PGP SIGNATURE-----


D
D
Danny Milosavljevic wrote on 29 Sep 2020 16:39
Re:
(address . control@debbugs.gnu.org)
20200929163953.184425f1@scratchpost.org
retitle 43513 readdir misbehaves when running 32-bit user space on a 64-bit-kernel - kernel/userspace interface mismatch in getdents64
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl9zRzkACgkQ5xo1VCww
uqU5Zwf9Hhmuk712W2fHePU8CZxCbn6DbMvVRstCiCwY9D3c8ZhFZUlG8SgY4ana
XpppykP6ORCteMqFQwGIN1e3PS2jet6J954t7MqmrrSYWjFkObdr2L/PNd6iH/8w
NJtbgfA8oM56yYiguqh5CWD5XcG9AcYFunKPIqUnWTtl5i6+kUGK9coUAln1H1ny
9753eRTHXNQcobZWTsXHzPmm8Q0YYXEzeTkTy/3oFoMp3zdWnvV7Q22WugYwAqgE
nlgTJdxheIYPz1z9wBE9ZnAvvCGYWu3eJ+hvn/UAluXKt1jC6MSy1htaCgoqG5zL
WVj46zPEluPcDDg9EqNRLGwW+rTixw==
=JleQ
-----END PGP SIGNATURE-----


?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 42448@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 42448
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch