core dump in do_minor at beam/erl_gc.c:1442

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

core dump in do_minor at beam/erl_gc.c:1442

Monk Boy

Hi all:

When I use the ejabberd, I got a core file. I use gdb to analyzw the reasons. But I did not find the reason. The following is the process of mu analysis:

the erlang version is: otp_src_19.3
the ejabberd version is: ejabberd1609

the c code is(beam/erl_gc.c):

1440             case TAG_PRIMARY_LIST: {
1441                 ptr = list_val(gval);
1442                 val = *ptr;
1443                 if (IS_MOVED_CONS(val)) {
1444                     *n_hp++ = ptr[1];
1445                 } else if (ErtsInArea(ptr, mature, mature_size)) {
1446                     MOVE_CONS(ptr,val,old_htop,n_hp++);
1447                 } else if (ErtsInYoungGen(gval, ptr, oh, oh_size)) {
1448                     MOVE_CONS(ptr,val,n_htop,n_hp++);
1449                 } else {
1450                     n_hp++;
1451                 }
1452                 break;
1453             }


[[hidden email].cn5 /home/q/ejabberd.16.09]# gdb /home/q/erlang1903/lib/erlang/erts-8.3/bin/beam.smp  var/lib/ejabberd/core
GNU gdb (GDB) Red Hat Enterprise Linux (7.2-90.el6)
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-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/q/erlang1903/lib/erlang/erts-8.3/bin/beam.smp...done.
[New Thread 43516]
[New Thread 43519]
[New Thread 43525]
[New Thread 43533]
[New Thread 43520]
[New Thread 43527]
[New Thread 43522]
[New Thread 43537]
[New Thread 43521]
[New Thread 43536]
[New Thread 43528]
[New Thread 43523]
[New Thread 43524]
[New Thread 43534]
[New Thread 43508]
[New Thread 43504]
[New Thread 43538]
[New Thread 43526]
[New Thread 43509]
[New Thread 43531]
[New Thread 43510]
[New Thread 43529]
[New Thread 43506]
[New Thread 43530]
[New Thread 43518]
[New Thread 43513]
[New Thread 43535]
[New Thread 43505]
[New Thread 43511]
[New Thread 43517]
[New Thread 43507]
[New Thread 43515]
[New Thread 43532]
[New Thread 43512]
[New Thread 43503]
[New Thread 43539]
[New Thread 43502]
[New Thread 43499]
Missing separate debuginfo for /home/q/erlang1903/lib/erlang/lib/crypto-3.7.3/priv/lib/crypto.so
Try: yum --enablerepo='*-debug*' install /usr/lib/debug/.build-id/54/86971bd49d35a485d5cb3d671781c7222beb4f
Missing separate debuginfo for /home/q/erlang1903/lib/erlang/lib/crypto-3.7.3/priv/lib/crypto_callback.so
Try: yum --enablerepo='*-debug*' install /usr/lib/debug/.build-id/26/28f9137d12356d93ba1675f620b6502d439cfe
Missing separate debuginfo for /home/q/ejabberd.16.09/lib/fast_yaml-1.0.6/priv/lib/fast_yaml.so
Try: yum --enablerepo='*-debug*' install /usr/lib/debug/.build-id/66/dc1a5f6f70cf952e7cde7d4a63494aaa873659
Missing separate debuginfo for /usr/local/lib/libyaml-0.so.2
Try: yum --enablerepo='*-debug*' install /usr/lib/debug/.build-id/ae/35d9988c86d9305257e3a66c1dabf9a8d26247
Missing separate debuginfo for /home/q/ejabberd.16.09/lib/fast_tls-1.0.7/priv/lib/p1_sha.so
Try: yum --enablerepo='*-debug*' install /usr/lib/debug/.build-id/bf/5ea41e0f2c1b3d45f600cdba5f64746fdaaadf
Missing separate debuginfo for /home/q/ejabberd.16.09/lib/fast_tls-1.0.7/priv/lib/fast_tls_drv.so
Try: yum --enablerepo='*-debug*' install /usr/lib/debug/.build-id/3b/90d840163d5b57ffb55cb43bbc25abd9b52115
Missing separate debuginfo for /home/q/ejabberd.16.09/lib/fast_xml-1.1.15/priv/lib/fxml.so
Try: yum --enablerepo='*-debug*' install /usr/lib/debug/.build-id/d5/ddb17f4058ecb465853f8b793c76a9462c5751
Missing separate debuginfo for /usr/local/lib/libexpat.so.1
Try: yum --enablerepo='*-debug*' install /usr/lib/debug/.build-id/aa/be97b5e575f0ad0f9679767c0d590ed791cc24
Missing separate debuginfo for /home/q/ejabberd.16.09/lib/fast_xml-1.1.15/priv/lib/fxml_stream.so
Try: yum --enablerepo='*-debug*' install /usr/lib/debug/.build-id/68/098238760273e488ab80023cd14770884e95b7
Missing separate debuginfo for /home/q/ejabberd.16.09/lib/stringprep-1.0.6/priv/lib/stringprep.so
Try: yum --enablerepo='*-debug*' install /usr/lib/debug/.build-id/66/f3c4bbd0f08413929dcf906699329183184e16
Missing separate debuginfo for /home/q/ejabberd.16.09/lib/ezlib-1.0.1/priv/lib/ezlib_drv.so
Try: yum --enablerepo='*-debug*' install /usr/lib/debug/.build-id/b7/c7fa253e2e2f53203e16f1d6a651567a771953
Missing separate debuginfo for /home/q/erlang1903/lib/erlang/lib/asn1-4.0.4/priv/lib/asn1rt_nif.so
Try: yum --enablerepo='*-debug*' install /usr/lib/debug/.build-id/af/6272fe63fc5ea2106fed5084e579ba6fb5b8cf
Missing separate debuginfo for
Try: yum --enablerepo='*-debug*' install /usr/lib/debug/.build-id/71/a96b79419fe40ff1706d59ed06d6dbe37c8e97
Reading symbols from /lib64/libutil.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib64/libutil.so.1
Reading symbols from /lib64/libdl.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib64/libdl.so.2
Reading symbols from /lib64/libm.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib64/libm.so.6
Reading symbols from /lib64/libtinfo.so.5...(no debugging symbols found)...done.
Loaded symbols for /lib64/libtinfo.so.5
Reading symbols from /lib64/libpthread.so.0...(no debugging symbols found)...done.
[Thread debugging using libthread_db enabled]
Loaded symbols for /lib64/libpthread.so.0
Reading symbols from /lib64/librt.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib64/librt.so.1
Reading symbols from /lib64/libc.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib64/libc.so.6
Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Reading symbols from /home/q/erlang1903/lib/erlang/lib/crypto-3.7.3/priv/lib/crypto.so...done.
Loaded symbols for /home/q/erlang1903/lib/erlang/lib/crypto-3.7.3/priv/lib/crypto.so
Reading symbols from /usr/lib64/libcrypto.so.10...(no debugging symbols found)...done.
Loaded symbols for /usr/lib64/libcrypto.so.10
Reading symbols from //lib64/libz.so.1...(no debugging symbols found)...done.
Loaded symbols for //lib64/libz.so.1
Reading symbols from /home/q/erlang1903/lib/erlang/lib/crypto-3.7.3/priv/lib/crypto_callback.so...done.
Loaded symbols for /home/q/erlang1903/lib/erlang/lib/crypto-3.7.3/priv/lib/crypto_callback.so
Reading symbols from /home/q/ejabberd.16.09/lib/fast_yaml-1.0.6/priv/lib/fast_yaml.so...done.
Loaded symbols for /home/q/ejabberd.16.09/lib/fast_yaml-1.0.6/priv/lib/fast_yaml.so
Reading symbols from /usr/local/lib/libyaml-0.so.2...done.
Loaded symbols for /usr/local/lib/libyaml-0.so.2
Reading symbols from /home/q/ejabberd.16.09/lib/fast_tls-1.0.7/priv/lib/p1_sha.so...done.
Loaded symbols for /home/q/ejabberd.16.09/lib/fast_tls-1.0.7/priv/lib/p1_sha.so
Reading symbols from /usr/lib64/libssl.so.10...(no debugging symbols found)...done.
Loaded symbols for /usr/lib64/libssl.so.10
Reading symbols from /lib64/libgssapi_krb5.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib64/libgssapi_krb5.so.2
Reading symbols from /lib64/libkrb5.so.3...(no debugging symbols found)...done.
Loaded symbols for /lib64/libkrb5.so.3
Reading symbols from /lib64/libcom_err.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib64/libcom_err.so.2
Reading symbols from /lib64/libk5crypto.so.3...(no debugging symbols found)...done.
Loaded symbols for /lib64/libk5crypto.so.3
Reading symbols from /lib64/libkrb5support.so.0...(no debugging symbols found)...done.
Loaded symbols for /lib64/libkrb5support.so.0
Reading symbols from /lib64/libkeyutils.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib64/libkeyutils.so.1
Reading symbols from /lib64/libresolv.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib64/libresolv.so.2
Reading symbols from /lib64/libselinux.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib64/libselinux.so.1
Reading symbols from /home/q/ejabberd.16.09/lib/fast_tls-1.0.7/priv/lib/fast_tls_drv.so...done.
Loaded symbols for /home/q/ejabberd.16.09/lib/fast_tls-1.0.7/priv/lib/fast_tls_drv.so
Reading symbols from /home/q/ejabberd.16.09/lib/fast_xml-1.1.15/priv/lib/fxml.so...done.
Loaded symbols for /home/q/ejabberd.16.09/lib/fast_xml-1.1.15/priv/lib/fxml.so
Reading symbols from /usr/local/lib/libexpat.so.1...done.
Loaded symbols for /usr/local/lib/libexpat.so.1
Reading symbols from /home/q/ejabberd.16.09/lib/fast_xml-1.1.15/priv/lib/fxml_stream.so...done.
Loaded symbols for /home/q/ejabberd.16.09/lib/fast_xml-1.1.15/priv/lib/fxml_stream.so
Reading symbols from /home/q/ejabberd.16.09/lib/stringprep-1.0.6/priv/lib/stringprep.so...done.
Loaded symbols for /home/q/ejabberd.16.09/lib/stringprep-1.0.6/priv/lib/stringprep.so
Reading symbols from /usr/lib64/libstdc++.so.6...(no debugging symbols found)...done.
Loaded symbols for /usr/lib64/libstdc++.so.6
Reading symbols from /lib64/libgcc_s.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib64/libgcc_s.so.1
Reading symbols from /home/q/ejabberd.16.09/lib/ezlib-1.0.1/priv/lib/ezlib_drv.so...done.
Loaded symbols for /home/q/ejabberd.16.09/lib/ezlib-1.0.1/priv/lib/ezlib_drv.so
Reading symbols from /home/q/erlang1903/lib/erlang/lib/asn1-4.0.4/priv/lib/asn1rt_nif.so...done.
Loaded symbols for /home/q/erlang1903/lib/erlang/lib/asn1-4.0.4/priv/lib/asn1rt_nif.so
Core was generated by `/home/q/erlang1903/lib/erlang/erts-8.3/bin/beam.smp -K true -P 2500000 -- -root'.
Program terminated with signal 11, Segmentation fault.
#0  do_minor (p=<value optimized out>, live_hf_end=<value optimized out>, mature=0x7f479b140818 "T\001", mature_size=1016, new_sz=6772, objv=0x7f47a3e9c850, nobj=1) at beam/erl_gc.c:1442
1442            val = *ptr;
Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.192.el6.x86_64 keyutils-libs-1.4-5.el6.x86_64 krb5-libs-1.10.3-57.el6.x86_64 libcom_err-1.41.12-22.el6.x86_64 libgcc-4.4.7-17.el6.x86_64 libselinux-2.0.94-7.el6.x86_64 libstdc++-4.4.7-17.el6.x86_64 ncurses-libs-5.7-4.20090207.el6.x86_64 openssl-1.0.1e-48.el6_8.1.x86_64 zlib-1.2.3-29.el6.x86_64
(gdb) bt
#0  do_minor (p=<value optimized out>, live_hf_end=<value optimized out>, mature=0x7f479b140818 "T\001", mature_size=1016, new_sz=6772, objv=0x7f47a3e9c850, nobj=1) at beam/erl_gc.c:1442
#1  0x0000000000569039 in minor_collection (p=0x7f48a9625840, live_hf_end=0x0, need=0, objv=0x7f496d6fdcd0, nobj=1, fcalls=416) at beam/erl_gc.c:1238
#2  garbage_collect (p=0x7f48a9625840, live_hf_end=0x0, need=0, objv=0x7f496d6fdcd0, nobj=1, fcalls=416) at beam/erl_gc.c:673
#3  0x000000000056979b in erts_gc_after_bif_call_lhf (p=0x7f48a9625840, live_hf_end=<value optimized out>, result=139945523948913, regs=<value optimized out>, arity=<value optimized out>) at beam/erl_gc.c:426
#4  0x0000000000441bf8 in process_main () at beam/beam_emu.c:2874
#5  0x00000000004e0cf5 in sched_thread_func (vesdp=0x7f4971dd6980) at beam/erl_process.c:8206
#6  0x000000000062ec02 in thr_wrapper (vtwd=<value optimized out>) at pthread/ethread.c:114
#7  0x0000003b52007aa1 in start_thread () from /lib64/libpthread.so.0
#8  0x0000003b51ce8aad in clone () from /lib64/libc.so.6
(gdb) f 1
#1  0x0000000000569039 in minor_collection (p=0x7f48a9625840, live_hf_end=0x0, need=0, objv=0x7f496d6fdcd0, nobj=1, fcalls=416) at beam/erl_gc.c:1238
1238            do_minor(p, live_hf_end, (char *) mature, mature_size*sizeof(Eterm),
(gdb) etp-process-info p
  Pid: <0.15774.738>
  State: on-heap-msgq | garbage-collecting | running | active | prq-prio-normal | usr-prio-normal | act-prio-normal
  Current function: erlang:process_info/2
  I: #Cp<0x7200d630>
  Heap size: 4185
  Old-heap size: 17731
  Mbuf size: 3150
  Msgq len: 2 (inner=2, outer=0)
  Parent: <0.3801.0>
  Pointer: (Process *) 0x7f48a9625840
(gdb) etp-stacktrace p
% Stacktrace (46): NULL
#Cp<ejabberd_redis:get_random_pid/2+0x50>.
#Cp<redis_link:hash_del/4+0x58>.
#Cp<qtalk_public:clear_redis_user_key/3+0x648>.
#Cp<ejabberd_c2s:terminate/3+0x1790>.
#Cp<p1_fsm:terminate/8+0x130>.
#Cp<proc_lib:wake_up/3+0xa0>.
#Cp<terminate process normally>.
(gdb) etp-stackdump p
% Stackdump (46): NULL
#Cp<ejabberd_redis:get_random_pid/2+0x50>.
2.
#Cp<redis_link:hash_del/4+0x58>.
[].
#Cp<qtalk_public:clear_redis_user_key/3+0x648>.
#HeapBinary<0x15,0x38393136,0x39323233,0x31383034>.
#SubBinary<0x12,0,0x10000:0xa3ea2b1a>.
#Cp<ejabberd_c2s:terminate/3+0x1790>.
[].
[].
[].
[].
#Catch<1906>.
#HeapBinary<0x8,0x632e6978>.
#HeapBinary<0x9,0x62616a65,0xa6f00431>.
#HeapBinary<0x15,0x38393136,0x39323233,0x31383034>.
#Cp<p1_fsm:terminate/8+0x130>.
[].
[].
[].
[].
{socket_state,gen_tcp,#Port<0.21862986>,<0.16550.738>}.
ejabberd_socket.
[].
[].
[].
[].
[].
[].
[].
[].
[].
[].
{state,{socket_state,gen_tcp,#Port<0.21862986>,<0.16550.738>},ejabberd_socket,#Ref<0.0.104333315.20933>,false,#HeapBinary<0x11,0x32323831,0x37393033,0xaf03ff39>,undefined,c2s,c2s_shaper,false,false,false,false,[verify_none,compression_none],true,{jid,#HeapBinary<0x8,0x632e6978>,#HeapBinary<0x9,0x62616a65,0xa6f00431>,#RefcBinary<0x45,0,0xc95b73e8,0xc95b7400,0>,#HeapBinary<0x8,0x632e6978>,#HeapBinary<0x9,0x62616a65,0xa6f00431>,#RefcBinary<0x45,0,0xc95b73e8,0xc95b7400,0>},#HeapBinary<0x8,0x632e6978>,#HeapBinary<0x9,0x62616a65,0xa6f00431>,#RefcBinary<0x45,0,0xc95b73e8,0xc95b7400,0>,{{1513,229103,4851576},<0.15774.738>},...}.
[].
#Cp<proc_lib:wake_up/3+0xa0>.
#Catch<2501>.
[].
{state,{socket_state,gen_tcp,#Port<0.21862986>,<0.16550.738>},ejabberd_socket,#Ref<0.0.104333315.20933>,false,#HeapBinary<0x11,0x32323831,0x37393033,0xaf03ff39>,undefined,c2s,c2s_shaper,false,false,false,false,[verify_none,compression_none],true,{jid,#HeapBinary<0x8,0x632e6978>,#HeapBinary<0x9,0x62616a65,0xa6f00431>,#RefcBinary<0x45,0,0xc95b73e8,0xc95b7400,0>,#HeapBinary<0x8,0x632e6978>,#HeapBinary<0x9,0x62616a65,0xa6f00431>,#RefcBinary<0x45,0,0xc95b73e8,0xc95b7400,0>},#HeapBinary<0x8,0x632e6978>,#HeapBinary<0x9,0x62616a65,0xa6f00431>,#RefcBinary<0x45,0,0xc95b73e8,0xc95b7400,0>,{{1513,229103,4851576},<0.15774.738>},...}.
session_established.
ejabberd_c2s.
{'$gen_event',{xmlstreamerror,#HeapBinary<0x15,0x204c4d58,0x6920617a,0x6962206f>}}.
<0.15774.738>.
normal.
#Cp<terminate process normally>.
#Catch<200>.
(gdb)



Thank you for your time.


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions