Re: <jemalloc>: jemalloc_arena.c:182: Failed assertion: "p[i] == 0"

From: Aleksandr Rybalko <ray_at_dlink.ua>
Date: Mon, 30 Apr 2012 01:49:32 +0300
On Sun, 29 Apr 2012 12:04:05 -0700
Adrian Chadd <adrian_at_freebsd.org> wrote:

> .. and the output from the buildworld:
> 
> cc -fpic -DPIC  -O -pipe -G0 -march=mips32
> -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/include
> -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/../../include
> -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/mips -DNLS
> -DSOFTFLOAT -D__DBINTERFACE_PRIVATE
> -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/../../contrib/gdtoa
> -DINET6
> -I/usr/home/adrian/work/freebsd/svn/obj/mipseb/mips.mips/usr/home/adrian/work/freebsd/svn/src/lib/libc
> -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/resolv
> -D_ACL_PRIVATE -DPOSIX_MISTAKE
> -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/../../contrib/jemalloc/include
> -DMALLOC_PRODUCTION
> -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/../../contrib/tzcode/stdtime
> -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/stdtime
> -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/locale -DBROKEN_DES
> -DPORTMAP -DDES_BUILTIN
> -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/rpc
> -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/mips/softfloat
> -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/softfloat
> -DSOFTFLOAT_FOR_GCC -DYP -DNS_CACHING -DSYMBOL_VERSIONING -std=gnu99
> -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized
> -Wno-pointer-sign
> -c /usr/home/adrian/work/freebsd/svn/src/lib/libc/stdlib/twalk.c -o
> twalk.So cc  -O -pipe -G0 -march=mips32
> -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/include
> -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/../../include
> -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/mips -DNLS
> -DSOFTFLOAT -D__DBINTERFACE_PRIVATE
> -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/../../contrib/gdtoa
> -DINET6
> -I/usr/home/adrian/work/freebsd/svn/obj/mipseb/mips.mips/usr/home/adrian/work/freebsd/svn/src/lib/libc
> -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/resolv
> -D_ACL_PRIVATE -DPOSIX_MISTAKE
> -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/../../contrib/jemalloc/include
> -DMALLOC_PRODUCTION
> -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/../../contrib/tzcode/stdtime
> -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/stdtime
> -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/locale -DBROKEN_DES
> -DPORTMAP -DDES_BUILTIN
> -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/rpc
> -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/mips/softfloat
> -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/softfloat
> -DSOFTFLOAT_FOR_GCC -DYP -DNS_CACHING -DSYMBOL_VERSIONING -std=gnu99
> -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized
> -Wno-pointer-sign -c jemalloc_jemalloc.c -o jemalloc_jemalloc.o cc
> -fpic -DPIC  -O -pipe -G0 -march=mips32
> -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/include
> -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/../../include
> -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/mips -DNLS
> -DSOFTFLOAT -D__DBINTERFACE_PRIVATE
> -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/../../contrib/gdtoa
> -DINET6
> -I/usr/home/adrian/work/freebsd/svn/obj/mipseb/mips.mips/usr/home/adrian/work/freebsd/svn/src/lib/libc
> -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/resolv
> -D_ACL_PRIVATE -DPOSIX_MISTAKE
> -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/../../contrib/jemalloc/include
> -DMALLOC_PRODUCTION
> -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/../../contrib/tzcode/stdtime
> -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/stdtime
> -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/locale -DBROKEN_DES
> -DPORTMAP -DDES_BUILTIN
> -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/rpc
> -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/mips/softfloat
> -I/usr/home/adrian/work/freebsd/svn/src/lib/libc/softfloat
> -DSOFTFLOAT_FOR_GCC -DYP -DNS_CACHING -DSYMBOL_VERSIONING -std=gnu99
> -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized
> -Wno-pointer-sign -c jemalloc_jemalloc.c -o jemalloc_jemalloc.So
> jemalloc_jemalloc.c: In function 'calloc': jemalloc_jemalloc.c:1027:
> internal compiler error: in change_address_1, at emit-rtl.c:1784
> 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
> 
> 
> and the diff against build_freebsd:
> 
> 
> Index: build_freebsd
> ===================================================================
> --- build_freebsd       (revision 165)
> +++ build_freebsd       (working copy)
> _at__at_ -45,6 +45,9 _at__at_
>      X_TARGET_CPUTYPE="TARGET_CPUTYPE=${TARGET_CPUTYPE}"
>  fi
> 
> +# Create a make.conf
> +echo "MALLOC_PRODUCTION=" > ${X_DESTDIR}/../make.conf.${BUILDNAME}
> +
>  while [ "x$1" != "x" ]; do
>         if [ "$1" = "installworld" ]; then
>                 mkdir -p ${X_DESTDIR}/usr/local/bin/
> _at__at_ -63,7 +66,8 _at__at_
>             ${X_TARGET_CPUTYPE} KERNCONF=${KERNCONF}
> DESTDIR=${X_DESTDIR}       \
>             KODIR=/boot/kernel.${KERNCONF}/
>          \
>             KMODDIR=/boot/kernel.${KERNCONF}/
>          \
> -           __MAKE_CONF=/dev/null SRCCONF=/dev/null
>          \
> +           __MAKE_CONF=${X_DESTDIR}/../make.conf.${BUILDNAME}
>          \
> +           SRCCONF=/dev/null
>          \
>             LOCAL_DIRS="${LOCAL_DIRS}"
>          \
>             LOCAL_TOOL_DIRS="${LOCAL_TOOL_DIRS}" $1
>          \
>         || exit 1
> _at__at_ -74,3 +78,6 _at__at_
>         fi
>         shift
>  done
> +
> +#          __MAKE_CONF=/dev/null
>          \
> +#          SRCCONF=${X_DESTDIR}/../src.conf.${BUILDNAME}
>          \
> 
> 
> 
> adrian

Hi,

confirm, same for zrouter builds, at least for MIPS32EB and MIPS32EL.
In short, MALLOC_PRODUCTION flag for MIPS32EL used this way:
make \
        TARGET=mips \
        TARGET_ARCH=mipsel \
        TARGET_CPUARCH=mips \
	... \
	MALLOC_PRODUCTION=yes toolchain
make \
        TARGET=mips \
        TARGET_ARCH=mipsel \
        TARGET_CPUARCH=mips \
	... \
	MALLOC_PRODUCTION=yes buildworld

Just s/mipsel/mips/ for MIPS32EB.

WBW
-- 
Aleksandr Rybalko <ray_at_dlink.ua>
Received on Sun Apr 29 2012 - 20:49:47 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:26 UTC