meetecho / janus-gateway

Janus WebRTC Server
https://janus.conf.meetecho.com
GNU General Public License v3.0
8.17k stars 2.47k forks source link

[0.x]execute echotest occur error #3418

Closed softwareshrimp closed 1 month ago

softwareshrimp commented 1 month ago

this is back trace:

#0  0x00007f0bebc3d387 in raise () at /lib64/libc.so.6
#1  0x00007f0bebc3ea78 in abort () at /lib64/libc.so.6
#2  0x00007f0bc5b467d5 in  () at /lib64/libgmp.so.10
#3  0x00007f0bc5dc2ff2 in _nettle_gmp_alloc (n=n@entry=139685221368320) at gmp-glue.c:345
        alloc_func = 0x7f0bc5b467a0 <__gmp_default_allocate>
        __PRETTY_FUNCTION__ = "_nettle_gmp_alloc"
#4  0x00007f0bc5dbcd1c in nettle_pkcs1_rsa_digest_encode (m=m@entry=0x7f0bbf7fcc50, key_size=139685221368320, di_length=di_length@entry=51, digest_info=digest_info@entry=0x7f0bac00b2f0 "010\r\006\t`\206H\001e\003\004\002\001\005") at pkcs1-rsa-digest.c:48
        em = <optimized out>
        tmp_em_size = 139685221368320
#5  0x00007f0bc5dbe916 in nettle_rsa_pkcs1_sign_tr (pub=0x7f0bbf7fcce0, key=0x7f0bbf7fcd10, random_ctx=0x0, random=0x7f0bc58eb740 <rnd_func>, length=51, digest_info=0x7f0bac00b2f0 "010\r\006\t`\206H\001e\003\004\002\001\005", s=0x7f0bbf7fccd0) at rsa-pkcs1-sign-tr.c:54
        m = {{_mp_alloc = 1, _mp_size = 0, _mp_d = 0x7f0bac00b0d0}}
        ret = <optimized out>
#6  0x00007f0bc58ee849 in _wrap_nettle_pk_sign () at /lib64/libgnutls.so.28
#7  0x00007f0bc5854f9e in gnutls_privkey_sign_hash () at /lib64/libgnutls.so.28
#8  0x00007f0bc584a79c in sign_tls_hash () at /lib64/libgnutls.so.28
#9  0x00007f0bc584ac2c in _gnutls_handshake_sign_data () at /lib64/libgnutls.so.28
#10 0x00007f0bc58be6c2 in _gnutls_gen_dhe_signature () at /lib64/libgnutls.so.28
#11 0x00007f0bc583951a in _gnutls_send_server_kx_message () at /lib64/libgnutls.so.28
#12 0x00007f0bc58365cd in gnutls_handshake () at /lib64/libgnutls.so.28
#13 0x00007f0bc65f5457 in MHD_run_tls_handshake_ (connection=0x7f0bac0008c0) at connection_https.c:110
        ret = <optimized out>
#14 0x00007f0bc65e14ed in MHD_connection_handle_read (connection=0x7f0bac0008c0) at connection.c:2768
        bytes_read = <optimized out>
#15 0x00007f0bc65e4869 in call_handlers (con=con@entry=0x7f0bac0008c0, read_ready=<optimized out>, write_ready=<optimized out>, force_close=<optimized out>) at daemon.c:1214
        ret = <optimized out>
        states_info_processed = false
        on_fasttrack = <optimized out>
#16 0x00007f0bc65e92d8 in MHD_epoll (daemon=daemon@entry=0x1a3cf10, may_block=may_block@entry=1) at daemon.c:4602
        upgrade_marker = 0x7f0bc65f6699 "upgrade_ptr"
        pos = 0x7f0bac0008c0
        prev = 0x0
        events =
              {{events = 5, data = {ptr = 0x7f0bac0008c0, fd = -1409283904, u32 = 2885683392, u64 = 139688107051200}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}} <repeats 127 times>}
        event = {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}
        timeout_ms = <optimized out>
        timeout_ll = 120000
        num_events = 1
        i = <optimized out>
        ls = <optimized out>
        run_upgraded = false
#17 0x00007f0bc65ea04a in MHD_polling_thread (cls=0x1a3cf10) at daemon.c:4768
        daemon = 0x1a3cf10
#18 0x00007f0bebfdcea5 in start_thread () at /lib64/libpthread.so.0
#19 0x00007f0bebd05b0d in clone () at /lib64/libc.so.6

Where is the problem? I can't tell

atoppi commented 1 month ago

It seems that it crashed deep inside the tls library when a secure connection is being established. Not related to Janus code probably. What is your environment? You could test with different/updated versions of gnutls. Side note: we do not recommend setting up https in Janus, it'd be a better choice terminating https with a reverse proxy.

softwareshrimp commented 1 month ago

I tried to recompile the gnutls lib and replace the relevant dependencies with a new version, and this issue no longer occurs. thanks for your help.