Hello Modestas, With recent updates in Sid the combination of eatmydata's LD_PRELOAD library and GNU TLS has been producing an error. This results in problems. Libreoffice won't start. Other programs such as mutt produce error messages. See https://bugs.debian.org/759590 for the history of the reports. I have reassigned it to eatmydata after the most recent information.
Here is the smallest reproducer. On amd64.
$ env GNUTLS_DEBUG_LEVEL=2 eatmydata gnutls-cli
gnutls[2]: Enabled GnuTLS logging...
gnutls[2]: Cannot open urandom!
gnutls[2]: Could not detect an egd device.
gnutls[2]: Cannot open egd socket!
Error in GnuTLS initialization: Failed to acquire random data.
No hostname specified
But without the LD_PRELOAD then all works okay.
$ (unset LD_PRELOAD ; env GNUTLS_DEBUG_LEVEL=2 gnutls-cli)
gnutls[2]: Enabled GnuTLS logging...
gnutls[2]: Intel SSSE3 was detected
No hostname specified
Andreas Metzler has reduced the problem to this:
> Andreas Metzler wrote:
> On AMD64 I also see "eatmydata gnutls-cli" breaking, but not in ix86.
> Sprinkling GnuTLS with fprintf() like this
>
> ---------------------
> rnd-common.c
> ...
> int _rnd_system_entropy_init(void)
> {
> int old;
> fprintf(stderr, "AMDEBUG line [%d] file[%s] func[%s]\n",
> __LINE__, __FILE__, __FUNCTION__);
> device_fd = open("/dev/urandom", O_RDONLY);
> perror("AMDEBUG perror");
> fprintf(stderr, "AMDEBUG device_fd [%d]\n",
> device_fd);
> [...]
> ---------------------
> yields
> (sid-AMD64)ametzler@argenau:/tmp/GNUTLS/gnutls-3.3.7$ eatmydata src/gnutls-cli
> AMDEBUG line [198] file[rnd-common.c] func[_rnd_system_entropy_init]
> AMDEBUG perror: Bad address
> AMDEBUG device_fd [-1]
>
> EFAULT does not really make sense here, does it?
I am puzzled too. I would not have thought it likely. And so the
question is how could the eatmydata LD_PRELOAD library cause
open("/dev/urandom", O_RDONLY); to fail with an EFAULT? Have you seen
anything like this before?
Thank you for maintaining the eatmydata library. It is a very useful
library.
Bob
signature.asc
Description: Digital signature

