[erlang-questions] erts dump in /usr/lib64/libcrypto.so.10
Monk Boy
boyofmonk@REDACTED
Mon Oct 16 10:29:22 CEST 2017
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:
=============
[/home/q/ejabberd16.09.1903]# 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-75.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 22142]
[New Thread 22144]
[New Thread 22153]
[New Thread 22143]
[New Thread 22145]
[New Thread 22130]
[New Thread 22147]
[New Thread 22134]
[New Thread 22150]
[New Thread 22128]
[New Thread 22151]
[New Thread 22131]
[New Thread 22149]
[New Thread 22148]
[New Thread 22156]
[New Thread 22160]
[New Thread 22158]
[New Thread 22136]
[New Thread 22146]
[New Thread 22126]
[New Thread 22138]
[New Thread 22141]
[New Thread 22133]
[New Thread 22135]
[New Thread 22154]
[New Thread 22152]
[New Thread 22162]
[New Thread 22132]
[New Thread 22129]
[New Thread 22140]
[New Thread 22127]
[New Thread 22161]
[New Thread 22159]
[New Thread 22163]
[New Thread 22155]
[New Thread 22137]
[New Thread 22164]
[New Thread 22157]
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/81/bfdd1fd64e3ab54a08250be06c1206e9f58451
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/48/3db7c6adda8b1189f736e2d6add5c27c8519cd
Missing separate debuginfo for
/home/q/ejabberd16.09.1903/lib/fast_yaml-1.0.6/priv/lib/fast_yaml.so
Try: yum --enablerepo='*-debug*' install
/usr/lib/debug/.build-id/bd/2eda60ce2875f84049772382d146f5463a6b4f
Missing separate debuginfo for /lib64/libyaml-0.so.2
Try: yum --enablerepo='*-debug*' install
/usr/lib/debug/.build-id/ae/35d9988c86d9305257e3a66c1dabf9a8d26247
Missing separate debuginfo for
/home/q/ejabberd16.09.1903/lib/fast_tls-1.0.7/priv/lib/p1_sha.so
Try: yum --enablerepo='*-debug*' install
/usr/lib/debug/.build-id/2f/2216be1af770efa084baf2ef9d12379bff0c28
Missing separate debuginfo for
/home/q/ejabberd16.09.1903/lib/fast_tls-1.0.7/priv/lib/fast_tls_drv.so
Try: yum --enablerepo='*-debug*' install
/usr/lib/debug/.build-id/19/1e48d91446e248dbff31134c9f5d1db9a5a596
Missing separate debuginfo for
/home/q/ejabberd16.09.1903/lib/fast_xml-1.1.15/priv/lib/fxml.so
Try: yum --enablerepo='*-debug*' install
/usr/lib/debug/.build-id/5b/8c6fd4eb179d16391929c1dcd30c6894c04154
Missing separate debuginfo for
/home/q/ejabberd16.09.1903/lib/fast_xml-1.1.15/priv/lib/fxml_stream.so
Try: yum --enablerepo='*-debug*' install
/usr/lib/debug/.build-id/8d/56b1d43d23899556c668377ee64129a6bc611f
Missing separate debuginfo for
/home/q/ejabberd16.09.1903/lib/stringprep-1.0.6/priv/lib/stringprep.so
Try: yum --enablerepo='*-debug*' install
/usr/lib/debug/.build-id/58/3a0dd70b94291dfdcc8072ae0a3d0c0c5d49d2
Missing separate debuginfo for
/home/q/ejabberd16.09.1903/lib/ezlib-1.0.1/priv/lib/ezlib_drv.so
Try: yum --enablerepo='*-debug*' install
/usr/lib/debug/.build-id/bb/101cc9d2f28f536b249896e08eb342ed38a5c2
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/ejabberd16.09.1903/lib/fast_yaml-1.0.6/priv/lib/fast_yaml.so...done.
Loaded symbols for
/home/q/ejabberd16.09.1903/lib/fast_yaml-1.0.6/priv/lib/fast_yaml.so
Reading symbols from /lib64/libyaml-0.so.2...done.
Loaded symbols for /lib64/libyaml-0.so.2
Reading symbols from
/home/q/ejabberd16.09.1903/lib/fast_tls-1.0.7/priv/lib/p1_sha.so...done.
Loaded symbols for
/home/q/ejabberd16.09.1903/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/ejabberd16.09.1903/lib/fast_tls-1.0.7/priv/lib/fast_tls_drv.so...done.
Loaded symbols for
/home/q/ejabberd16.09.1903/lib/fast_tls-1.0.7/priv/lib/fast_tls_drv.so
Reading symbols from
/home/q/ejabberd16.09.1903/lib/fast_xml-1.1.15/priv/lib/fxml.so...done.
Loaded symbols for
/home/q/ejabberd16.09.1903/lib/fast_xml-1.1.15/priv/lib/fxml.so
Reading symbols from /lib64/libexpat.so.1...(no debugging symbols
found)...done.
Loaded symbols for /lib64/libexpat.so.1
Reading symbols from
/home/q/ejabberd16.09.1903/lib/fast_xml-1.1.15/priv/lib/fxml_stream.so...done.
Loaded symbols for
/home/q/ejabberd16.09.1903/lib/fast_xml-1.1.15/priv/lib/fxml_stream.so
Reading symbols from
/home/q/ejabberd16.09.1903/lib/stringprep-1.0.6/priv/lib/stringprep.so...done.
Loaded symbols for
/home/q/ejabberd16.09.1903/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/ejabberd16.09.1903/lib/ezlib-1.0.1/priv/lib/ezlib_drv.so...done.
Loaded symbols for
/home/q/ejabberd16.09.1903/lib/ezlib-1.0.1/priv/lib/ezlib_drv.so
Core was generated by `/home/q/erlang1903/lib/erlang/erts-8.3/bin/beam.smp
-K true -P 1000000 -- -root'.
Program terminated with signal 11, Segmentation fault.
#0 0x0000003e4f2766cb in ?? () from /usr/lib64/libcrypto.so.10
Missing separate debuginfos, use: debuginfo-install
expat-2.0.1-11.el6_2.x86_64 glibc-2.12-1.149.el6_6.5.x86_64
keyutils-libs-1.4-5.el6.x86_64 krb5-libs-1.10.3-33.el6.x86_64
libcom_err-1.41.12-21.el6.x86_64 libgcc-4.4.7-11.el6.x86_64
libselinux-2.0.94-5.8.el6.x86_64 libstdc++-4.4.7-11.el6.x86_64
ncurses-libs-5.7-3.20090208.el6.x86_64 openssl-1.0.1e-30.el6_6.5.x86_64
zlib-1.2.3-29.el6.x86_64
(gdb) source /home/q/lffan.liu/otp_src_19.3/erts/etc/unix/etp-commands.in
%---------------------------------------------------------------------------
% Use etp-help for a command overview and general help.
%
% To use the Erlang support module, the environment variable ROOTDIR
% must be set to the toplevel installation directory of Erlang/OTP,
% so the etp-commands file becomes:
% $ROOTDIR/erts/etc/unix/etp-commands
% Also, erl and erlc must be in the path.
%---------------------------------------------------------------------------
etp-set-max-depth 20
etp-set-max-string-length 100
--------------- System Information ---------------
OTP release: 19
ERTS version: 8.3
Compile date: Sat Sep 30 10:12:09 2017
Arch: x86_64-unknown-linux-gnu
Endianness: Little
Word size: 64-bit
HiPE support: yes
SMP support: yes
Thread support: yes
Kernel poll: Supported and used
Debug compiled: no
Lock checking: no
Lock counting: no
Node name: 'ejabberd@REDACTED'
Number of schedulers: 24
Number of async-threads: 10
--------------------------------------------------
(gdb) bt
#0 0x0000003e4f2766cb in ?? () from /usr/lib64/libcrypto.so.10
#1 0xca62c1d6ca62c1d6 in ?? ()
#2 0xca62c1d6ca62c1d6 in ?? ()
#3 0xca62c1d6ca62c1d6 in ?? ()
#4 0xca62c1d6ca62c1d6 in ?? ()
#5 0xca62c1d6ca62c1d6 in ?? ()
#6 0xca62c1d6ca62c1d6 in ?? ()
#7 0xca62c1d6ca62c1d6 in ?? ()
#8 0xca62c1d6ca62c1d6 in ?? ()
#9 0x0000003e4f5df7fc in ?? () from /usr/lib64/libcrypto.so.10
#10 0x00007f78ab21d848 in ?? ()
#11 0x0000000000000023 in ?? ()
#12 0x0000003e4f272d67 in SHA1_Update () from /usr/lib64/libcrypto.so.10
#13 0x0000003e4f2e6374 in ?? () from /usr/lib64/libcrypto.so.10
#14 0x0000003e4f2aac7a in ?? () from /usr/lib64/libcrypto.so.10
#15 0x0000003e4f2aab18 in ?? () from /usr/lib64/libcrypto.so.10
#16 0x00007f78f6fba8ec in rand_uniform_nif (env=0x7f793b5fdd80, argc=<value
optimized out>, argv=0x7f796bf48200) at crypto.c:2120
#17 0x000000000043d907 in process_main () at beam/beam_emu.c:3575
#18 0x00000000004e0cf5 in sched_thread_func (vesdp=0x7f7962c60cc0) at
beam/erl_process.c:8206
#19 0x000000000062ec02 in thr_wrapper (vtwd=<value optimized out>) at
pthread/ethread.c:114
#20 0x0000003e4b6079d1 in start_thread () from /lib64/libpthread.so.0
#21 0x0000003e4b2e88fd in clone () from /lib64/libc.so.6
(gdb) f 16
#16 0x00007f78f6fba8ec in rand_uniform_nif (env=0x7f793b5fdd80, argc=<value
optimized out>, argv=0x7f796bf48200) at crypto.c:2120
2120 BN_pseudo_rand_range(bn_rand, bn_to);
(gdb) l
2115 return enif_make_badarg(env);
2116 }
2117
2118 bn_to = BN_new();
2119 BN_sub(bn_to, bn_rand, bn_from);
2120 BN_pseudo_rand_range(bn_rand, bn_to);
2121 BN_add(bn_rand, bn_rand, bn_from);
2122 dlen = BN_num_bytes(bn_rand);
2123 data = enif_make_new_binary(env, dlen+4, &ret);
2124 put_int32(data, dlen);
(gdb) p *bn_from
$1 = {d = 0x7f78ab1c5698, top = 0, dmax = 1, neg = 0, flags = 1}
(gdb) p *bn_rand
$2 = {d = 0x7f78ab21d748, top = 2, dmax = 2, neg = 0, flags = 1}
(gdb) p *bn_to
$3 = {d = 0x7f78ab21d7c8, top = 2, dmax = 2, neg = 0, flags = 1}
(gdb) p *((*bn_to).d)
$4 = 0
(gdb) p *((*bn_from).d)
$5 = 0
(gdb) p *((*bn_rand).d)
$6 = 0
(gdb) ptype bn_to
type = struct bignum_st {
long unsigned int *d;
int top;
int dmax;
int neg;
int flags;
} *
(gdb) f 17
#17 0x000000000043d907 in process_main () at beam/beam_emu.c:3575
3575 nif_bif_result = (*fp)(&env, bif_nif_arity, reg);
(gdb) info local
fp = 0x7f78f6fba850 <rand_uniform_nif>
env = {mod_nif = 0x7f796a6c2390, proc = 0x7f79383bfc70, hp =
0x7f788b7ba9b0, hp_end = 0x7f788b7bae30, heap_frag = 0x0, fpe_was_unmasked
= 0, tmp_obj_list = 0x0,
exception_thrown = 0, tracee = 0x0, exiting = 0}
vbf = 0x7f78f6fba850
live_hf_end = 0x0
nif_bif_result = <value optimized out>
bif_nif_arity = 2
init_done = 1
c_p = 0x7f79383bfc70
reds_used = <value optimized out>
reg = 0x7f796bf48200
HTOP = 0x0
E = 0x7f788b7bae30
I = <value optimized out>
FCALLS = 1798
freg = 0x7f796bf4a280
neg_o_reds = 0
opcodes = {0x43d6bb, 0x43c050, 0x43c164, 0x43d70d, 0x43d648, 0x440afa,
0x43d7c5, 0x440a7d, 0x440f57, 0x43d926, 0x43bf32, 0x43b959, 0x44069f,
0x440865, 0x4405ac, 0x4402e0, 0x4400c0,
0x43fed0, 0x43fe9d, 0x43fe71, 0x43ef91, 0x43bb80, 0x43d76b, 0x43d8a6,
0x4407a3, 0x43bdcf, 0x43c0cf, 0x43d987, 0x43f9ab, 0x43d635, 0x43a279,
0x439d0c, 0x43e69b, 0x43f87d, 0x43e710,
0x43e761, 0x43d60d, 0x43d5e4, 0x43d5b3, 0x43d583, 0x43d55b, 0x43d52a,
0x43d4eb, 0x43d4ad, 0x43d46f, 0x43d432, 0x43d3f4, 0x43d3b7, 0x43d37a,
0x43d33e, 0x43f32a, 0x43f136, 0x43f0df,
0x43efbc, 0x43f09f, 0x43f05f, 0x43ad6e, 0x440b71, 0x43fd7d, 0x440a12,
0x43f7f4, 0x43f66a, 0x43f33a, 0x43f44b, 0x43b642, 0x43bdef, 0x43b8b5,
0x4405fa, 0x43faee, 0x43fa74, 0x440eb2,
0x43eb60, 0x43ea58, 0x440d26, 0x43ff96, 0x43ff02, 0x43fdfa, 0x44001a,
0x43e637, 0x440e87, 0x440cff, 0x43ec7d, 0x43e79a, 0x440ce4, 0x440c5c,
0x440c8c, 0x43e89c, 0x440be7, 0x440c30,
0x44089a, 0x440c47, 0x440511, 0x440780, 0x440906, 0x440493, 0x44015c,
0x43fc1d, 0x440e60, 0x43e9e0, 0x43e967, 0x43e930, 0x43e901, 0x44019c,
0x44026d, 0x440104, 0x43ebcd, 0x440060,
0x44027e, 0x43ba40, 0x43baf3, 0x43b82e, 0x439d84, 0x439dfa, 0x439db5,
0x439e37, 0x44099e, 0x43e30b, 0x439d4b, 0x439d25, 0x43f230, 0x43abf3,
0x43ab98, 0x43acb0, 0x43b9e3, 0x43c157,
0x439d0c, 0x43f1dd, 0x43f28a, 0x43f18a, 0x43f2dd, 0x43e8e6, 0x43bd31,
0x43bc59, 0x43b6fd, 0x43f918, 0x440816, 0x4407c3, 0x43d2ca, 0x43d257,
0x43d1e4, 0x43d172, 0x43d113, 0x43d0b5,
0x43d057, 0x43dceb, 0x43ae81, 0x43dbf6, 0x43ee7c, 0x43dbc4, 0x43ee56,
0x43dcb0, 0x43dc6c, 0x43dc29, 0x43f6e4, 0x43a2a2, 0x43a56c, 0x43a55f,
0x43adf3, 0x43f58b, 0x43dba6, 0x43db83,
0x43db61, 0x43a35d, 0x43ad2d, 0x43db42, 0x43db24, 0x43ad22, 0x43acfd,
0x43afb8, 0x43afdd, 0x43b934, 0x43bf25, 0x439e7c, 0x43f498, 0x43edfa,
0x43a3c9, 0x43a383, 0x439d78, 0x439dee,
0x439dad, 0x439e2f, 0x439d43, 0x439d1d, 0x43eea3, 0x43edaf, 0x43ef46,
0x43e593, 0x43fbd0, 0x43e49e, 0x43e544, 0x43ec31, 0x43a548, 0x43a489,
0x43a57a, 0x43db02, 0x43da76, 0x43d946,
0x439e61, 0x43f3c7, 0x43f381...}
pt_arity = <value optimized out>
start_time = 0
start_time_i = 0x0
EBS = 0x7f7962c60cf0
[/home/q/ejabberd16.09.1903]# ls -l /usr/lib64/libcrypto.so.10
lrwxrwxrwx. 1 root root 19 May 8 2015 /usr/lib64/libcrypto.so.10 ->
libcrypto.so.1.0.1e
[/home/q/ejabberd16.09.1903]# ls -l /usr/lib64/libcrypto.so.1.0.1e
-rwxr-xr-x 1 root root 1965856 Jan 21 2015 /usr/lib64/libcrypto.so.1.0.1e
========
crypto.c
2105 static ERL_NIF_TERM rand_uniform_nif(ErlNifEnv* env, int argc, const
ERL_NIF_TERM argv[])
2106 {/* (Lo,Hi) */
2107 BIGNUM *bn_from = NULL, *bn_to, *bn_rand;
2108 unsigned char* data;
2109 unsigned dlen;
2110 ERL_NIF_TERM ret;
2111
2112 if (!get_bn_from_mpint(env, argv[0], &bn_from)
2113 || !get_bn_from_mpint(env, argv[1], &bn_rand)) {
2114 if (bn_from) BN_free(bn_from);
2115 return enif_make_badarg(env);
2116 }
2117
2118 bn_to = BN_new();
2119 BN_sub(bn_to, bn_rand, bn_from);
2120 BN_pseudo_rand_range(bn_rand, bn_to);
2121 BN_add(bn_rand, bn_rand, bn_from);
2122 dlen = BN_num_bytes(bn_rand);
2123 data = enif_make_new_binary(env, dlen+4, &ret);
2124 put_int32(data, dlen);
2125 BN_bn2bin(bn_rand, data+4);
2126 ERL_VALGRIND_MAKE_MEM_DEFINED(data+4, dlen);
2127 BN_free(bn_rand);
2128 BN_free(bn_from);
2129 BN_free(bn_to);
2130 return ret;
2131 }
=======
Thank you for your time.
Monk Boy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20171016/c8c20ead/attachment.htm>
More information about the erlang-questions
mailing list