Subject: Re: sigbus test fails
From: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Date: Sun, 27 Feb 2011 16:06:10 +0100

Gordan Bobic <gordan@bobich.net> writes:

> This is what I get when I strace lib_internal/testsuite/sigbus

fyi, the sigbus test checks whether

a) SIGBUS is emitted when mmap'ed data is accessed after truncating a
   file

b) this SIGBUS is detected and handled correctly.

Seeing SIGBUS in the strace is expected hence (but not the abort).


> ftruncate64(4, 316659348799488)         = 0
                 ~~~~~~~~~~~~~~~

this is not sane; afais dietlibc code looks good (although it uses an
unneeded wrapper), perhaps it is a bug in strace (bad interpretation of
64 bit args?). But it does not explain the abort...


> send(4, ".", 1, 0)                      = 1
> recv(4, ".", 1, 0)                      = 1
> --- SIGBUS (Bus error) @ 0 (0) ---
> munmap(0x400cf000, 73728)               = 0
> munmap(0x4001b000, 73728)               = 0
> ...
> send(4, ".", 1, 0)                      = 1
> recv(4, ".", 1, 0)                      = 1
> --- SIGBUS (Bus error) @ 0 (0) ---
> +++ killed by SIGBUS +++
> Bus error

Because first test succeeds and the abort happens after the second
one, there is probably something wrong with the signal handling or the
siglongjmp stuff.  I will write some testsuite programs checking this...


Enrico