GNU bug report logs -
#29886
tests/rm/rm-readdir-fail is failing with SIGBUS on Gentoo sparc
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
On 2018-07-11 04:46, Paul Eggert wrote:
> Thomas Deutschmann wrote:
>> - p->fts_statp->st_ino = D_INO (dp);
>> + memcpy(&p->fts_statp->st_ino, &dp,
>> sizeof(p->fts_statp->st_ino));
>
> This looks like a kernel bug, not a coreutils bug. readdir must be
> returning a pointer to an misaligned struct. Can you look into that? For
> example, what happens if you insert this:
>
> if ((intptr_t) (dp) % _Alignof (struct dirent) != 0)
> abort ();
>
> before the memcpy? The 'abort ()' should never happen; if it does,
> there's a bug in readdir, surely.
Not sure if this is a kernel problem. Isn't test suite using
LD_PRELOAD to pull in additional libraries which could cause
such a breakage? And wouldn't "rm" show any failure during normal
use?
The sparc user added the requested debug code and confirmed that
abort() will be triggered.
#0 0xf7e230fc in raise () from /lib/libc.so.6
#1 0xf7e25240 in abort () from /lib/libc.so.6
#2 0x0001813c in fts_build (sp=sp <at> entry=0x309c0, type=type <at> entry=3) at lib/fts.c:1555
#3 0x00018bd0 in fts_read (sp=sp <at> entry=0x309c0) at lib/fts.c:966
#4 0x00012750 in rm (file=file <at> entry=0xffffc95c, x=x <at> entry=0xffffc7f4) at src/remove.c:596
#5 0x00011564 in main (argc=<optimized out>, argv=<optimized out>) at src/rm.c:370
(gdb) frame 2
(gdb) p dp
$1 = (struct dirent *) 0x31dcc
User said it is also always going through
#0 0xf7fb4684 in readdir64 () from ./k.so
Kernel: Linux castor 4.16.8 #1 SMP Tue May 15 22:40:58 CEST 2018 sparc64 sun4v UltraSparc T2 (Niagara2) GNU/Linux
--
Regards,
Thomas Deutschmann / Gentoo Linux Developer
C4DD 695F A713 8F24 2AA1 5638 5849 7EE5 1D5D 74A5
[signature.asc (application/pgp-signature, attachment)]
This bug report was last modified 7 years and 6 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.