InterLinked1 / lbbs

Lightweight BBS For Linux - Bulletin Board System server software
GNU General Public License v2.0
35 stars 4 forks source link

tls.c: SEGV on abrupt TLS session termination #22

Closed InterLinked1 closed 3 months ago

InterLinked1 commented 9 months ago
3-10-04 00:07:18.710]   == Node 3 has exited
[2023-10-04 00:07:18.710]   DEBUG[1779897]: thread.c:122 __thread_unregister: Thread 1779897 is exiting (detached)
[2023-10-04 00:07:41.814]   ERROR[1762653]: tls.c:492 ssl_io_thread: TLS error: error:0A000126:SSL routines::unexpected eof while reading
[2023-10-04 00:07:41.814]   DEBUG[1762653]: tls.c:496 ssl_io_thread: SSL connection 0x7f7cb8012380 now marked as dead
[2023-10-04 00:07:41.814]   DEBUG[1762653]: tls.c:501 ssl_io_thread: SSL_read for 0x7f7cb8012380 returned 0 (SSL_ERROR_SSL)
[2023-10-04 00:07:41.814]   DEBUG[1762653]: tls.c:387 ssl_io_thread: Skipping dead SSL read connection 0x7f7cb8012380 at index 1 / 0
[2023-10-04 00:07:41.814]   DEBUG[1779902]: net_imap.c:4520 handle_client: 0x7f7c94ff66b0 => 4.7 LOGOUT
[2023-10-04 00:07:41.814]   DEBUG[1779902]: net_imap.c:4054 imap_process: 0x7f7c94ff66b0 <= * BYE IMAP4 Server logging out
[2023-10-04 00:07:41.814] WARNING[1762653]: tls.c:543 ssl_io_thread: Can't write to dead SSL connection 0x7f7cb8012380, discarding 32 bytes
[2023-10-04 00:07:41.814]   DEBUG[1779902]: net_imap.c:4055 imap_process: 0x7f7c94ff66b0 <= 4.7 OK LOGOUT completed
[2023-10-04 00:07:41.814] WARNING[1762653]: tls.c:543 ssl_io_thread: Can't write to dead SSL connection 0x7f7cb8012380, discarding 25 bytes
[2023-10-04 00:07:41.814]   DEBUG[1779902]: mod_mail.c:227 mailbox_dispatch_event: Dispatching mailbox event 'Logout'
[2023-10-04 00:07:41.814]   DEBUG[1762653]: tls.c:446 ssl_io_thread: SSL at index 2 / 1 = POLLHUP
[2023-10-04 00:07:41.814]   DEBUG[1762653]: tls.c:533 ssl_io_thread: read returned 0
[2023-10-04 00:07:41.814]   DEBUG[1762653]: tls.c:404 ssl_io_thread: SSL I/O thread now polling 9 -> 7 fds (3 connections)
[2023-10-04 00:07:41.814]   DEBUG[1779902]: net_imap.c:4599 __imap_handler: Node 5 has ended its IMAPS session
[2023-10-04 00:07:41.814]   DEBUG[1779902]: node.c:491 node_shutdown: Terminating node 5
[2023-10-04 00:07:41.814]   DEBUG[1779902]: node.c:562 node_shutdown: Shutdown pending finalization for node 5
[2023-10-04 00:07:41.814]   DEBUG[1779902]: node.c:579 node_free: Node 5 now freed
[2023-10-04 00:07:41.814]   == Node 5 has exited
[2023-10-04 00:07:41.814]   DEBUG[1779902]: thread.c:122 __thread_unregister: Thread 1779902 is exiting (detached)
[2023-10-04 00:07:41.819]   DEBUG[1779900]: net_imap.c:4520 handle_client: 0x7f7c8efea6b0 => DONE
[2023-10-04 00:07:41.819]   DEBUG[1779900]: net_imap.c:3767 idle_stop: 0x7f7c8efea6b0 <= 14.4 OK IDLE terminated
[2023-10-04 00:07:41.903]   DEBUG[1779900]: net_imap.c:4520 handle_client: 0x7f7c8efea6b0 => 15.4 CLOSE
[2023-10-04 00:07:41.903]   DEBUG[1779900]: net_imap.c:4181 imap_process: 0x7f7c8efea6b0 <= 15.4 OK CLOSE completed
[2023-10-04 00:07:41.990]   DEBUG[1779900]: net_imap.c:4520 handle_client: 0x7f7c8efea6b0 => 16.4 LOGOUT
[2023-10-04 00:07:41.990]   DEBUG[1779900]: net_imap.c:4054 imap_process: 0x7f7c8efea6b0 <= * BYE IMAP4 Server logging out
[2023-10-04 00:07:41.990]   DEBUG[1779900]: net_imap.c:4055 imap_process: 0x7f7c8efea6b0 <= 16.4 OK LOGOUT completed
[2023-10-04 00:07:41.990]   DEBUG[1779900]: mod_mail.c:227 mailbox_dispatch_event: Dispatching mailbox event 'Logout'
[2023-10-04 00:07:41.990]   DEBUG[1779900]: net_imap.c:4599 __imap_handler: Node 4 has ended its IMAPS session
[2023-10-04 00:07:41.990]   DEBUG[1779900]: node.c:491 node_shutdown: Terminating node 4
[2023-10-04 00:07:41.990]   DEBUG[1779900]: node.c:562 node_shutdown: Shutdown pending finalization for node 4
[2023-10-04 00:07:41.990]   DEBUG[1779900]: node.c:579 node_free: Node 4 now freed
[2023-10-04 00:07:41.990]   == Node 4 has exited
[2023-10-04 00:07:41.990]   DEBUG[1779900]: thread.c:122 __thread_unregister: Thread 1779900 is exiting (detached)
Segmentation fault (core dumped)

Thread 1 (Thread 0x7f7cbf63b6c0 (LWP 1762653)):
#0  0x0000000000000000 in  ()
#1  0x00007f7cc086c763 in SSL_read () at /lib/x86_64-linux-gnu/libssl.so.3
#2  0x000056471828e4c0 in ssl_io_thread (unused=unused@entry=0x0) at tls.c:479
        ssl = 0x7f7cb0576ec0
        readpipe = 59
        ores = <optimized out>
        wres = <optimized out>
        sfd = <optimized out>
        i = 1
        res = 1
        pfds = 0x7f7cb800a0a0
        readpipes = 0x7f7cb8002e40
        ssl_list = 0x7f7cb8015bd0
        prevfds = 7
        oldnumfds = <optimized out>
        numfds = 7
        numssl = <optimized out>
        needcreate = 0
        buf = "16.4 LOGOUT\r\n completed\r\ng out\r\nUsers\" \".\")) ((\"Shared Folders\" \".\"))\r\n13.4 NAMESPACE command completed\r\nST CHILDREN IDLE NOTIFY NAMESPACE QUOTA QUOTA=RES-STORAGE ID SASL-IR ACL SOR>
        pending = <optimized out>
        inovertime = 0
        overtime = 0
        err_msg = "error:0A000126:SSL routines::unexpected eof while reading", '\000' <repeats 966 times>
        __func__ = "ssl_io_thread"
#3  0x000056471828c3a7 in thread_run (data=<optimized out>) at thread.c:357
        __cancel_buf = {__cancel_jmp_buf = {{__cancel_jmp_buf = {140173639682928, -8880879192134578050, 0, 94863378829664, 140734316593216, 140173755265024, -8880879192258310018, -2974757314973593474}, __mask_was_>
        __cancel_routine = 0x56471828c660 <thread_unregister>
        __cancel_arg = 0x7f7cbf63b6c0
        __not_first_call = <optimized out>
        ret = <optimized out>
        a = {start_routine = <optimized out>, data = <optimized out>, name = 0x564719ff5160 "ssl_io_thread         started by thread 1762652 at tls.c:1067 setup_ssl_io()", detached = <optimized out>}
#4  0x00007f7cc00a8044 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
InterLinked1 commented 3 months ago

Haven't seen this anytime recently, suspending for now