[racket-dev] mips/ia64 build failures due to unaligned memory access (was: Re: Build failure on specific PPC systems)

From: James Vega (jamessan at debian.org)
Date: Sat Sep 17 09:10:44 EDT 2011

On Fri, Aug 26, 2011 at 05:42:10AM -0400, Eli Barzilay wrote:
> Two days ago, James Vega wrote:
> > 
> > Since I've generally had more luck using the cgc GC on less
> > mainstream systems, I set the build to use that for PowerPC and let
> > it be in case things changed and it started working.
> This is a bad idea.  There are certain things that are practically
> impossible with the CGC.

Given that warning, I started revisiting the failures I had seen with 3m.  All
the below is with 5.1.3.

mips and ia64 both fail with unaligned access, although in different

ia64's build failure

|cd gc2; /usr/bin/make all
|make[4]: Entering directory `/home/jamessan/racket-5.1.3+dfsg1/build/racket/gc2'
|/usr/bin/make xsrc/precomp.h
|make[5]: Entering directory `/home/jamessan/racket-5.1.3+dfsg1/build/racket/gc2'
|env XFORM_PRECOMP=yes ../racketcgc -cqu /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/xform.rkt --setup . --cpp "gcc -E -I./.. -I/home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../include "  --keep-lines -o xsrc/precomp.h /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/precomp.c
|GC Warning: GC_register_stackbottom should be set with GC_stackbottom
|Removing old xform-collects tree...
|Copying tree...
|[snip copying]
|Compiling xform support...
|xform.rkt(2950): unaligned access to 0x600000000003708c, ip=0x400000000035a9e1
|make[5]: *** [xsrc/precomp.h] Illegal instruction (core dumped)
|make[5]: Leaving directory `/home/jamessan/racket-5.1.3+dfsg1/build/racket/gc2'

and backtrace

|(gdb) bt full
|#0  0x400000000035ac31 in scheme_setjmpup_relative (b=0x0, base=0x47e0b4000000000,
|    start=0x47e0b0020000000, c=0x47e0ac020000000)
|    at /home/jamessan/racket-5.1.3+dfsg1/src/racket/src/setjmpup.c:553
|        local = 1
|        disguised_b = 0

mips' build failure

|make[3]: Leaving directory `/home/jamessan/racket-5.1.3+dfsg1/build'
|env CFLAGS="-g -Wall  -Wall     " LDFLAGS=""  racket/racket3m -X "/home/jamessan/racket-5.1.3+dfsg1/debian/tmp/usr/share/racket/collects" -N "raco setup" -l- setup -j 1 --no-docs --no-zo   --no-user
|raco setup: bootstrapping from source...
|make[2]: *** [install-3m] Bus error (core dumped)

and backtrace

|(gdb) bt
|#0  0x0060675c in syncing_ready (s=0x2dbf3220, sinfo=0x7fe4efc0)
|    at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/thread.c:5661
|#1  0x00601e34 in scheme_block_until (_f=0x606114 <syncing_ready>,
|    fdf=0x60697c <syncing_needs_wakeup>, data=0x2dbf3220, delay=0)
|    at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/thread.c:4258
|#2  0x006079fc in do_sync (name=0x6aa2fc "sync", argc=1, argv=0x2d69efa8, with_break=0,
|    with_timeout=0, _tailok=1)
|    at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/thread.c:5903
|#3  0x00607fe4 in sch_sync (argc=1, argv=0x2d69efa8)
|    at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/thread.c:5996
|#4  0x00441944 in scheme_do_eval (obj=0x71bc78, num_rands=1, rands=0x2d69efa8, get_value=1)
|    at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/eval.c:2407
|#5  0x00444a28 in scheme_do_eval (obj=0x2d6bb9b8, num_rands=5, rands=0x2d69ef9c, get_value=-1)
|    at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/eval.c:3368
|#6  0x00465928 in apply_k () at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/fun.c:1285
|#7  0x00465204 in scheme_top_level_do_worker (k=0x465870 <apply_k>, eb=1, new_thread=1,
|    dyn_state=0x0) at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/fun.c:1126
|#8  0x00465b30 in scheme_apply_thread_thunk (rator=0x2d74af48)
|    at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/fun.c:1325
|#9  0x005fd854 in start_child (child=0x2d689038, child_eval=0x2dbf32b0)
|    at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/thread.c:2766
|#10 0x005fdc10 in make_subprocess (child_thunk=0x2dbf32b0, child_start=0x7fe4f99c,
|    config=0x2dbf3210, cells=0x2dbf31e8, break_cell=0x2b2587c0, mgr=0x0, normal_kill=1)
|    at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/thread.c:2855
|#11 0x005fe800 in scheme_thread_w_details (thunk=0x4, config=0x2b2085b0, cells=0x7fe4f9e0,
|    break_cell=0x436a2c, mgr=0x0, suspend_to_kill=4)
|    at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/thread.c:3073
|#12 0x2d5147b0 in ?? ()
|warning: GDB can't find the start of the function at 0x2d5147ae.

If there's more information I can provide, let me know.

GPG Key: 1024D/61326D40 2003-09-02 James Vega <jamessan at debian.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.racket-lang.org/dev/archive/attachments/20110917/31d76b13/attachment.sig>

Posted on the dev mailing list.