[erlang-bugs] Segmentation fault in R14B02/wxErlang/amd64/debian-sid

Olivier Girondel olivier.girondel@REDACTED
Sat Apr 30 04:01:21 CEST 2011


Hello,

I have an application that works just fine with R14B02 on i386 / debian sid,
but segfaults on amd64 (same configuration, nothing special in the
erlang build):

================================
olivier@REDACTED:~$ cat /etc/debian_version
wheezy/sid
olivier@REDACTED:~$ uname -a
Linux yoda 2.6.38-2-amd64 #1 SMP Sat Apr 23 18:47:49 UTC 2011 x86_64 GNU/Linux
olivier@REDACTED:~$ erl
Erlang R14B02 (erts-5.8.3) [source] [64-bit] [smp:2:2] [rq:2]
[async-threads:0] [hipe] [kernel-poll:false]

Eshell V5.8.3  (abort with ^G)
================================

Way to reproduce the bug -alas, not related to my application-

1> wx:demo().

Then click on the "gl" example. Segfaults without a core (even with
ulimit -c unlimited
and write permissions to the cwd)

1> wx:demo().
{wx_ref,35,wxFrame,<0.34.0>}
2> Segmentation fault

Backtrace with gdb (erlang was compiled with -g):
================================
olivier@REDACTED:~$ ./erldbg.sh
GNU gdb (GDB) 7.2-debian
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/local/lib/erlang/erts-5.8.3/bin/erlexec...done.
(gdb) run
Starting program: /usr/local/lib/erlang/erts-5.8.3/bin/erlexec
process 4030 is executing new program:
/usr/local/lib/erlang/erts-5.8.3/bin/beam.smp
[Thread debugging using libthread_db enabled]
[New Thread 0x7ffff6b87700 (LWP 4033)]
[New Thread 0x7ffff7ff8700 (LWP 4034)]
[New Thread 0x7ffff6386700 (LWP 4035)]
[New Thread 0x7ffff7fe6700 (LWP 4036)]
[New Thread 0x7ffff5a84700 (LWP 4037)]
[New Thread 0x7ffff5283700 (LWP 4038)]
Erlang R14B02 (erts-5.8.3) [source] [64-bit] [smp:2:2] [rq:2]
[async-threads:0] [hipe] [kernel-poll:false]

Eshell V5.8.3  (abort with ^G)
1> wx:demo().
[New Thread 0x7fffe560e700 (LWP 4041)]
                                      {wx_ref,35,wxFrame,<0.34.0>}
2>
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffe560e700 (LWP 4041)]
0x00007fffe27266b0 in ?? ()
(gdb) bt
#0  0x00007fffe27266b0 in ?? ()
#1  0x00007fffe29719c1 in egl_dispatch (op=5314, bp=0x9d38f0 "",
port=0x267, caller=659, bins=<value optimized out>, bins_sz=<value
optimized out>)
    at gen/gl_funcs.cpp:2206
#2  0x00007fffefc34c8e in gl_dispatch (op=5314, bp=0x9d38e0 "",
caller=659, bins=0x7ffff0041dc0) at wxe_gl.cpp:158
#3  0x00007fffefc2facf in WxeApp::dispatch (this=0x9ffbb0,
batch=0xa8a900, blevel=1, list_type=0) at wxe_impl.cpp:405
#4  0x00007fffefc2fbd7 in WxeApp::dispatch_cmds (this=0x9ffbb0) at
wxe_impl.cpp:359
#5  0x00007fffee589955 in
wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&,
wxEvtHandler*, wxEvent&) () from /usr/lib/libwx_baseu-2.8.so.0
#6  0x00007fffee589d3f in
wxEvtHandler::SearchDynamicEventTable(wxEvent&) () from
/usr/lib/libwx_baseu-2.8.so.0
#7  0x00007fffee589df2 in wxEvtHandler::ProcessEvent(wxEvent&) () from
/usr/lib/libwx_baseu-2.8.so.0
#8  0x00007fffeea70425 in wxAppBase::ProcessIdle() () from
/usr/lib/libwx_gtk2u_core-2.8.so.0
#9  0x00007fffee9decf2 in ?? () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#10 0x00007fffeb83c4a3 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#11 0x00007fffeb83cc80 in ?? () from /lib/libglib-2.0.so.0
#12 0x00007fffeb83d2f2 in g_main_loop_run () from /lib/libglib-2.0.so.0
#13 0x00007fffed5ee2b7 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#14 0x00007fffee9f3098 in wxEventLoop::Run() () from
/usr/lib/libwx_gtk2u_core-2.8.so.0
#15 0x00007fffeea701db in wxAppBase::MainLoop() () from
/usr/lib/libwx_gtk2u_core-2.8.so.0
#16 0x00007fffee5379ac in wxEntry(int&, wchar_t**) () from
/usr/lib/libwx_baseu-2.8.so.0
#17 0x00007fffefc2f47c in wxe_main_loop (vpdl=0x96ee38) at wxe_impl.cpp:227
#18 0x0000000000548e0d in erl_drv_thread_wrapper (vdtid=0x9d3888) at
beam/erl_drv_thread.c:117
#19 0x000000000060f573 in thr_wrapper (vtwd=0x7ffff527fec0) at
pthread/ethread.c:106
#20 0x00007ffff72f98ba in start_thread (arg=<value optimized out>) at
pthread_create.c:300
#21 0x00007ffff6e583cd in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#22 0x0000000000000000 in ?? ()
(gdb)
================================

The fault may be on my side -if not, what can I do to help debugging this ?

-- 
Olivier / http://biniou.net



More information about the erlang-bugs mailing list