[erlang-questions] Debugging embedded Erlang system

Kaiduan Xie kaiduanx@REDACTED
Sat Oct 22 23:42:50 CEST 2011


Erlang VM crashed while invoking debugger:start(global) on Ubuntu 10.10.

kaiduanx@REDACTED:~$ erl -name debugger@REDACTED -setcookie qwert
Erlang R14B01 (erts-5.8.2) [source] [64-bit] [smp:6:6] [rq:6]
[async-threads:0] [kernel-poll:false]

Eshell V5.8.2  (abort with ^G)
(debugger@REDACTED)1> net_adm:ping('server@REDACTED').
pong
(debugger@REDACTED)2> nodes().
['server@REDACTED']
(debugger@REDACTED)3> debugger:start(global).
beam.smp: malloc.c:3096: sYSMALLOc: Assertion `(old_top == (((mbinptr)
(((char *) &((av)->bins[((1) - 1) * 2])) - __builtin_offsetof (struct
malloc_chunk, fd)))) && old_size == 0) || ((unsigned long) (old_size)
>= (unsigned long)((((__builtin_offsetof (struct malloc_chunk,
fd_nextsize))+((2 * (sizeof(size_t))) - 1)) & ~((2 * (sizeof(size_t)))
- 1))) && ((old_top)->size & 0x1) && ((unsigned long)old_end &
pagemask) == 0)' failed.

       Aborted


Some questions,

1) Do I need to copy the source code and beam files from the remote
machine to the machine where debugger runs?
2) The Erlang system on remote machine is cross-compiled, how to
handle this case?

Thanks for sharing the experience.

/Kaiduan

On Sat, Oct 22, 2011 at 3:44 PM, Ahmed Omar <spawn.think@REDACTED> wrote:
> According to documentation it's possible but i didn't try it myself before.
> debugger:start(global).
> http://www.erlang.org/doc/apps/debugger/debugger_chapter.html#id117935
>
> On Fri, Oct 21, 2011 at 6:30 PM, Kaiduan Xie <kaiduanx@REDACTED> wrote:
>>
>> Hi,
>>
>> We need to debug an Erlang server running in an embedded system where
>> no GUI is available. We can attach an Erlang shell to the server from
>> a remote box with GUI. Can we use debugger on GUI box to remote debug
>> the server on embedded system? Can someone share the experience?
>>
>> Thanks a lot,
>>
>> /Kaiduan
>> _______________________________________________
>> erlang-questions mailing list
>> erlang-questions@REDACTED
>> http://erlang.org/mailman/listinfo/erlang-questions
>
>
>
> --
> Best Regards,
> - Ahmed Omar
> http://nl.linkedin.com/in/adiaa
> Follow me on twitter
> @spawn_think
>



More information about the erlang-questions mailing list