Bug#851379: dietlibc FTBFS on arm64: Bus error when running tst-calloc.c

2017-01-27 Thread Christian Seiler
On 01/26/2017 10:17 PM, Thorsten Glaser wrote:
> Christian Seiler dixit:
>> -g, and generate a backtrace? That might already help me to figure
>> out what's going on...
> 
> Recursive calls; the SIGBUS is likely a stack underflow.

So it looked at this yesterday evening and I couldn't really make heads
or tails from the backtrace, so let's try this again with a fresh pair
of eyes.

I would expect stack exhaustion to cause a SIGSEGV, but not a SIGBUS.
Example:

void foo()
{
  char a[8192];
  a[0] = '\0';
  // Prevent tail-recursion optimization by the compiler:
  void (* volatile bar)() = 
  bar();
  (void) a;
}

int main()
{
  foo();
  return 0;
}

This segfaults, but doesn't generate SIGBUS.

> (gdb) set pagination off
> (gdb) r
> Starting program: /home/tg/dietlibc-0.34~cvs20160606/debian/unittests/ttt
> [Inferior 1 (process 29556) exited normally]
> (gdb) r
> Starting program: /home/tg/dietlibc-0.34~cvs20160606/debian/unittests/ttt
> 
> Program received signal SIGBUS, Bus error.
> 0x00401740 in __testandset ()
> (gdb) bt
> #0  0x00401740 in __testandset ()
> #1  0x004016a0 in __pthread_lock ()
> #2  0x004016a0 in __pthread_lock ()
> #3  0x004016a0 in __pthread_lock ()
> #4  0x004016a0 in __pthread_lock ()
> #5  0x004016a0 in __pthread_lock ()

I don't think this is stack exhaustion; I think the stack frame
is being corrupted here and that's why gdb can't figure out the
proper stack frame.

> (sid_arm64-dchroot)tg@asachi:~/dietlibc-0.34~cvs20160606$ gdb 
> debian/unittests/ttt
> Breakpoint 1, 0x00401674 in __pthread_lock ()
> (gdb) bt
> #0  0x00401674 in __pthread_lock ()
> #1  0x00400858 in __thread_find_ ()
> #2  0x00400894 in __thread_self ()
> #3  0x0040059c in malloc ()
> #4  0x0040059c in malloc ()
> #5  0x0040059c in malloc ()
> #6  0x0040059c in malloc ()
> #7  0x0040059c in malloc ()
> […]

This would also indicate stack frame corruption (and hence gdb
being unable to properly trace this), because malloc() (see
libpthread/pthread_sys_alloc.c) does _not_ call itself directly.

> Your debian/patches/bugfixes/thread-self-vs-tcb.diff replaces the inline
> assembly implementation of __thread_self with one ending up recursively
> calling a chain malloc → __thread_self → __thread_find_ → __pthread_lock
> probably because it uses some structure that needs to be malloc(3)ed to
> work, but is needed for malloc(3) to function.

No, because __thread_self and __thread_find_ and __pthread_lock
never call malloc().

If that were the case, you'd see that loop in the stack trace,
and not just the same function repeated over and over again.

Whether this is a stack exhaustion or not can easily be seen:

Print the current stack pointer in gdb:
print $sp

Look at /proc/$PID/maps to see in which range the stack resides.
I'd be surprised if $sp was even close to the lower end of that
address range.

Unfortunately, if the stack frame really is corrupted, I'd really
need to look at this on the porterbox directly (because I don't
think it's a productive use of both of our time to do this via
email), so I'll have to wait until I get my account.

Regards,
Christian



Bug#851379: dietlibc FTBFS on arm64: Bus error when running tst-calloc.c

2017-01-26 Thread Thorsten Glaser
Christian Seiler dixit:

>If you have time, could you install gdb, compile the binary with

Well, I should have “lunch” (had breakfast at 12:30 this noon…),
but this much I can do.

>-g, and generate a backtrace? That might already help me to figure
>out what's going on...

Recursive calls; the SIGBUS is likely a stack underflow.

