Open
Description
I ran into a double free. My program is using execute(db, ...)
on multiple threads but it's guarded by a lock so no two executes can run concurrently. I've also experienced a few crashes which seem related (just segfaults with no printout).
MySQL v1.4.6
MariaDB_Connector_C_jll v3.1.12+0
double free or corruption (fasttop)
[2167724] signal (6.-6): Aborted
in expression starting at REPL[48]:1
pthread_kill at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
raise at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
abort at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
unknown function (ip: 0x7f0132879675)
unknown function (ip: 0x7f0132890cfb)
unknown function (ip: 0x7f01328929c9)
free at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
SSL_free at /home/salmon/.julia/artifacts/69903d1a57355b6e78750aac3a8b3fddab87180f/lib/libssl.so (unknown line)
ma_tls_close at /home/salmon/.julia/artifacts/c688df815e86a92f5f36c990983dd26d8a80f17a/lib/mariadb/libmariadb.so (unknown line)
ma_pvio_close at /home/salmon/.julia/artifacts/c688df815e86a92f5f36c990983dd26d8a80f17a/lib/mariadb/libmariadb.so (unknown line)
mthd_my_send_cmd at /home/salmon/.julia/artifacts/c688df815e86a92f5f36c990983dd26d8a80f17a/lib/mariadb/libmariadb.so (unknown line)
mysql_stmt_execute at /home/salmon/.julia/artifacts/c688df815e86a92f5f36c990983dd26d8a80f17a/lib/mariadb/libmariadb.so (unknown line)
mysql_stmt_execute at /home/salmon/.julia/packages/MySQL/NMNbH/src/api/ccalls.jl:8 [inlined]
execute at /home/salmon/.julia/packages/MySQL/NMNbH/src/api/papi.jl:3 [inlined]
#execute#35 at /home/salmon/.julia/packages/MySQL/NMNbH/src/prepare.jl:162
execute at /home/salmon/.julia/packages/MySQL/NMNbH/src/prepare.jl:152
unknown function (ip: 0x7eff73f23349)
_jl_invoke at /cache/build/builder-amdci4-4/julialang/julia-release-1-dot-10/src/gf.c:2895 [inlined]
ijl_apply_generic at /cache/build/builder-amdci4-4/julialang/julia-release-1-dot-10/src/gf.c:3077
#82 at /home/salmon/git/project/main.jl:70
lock at ./lock.jl:229
unknown function (ip: 0x7eff73fed249)
_jl_invoke at /cache/build/builder-amdci4-4/julialang/julia-release-1-dot-10/src/gf.c:2895 [inlined]
ijl_apply_generic at /cache/build/builder-amdci4-4/julialang/julia-release-1-dot-10/src/gf.c:3077
#81 at /home/salmon/git/project/main.jl:69
unknown function (ip: 0x7eff73fea5b2)
_jl_invoke at /cache/build/builder-amdci4-4/julialang/julia-release-1-dot-10/src/gf.c:2895 [inlined]
ijl_apply_generic at /cache/build/builder-amdci4-4/julialang/julia-release-1-dot-10/src/gf.c:3077
jl_apply at /cache/build/builder-amdci4-4/julialang/julia-release-1-dot-10/src/julia.h:1982 [inlined]
start_task at /cache/build/builder-amdci4-4/julialang/julia-release-1-dot-10/src/task.c:1238
Allocations: 121462440 (Pool: 121313001; Big: 149439); GC: 60
[1] 2167724 IOT instruction (core dumped) julia -t auto --project
julia> versioninfo()
Julia Version 1.10.5
Commit 6f3fdf7b362 (2024-08-27 14:19 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: 32 × 13th Gen Intel(R) Core(TM) i9-13900K
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-15.0.7 (ORCJIT, goldmont)
Threads: 32 default, 0 interactive, 16 GC (on 32 virtual cores)
kernel 5.15.153.1-microsoft-standard-WSL2
Metadata
Metadata
Assignees
Labels
No labels