Android question: how to connect to swank, running on android?

PR polos.ruetz at gmail.com
Sun Sep 24 14:04:00 UTC 2017


2017-09-03 1:22 GMT+02:00, PR <polos.ruetz at gmail.com>:
> ...

Hi again,

so let's disentangle some confusion (partially created by me, sorry for that):

I have good news (for android) and bad news (for current Slime v2.20):


* First the good one:

I found out that old Slime v2.19 is stable on android (even though it
needs a tiny patch, as mentioned in an earlier mail).
(So, what I'm currently doing in EQL5-Android is to include a patched
Slime v2.19, just to be safe)


* Now the bad news, _not_ related to android (and I can't be the only
one experimenting this...):

With current Slime v2.20, the Slime REPL will freeze occasionally,
especially if the response from Swank takes some time to compute, e.g.
with TAB completion. What causes the "freezing" is a segfault in ECL:

I ran ECL through gdb, and the segfault seems related to GC (see
attachment for the full backtrace). I was provoking the freezing with
TAB completion (and it took me a few minutes to have it occur).

If my subjective observations match reality, then this is caused when
a GC is triggered during a Slime REPL command, waiting for a response
from Swank (since these pauses are mostly very short, that coincidence
doesn't happen very often).

This problem definitely doesn't happen in Slime version v2.19, and
it's not related to the new :SPAWN mode, because it happens even with
:style NIL (the fallback communication style).

Paul
-------------- next part --------------
Thread 15 "ecl" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffecad8700 (LWP 3645)]
GC_is_marked (p=<optimized out>)
    at /home/polos/ecl/ecl-16.1.3/src/bdwgc/mark.c:218
218	    return (int)mark_bit_from_hdr(hhdr, bit_no); /* 0 or 1 */
(gdb) bt
#0  GC_is_marked (p=<optimized out>) at /home/polos/ecl/ecl-16.1.3/src/bdwgc/mark.c:218
#1  0x00007ffff7947f32 in GC_make_disappearing_links_disappear (dl_hashtbl=0x7ffff7ca1330 <GC_dl_hashtbl>)
    at /home/polos/ecl/ecl-16.1.3/src/bdwgc/finalize.c:711
#2  GC_finalize () at /home/polos/ecl/ecl-16.1.3/src/bdwgc/finalize.c:752
#3  0x00007ffff794547b in GC_finish_collection () at /home/polos/ecl/ecl-16.1.3/src/bdwgc/alloc.c:879
#4  0x00007ffff7945bdd in GC_try_to_collect_inner (stop_func=0x7ffff7944c60 <GC_never_stop_func>)
    at /home/polos/ecl/ecl-16.1.3/src/bdwgc/alloc.c:472
#5  0x00007ffff7946514 in GC_collect_or_expand (needed_blocks=needed_blocks at entry=1, ignore_off_page=ignore_off_page at entry=0, 
    retry=retry at entry=0) at /home/polos/ecl/ecl-16.1.3/src/bdwgc/alloc.c:1270
#6  0x00007ffff7946707 in GC_allocobj (gran=gran at entry=4, kind=1) at /home/polos/ecl/ecl-16.1.3/src/bdwgc/alloc.c:1360
#7  0x00007ffff794998f in GC_generic_malloc_inner (lb=lb at entry=64, k=k at entry=1) at /home/polos/ecl/ecl-16.1.3/src/bdwgc/malloc.c:132
#8  0x00007ffff7949a6e in GC_generic_malloc (lb=64, k=1) at /home/polos/ecl/ecl-16.1.3/src/bdwgc/malloc.c:181
#9  0x00007ffff793f1af in ecl_alloc (n=n at entry=64) at /home/polos/ecl/ecl-16.1.3/src/c/alloc_2.d:719
#10 0x00007ffff7920d6d in alloc_pointerfull_memory (l=l at entry=8) at /home/polos/ecl/ecl-16.1.3/src/c/array.d:527
#11 0x00007ffff7920dfc in ecl_array_allocself (x=x at entry=0x2571570) at /home/polos/ecl/ecl-16.1.3/src/c/array.d:542
#12 0x00007ffff79217b4 in si_make_vector (etype=0x7ffff7c715b8 <cl_symbols+56>, dim=0x23, adj=0x1, fillp=0x1, displ=0x1, disploff=0x3)
    at /home/polos/ecl/ecl-16.1.3/src/c/array.d:518
#13 0x00007ffff7921979 in si_make_pure_array (etype=<optimized out>, dims=dims at entry=0xe3bd91, adj=0x1, fillp=<optimized out>, 
    displ=<optimized out>, disploff=0x3) at /home/polos/ecl/ecl-16.1.3/src/c/array.d:413
#14 0x00007ffff781221e in cl_make_array (narg=narg at entry=5, v1dimensions=0xe3bd91) at lsp/arraylib.c:49
#15 0x00007ffff7846f03 in L4make_format_directive (narg=narg at entry=14) at lsp/format.c:520
#16 0x00007ffff7853460 in L7parse_directive (v1string=v1string at entry=0x3ad35a0, v2start=v2start at entry=0x3) at lsp/format.c:749
#17 0x00007ffff78536fb in L5tokenize_control_string (v1string=v1string at entry=0x3ad35a0) at lsp/format.c:562
#18 0x00007ffff785d0e2 in L8formatter_aux (narg=narg at entry=3, v1stream=v1stream at entry=0x5827f00, 
    v2string_or_fun=v2string_or_fun at entry=0x3ad35a0, v3orig_args=<optimized out>) at lsp/format.c:821
#19 0x00007ffff792d586 in cl_format (narg=narg at entry=3, strm=0x5827f00, strm at entry=0x1, string=0x3ad35a0)
    at /home/polos/ecl/ecl-16.1.3/src/c/format.d:2236
#20 0x00007fffed74ae50 in L25untokenize_completion (narg=2, v1tokens=0x58211d1)
    at .slime/fasl/2.20/ecl-16.1.3-linux-x86_64/contrib/swank-c-p-c.c:2155
#21 0x00007fffed74bf22 in L23longest_compound_prefix (narg=<optimized out>, v1completions=0x57bcea1)
    at .slime/fasl/2.20/ecl-16.1.3-linux-x86_64/contrib/swank-c-p-c.c:1990
#22 0x00007fffed74f7d8 in L1completions (v1string=0x64152c0, v2default_package_name=0x5eba770)
    at .slime/fasl/2.20/ecl-16.1.3-linux-x86_64/contrib/swank-c-p-c.c:65
#23 0x00007ffff78dca27 in ecl_interpret (frame=frame at entry=0x7fffecad62d0, env=<optimized out>, bytecodes=bytecodes at entry=0x393b4b0)
    at /home/polos/ecl/ecl-16.1.3/src/c/interpreter.d:491
#24 0x00007ffff78e1450 in eval_nontrivial_form (form=0x7fffecad63d0, env=0x7ffff7fee000) at /home/polos/ecl/ecl-16.1.3/src/c/compiler.d:2388
#25 eval_form (env=env at entry=0x7ffff7fee000, form=form at entry=0x5764f21) at /home/polos/ecl/ecl-16.1.3/src/c/compiler.d:2402
#26 0x00007ffff78e456d in si_eval_with_env (narg=narg at entry=1, form=0x5764f21) at /home/polos/ecl/ecl-16.1.3/src/c/compiler.d:3150
#27 0x00007ffff78da67f in cl_eval (form=<optimized out>) at /home/polos/ecl/ecl-16.1.3/src/c/eval.d:167
#28 0x00007ffff1244ca8 in L235eval_for_emacs (v1form=<optimized out>, v2buffer_package=<optimized out>, v3id=<optimized out>)
    at .slime/fasl/2.20/ecl-16.1.3-linux-x86_64/swank.c:14598
