[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 12:36:57 EDT 2011

On Sat, Sep 17, 2011 at 07:53:28AM -0600, Matthew Flatt wrote:
> At Sat, 17 Sep 2011 09:10:44 -0400, James Vega wrote:
> > mips and ia64 both fail with unaligned access, although in different
> > places.
> > 
> > ia64's build failure
> 
> I think Racket won't work on ia64 iecause we never worked out how to
> deal with its multiple stacks.

Ok.  I can remove that from the set of architectures on which we build.

> > 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
> 
> I'm not sure, but here are two things to try:
> 
>  * In "src/racket/gc2/newgc.c" around line 2601, force
>    `generations_available' to 0:
> 
>        newgc->generations_available = 0;
> 
>    If something is going wrong with the write barrier, then disabling
>    generational GC should allow the build to continue.

That seems to have worked.

>  * In "src/racket/gc2/sighand.c" around line 122, change
> 
>       #  define USE_SIGACTON_SIGNAL_KIND SIGSEGV
> 
>    to
> 
>       #  define USE_SIGACTON_SIGNAL_KIND SIGBUS
> 
>    to check whether page-protection failures trigger SIGBUS instead of
>    SIGSEGV. I think this is unlikely to be the problem, but it may be
>    worth checking.

This caused a different failure than before.  Build step and backtrace below,
if they're of interest.

,--------------------------------------
|make[5]: Entering directory `/home/jamessan/racket-5.1.3+dfsg1/build/gracket/gc2'
|/usr/bin/make ../gracket3m
|make[6]: Entering directory `/home/jamessan/racket-5.1.3+dfsg1/build/gracket/gc2'
|../../racket/racket3m -cqu /home/jamessan/racket-5.1.3+dfsg1/src/gracket/gc2/../../racket/gc2/xform.rkt --setup ../../racket/gc2 --cpp "gcc -E -I/home/jamessan/racket-5.1.3+dfsg1/src/gracket/gc2/../../racket/gc2 -I./../../racket/ -I/home/jamessan/racket-5.1.3+dfsg1/src/gracket/gc2/../../racket/include/     -Dwx_xt -MMD"  --keep-lines -o xsrc/grmain.c +D INITIAL_COLLECTS_DIRECTORY='"'"`cd /home/jamessan/racket-5.1.3+dfsg1/src/gracket/gc2/../../../collects; pwd`"'"' /home/jamessan/racket-5.1.3+dfsg1/src/gracket/gc2/../grmain.c
|make[6]: *** [xsrc/grmain.c] Segmentation fault (core dumped)
`--------------------------------------

,--------------------------------------
|#0  scheme_gmp_tls_unload (s=0x2b1b95bc, data=0x0) at /home/jamessan/racket-5.1.3+dfsg1/src/racket/src/gmp/gmp.c:5813
|#1  0x0054d114 in done_with_GC () at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/thread.c:7619
|#2  0x0057f690 in garbage_collect (gc=0x61a008, force_full=<optimized out>, switching_master=<optimized out>, lmi=<optimized out>) at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/newgc.c:4453
|#3  0x00582cd4 in allocate_slowpath (allocate_size=<optimized out>, gc=<optimized out>, newptr=<optimized out>) at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/newgc.c:1180
|#4  allocate (type=1, request_size=<optimized out>) at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/newgc.c:1218
|#5  allocate (type=1, request_size=<optimized out>) at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/newgc.c:1329
|#6  GC_malloc_atomic (s=<optimized out>) at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/newgc.c:1329
|#7  0x00518238 in scheme_make_sized_offset_byte_string (chars=0x2b235b60 "/home/jamessan/racket-5.1.3+dfsg1/build/gracket/gc2/../../racket/gc2/", d=0, len=65, copy=<optimized out>) at xsrc/string.c:3894
|#8  0x0043e8f0 in scheme_make_sized_offset_kind_path (chars=<optimized out>, d=<optimized out>, len=<optimized out>, copy=<optimized out>, kind=57) at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/file.c:562
|#9  0x00444dec in make_exposed_sized_offset_path (already_protected=<optimized out>, chars=0x2b03ff58 "+#[`e/jamessan/racket-5.1.3+dfsg1/build/gracket/gc2/../../racket/gc2/", d=0, len=65, copy=1, kind=57) at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/file.c:716
|#10 0x00445398 in do_split_path (path=<optimized out>, len=<optimized out>, base_out=0x7f7fe11c, id_out=0x7f7fe128, cleaned_slashes=0x7f7fe124, kind=57) at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/file.c:3470
|#11 0x00441c10 in do_simplify_path (path=0x2b1b9798, cycle_check=0x5fee68, skip=<optimized out>, use_filesystem=0, force_rel_up=0, kind=57) at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/file.c:4424
|#12 0x00446854 in simplify_path (argc=<optimized out>, argv=0x2b1a8f80) at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/file.c:4659
|#13 0x0043ac48 in scheme_do_eval (obj=0x642718, num_rands=2, rands=0x2b1a8f80, get_value=1) at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/eval.c:2407
|#14 0x00439e58 in scheme_do_eval (obj=0x2b1b97a8, num_rands=<optimized out>, rands=0x7f7fe614, get_value=1) at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/eval.c:3368
|#15 0x0044a928 in apply_k () at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/fun.c:1287
|#16 0x00451774 in scheme_top_level_do_worker (k=0x44a8b8 <apply_k>, eb=<optimized out>, new_thread=0, dyn_state=0x0) at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/fun.c:1126
|#17 0x0046f4d0 in _module_resolve (modidx=0x2b1b97f0, stx=0x0, env=0x0, load_it=1) at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/module.c:3221
|#18 0x00477eec in compute_require_names (menv=0x2b1b9840, phase=0x1, load_env=0x2b1b8c30, syntax_idx=0x2b1b9820) at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/module.c:3996
|#19 0x0047d360 in chain_start_module (syntax_idx=0x2b1b9820, cycle_list=<optimized out>, base_phase=0, eval_run=1, eval_exp=0, env=0x2b1b8c30, menv=0x2b1b9840) at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/module.c:4061
|#20 scheme_module_start_finish (a=<optimized out>) at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/module.c:4178
|#21 0x0047b0cc in chain_start_module_w_push (syntax_idx=<optimized out>, cycle_list=<optimized out>, base_phase=0, eval_run=1, eval_exp=0, env=<optimized out>, menv=<optimized out>) at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/module.c:4172
|#22 start_module (m=0x2b1b98e0, env=0x2b1b8c30, restart=0, syntax_idx=0x2b1b9820, eval_exp=0, eval_run=1, base_phase=0, cycle_list=0x2b1b98d0) at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/module.c:4444
|#23 0x0047d3c8 in chain_start_module (syntax_idx=0x2b1b9988, cycle_list=<optimized out>, base_phase=0, eval_run=1, eval_exp=0, env=0x2b1b8c30, menv=0x2b1b99b8) at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/module.c:4068
|#24 scheme_module_start_finish (a=<optimized out>) at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/module.c:4178
|#25 0x0047b0cc in chain_start_module_w_push (syntax_idx=<optimized out>, cycle_list=<optimized out>, base_phase=0, eval_run=1, eval_exp=0, env=<optimized out>, menv=<optimized out>) at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/module.c:4172
|#26 start_module (m=0x2b1b9a48, env=0x2b1b8c30, restart=0, syntax_idx=0x2b1b9988, eval_exp=0, eval_run=1, base_phase=0, cycle_list=0x2b1b9a38) at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/module.c:4444
|#27 0x0047d3c8 in chain_start_module (syntax_idx=0x2b1b9af0, cycle_list=<optimized out>, base_phase=0, eval_run=1, eval_exp=0, env=0x2b1b8c30, menv=0x2b1b9b20) at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/module.c:4068
|#28 scheme_module_start_finish (a=<optimized out>) at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/module.c:4178
|#29 0x0047b0cc in chain_start_module_w_push (syntax_idx=<optimized out>, cycle_list=<optimized out>, base_phase=0, eval_run=1, eval_exp=0, env=<optimized out>, menv=<optimized out>) at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/module.c:4172
|#30 start_module (m=0x2b1b9bb0, env=0x2b1b8c30, restart=0, syntax_idx=0x2b1b9af0, eval_exp=0, eval_run=1, base_phase=0, cycle_list=0x2b1b9ba0) at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/module.c:4444
|#31 0x0047d3c8 in chain_start_module (syntax_idx=0x2b1b9c58, cycle_list=<optimized out>, base_phase=0, eval_run=1, eval_exp=0, env=0x2b1b8c30, menv=0x2b1b9c88) at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/module.c:4068
|#32 scheme_module_start_finish (a=<optimized out>) at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/module.c:4178
|#33 0x0047b0cc in chain_start_module_w_push (syntax_idx=<optimized out>, cycle_list=<optimized out>, base_phase=0, eval_run=1, eval_exp=0, env=<optimized out>, menv=<optimized out>) at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/module.c:4172
|#34 start_module (m=0x2b1b9d08, env=0x2b1b8c30, restart=0, syntax_idx=0x2b1b9c58, eval_exp=0, eval_run=1, base_phase=0, cycle_list=0x5fee68) at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/module.c:4444
|#35 0x004841e8 in _dynamic_require (argc=<optimized out>, argv=<optimized out>, env=0x2b1b8c30, get_bucket=0, phase=0, indirect_ok=<optimized out>, fail_with_error=1, position=<optimized out>, mod_phase=0) at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/module.c:1091
|#36 0x00484b34 in scheme_dynamic_require (argc=2, argv=0x2b1a8fac) at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/module.c:1155
|#37 0x0043ac48 in scheme_do_eval (obj=0x63c3f8, num_rands=2, rands=0x2b1a8fac, get_value=-1) at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/eval.c:2407
|#38 0x004708e4 in body_one_expr (prefix_plus_expr=0x2b1b95bc, argc=<optimized out>, argv=<optimized out>) at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/module.c:4590
|#39 0x00439688 in scheme_do_eval (obj=0x2b1b9dd0, num_rands=0, rands=0x0, get_value=-1) at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/eval.c:2820
|#40 0x00457cf8 in scheme_finish_apply_for_prompt (prompt=0x0, _prompt_tag=<optimized out>, proc=0x2b1b9dd0, argc=0, argv=0x0) at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/fun.c:5535
|#41 0x00457e14 in scheme_apply_for_prompt (prompt=<optimized out>, prompt_tag=<optimized out>, proc=0x2b1b9dd0, argc=<optimized out>, argv=0x0) at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/fun.c:5614
|#42 0x0045c12c in call_with_prompt (in_argc=<optimized out>, in_argv=0x7f7ff35c) at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/fun.c:5939
|#43 0x0043ac48 in scheme_do_eval (obj=0x639eb8, num_rands=3, rands=0x7f7ff35c, get_value=-1) at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/eval.c:2407
|#44 0x004524e4 in do_call_with_prompt (f=<optimized out>, data=<optimized out>, multi=<optimized out>, top_level=<optimized out>) at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/fun.c:6126
|#45 0x0047a9e0 in scheme_module_run_finish (menv=0x2b1b9e80, env=0x2b1b8c30) at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/module.c:4683
|#46 0x0047ad18 in eval_module_body (env=<optimized out>, menv=<optimized out>) at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/module.c:4581
|#47 do_start_module (m=<optimized out>, menv=0x2aff2778, env=0x2af81b58, restart=<optimized out>) at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/module.c:4391
|#48 0x0047b440 in start_module (m=0x2b1b9f00, env=0x2b1b8c30, restart=0, syntax_idx=0x2b1b9fe8, eval_exp=-1, eval_run=1, base_phase=0, cycle_list=0x5fee68) at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/module.c:4465
|#49 0x004825cc in parse_requires (form=0x2b1ba080, base_modidx=0x5fedc4, main_env=0x2b1b8c30, rn_set=0x2b1ba058, post_ex_rn_set=0x0, ck=0, data=0x0, unpack_kern=1, copy_vars=0, can_save_marshal=0, eval_exp=-1, eval_run=1, all_simple=0x0, for_m=<optimized out>, redef_modname=<optimized out>) at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/module.c:9056
|#50 0x00483ea4 in do_namespace_require (env=0x2b1b8c30, argv=0x7f7ffb80, copy=0, etonly=<optimized out>, argc=<optimized out>) at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/module.c:1179
|#51 0x0043ac48 in scheme_do_eval (obj=0x63c438, num_rands=1, rands=0x7f7ffb80, get_value=1) at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/eval.c:2407
|#52 0x0044a928 in apply_k () at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/fun.c:1287
|#53 0x00451774 in scheme_top_level_do_worker (k=0x44a8b8 <apply_k>, eb=<optimized out>, new_thread=0, dyn_state=0x0) at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/fun.c:1126
|#54 0x0041b980 in finish_cmd_line_run (fa=0x2b1b5e08, repl=0x41b0b8 <do_scheme_rep>) at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../cmdline.inc:318
|#55 0x0041c888 in run_from_cmd_line (_argv=0x7f7fff84, argc=10, mk_basic_env=<optimized out>, cont_run=<optimized out>) at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../cmdline.inc:1250
|#56 main_after_stack (data=<optimized out>) at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../main.c:365
|#57 0x0041db3c in do_main_stack_setup (data=0x7f7ffe98, _main=0x41c22c <main_after_stack>, no_auto_statics=<optimized out>) at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/salloc.c:196
|#58 scheme_main_stack_setup (no_auto_statics=<optimized out>, _main=0x41c22c <main_after_stack>, data=<optimized out>) at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../src/salloc.c:296
|#59 0x0041abd4 in main_after_dlls (argv=<optimized out>, argc=<optimized out>) at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../main.c:302
|#60 main (argc=<optimized out>, argv=<optimized out>) at /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../main.c:278
`--------------------------------------

-- 
James
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/d7811a45/attachment.sig>

Posted on the dev mailing list.