Skip to content

valgrind warning in sslcontext_dtor when running ./src/AtomVM ./tests/libs/estdlib/test_estdlib.avm on CI #1115

Closed
@bettio

Description

@bettio

Following warning has been taken from CI output.

See also https://github.com/atomvm/AtomVM/actions/runs/8214411234/job/22466885128?pr=1114

==13113== Memcheck, a memory error detector
==13113== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==13113== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
==13113== Command: ./src/AtomVM ./tests/libs/estdlib/test_estdlib.avm
==13113== 
--13113-- WARNING: unhandled x86-linux syscall: 403
--13113-- You may be able to write your own handler.
--13113-- Read the file README_MISSING_SYSCALL_OR_IOCTL.
--13113-- Nevertheless we consider this a bug.  Please report
--13113-- it at http://valgrind.org/support/bug_reports.html.
E otp_socket: Unable to send data: res=-2. (/home/runner/work/AtomVM/AtomVM/src/libAtomVM/otp_socket.c:2151)
E otp_socket: Unable to send data: res=-2. (/home/runner/work/AtomVM/AtomVM/src/libAtomVM/otp_socket.c:2151)
E otp_socket: socket:setopt: Unsupported otp option (/home/runner/work/AtomVM/AtomVM/src/libAtomVM/otp_socket.c:1127)
E otp_socket: socket:setopt: otp rcvbuf value must be an integer (/home/runner/work/AtomVM/AtomVM/src/libAtomVM/otp_socket.c:1113)
E otp_socket: socket:setopt: otp rcvbuf value may not be negative (/home/runner/work/AtomVM/AtomVM/src/libAtomVM/otp_socket.c:1119)
I otp_socket: Peer closed connection. (/home/runner/work/AtomVM/AtomVM/src/libAtomVM/otp_socket.c:1800)
I otp_socket: Peer closed connection. (/home/runner/work/AtomVM/AtomVM/src/libAtomVM/otp_socket.c:1800)
{warning,timeout,waiting,accept_terminated}
WARNING: EAI_SERVICE unsupported on this platform.
WARNING: EAI_SERVICE unsupported on this platform.
WARNING: EAI_SERVICE unsupported on this platform.
==13113== Invalid read of size 4
==13113==    at 0x49814D7: mbedtls_debug_print_msg (in /usr/lib/i386-linux-gnu/libmbedtls.so.2.16.3)
==13113==    by 0x4991EBF: mbedtls_ssl_free (in /usr/lib/i386-linux-gnu/libmbedtls.so.2.16.3)
==13113==    by 0x1A803C: sslcontext_dtor (otp_ssl.c:129)
==13113==    by 0x18F167: refc_binary_destroy (refc_binary.c:88)
==13113==    by 0x18F167: refc_binary_decrement_refcount (refc_binary.c:70)
==13113==    by 0x16228F: memory_sweep_mso_list (memory.c:735)
==13113==    by 0x16228F: memory_gc (memory.c:296)
==13113==    by 0x1626CA: memory_ensure_free_with_roots (memory.c:176)
==13113==    by 0x113F87: scheduler_entry_point (opcodesswitch.h:2303)
==13113==    by 0x1126B2: main (main.c:148)
==13113==  Address 0x4ff7c3c is 36 bytes inside a block of size 228 free'd
==13113==    at 0x48388AB: free (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-x86-linux.so)
==13113==    by 0x18F173: refc_binary_destroy (refc_binary.c:91)
==13113==    by 0x18F173: refc_binary_decrement_refcount (refc_binary.c:70)
==13113==    by 0x1A8030: sslcontext_dtor (otp_ssl.c:127)
==13113==    by 0x18F167: refc_binary_destroy (refc_binary.c:88)
==13113==    by 0x18F167: refc_binary_decrement_refcount (refc_binary.c:70)
==13113==    by 0x16228F: memory_sweep_mso_list (memory.c:735)
==13113==    by 0x16228F: memory_gc (memory.c:296)
==13113==    by 0x1626CA: memory_ensure_free_with_roots (memory.c:176)
==13113==    by 0x113F87: scheduler_entry_point (opcodesswitch.h:2303)
==13113==    by 0x1126B2: main (main.c:148)
==13113==  Block was alloc'd at
==13113==    at 0x483767F: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-x86-linux.so)
==13113==    by 0x18F02C: refc_binary_create_resource (refc_binary.c:39)
==13113==    by 0x18F4DE: enif_alloc_resource (resources.c:66)
==13113==    by 0x1A7AFF: nif_ssl_config_init (otp_ssl.c:339)
==13113==    by 0x126F95: scheduler_entry_point (opcodesswitch.h:1898)
==13113==    by 0x1A0083: scheduler_thread_entry_point (smp.c:75)
==13113==    by 0x4A28634: start_thread (pthread_create.c:477)
==13113==    by 0x4B48B49: clone (clone.S:108)
==13113== 
==13113== Invalid read of size 4
==13113==    at 0x49814D7: mbedtls_debug_print_msg (in /usr/lib/i386-linux-gnu/libmbedtls.so.2.16.3)
==13113==    by 0x4991FD2: mbedtls_ssl_free (in /usr/lib/i386-linux-gnu/libmbedtls.so.2.16.3)
==13113==    by 0x1A803C: sslcontext_dtor (otp_ssl.c:129)
==13113==    by 0x18F167: refc_binary_destroy (refc_binary.c:88)
==13113==    by 0x18F167: refc_binary_decrement_refcount (refc_binary.c:70)
==13113==    by 0x16228F: memory_sweep_mso_list (memory.c:735)
==13113==    by 0x16228F: memory_gc (memory.c:296)
==13113==    by 0x1626CA: memory_ensure_free_with_roots (memory.c:176)
==13113==    by 0x113F87: scheduler_entry_point (opcodesswitch.h:2303)
==13113==    by 0x1126B2: main (main.c:148)
==13113==  Address 0x4ff7c3c is 36 bytes inside a block of size 228 free'd
==13113==    at 0x48388AB: free (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-x86-linux.so)
==13113==    by 0x18F173: refc_binary_destroy (refc_binary.c:91)
==13113==    by 0x18F173: refc_binary_decrement_refcount (refc_binary.c:70)
==13113==    by 0x1A8030: sslcontext_dtor (otp_ssl.c:127)
==13113==    by 0x18F167: refc_binary_destroy (refc_binary.c:88)
==13113==    by 0x18F167: refc_binary_decrement_refcount (refc_binary.c:70)
==13113==    by 0x16228F: memory_sweep_mso_list (memory.c:735)
==13113==    by 0x16228F: memory_gc (memory.c:296)
==13113==    by 0x1626CA: memory_ensure_free_with_roots (memory.c:176)
==13113==    by 0x113F87: scheduler_entry_point (opcodesswitch.h:2303)
==13113==    by 0x1126B2: main (main.c:148)
==13113==  Block was alloc'd at
==13113==    at 0x483767F: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-x86-linux.so)
==13113==    by 0x18F02C: refc_binary_create_resource (refc_binary.c:39)
==13113==    by 0x18F4DE: enif_alloc_resource (resources.c:66)
==13113==    by 0x1A7AFF: nif_ssl_config_init (otp_ssl.c:339)
==13113==    by 0x126F95: scheduler_entry_point (opcodesswitch.h:1898)
==13113==    by 0x1A0083: scheduler_thread_entry_point (smp.c:75)
==13113==    by 0x4A28634: start_thread (pthread_create.c:477)
==13113==    by 0x4B48B49: clone (clone.S:108)
==13113== 
CRASH 
======
pid: <0.37.0>

Stacktrace:
undefined

cp: #CP<module: 15, label: 92, offset: 23>

x[0]: throw
x[1]: test_crash
x[2]: throw

Stack 
------

[]
[]
{state,0,0,0,none,false}
[]
[]
{state,undefined,test_gen_server,{state,0,0,0,none,false}}
#CP<module: 15, label: 120, offset: 0>


Mailbox
--------


Monitors
--------
<0.32.0> <---> <0.37.0>


**End Of Crash Report**

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions