New Backtrace with the libtls version installed on the 5th of march:

GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "amd64-unknown-openbsd5.7"...
Core was generated by `openvpn'.
Program terminated with signal 11, Segmentation fault.
Loaded symbols for /usr/local/sbin/openvpn
Reading symbols from /usr/local/lib/liblzo2.so.0.0...done.
Loaded symbols for /usr/local/lib/liblzo2.so.0.0
Reading symbols from /usr/lib/libssl.so.32.0...done.
Loaded symbols for /usr/lib/libssl.so.32.0
Reading symbols from /usr/lib/libcrypto.so.32.0...done.
Loaded symbols for /usr/lib/libcrypto.so.32.0
Reading symbols from /usr/lib/libc.so.78.1...done.
Loaded symbols for /usr/lib/libc.so.78.1
Reading symbols from /usr/libexec/ld.so...done.
Loaded symbols for /usr/libexec/ld.so
#0 0x00001bfb23c6f160 in memcpy (dst0=0x1bfb5bc56c48, src0=0x1bfb5c4c5000, length=Variable "length" is not available.
) at /usr/src/lib/libc/string/memcpy.c:96
96      /usr/src/lib/libc/string/memcpy.c: No such file or directory.
        in /usr/src/lib/libc/string/memcpy.c
(gdb) bt
#0 0x00001bfb23c6f160 in memcpy (dst0=0x1bfb5bc56c48, src0=0x1bfb5c4c5000, length=Variable "length" is not available.
) at /usr/src/lib/libc/string/memcpy.c:96
#1 0x00001bf86008871c in x509_get_subject (cert=0x1bfad6256000, gc=0x7f7ffffc6180) at /usr/ports/pobj/openvpn-2.3.6/openvpn-2.3.6/src/openvpn/ssl_verify_openssl.c:291 #2 0x00001bf860086a24 in verify_cert (session=0x1bfb0da853a0, cert=0x1bfad6256000, cert_depth=0) at /usr/ports/pobj/openvpn-2.3.6/openvpn-2.3.6/src/openvpn/ssl_verify.c:609 #3 0x00001bf860088296 in verify_callback (preverify_ok=1, ctx=0x7f7ffffc6330) at /usr/ports/pobj/openvpn-2.3.6/openvpn-2.3.6/src/openvpn/ssl_verify_openssl.c:84 #4 0x00001bfaa3526d8c in internal_verify (ctx=0x7f7ffffc6330) at /usr/src/lib/libcrypto/crypto/../../libssl/src/crypto/x509/x509_vfy.c:1613 #5 0x00001bfaa3528435 in X509_verify_cert (ctx=0x7f7ffffc6330) at /usr/src/lib/libcrypto/crypto/../../libssl/src/crypto/x509/x509_vfy.c:374 #6 0x00001bfb4cb97a70 in ssl_verify_cert_chain (s=0x1bfa9f60f000, sk=Variable "sk" is not available.
) at /usr/src/lib/libssl/ssl/../../libssl/src/ssl/ssl_cert.c:459
#7 0x00001bfb4cb702f0 in ssl3_get_client_certificate (s=0x1bfa9f60f000) at /usr/src/lib/libssl/ssl/../../libssl/src/ssl/s3_srvr.c:2540 #8 0x00001bfb4cb73cf8 in ssl3_accept (s=0x1bfa9f60f000) at /usr/src/lib/libssl/ssl/../../libssl/src/ssl/s3_srvr.c:511 #9 0x00001bfb4cb81005 in ssl3_read_bytes (s=0x1bfa9f60f000, type=23, buf=0x1bfaa021f800 "", len=2048, peek=0) at /usr/src/lib/libssl/ssl/../../libssl/src/ssl/s3_pkt.c:896 #10 0x00001bfb4cb946ee in ssl3_read_internal (s=0x1bfa9f60f000, buf=0x1bfaa021f800, len=2048, peek=0) at /usr/src/lib/libssl/ssl/../../libssl/src/ssl/s3_lib.c:2784 #11 0x00001bfb4cb687f1 in ssl_read (b=0x1bfa8077ef00, out=0x1bfaa021f800 "", outl=2048) at /usr/src/lib/libssl/ssl/../../libssl/src/ssl/bio_ssl.c:156 #12 0x00001bfaa356943f in BIO_read (b=0x1bfa8077ef00, out=0x1bfaa021f800, outl=2048) at /usr/src/lib/libcrypto/crypto/../../libssl/src/crypto/bio/bio_lib.c:217 #13 0x00001bf860084c58 in bio_read (bio=0x1bfa8077ef00, buf=0x1bfb0da85578, maxlen=2048, desc=0x1bf8601ac83c "tls_read_plaintext") at /usr/ports/pobj/openvpn-2.3.6/openvpn-2.3.6/src/openvpn/ssl_openssl.c:1094 #14 0x00001bf860085170 in key_state_read_plaintext (ks_ssl=0x1bfb0da85488, buf=0x1bfb0da85578, maxlen=2048) at /usr/ports/pobj/openvpn-2.3.6/openvpn-2.3.6/src/openvpn/ssl_openssl.c:1249 #15 0x00001bf86007fab3 in tls_process (multi=0x1bfb0da85150, session=0x1bfb0da853a0, to_link=0x1bfb4b5b1e48, to_link_addr=0x7f7ffffc68e0, to_link_socket_info=0x1bfabeb86dc8, wakeup=0x7f7ffffc6964) at /usr/ports/pobj/openvpn-2.3.6/openvpn-2.3.6/src/openvpn/ssl.c:2411 #16 0x00001bf86008080f in tls_multi_process (multi=0x1bfb0da85150, to_link=0x1bfb4b5b1e48, to_link_addr=0x1bfb4b5b1b78, to_link_socket_info=0x1bfabeb86dc8, wakeup=0x7f7ffffc6964) at /usr/ports/pobj/openvpn-2.3.6/openvpn-2.3.6/src/openvpn/ssl.c:2635 #17 0x00001bf8600155de in check_tls_dowork (c=0x1bfb4b5b1378) at /usr/ports/pobj/openvpn-2.3.6/openvpn-2.3.6/src/openvpn/forward.c:100 #18 0x00001bf860019803 in check_tls (c=0x1bfb4b5b1378) at forward-inline.h:41 #19 0x00001bf860019744 in pre_select (c=0x1bfb4b5b1378) at /usr/ports/pobj/openvpn-2.3.6/openvpn-2.3.6/src/openvpn/forward.c:1330 #20 0x00001bf86003e797 in multi_process_post (m=0x7f7ffffc6b10, mi=0x1bfb4b5b12c0, flags=5) at /usr/ports/pobj/openvpn-2.3.6/openvpn-2.3.6/src/openvpn/multi.c:2050 #21 0x00001bf86003f008 in multi_process_incoming_link (m=0x7f7ffffc6b10, instance=0x0, mpp_flags=5) at /usr/ports/pobj/openvpn-2.3.6/openvpn-2.3.6/src/openvpn/multi.c:2293 #22 0x00001bf860038d75 in multi_process_io_udp (m=0x7f7ffffc6b10) at /usr/ports/pobj/openvpn-2.3.6/openvpn-2.3.6/src/openvpn/mudp.c:173 #23 0x00001bf8600390fd in tunnel_server_udp_single_threaded (top=0x7f7ffffc7920) at /usr/ports/pobj/openvpn-2.3.6/openvpn-2.3.6/src/openvpn/mudp.c:266 #24 0x00001bf86003952a in tunnel_server_udp (top=0x7f7ffffc7920) at /usr/ports/pobj/openvpn-2.3.6/openvpn-2.3.6/src/openvpn/mudp.c:288 #25 0x00001bf86004065b in tunnel_server (top=0x7f7ffffc7920) at /usr/ports/pobj/openvpn-2.3.6/openvpn-2.3.6/src/openvpn/multi.c:2875 #26 0x00001bf860042b40 in openvpn_main (argc=7, argv=0x7f7ffffc8638) at /usr/ports/pobj/openvpn-2.3.6/openvpn-2.3.6/src/openvpn/openvpn.c:254 #27 0x00001bf860042c82 in main (argc=7, argv=0x7f7ffffc8638) at /usr/ports/pobj/openvpn-2.3.6/openvpn-2.3.6/src/openvpn/openvpn.c:325



On 2015-02-23 18:46, Stuart Henderson wrote:
On 2015/02/23 15:55, Alexander Haensch wrote:
>Synopsis: OpenVPN process crashes from time to time
>Category: OpenVPN
>Environment:
        System      : OpenBSD 5.7
Details : OpenBSD 5.7-beta (GENERIC.MP) #828: Thu Jan 29 14:28:19 MST 2015 [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP

        Architecture: OpenBSD.amd64
        Machine     : amd64
>Description:
The OpenVPN Server process configured with a tap device is crashing during Handshake after some days of operation. The exact reason is not yet clear to me, but i can maybe gather some log files as this happens pretty much every 10 days. I think that something is accumulating and finally ending the process.

>How-To-Repeat:
        Let the server run and wait until the process crashes.
>Fix:
I use monit to automatically start OpenVPN again. I think this is a bad idea.

Log entries from around the time of the crash (both from openvpn and
OS messages from /var/log/messages) would be helpful.

Is there a core dump anywhere? If not, you might be able to get one in
/var/crash by setting sysctl kern.nosuidcoredump=2, but it would be
helpful to run a build of openvpn from ports done with 'make clean=all;
make DEBUG="-O0 -g" repackage && sudo make reinstall' as this will
increase the amount of information available if there is a coredump.
(If you can get one, use gdb to obtain a backtrace and send that,
rather than sending the file itself).

dmesg:
OpenBSD 5.7-beta (GENERIC.MP) #828: Thu Jan 29 14:28:19 MST 2015
[email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP

(real/avail mem lines snipped to protect the innocent ;)

--
Dipl. Chem. Alexander Haensch
AG Weimar
Institute of Theoretical and Physical Chemistry
Eberhard Karls University Tübingen
Auf der Morgenstelle 15
72076 Tuebingen
Germany
Tel: +49(0) 7071 2978768
Fax: +49(0) 7071 295960

Reply via email to