Bug#644023: FTBFS on kfreebsd-i386
I looked more into.
In fact I do not understand what the test tries to test.
It effectively test return code of
fprintf (fp, "%2147483648d%2147483648d", 1, 1);
The printf family returns int and should return number of written bytes.
It therefore cannot exceed MAX_INT.
But the test tries to print twice entry with width MAX_INT+1.
I would understand the test with i.e. 2147483640
or six time 512 MB.
On kfreebsd-amd64, it tries to
mmap(0,0xffffffff80001000,PROT_READ|PROT_WRITE,MAP_ANON|MAP_TYPE|MAP_PRIVATE,0xffffffff,0)
and fails.
On kfreebsd-i386, it tries to mmap 2GB and it succeeds.
mmap(0,0x80001000,PROT_READ|PROT_WRITE,MAP_ANON|MAP_TYPE|MAP_PRIVATE,0xffffffff,0)
And after that there are (at least) three posibilities.
- available memory is "low" (aka 2GB of RAM and no swap)
-> Didn't expect signal from child: got `Killed'
- available "fast" memory is "low" (aka 2GB of RAM and 2GB of swap)
-> Timed out: killed the child process
- available "fast" memory is "enough" (aka 3GB of RAM or fidling with TIMEOUTFACTOR=5)
-> test succeeds
The memory map before mmap of 32-bit process.
# cat /proc/XXX/maps
08048000-0804a000 r-xp 00008000 00:00 2320432 bug22
0804a000-0804b000 r--p 00008000 00:00 2320432 bug22
0804b000-0806d000 rw-p 00022000 00:00 0
2804a000-28066000 r-xp 0001e000 00:00 589760 lib32/ld-2.13.so
28066000-28067000 r--p 0001e000 00:00 589760 lib32/ld-2.13.so
28067000-28069000 rw-p 00002000 00:00 0
28069000-2806e000 r--p 00005000 00:00 497370 ld.so.cache
2806e000-28192000 r-xp 00128000 00:00 589763 lib32/libc-2.13.so
28192000-28194000 r--p 00128000 00:00 589763 lib32/libc-2.13.so
28194000-28195000 rw-p 00128000 00:00 589763 lib32/libc-2.13.so
28195000-28199000 rw-p 00004000 00:00 0
fffdf000-fffff000 rwxp 00020000 00:00 0
1161 bug22 NAMI "/dev/null"
1161 bug22 RET open 3
1161 bug22 CALL mmap(0,0x80001000,PROT_READ|PROT_WRITE,MAP_ANON|MAP_TYPE|MAP_PRIVATE,0xffffffff,0,0)
1161 bug22 RET mmap 672763904/0x28199000
1161 bug22 PSIG SIGKILL SIG_DFL
Petr
Reply to: