Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

asymptote fails to compile on m68k #172

Closed
hpreusse opened this issue Aug 12, 2020 · 6 comments
Closed

asymptote fails to compile on m68k #172

hpreusse opened this issue Aug 12, 2020 · 6 comments

Comments

@hpreusse
Copy link

The package fails to build on m68k inside a qemu vm. I'm able to reproduce the issue locally, a core dump was generated, here is the back trace. The issue was first visible w/ 2.66-1. I'm not 100% sure if the root cause is in asy or in one of the used libs. Please be so kind to comment. Thanks! Debian Bug

(gdb) bt
#0  __GI_raise (sig=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0xfd9c85e8 in __GI_abort () at abort.c:79
#2  0xfd9d4142 in __assert_fail_base (fmt=0xfdacba4b "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0xfe1dce6d "((size_t)addr & (sizeof(*addr) - 1)) == 0",
    file=0xfe1dce97 "/usr/include/atomic_ops/sysdeps/loadstore/atomic_load.h", line=31, function=0xfe1de77d <__PRETTY_FUNCTION__.0> "AO_load") at assert.c:92
#3  0xfd9d41ca in __GI___assert_fail (assertion=0xfe1dce6d "((size_t)addr & (sizeof(*addr) - 1)) == 0", file=0xfe1dce97 "/usr/include/atomic_ops/sysdeps/loadstore/atomic_load.h", line=31,
    function=0xfe1de77d <__PRETTY_FUNCTION__.0> "AO_load") at assert.c:101
#4  0xfe1dba0e in AO_load (addr=<optimized out>) at /usr/include/atomic_ops/sysdeps/loadstore/atomic_load.h:31
#5  AO_load (addr=<optimized out>) at /usr/include/atomic_ops/sysdeps/loadstore/atomic_load.h:28
#6  GC_mark_thread_local_fls_for (p=0xfe2133e2 <first_thread+54>) at thread_local_alloc.c:271
#7  0xfe1d854e in GC_mark_thread_local_free_lists () at pthread_support.c:284
#8  0xfe1d1cec in GC_push_roots (all=1, cold_gc_frame=0xfeb59a68 "\376\034b\n\376\265\232h") at mark_rts.c:938
#9  0xfe1d10aa in GC_mark_some (cold_gc_frame=0xfeb59a68 "\376\034b\n\376\265\232h") at mark.c:355
#10 0xfe1c620a in GC_stopped_mark (stop_func=0xfe1c5be4 <GC_never_stop_func>) at alloc.c:793
#11 0xfe1c6986 in GC_try_to_collect_inner (stop_func=0xfe1c5be4 <GC_never_stop_func>) at alloc.c:541
#12 GC_try_to_collect_inner (stop_func=0xfe1c5be4 <GC_never_stop_func>) at alloc.c:485
#13 0xfe1d36e2 in GC_init () at misc.c:1325
#14 GC_init () at misc.c:901
#15 0xfe1cd98c in GC_generic_malloc_inner (lb=23, k=0) at malloc.c:174
#16 0xfe1cda96 in GC_generic_malloc (lb=23, k=0) at malloc.c:251
#17 0xfe1ce530 in GC_generic_malloc_ignore_off_page (lb=23, k=0) at mallocx.c:207
#18 0xfe1ce728 in GC_malloc_atomic_ignore_off_page (lb=23) at mallocx.c:253
#19 0xfebf2696 in GC_selective_alloc<GC_true_type> (ignore_off_page=<optimized out>, n=<optimized out>) at /usr/include/gc/gc_allocator.h:127
#20 gc_allocator_ignore_off_page<char>::allocate (GC_n=<optimized out>, this=<optimized out>) at /usr/include/gc/gc_allocator.h:243
#21 std::allocator_traits<gc_allocator_ignore_off_page<char> >::allocate (__n=<optimized out>, __a=...) at /usr/include/c++/10/bits/alloc_traits.h:314
#22 std::__cxx11::basic_string<char, std::char_traits<char>, gc_allocator_ignore_off_page<char> >::_M_create (__capacity=@0xfeb597dc: 2147483647, __old_capacity=2, this=<optimized out>)
    at /usr/include/c++/10/bits/basic_string.tcc:153
#23 0xfebf2b04 in std::__cxx11::basic_string<char, std::char_traits<char>, gc_allocator_ignore_off_page<char> >::_M_construct<char const*> (__end=<optimized out>, __beg=<optimized out>,
    this=<optimized out>) at /usr/include/c++/10/bits/char_traits.h:395
#24 std::__cxx11::basic_string<char, std::char_traits<char>, gc_allocator_ignore_off_page<char> >::_M_construct_aux<char const*> (__end=<optimized out>, __beg=<optimized out>, this=<optimized out>)
    at /usr/include/c++/10/bits/basic_string.h:247
#25 std::__cxx11::basic_string<char, std::char_traits<char>, gc_allocator_ignore_off_page<char> >::_M_construct<char const*> (__end=<optimized out>, __beg=<optimized out>, this=<optimized out>)
    at /usr/include/c++/10/bits/basic_string.h:266
#26 std::__cxx11::basic_string<char, std::char_traits<char>, gc_allocator_ignore_off_page<char> >::basic_string (this=0xfef9e540 <settings::WebGLheader>, __s=0xfeec1065 "webgl/WebGLheader.html",
    __a=...) at /usr/include/c++/10/bits/basic_string.h:527
#27 0xfebd0aa2 in __static_initialization_and_destruction_0 (__initialize_p=<optimized out>, __priority=<optimized out>) at camperror.cc:64
#28 _GLOBAL__sub_I__ZN4camp11reportErrorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcE28gc_allocator_ignore_off_pageIcEEE () at camperror.cc:64
#29 0xfeec1010 in __libc_csu_init ()
#30 0x0000000a in ?? ()
#31 0xfeb59cf4 in ?? ()
#32 0xfeb59d20 in ?? ()
#33 0x00000000 in ?? ()
(gdb) quit
@johncbowman
Copy link
Member

johncbowman commented Aug 12, 2020 via email

@hpreusse
Copy link
Author

We use the GC library provided by as Debian package, which is currently version 8.0.4. The test suite seems to be disabled on m68k, but runs fine on amd64.

@johncbowman
Copy link
Member

Try
./configure --enable-gc=8.0.4
and follow the outputted instructions so that make will build and use a local copy of libgc.

@hpreusse
Copy link
Author

I got the error message that test suite fails:

make[5]: Leaving directory '/root/asymptote-2.67/gc-8.0.4'
/usr/bin/make  check-TESTS
make[5]: Entering directory '/root/asymptote-2.67/gc-8.0.4'
make[6]: Entering directory '/root/asymptote-2.67/gc-8.0.4'
./test-driver: line 107: 18505 Aborted                 "$@" > $log_file 2>&1
FAIL: cordtest
./test-driver: line 107: 18522 Aborted                 "$@" > $log_file 2>&1
FAIL: gctest
./test-driver: line 107: 18539 Aborted                 "$@" > $log_file 2>&1
FAIL: leaktest
./test-driver: line 107: 18556 Aborted                 "$@" > $log_file 2>&1
FAIL: middletest
./test-driver: line 107: 18573 Aborted                 "$@" > $log_file 2>&1
FAIL: smashtest
./test-driver: line 107: 18590 Aborted                 "$@" > $log_file 2>&1
FAIL: hugetest
./test-driver: line 107: 18607 Aborted                 "$@" > $log_file 2>&1
FAIL: realloc_test
./test-driver: line 107: 18624 Aborted                 "$@" > $log_file 2>&1
FAIL: staticrootstest
PASS: test_atomic_ops
./test-driver: line 107: 18657 Aborted                 "$@" > $log_file 2>&1
FAIL: threadleaktest
./test-driver: line 107: 18674 Aborted                 "$@" > $log_file 2>&1
FAIL: threadkey_test
./test-driver: line 107: 18691 Aborted                 "$@" > $log_file 2>&1
FAIL: subthreadcreate_test
./test-driver: line 107: 18708 Aborted                 "$@" > $log_file 2>&1
FAIL: initsecondarythread_test
./test-driver: line 107: 18726 Aborted                 "$@" > $log_file 2>&1
FAIL: disclaim_test
./test-driver: line 107: 18743 Aborted                 "$@" > $log_file 2>&1
FAIL: disclaim_bench
./test-driver: line 107: 18760 Aborted                 "$@" > $log_file 2>&1
FAIL: disclaim_weakmap_test
============================================================================
Testsuite summary for gc 8.0.4
============================================================================
# TOTAL: 16
# PASS:  1
# SKIP:  0
# XFAIL: 0
# FAIL:  15
# XPASS: 0
# ERROR: 0
============================================================================
See ./test-suite.log
Please report to https://github.com/ivmai/bdwgc/issues
============================================================================

I'll report @bdwgc correct?

@hpreusse
Copy link
Author

..happens even w/ latest git checkout.

@johncbowman
Copy link
Member

Yes, please report it to https://github.com/ivmai/bdwgc/issues. I will close this bug report for now. For now you can try an earlier version of Boehm GC (or even disable it, although you will then have serious memory leaks...).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants