Re: memory alignment problems with -current on amd64?

From: Mark Atkinson <atkin901_at_yahoo.com>
Date: Mon, 09 Feb 2009 14:50:03 -0800
Mark Atkinson wrote:
> With recent kernels on HAMMER/amd64 I cannot complete a buildworld.  The
> compilation keeps failing with problems like:
> 
> cc -O2 -pipe -DBFD_DEFAULT_TARGET_SIZE=64 -I.
> -I/usr/src/gnu/usr.bin/binutils/as
> -I/usr/src/gnu/usr.bin/binutils/as/../libbfd
> -I/usr/obj/usr/src/tmp/usr/src/gnu/usr.bin/binutils/as/../libbfd
> -I/usr/src/gnu/usr.bin/binutils/as/../../../../contrib/binutils/include
> -DDEFAULT_ARCH=\"x86_64\" -DTARGET_CPU=\"x86_64\"
> -DTARGET_CANONICAL=\"x86_64-obrien-freebsd\"
> -DTARGET_ALIAS=\"x86_64-obrien-freebsd\" -DVERSION=\""2.15
> [FreeBSD]
> 2004-05-23"\" -D_GNU_SOURCE
> -I/usr/src/gnu/usr.bin/binutils/as/../../../../contrib/binutils/gas
> -I/usr/src/gnu/usr.bin/binutils/as/../../../../contrib/binutils/gas/config
> -I/usr/src/gnu/usr.bin/binutils/as/../../../../contrib/binutils
> -I/usr/src/gnu/usr.bin/binutils/as
> -I/usr/src/gnu/usr.bin/binutils/as/amd64-freebsd 
> -I/usr/obj/usr/src/tmp/legacy/usr/include -c
> /usr/src/gnu/usr.bin/binutils/as/../../../../contrib/binutils/gas/subsegs.c
> /usr/src/gnu/usr.bin/binutils/as/../../../../contrib/binutils/gas/subsegs.c:
> In function 'subseg_set_rest':
> /usr/src/gnu/usr.bin/binutils/as/../../../../contrib/binutils/gas/subsegs.c:205:
> internal compiler error: Bus error: 10 Please submit a full bug report,
> with preprocessed source if appropriate. See
> <URL:http://gcc.gnu.org/bugs.html> for instructions. *** Error code 1 1
> error *** Error code 2 1 error *** Error code 2 1 error *** Error code 2
> 1 error
> *** Error code 2
> 1 error
> 
> Yet if I run the failed command it will complete successfully:
> 
> [root_at_dl385g5 /usr/src]#
> cc -O2 -pipe -DBFD_DEFAULT_TARGET_SIZE=64 -I.
> -I/usr/src/gnu/usr.bin/binutils/as
> -I/usr/src/gnu/usr.bin/binutils/as/../libbfd
> -I/usr/obj/usr/src/tmp/usr/src/gnu/usr.bin/binutils/as/../libbfd
> -I/usr/src/gnu/usr.bin/binutils/as/../../../../contrib/binutils/include
> -DDEFAULT_ARCH=\"x86_64\" -DTARGET_CPU=\"x86_64\"
> -DTARGET_CANONICAL=\"x86_64-obrien-freebsd\"
> -DTARGET_ALIAS=\"x86_64-obrien-freebsd\" -DVERSION=\""2.15
> [FreeBSD]
> 2004-05-23"\" -D_GNU_SOURCE
> -I/usr/src/gnu/usr.bin/binutils/as/../../../../contrib/binutils/gas
> -I/usr/src/gnu/usr.bin/binutils/as/../../../../contrib/binutils/gas/config
> -I/usr/src/gnu/usr.bin/binutils/as/../../../../contrib/binutils
> -I/usr/src/gnu/usr.bin/binutils/as
> -I/usr/src/gnu/usr.bin/binutils/as/amd64-freebsd 
> -I/usr/obj/usr/src/tmp/legacy/usr/include -c
> /usr/src/gnu/usr.bin/binutils/as/../../../../contrib/binutils/gas/subsegs.c
> [root_at_dl385g5 /usr/src]# echo $?
> 0
> 
> If I boot back to a kernel from sources Oct 15th 2008, I can complete a
> buildworld on this machine no problem.
> 
> * This is a HP DL385G5 with 1 quad core AMD 2100 and 10G of memory.
> * This the amd64 GENERIC kernel
> * I've tried reducing hw.physmem to 2G, but that didn't make any
> difference. * I will recieve bus errors when running buildworld w/ -j1
> * If I run buildworld with a larger number the machine will reset w/ no
> panic.
> 
> Ideas?