GNU gdb (Debian 7.12-6) 7.12.0.20161007-git
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "aarch64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from debian/unittests/ttt...done.
(gdb) set pagination off
(gdb) r
Starting program: /home/tg/dietlibc-0.34~cvs20160606/debian/unittests/ttt
[Inferior 1 (process 29556) exited normally]
(gdb) r
Starting program: /home/tg/dietlibc-0.34~cvs20160606/debian/unittests/ttt

Program received signal SIGBUS, Bus error.
0x00401740 in __testandset ()
(gdb) bt
#0  0x00401740 in __testandset ()
#1  0x004016a0 in __pthread_lock ()
#2  0x004016a0 in __pthread_lock ()
#3  0x004016a0 in __pthread_lock ()
#4  0x004016a0 in __pthread_lock ()
#5  0x004016a0 in __pthread_lock ()
#6  0x004016a0 in __pthread_lock ()
#7  0x004016a0 in __pthread_lock ()
#8  0x004016a0 in __pthread_lock ()
#9  0x004016a0 in __pthread_lock ()
#10 0x004016a0 in __pthread_lock ()
#11 0x004016a0 in __pthread_lock ()
#12 0x004016a0 in __pthread_lock ()
#13 0x004016a0 in __pthread_lock ()
#14 0x004016a0 in __pthread_lock ()
#15 0x004016a0 in __pthread_lock ()
#16 0x004016a0 in __pthread_lock ()
#17 0x004016a0 in __pthread_lock ()
#18 0x004016a0 in __pthread_lock ()
#19 0x004016a0 in __pthread_lock ()
#20 0x004016a0 in __pthread_lock ()
#21 0x004016a0 in __pthread_lock ()
#22 0x004016a0 in __pthread_lock ()
#23 0x004016a0 in __pthread_lock ()
#24 0x004016a0 in __pthread_lock ()
#25 0x004016a0 in __pthread_lock ()
#26 0x004016a0 in __pthread_lock ()
#27 0x004016a0 in __pthread_lock ()
#28 0x004016a0 in __pthread_lock ()
#29 0x004016a0 in __pthread_lock ()
#30 0x004016a0 in __pthread_lock ()
#31 0x004016a0 in __pthread_lock ()
#32 0x004016a0 in __pthread_lock ()
#33 0x004016a0 in __pthread_lock ()
#34 0x004016a0 in __pthread_lock ()
#35 0x004016a0 in __pthread_lock ()
#36 0x004016a0 in __pthread_lock ()
#37 0x004016a0 in __pthread_lock ()
#38 0x004016a0 in __pthread_lock ()
#39 0x004016a0 in __pthread_lock ()
#40 0x004016a0 in __pthread_lock ()
#41 0x004016a0 in __pthread_lock ()

[…]

#11411 0x004016a0 in __pthread_lock ()
#11412 0x004016a0 in __pthread_lock ()
#11413 0x004016a0 in __pthread_lock ()
#11414 0x004016a0 in __pthread_lock ()
#11415 0x004016a0 in __pthread_lock ()

[…]


But where’s the cause? I gave up around stack frame #25854 because
I have another lead:


(sid_arm64-dchroot)tg@asachi:~/dietlibc-0.34~cvs20160606$ gdb 
debian/unittests/ttt
GNU gdb (Debian 7.12-6) 7.12.0.20161007-git
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "aarch64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from debian/unittests/ttt...done.
(gdb) b __pthread_lock
Breakpoint 1 at 0x401674
(gdb) r
Starting program: /home/tg/dietlibc-0.34~cvs20160606/debian/unittests/ttt

Breakpoint 1, 0x00401674 in __pthread_lock ()
(gdb) bt
#0  0x00401674 in __pthread_lock ()
#1  0x00400858 in __thread_find_ ()
#2  0x00400894 in __thread_self ()
#3  0x0040059c in malloc ()
#4  0x0040059c in malloc ()
#5  0x0040059c in malloc ()
#6  0x0040059c in malloc ()
#7  0x0040059c in malloc 

Bug#851379: dietlibc FTBFS on arm64: Bus error when running tst-calloc.c

2017-01-26 Thread Thorsten Glaser
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA384

Christian Seiler dixit:

>> Now, an alpha porterbox would be niceb& (therebs none listed).
>
>Yeah, especially since it builds fine in qemu-user alpha. (Well
>the latest upload does, after I fixed a ton of alpha-related

Adrian says Michael Cree has got one, you can ask him for an account.

Michael, can I have one too?

Thanks,
//mirabilos
- -- 
 you introduced a merge commit│ % g rebase -i HEAD^^
 sorry, no idea and rebasing just fscked │ Segmentation
 should have cloned into a clean repo  │  fault (core dumped)
 if I rebase that now, it's really ugh │ wuahh
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.14 (MirBSD)
Comment: ☃ ЦΤℱ—8 ☕☂☄

iQIcBAEBCQAGBQJYilzCAAoJEHa1NLLpkAfgvhEQAIRV+WHH84Jb4v9/LA59OAjb
xfTycVIXjX7Yk0QKAstEavHsfUAR1yT4Z5g3TVXck+M2Ezi802bY+GoNmazkGdbT
owSngpEvqy2wX3PeOx0tqbh68XWFeR1j758JdWEu9OsQKKbCNnm2lERtxyXOQNWH
mSFolltde8p0sJ6p+dc0ZSkegJIMA1i6epkmqva5bDbATjz/QVW4MDiJiuvOoBBn
uBudqnTBrNvPsxvCnrzETRH1J67OmEiwPdeWpImt7xOS6bDI+3SGwKHj4OK+krrY
jbhc+N7VhGuI8FL8JXuN3+Dy3bQuD6k5OsKLKyN3qG7TUQXDa2dk60MlFRufxfkY
ykD4WtVt3CaFeOz/6e5LdtBEmTOX0Uqu48AzZ7Y2c2YKfrynPPWTMcv2OLP8hx43
xHep//j60912tLFNjdiS0oiqIxqwoK/4NZqUvPUn+taH94kPFfyAWPHCDp91Ncjf
iWRiDOqS/z8WDkxrp7HlZezEezfRp1OFO/xikOSF5itMsO8cQjMjApDDSnEuLrQH
+X5ZJPRJo1aGGWMpHLBNFtG4HEZiotQWXbxIUqz7RZP19+vAS/y6taX7UQObKGGO
dQlBE69+Z+PVj27TD9fO+H46UzhxJcD7e/68ylWe3iWb+hA/nxsVuAmVJ89R/nDX
b6sZfjxJTkjTXZiJSDcv
=SFWg
-END PGP SIGNATURE-



Bug#851379: dietlibc FTBFS on arm64: Bus error when running tst-calloc.c

2017-01-26 Thread Christian Seiler
On 01/26/2017 09:27 PM, Thorsten Glaser wrote:
>> Christian Seiler dixit:
> 
>>> Could you do me a favor, if you're on the porterbox anyway?
>>
>> … that’s a lengthy process, but I’ll do anyway…
> 
> Surprise!

Yay for nondeterminism...

> (sid_arm64-dchroot)tg@asachi:~/dietlibc-0.34~cvs20160606$ dpkg -l | fgrep 
> dietlibc
> ii  dietlibc-dev:arm64 0.34~cvs20160606-5   arm64diet libc - 
> a libc optimized for small size
> (sid_arm64-dchroot)tg@asachi:~/dietlibc-0.34~cvs20160606$ diet -v -Os gcc 
> -nostdinc -fstack-protector-strong -static \
>> -o debian/unittests/ttt test/stdlib/tst-calloc.c \
>> -lpthread # sollte eigentlich -pthread sein AFAIK
> gcc -nostdlib -static -L/usr/lib/aarch64-linux-gnu/diet/lib-aarch64 
> -L/usr/lib/diet/lib /usr/lib/aarch64-linux-gnu/diet/lib-aarch64/start.o 
> -nostdinc -fstack-protector-strong -static -o debian/unittests/ttt 
> test/stdlib/tst-calloc.c -lpthread -isystem 
> /usr/lib/aarch64-linux-gnu/diet/include -D__dietlibc__ -Os 
> -fomit-frame-pointer /usr/lib/aarch64-linux-gnu/diet/lib-aarch64/libc.a -lgcc
> test/stdlib/tst-calloc.c: In function 'random_test':
> test/stdlib/tst-calloc.c:71:19: warning: implicit declaration of function 
> 'random' [-Wimplicit-function-declaration]
>int n = 1 + random () % 10;
>^~
> /usr/lib/aarch64-linux-gnu/diet/lib-aarch64/libc.a(vfprintf.o): In function 
> `vfprintf':
> (.text+0x5c): warning: warning: the printf functions add several kilobytes of 
> bloat.
> /usr/lib/aarch64-linux-gnu/diet/lib-aarch64/libc.a(stderr.o): In function 
> `__fflush_stderr':
> (.text+0x8): warning: warning: your code uses stdio (7+k bloat).
> (sid_arm64-dchroot)tg@asachi:~/dietlibc-0.34~cvs20160606$ 
> ./debian/unittests/ttt
> Bus error

If you have time, could you install gdb, compile the binary with
-g, and generate a backtrace? That might already help me to figure
out what's going on...

Regards,
Christian



Bug#851379: dietlibc FTBFS on arm64: Bus error when running tst-calloc.c

2017-01-26 Thread Thorsten Glaser
Dixi quod…

>Christian Seiler dixit:

>>Could you do me a favor, if you're on the porterbox anyway?
>
>… that’s a lengthy process, but I’ll do anyway…

Surprise!

(sid_arm64-dchroot)tg@asachi:~/dietlibc-0.34~cvs20160606$ dpkg -l | fgrep 
dietlibc
ii  dietlibc-dev:arm64 0.34~cvs20160606-5   arm64diet libc - a 
libc optimized for small size
(sid_arm64-dchroot)tg@asachi:~/dietlibc-0.34~cvs20160606$ diet -v -Os gcc 
-nostdinc -fstack-protector-strong -static \
> -o debian/unittests/ttt test/stdlib/tst-calloc.c \
> -lpthread # sollte eigentlich -pthread sein AFAIK
gcc -nostdlib -static -L/usr/lib/aarch64-linux-gnu/diet/lib-aarch64 
-L/usr/lib/diet/lib /usr/lib/aarch64-linux-gnu/diet/lib-aarch64/start.o 
-nostdinc -fstack-protector-strong -static -o debian/unittests/ttt 
test/stdlib/tst-calloc.c -lpthread -isystem 
/usr/lib/aarch64-linux-gnu/diet/include -D__dietlibc__ -Os -fomit-frame-pointer 
/usr/lib/aarch64-linux-gnu/diet/lib-aarch64/libc.a -lgcc
test/stdlib/tst-calloc.c: In function 'random_test':
test/stdlib/tst-calloc.c:71:19: warning: implicit declaration of function 
'random' [-Wimplicit-function-declaration]
   int n = 1 + random () % 10;
   ^~
/usr/lib/aarch64-linux-gnu/diet/lib-aarch64/libc.a(vfprintf.o): In function 
`vfprintf':
(.text+0x5c): warning: warning: the printf functions add several kilobytes of 
bloat.
/usr/lib/aarch64-linux-gnu/diet/lib-aarch64/libc.a(stderr.o): In function 
`__fflush_stderr':
(.text+0x8): warning: warning: your code uses stdio (7+k bloat).
(sid_arm64-dchroot)tg@asachi:~/dietlibc-0.34~cvs20160606$ ./debian/unittests/ttt
Bus error
(sid_arm64-dchroot)tg@asachi:~/dietlibc-0.34~cvs20160606$ ./debian/unittests/ttt
(sid_arm64-dchroot)tg@asachi:~/dietlibc-0.34~cvs20160606$ ./debian/unittests/ttt
(sid_arm64-dchroot)tg@asachi:~/dietlibc-0.34~cvs20160606$ ./debian/unittests/ttt
Bus error
(sid_arm64-dchroot)tg@asachi:~/dietlibc-0.34~cvs20160606$ ./debian/unittests/ttt
(sid_arm64-dchroot)tg@asachi:~/dietlibc-0.34~cvs20160606$ ./debian/unittests/ttt
Bus error
(sid_arm64-dchroot)tg@asachi:~/dietlibc-0.34~cvs20160606$ ./debian/unittests/ttt
Bus error
(sid_arm64-dchroot)tg@asachi:~/dietlibc-0.34~cvs20160606$ ./debian/unittests/ttt
Bus error
(sid_arm64-dchroot)tg@asachi:~/dietlibc-0.34~cvs20160606$ ./debian/unittests/ttt
Bus error
(sid_arm64-dchroot)tg@asachi:~/dietlibc-0.34~cvs20160606$ ./debian/unittests/ttt
Bus error
(sid_arm64-dchroot)tg@asachi:~/dietlibc-0.34~cvs20160606$ ./debian/unittests/ttt
Bus error
(sid_arm64-dchroot)tg@asachi:~/dietlibc-0.34~cvs20160606$ ./debian/unittests/ttt
Bus error
(sid_arm64-dchroot)tg@asachi:~/dietlibc-0.34~cvs20160606$ ./debian/unittests/ttt
Bus error
(sid_arm64-dchroot)tg@asachi:~/dietlibc-0.34~cvs20160606$ ./debian/unittests/ttt
(sid_arm64-dchroot)tg@asachi:~/dietlibc-0.34~cvs20160606$ ./debian/unittests/ttt
Bus error
(sid_arm64-dchroot)tg@asachi:~/dietlibc-0.34~cvs20160606$ ./debian/unittests/ttt
Bus error
(sid_arm64-dchroot)tg@asachi:~/dietlibc-0.34~cvs20160606$ ./debian/unittests/ttt
Bus error
(sid_arm64-dchroot)tg@asachi:~/dietlibc-0.34~cvs20160606$ ./debian/unittests/ttt
Bus error
(sid_arm64-dchroot)tg@asachi:~/dietlibc-0.34~cvs20160606$ ./debian/unittests/ttt
Bus error
(sid_arm64-dchroot)tg@asachi:~/dietlibc-0.34~cvs20160606$ ./debian/unittests/ttt
Bus error
(sid_arm64-dchroot)tg@asachi:~/dietlibc-0.34~cvs20160606$ ./debian/unittests/ttt
(sid_arm64-dchroot)tg@asachi:~/dietlibc-0.34~cvs20160606$ ./debian/unittests/ttt
Bus error
(sid_arm64-dchroot)tg@asachi:~/dietlibc-0.34~cvs20160606$ ./debian/unittests/ttt
Bus error



bye,
//mirabilos
-- 
15:39⎜«mika:#grml» mira|AO: "mit XFree86® wär’ das nicht passiert" - muhaha
15:48⎜ also warum machen die xorg Jungs eigentlich alles
kaputt? :)15:49⎜ thkoehler: weil sie als Kinder nie den
gebauten Turm selber umschmeissen durften?  -- ~/.Xmodmap wonders…



Bug#851379: dietlibc FTBFS on arm64: Bus error when running tst-calloc.c

2017-01-26 Thread Thorsten Glaser
Christian Seiler dixit:

>But the test still fails on the buildd:
[…]
>So the bug is still there...

This is not a valid conclusion ;) The buildd can also have broken
hardware, or (happened recently for x32) an old kernel with known
bugs…

>Could you do me a favor, if you're on the porterbox anyway?

… that’s a lengthy process, but I’ll do anyway…

>> Now, an alpha porterbox would be nice… (there’s none listed).
>
>Yeah, especially since it builds fine in qemu-user alpha. (Well

Which is usually less strict (and -user is suspect for me anyway,
it also doesn’t catch kernel bugs).

>bugs.) OTOH alpha is not a primary port, so I'm going to wait until
>after the release of Stretch to take care of that. The arm64 issue
>I would like to have fixed before the release.

Sure.

bye,
//mirabilos
-- 
Stéphane, I actually don’t block Googlemail, they’re just too utterly
stupid to successfully deliver to me (or anyone else using Greylisting
and not whitelisting their ranges). Same for a few other providers such
as Hotmail. Some spammers (Yahoo) I do block.



Bug#851379: dietlibc FTBFS on arm64: Bus error when running tst-calloc.c

2017-01-26 Thread Christian Seiler
On 01/26/2017 08:35 PM, Thorsten Glaser wrote:
> Christian Seiler dixit:
> 
>> Unfortunately I still haven't heard back from Front Desk about
>> a porterbox account (I'm a DM) for arm64, and I really can't
>> reproduce the issue in qemu on my system and I don't have
>> ARMv8 hardware.
> 
> I just did that for you,

Oh, thanks! :-)

> and it’s fine on the porterbox as well
> (so your workaround to expect a failure is actually not a problem):
>   test/stdlib/tst-calloc.c   : build: OKrun: OK

But the test still fails on the buildd:

https://buildd.debian.org/status/fetch.php?pkg=dietlibc=arm64=0.34%7Ecvs20160606-5=1485384794=0

  test/stdlib/tst-calloc.c   : build: OKrun: ERROR
> Test was expected to fail, ignoring.

RUN ERROR for test/stdlib/tst-calloc.c in variant pthreads (rc = 135), test 
output is:

Bus error


So the bug is still there...

Could you do me a favor, if you're on the porterbox anyway?
Could you install dietlibc-dev from sid in an schroot there,
and then compile tst-calloc.c with the diet built on the buildd?

diet -v -Os gcc -nostdinc -fstack-protector-strong -static \
   -o debian/unittests/ttt test/stdlib/tst-calloc.c \
   -lpthread