---Type <return> to continue, or q <return> to quit---
#29 0x00007ffff78da475 in cl_apply (narg=<optimized out>, narg at entry=2, fun=0x399ed40, lastarg=<optimized out>)
    at /home/polos/ecl/ecl-16.1.3/src/c/eval.d:158
#30 0x00007ffff1212ae0 in L103process_requests (v1timeout=0x1) at .slime/fasl/2.20/ecl-16.1.3-linux-x86_64/swank.c:6784
#31 0x00007ffff123e2e8 in LC94__g376 (narg=<optimized out>) at .slime/fasl/2.20/ecl-16.1.3-linux-x86_64/swank.c:6507
#32 0x00007ffff124b993 in LC98__g373 (narg=<optimized out>) at .slime/fasl/2.20/ecl-16.1.3-linux-x86_64/swank.c:6239
#33 0x00007ffff1ed1952 in LC48call_with_debugger_hook (v1hook=0x399e840, v2fun=0x320e7e0)
    at .slime/fasl/2.20/ecl-16.1.3-linux-x86_64/ecl.c:2018
#34 0x00007ffff78da475 in cl_apply (narg=<optimized out>, fun=0x3ab76c0, lastarg=<optimized out>)
    at /home/polos/ecl/ecl-16.1.3/src/c/eval.d:158
#35 0x00007ffff11ee845 in LC101__g407 (narg=<optimized out>) at .slime/fasl/2.20/ecl-16.1.3-linux-x86_64/swank.c:6449
#36 0x00007ffff1223fb6 in L2call_with_bindings (v1alist=0x31a6471, v2fun=0x320e5d0) at .slime/fasl/2.20/ecl-16.1.3-linux-x86_64/swank.c:259
#37 0x00007ffff1246762 in L102handle_requests (narg=<optimized out>, v1connection=<optimized out>)
    at .slime/fasl/2.20/ecl-16.1.3-linux-x86_64/swank.c:6134
#38 0x00007fffedf82b8c in L32repl_loop (v1connection=0x3a3d2d0) at .slime/fasl/2.20/ecl-16.1.3-linux-x86_64/contrib/swank-repl.c:1584
#39 0x00007fffedf85040 in LC29__g71 (narg=0) at .slime/fasl/2.20/ecl-16.1.3-linux-x86_64/contrib/swank-repl.c:1558
#40 0x00007ffff1223e66 in L2call_with_bindings (v1alist=0x1, v2fun=0x320e810) at .slime/fasl/2.20/ecl-16.1.3-linux-x86_64/swank.c:60
#41 0x00007fffedf879d2 in LC30__g70 (narg=<optimized out>) at .slime/fasl/2.20/ecl-16.1.3-linux-x86_64/contrib/swank-repl.c:1532
#42 0x00007ffff78da475 in cl_apply (narg=<optimized out>, narg at entry=2, fun=0x3239b10, lastarg=<optimized out>)
    at /home/polos/ecl/ecl-16.1.3/src/c/eval.d:158
#43 0x00007ffff793af19 in thread_entry_point (arg=0x3aa1700) at /home/polos/ecl/ecl-16.1.3/src/c/threads/process.d:258
#44 0x00007ffff7958561 in GC_inner_start_routine (sb=<error reading variable: value has been optimized out>, 
    arg=<error reading variable: value has been optimized out>) at /home/polos/ecl/ecl-16.1.3/src/bdwgc/pthread_start.c:57
#45 0x00007ffff794f4d2 in GC_call_with_stack_base (fn=<optimized out>, arg=<optimized out>)
    at /home/polos/ecl/ecl-16.1.3/src/bdwgc/misc.c:1860
#46 0x00007ffff6ce96ba in start_thread (arg=0x7fffecad8700) at pthread_create.c:333
#47 0x00007ffff748e3dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
(gdb) 



More information about the ecl-devel mailing list