It turns out some errors will turn up in memtest86+ if you select 'Bios
Probe' as the sizing method.  Otherwise using the e820 method by default it
will run all day over the 10G.  The Memtest doc themselve state
that 'Probe' and 'All' may return the same sizing and are not considered
safe.  'Probe' seems to behave exactly the way -current is behaving
(returning errors, and reseting the box). 'All' happens to lock the box on
this machine.

Since I can go back to the Oct 15th kernel and do a complete buildworld, I
can only assume -current has changed since then for amd64 sizing to maybe
access something other than what the e820 method would return?

The SMAP appears the same, but you can see the difference in the Physical
memory chunk(s) below for the two kernels.   

8-current (from Feb 4th):
SMAP type=01 base=0000000000000000 len=000000000009f400
SMAP type=02 base=000000000009f400 len=0000000000000c00
SMAP type=02 base=00000000000f0000 len=0000000000010000
SMAP type=01 base=0000000000100000 len=000000000ff00000
SMAP type=01 base=0000000010000000 len=0000000010000000
SMAP type=01 base=0000000020000000 len=00000000afe4e000
SMAP type=03 base=00000000cfe4e000 len=0000000000008000
SMAP type=01 base=00000000cfe56000 len=0000000000001000
SMAP type=02 base=00000000cfe57000 len=00000000001a9000
SMAP type=02 base=00000000d0000000 len=0000000010000000
SMAP type=02 base=00000000fec00000 len=0000000000100000
SMAP type=02 base=00000000fee00000 len=0000000000010000
SMAP type=02 base=00000000ffc00000 len=0000000000400000
SMAP type=01 base=0000000100000000 len=00000001affff000

usable memory = 10720202752 (10223 MB)
Physical memory chunk(s):
0x0000000000001000 - 0x000000000009bfff, 634880 bytes (155 pages)
0x0000000000f54000 - 0x00000000cfe4dfff, 3471810560 bytes (847610 pages)
0x00000000cfe56000 - 0x00000000cfe56fff, 4096 bytes (1 pages)
0x0000000100000000 - 0x000000029d212fff, 6931165184 bytes (1692179 pages)
avail memory  = 10365558784 (9885 MB)

8-current (Oct 15th)
SMAP type=01 base=0000000000000000 len=000000000009f400
SMAP type=02 base=000000000009f400 len=0000000000000c00
SMAP type=02 base=00000000000f0000 len=0000000000010000
SMAP type=01 base=0000000000100000 len=000000000ff00000
SMAP type=01 base=0000000010000000 len=0000000010000000
SMAP type=01 base=0000000020000000 len=00000000afe4e000
SMAP type=03 base=00000000cfe4e000 len=0000000000008000
SMAP type=01 base=00000000cfe56000 len=0000000000001000
SMAP type=02 base=00000000cfe57000 len=00000000001a9000
SMAP type=02 base=00000000d0000000 len=0000000010000000
SMAP type=02 base=00000000fec00000 len=0000000000100000
SMAP type=02 base=00000000fee00000 len=0000000000010000
SMAP type=02 base=00000000ffc00000 len=0000000000400000
SMAP type=01 base=0000000100000000 len=00000001affff000

usable memory = 10720538624 (10223 MB)
Physical memory chunk(s):
0x0000000000001000 - 0x000000000009bfff, 634880 bytes (155 pages)
0x0000000000f02000 - 0x00000000cfe4dfff, 3472146432 bytes (847692 pages)
0x00000000cfe56000 - 0x00000000cfe56fff, 4096 bytes (1 pages)
0x0000000100000000 - 0x000000029d212fff, 6931165184 bytes (1692179 pages)
avail memory  = 10365890560 (9885 MB)

-- 
Mark Atkinson
atkin901_at_yahoo.com
(!wired)?(coffee++):(wired);
Received on Mon Feb 09 2009 - 21:50:22 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:41 UTC