./debian/unittests/ttt

> Now, an alpha porterbox would be nice… (there’s none listed).

Yeah, especially since it builds fine in qemu-user alpha. (Well
the latest upload does, after I fixed a ton of alpha-related
bugs.) OTOH alpha is not a primary port, so I'm going to wait until
after the release of Stretch to take care of that. The arm64 issue
I would like to have fixed before the release.

Regards,
Christian



Bug#851379: dietlibc FTBFS on arm64: Bus error when running tst-calloc.c

2017-01-26 Thread Thorsten Glaser
Christian Seiler dixit:

>Unfortunately I still haven't heard back from Front Desk about
>a porterbox account (I'm a DM) for arm64, and I really can't
>reproduce the issue in qemu on my system and I don't have
>ARMv8 hardware.

I just did that for you, and it’s fine on the porterbox as well
(so your workaround to expect a failure is actually not a problem):

[…]
gcc -D__dietlibc__ -I. -isystem include -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 
-fdebug-prefix-map=/home/tg/dietlibc-0.34~cvs20160606=. 
-specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat 
-Werror=format-security -Wall -fno-pie -specs=/usr/share/dpkg/no-pie-link.specs 
-Wl,-z,relro -Wl,-z,now -no-pie -pipe -nostdinc -D_REENTRANT -Os 
-fomit-frame-pointer -fstrict-aliasing -W -Wall -Wextra -Wchar-subscripts 
-Wmissing-prototypes -Wmissing-declarations -Wno-switch -Wno-unused 
-Wredundant-decls -Wshadow   -c lib/__ftruncate64.c -o 
bin-aarch64/__ftruncate64.o -D__dietlibc__
: -x -R .comment -R .note bin-aarch64/__accept4.o
ar cru bin-aarch64/liblatin1.a bin-aarch64/latin1-iscntrl.o 
bin-aarch64/latin1-isgraph.o bin-aarch64/latin1-islower.o 
bin-aarch64/latin1-isprint.o bin-aarch64/latin1-isupper.o
ar cru bin-aarch64/libcompat.a bin-aarch64/clearenv.o bin-aarch64/ctermid.o 
bin-aarch64/cuserid.o bin-aarch64/daemon.o bin-aarch64/err.o bin-aarch64/errx.o 
bin-aarch64/ffsl.o bin-aarch64/ffsll.o bin-aarch64/ftok.o 
bin-aarch64/getdelim.o bin-aarch64/getline.o bin-aarch64/getutmp.o 
bin-aarch64/mempcpy.o bin-aarch64/rcmd.o bin-aarch64/re_bsd.o 
bin-aarch64/toascii.o bin-aarch64/utmpxname.o bin-aarch64/verr.o 
bin-aarch64/verrx.o bin-aarch64/vwarn.o bin-aarch64/vwarnx.o bin-aarch64/warn.o 
bin-aarch64/warnx.o bin-aarch64/wtxent.o bin-aarch64/syscall.o
ar: `u' modifier ignored since `D' is the default (see `U')
ar cru bin-aarch64/libm.a bin-aarch64/acosh.o bin-aarch64/asinh.o 
bin-aarch64/atanh.o bin-aarch64/bessel.o bin-aarch64/cosh.o bin-aarch64/erf.o 
bin-aarch64/gamma.o bin-aarch64/ipow.o bin-aarch64/modf.o bin-aarch64/poly.o 
bin-aarch64/pow.o bin-aarch64/rint.o bin-aarch64/sinh.o bin-aarch64/tanh.o
ar: `u' modifier ignored since `D' is the default (see `U')
: -x -R .comment -R .note bin-aarch64/__fcntl64.o
ar cru bin-aarch64/librpc.a bin-aarch64/auth_none.o bin-aarch64/auth_unix.o 
bin-aarch64/authunix_prot.o bin-aarch64/bindresvport.o 
bin-aarch64/clnt_generic.o bin-aarch64/clnt_perror.o bin-aarch64/clnt_raw.o 
bin-aarch64/clnt_simple.o bin-aarch64/clnt_tcp.o bin-aarch64/clnt_udp.o 
bin-aarch64/get_myaddress.o bin-aarch64/getrpcent.o bin-aarch64/getrpcport.o 
bin-aarch64/pmap_clnt.o bin-aarch64/pmap_getmaps.o bin-aarch64/pmap_getport.o 
bin-aarch64/pmap_prot.o bin-aarch64/pmap_prot2.o bin-aarch64/pmap_rmt.o 
bin-aarch64/rpc_callmsg.o bin-aarch64/rpc_commondata.o 
bin-aarch64/rpc_dtablesize.o bin-aarch64/rpc_prot.o bin-aarch64/svc.o 
bin-aarch64/svc_auth.o bin-aarch64/svc_auth_unix.o bin-aarch64/svc_raw.o 
bin-aarch64/svc_run.o bin-aarch64/svc_simple.o bin-aarch64/svc_tcp.o 
bin-aarch64/svc_udp.o bin-aarch64/xdr.o bin-aarch64/xdr_array.o 
bin-aarch64/xdr_float.o bin-aarch64/xdr_mem.o bin-aarch64/xdr_rec.o 
bin-aarch64/xdr_reference.o bin-aarch64/xdr_stdio.o
: -x -R .comment -R .note bin-aarch64/__fstat64.o
: -x -R .comment -R .note bin-aarch64/__fstatfs64.o
ar: `u' modifier ignored since `D' is the default (see `U')
ar: `u' modifier ignored since `D' is the default (see `U')
ar cru bin-aarch64/libpthread.a bin-aarch64/pthread_atfork.o 
bin-aarch64/pthread_attr_getdetachstate.o 
bin-aarch64/pthread_attr_getinheritsched.o 
bin-aarch64/pthread_attr_getschedparam.o 
bin-aarch64/pthread_attr_getschedpolicy.o bin-aarch64/pthread_attr_getscope.o 
bin-aarch64/pthread_attr_getstackaddr.o bin-aarch64/pthread_attr_getstacksize.o 
bin-aarch64/pthread_attr_setdetachstate.o 
bin-aarch64/pthread_attr_setinheritsched.o 
bin-aarch64/pthread_attr_setschedparam.o 
bin-aarch64/pthread_attr_setschedpolicy.o bin-aarch64/pthread_attr_setscope.o 
bin-aarch64/pthread_attr_setstackaddr.o bin-aarch64/pthread_attr_setstacksize.o 
bin-aarch64/pthread_cleanup.o bin-aarch64/pthread_cond_broadcast.o 
bin-aarch64/pthread_cond_destroy.o bin-aarch64/pthread_cond_init.o 
bin-aarch64/pthread_cond_signal.o bin-aarch64/pthread_cond_timedwait.o 
bin-aarch64/pthread_cond_wait.o bin-aarch64/pthread_condattr_getshared.o 
bin-aarch64/pthread_condattr_setshared.o bin-aarch64/pthread_create.o 
bin-aarch64/pthread_detach.o bin-aarch64/pthread_dns_cruft.o 
bin-aarch64/pthread_equal.o bin-aarch64/pthread_fdglue2.o 
bin-aarch64/pthread_fflush.o bin-aarch64/pthread_fgetc.o 
bin-aarch64/pthread_flockfile.o bin-aarch64/pthread_fputc.o 
bin-aarch64/pthread_fputs.o bin-aarch64/pthread_fread.o 
bin-aarch64/pthread_ftrylockfile.o bin-aarch64/pthread_funlockfile.o 
bin-aarch64/pthread_fwrite.o bin-aarch64/pthread_internal.o 
bin-aarch64/pthread_join.o bin-aarch64/pthread_key.o bin-aarch64/pthread_kill.o 
bin-aarch64/pthread_mutex_destroy.o bin-aarch64/pthread_mutex_init.o 

Bug#851379: dietlibc FTBFS on arm64: Bus error when running tst-calloc.c

2017-01-26 Thread Christian Seiler
Control: retitle -1 dietlibc: arm64: tst-calloc.c -lpthread fails with Bus error
Control: found -1 dietlibc/0.34~cvs20160508-1~exp3

Unfortunately I still haven't heard back from Front Desk about
a porterbox account (I'm a DM) for arm64, and I really can't
reproduce the issue in qemu on my system and I don't have
ARMv8 hardware.

Since this is not a regression (the bug was present also in the
current package in testing, there we just didn't run the unit
tests), I've done two things:

 - The latest upload expects the unit test to fail on arm64,
   so the package builds now.

 - I'm marking the bug as found in the first version of
   dietlibc that had arm64 support.

This way the package will be able to migrate and the other bug
fixes (RC and otherwise, both in -4 and -5) will be able to
get into testing before the freeze.

I do think 'serious' is an appropriate severity here though,
since the calloc test failing is really bad and could easily
break other software out there, so I"m keeping that.

Once I do get a porterbox account I'll debug this issue and
then coordinate with the release team during the freeze to
make sure this bug is properly fixed.

Regards,
Christian



Bug#851379: dietlibc FTBFS on arm64: Bus error when running tst-calloc.c

2017-01-15 Thread Christian Seiler
Control: tags -1 + confirmed

On 01/14/2017 02:30 PM, Adrian Bunk wrote:
> Source: dietlibc
> Version: 0.34~cvs20160606-4
> Severity: serious
> 
> https://buildd.debian.org/status/fetch.php?pkg=dietlibc=arm64=0.34~cvs20160606-4=1483685322
> 
> ...
>   test/stdlib/testrand.c : build: OKrun: OK
>   test/stdlib/tst-calloc.c   : build: OKrun: ERROR
>   test/stdlib/tst-system.c   : build: OKrun: OK
> 
> RUN ERROR for test/stdlib/tst-calloc.c in variant pthreads (rc = 135), test 
> output is:
> 
> Bus error
> 

Yeah, I noticed that earlier. I've tried to reproduce this here, but
I don't have ARM hardware. (Not ARMv8 anyway.) I can't reproduce it
in qemu-user chroots and I've now tried to setup a full VM (via
qemu-system) but the test works there as well.

I suspect that "Bus error" stems from an unaligned memory access;
but this is one area where qemu is less strict than the CPU it
emulates...

I'll try to figure this out on a porterbox.

Regards,
Christian



Bug#851379: dietlibc FTBFS on arm64: Bus error when running tst-calloc.c

2017-01-14 Thread Adrian Bunk
Source: dietlibc
Version: 0.34~cvs20160606-4
Severity: serious

https://buildd.debian.org/status/fetch.php?pkg=dietlibc=arm64=0.34~cvs20160606-4=1483685322

...
  test/stdlib/testrand.c : build: OKrun: OK
  test/stdlib/tst-calloc.c   : build: OKrun: ERROR
  test/stdlib/tst-system.c   : build: OKrun: OK

RUN ERROR for test/stdlib/tst-calloc.c in variant pthreads (rc = 135), test 
output is:

Bus error


debian/rules:90: recipe for target 'override_dh_auto_test-arch' failed
make[1]: *** [override_dh_auto_test-arch] Error 1