Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Nov 2018 06:04:38 -0800
From:      Mark Millard <marklmi@yahoo.com>
To:        Sean Bruno <sbruno@freebsd.org>, Mark Millard via freebsd-ports <freebsd-ports@freebsd.org>
Subject:   ports -r484565 : qemu-arm-static fails with: (start < end), function page_set_flags, file . . . accel/tcg/translate-all.c, line 2077
Message-ID:  <783DE9B1-F1F5-45B5-8C3E-0B0D8BF4CC03@yahoo.com>

next in thread | raw e-mail | index | archive | help
After updating ports from -r480180 to -r484565 the rebuilt
qemu-arm-static used to cross-build ports with poudriere now
fails with the likes of the following assert (2 examples).
Other ports have completed their package phase just fine
so this does not always fail. But for cmake and gcc8 failure
seems repeatable in my context.

I did not have this problem at all when based on -r480180 .


=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<phas=
e: package        >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D
=3D=3D=3D>  Building package for cmake-3.12.3
Assertion failed: (start < end), function page_set_flags, file =
/wrkdirs/usr/ports/emulators/qemu-user-static/work/qemu-bsd-user-2cb0cdd/a=
ccel/tcg/translate-all.c, line 2077.
Child process pid=3D8254 terminated abnormally: Abort trap
*** Error code 1

Stop.
make: stopped in /usr/ports/devel/cmake
=3D>> Cleaning up wrkdir
=3D=3D=3D>  Cleaning for cmake-3.12.3
build of devel/cmake | cmake-3.12.3 ended at Sat Nov 10 00:32:06 PST =
2018
build time: 00:22:40


and:

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<phas=
e: package        >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D
=3D=3D=3D>  Building package for gcc8-8.2.0_1
Assertion failed: (start < end), function page_set_flags, file =
/wrkdirs/usr/ports/emulators/qemu-user-static/work/qemu-bsd-user-2cb0cdd/a=
ccel/tcg/translate-all.c, line 2077.
Child process pid=3D3100 terminated abnormally: Abort trap
*** Error code 1

Stop.
make: stopped in /usr/ports/lang/gcc8
=3D>> Cleaning up wrkdir
=3D=3D=3D>  Cleaning for gcc8-8.2.0_1
build of lang/gcc8 | gcc8-8.2.0_1 ended at Sat Nov 10 04:10:58 PST 2018
build time: 04:08:19



The code with the assert is:

/* Modify the flags of a page and invalidate the code if necessary.
   The flag PAGE_WRITE_ORG is positioned automatically depending
   on PAGE_WRITE.  The mmap_lock should already be held.  */
void page_set_flags(target_ulong start, target_ulong end, int flags)
{
    target_ulong addr, len;

    /* This function should never be called with addresses outside the
       guest address space.  If this assert fires, it probably indicates
       a missing call to h2g_valid.  */
#if TARGET_ABI_BITS > L1_MAP_ADDR_SPACE_BITS
    assert(end <=3D ((target_ulong)1 << L1_MAP_ADDR_SPACE_BITS));
#endif
    assert(start < end);
    assert_memory_lock();
. . .


The failed assert looks a bit odd because for:

start+TARGET_PAGE_SIZE < end

len will wrap around in the following, making for a huge len:

    target_ulong addr, len;
. . .
    for (addr =3D start, len =3D end - start;
         len !=3D 0;
         len -=3D TARGET_PAGE_SIZE, addr +=3D TARGET_PAGE_SIZE) {
. . .

(I ignore start+TARGET_PAGE_SIZE itself overflowing above.)


Context based on: head -r484565

=3D=3D=3D
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?783DE9B1-F1F5-45B5-8C3E-0B0D8BF4CC03>