-
-
Notifications
You must be signed in to change notification settings - Fork 33.5k
Description
Version
22.19.0
Platform
root@LAPTOP-N7FQVCR9 ~/s/openssl ((openssl-3.2.3))# uname -a
Linux LAPTOP-N7FQVCR9 5.15.167.4-microsoft-standard-WSL2 #1 SMP Tue Nov 5 00:21:55 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
root@LAPTOP-N7FQVCR9 ~/s/openssl ((openssl-3.2.3))# hostnamectl
Static hostname: LAPTOP-N7FQVCR9
Icon name: computer-container
Chassis: container ☐
Machine ID: 9b876b31cead483f95a474eb3867f4a1
Boot ID: e3e72a9728c54663a73bb29d986daadf
Virtualization: wsl
Operating System: Ubuntu 24.04.1 LTS
Kernel: Linux 5.15.167.4-microsoft-standard-WSL2
Architecture: x86-64
root@LAPTOP-N7FQVCR9 ~/s/openssl ((openssl-3.2.3))# /lib/x86_64-linux-gnu/libc.so.6
GNU C Library (Ubuntu GLIBC 2.39-0ubuntu8.6) stable release version 2.39.
Copyright (C) 2024 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 13.3.0.
libc ABIs: UNIQUE IFUNC ABSOLUTE
Minimum supported kernel: 3.2.0
For bug reporting instructions, please see:
<https://bugs.launchpad.net/ubuntu/+source/glibc/+bugs>.
root@LAPTOP-N7FQVCR9 ~/s/openssl ((openssl-3.2.3))# openssl version
OpenSSL 3.2.3 3 Sep 2024 (Library: OpenSSL 3.2.3 3 Sep 2024)
Subsystem
nodejs dependent openssl
What steps will reproduce the bug?
- Setup nodejs22.19.0 from official website node-v22.19.0-linux-x64.tar.xz.
- use msnodesqlv8 and winston to connect to MSSQL server with the attached scripts test-sql5-insert.js.
- Download openssl 3.2.3 (or compile openssl3.2.3) and make the system lib point to it. export PATH/LD_LIBRARY_PATH
- run below command: node test-sql5-insert.js to get the error.
....
2025-10-08 19:14:44 [INFO] Database connection closed.
corrupted size vs. prev_size in fastbins
[New Thread 529512.529518]
[New Thread 529512.529520]
[New Thread 529512.529521]
[New Thread 529512.529522]
Thread 1 received signal SIGABRT, Aborted.
How often does it reproduce? Is there a required condition?
everytime with the repro steps.
What is the expected behavior? Why is that the expected behavior?
application just run successfully and modifying data in sqlserver and then exit.
What do you see instead?
good one:
root@LAPTOP-N7FQVCR9 ~/sql-nodejs-demo# node test-sql5-insert.js
2025-10-13 11:21:04 [INFO] Run test call
2025-10-13 11:21:04 [INFO] Run test call
2025-10-13 11:21:04 [INFO] Run test call
2025-10-13 11:21:04 [INFO] Run test call
2025-10-13 11:21:04 [INFO] Run test call
2025-10-13 11:21:04 [INFO] Run test call
2025-10-13 11:21:04 [INFO] Run test call
2025-10-13 11:21:04 [INFO] Run test call
2025-10-13 11:21:04 [INFO] Run test call
2025-10-13 11:21:04 [INFO] Run test call
2025-10-13 11:21:05 [INFO] Database connection successful!
2025-10-13 11:21:05 [INFO] Database connection successful!
2025-10-13 11:21:05 [INFO] Database connection successful!
2025-10-13 11:21:05 [INFO] Database connection successful!
2025-10-13 11:21:05 [INFO] Database connection successful!
2025-10-13 11:21:05 [INFO] Database connection successful!
2025-10-13 11:21:05 [INFO] Database connection successful!
2025-10-13 11:21:05 [INFO] Database connection successful!
2025-10-13 11:21:05 [INFO] Database connection successful!
2025-10-13 11:21:05 [INFO] Database connection successful!
2025-10-13 11:21:09 [ERROR] Failed to create Orders table: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Transaction (Process ID 65) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
2025-10-13 11:21:09 [ERROR] Failed to create Orders table: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]There is already an object named 'Orders' in the database.
2025-10-13 11:21:09 [ERROR] Failed to create Orders table: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]There is already an object named 'Orders' in the database.
2025-10-13 11:21:09 [ERROR] Failed to create Orders table: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]There is already an object named 'Orders' in the database.
2025-10-13 11:21:09 [ERROR] Failed to create Orders table: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Cannot drop the table 'Orders', because it does not exist or you do not have permission.
2025-10-13 11:21:09 [INFO] Orders table checked/created successfully.
print data [
"INSERT INTO Orders (OrderID, CustomerID, OrderDate) VALUES (1001, 'CUST6599', '2022-04-10');",
"INSERT INTO Orders (OrderID, CustomerID, OrderDate) VALUES (1002, 'CUST8572', '2023-05-01');",
"INSERT INTO Orders (OrderID, CustomerID, OrderDate) VALUES (1003, 'CUST8496', '2022-08-04');",
"INSERT INTO Orders (OrderID, CustomerID, OrderDate) VALUES (1004, 'CUST2661', '2023-05-21');",
"INSERT INTO Orders (OrderID, CustomerID, OrderDate) VALUES (1005, 'CUST6599', '2024-02-23');",
"INSERT INTO Orders (OrderID, CustomerID, OrderDate) VALUES (1006, 'CUST4865', '2022-07-08');",
"INSERT INTO Orders (OrderID, CustomerID, OrderDate) VALUES (1007, 'CUST5830', '2022-09-03');",
"INSERT INTO Orders (OrderID, CustomerID, OrderDate) VALUES (1008, 'CUST9612', '2024-11-25');",
"INSERT INTO Orders (OrderID, CustomerID, OrderDate) VALUES (1009, 'CUST3101', '2024-07-05');",
"INSERT INTO Orders (OrderID, CustomerID, OrderDate) VALUES (1010, 'CUST6952', '2023-02-23');"
]
2025-10-13 11:21:09 [INFO] Orders table checked/created successfully.
print data [
"INSERT INTO Orders (OrderID, CustomerID, OrderDate) VALUES (1001, 'CUST1694', '2024-01-25');",
"INSERT INTO Orders (OrderID, CustomerID, OrderDate) VALUES (1002, 'CUST2467', '2023-08-08');",
"INSERT INTO Orders (OrderID, CustomerID, OrderDate) VALUES (1003, 'CUST4364', '2023-01-03');",
"INSERT INTO Orders (OrderID, CustomerID, OrderDate) VALUES (1004, 'CUST5895', '2022-08-11');",
"INSERT INTO Orders (OrderID, CustomerID, OrderDate) VALUES (1005, 'CUST9117', '2023-07-16');",
"INSERT INTO Orders (OrderID, CustomerID, OrderDate) VALUES (1006, 'CUST6420', '2023-10-25');",
"INSERT INTO Orders (OrderID, CustomerID, OrderDate) VALUES (1007, 'CUST9020', '2022-09-14');",
"INSERT INTO Orders (OrderID, CustomerID, OrderDate) VALUES (1008, 'CUST1731', '2024-04-01');",
"INSERT INTO Orders (OrderID, CustomerID, OrderDate) VALUES (1009, 'CUST3486', '2024-06-15');",
"INSERT INTO Orders (OrderID, CustomerID, OrderDate) VALUES (1010, 'CUST7641', '2022-07-12');"
]
2025-10-13 11:21:09 [ERROR] Failed to create Orders table: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Cannot drop the table 'Orders', because it does not exist or you do not have permission.
2025-10-13 11:21:09 [INFO] Orders table checked/created successfully.
print data [
"INSERT INTO Orders (OrderID, CustomerID, OrderDate) VALUES (1001, 'CUST4059', '2023-12-06');",
"INSERT INTO Orders (OrderID, CustomerID, OrderDate) VALUES (1002, 'CUST5337', '2023-04-13');",
"INSERT INTO Orders (OrderID, CustomerID, OrderDate) VALUES (1003, 'CUST3614', '2023-01-24');",
"INSERT INTO Orders (OrderID, CustomerID, OrderDate) VALUES (1004, 'CUST9941', '2022-05-03');",
"INSERT INTO Orders (OrderID, CustomerID, OrderDate) VALUES (1005, 'CUST5947', '2023-07-16');",
"INSERT INTO Orders (OrderID, CustomerID, OrderDate) VALUES (1006, 'CUST4422', '2023-06-05');",
"INSERT INTO Orders (OrderID, CustomerID, OrderDate) VALUES (1007, 'CUST3806', '2024-11-03');",
"INSERT INTO Orders (OrderID, CustomerID, OrderDate) VALUES (1008, 'CUST6150', '2023-05-03');",
"INSERT INTO Orders (OrderID, CustomerID, OrderDate) VALUES (1009, 'CUST4706', '2024-09-01');",
"INSERT INTO Orders (OrderID, CustomerID, OrderDate) VALUES (1010, 'CUST2884', '2023-07-25');"
]
2025-10-13 11:21:09 [INFO] Orders table checked/created successfully.
print data [
"INSERT INTO Orders (OrderID, CustomerID, OrderDate) VALUES (1001, 'CUST2052', '2023-02-10');",
"INSERT INTO Orders (OrderID, CustomerID, OrderDate) VALUES (1002, 'CUST1875', '2022-05-13');",
"INSERT INTO Orders (OrderID, CustomerID, OrderDate) VALUES (1003, 'CUST8947', '2022-05-22');",
"INSERT INTO Orders (OrderID, CustomerID, OrderDate) VALUES (1004, 'CUST5409', '2024-01-07');",
"INSERT INTO Orders (OrderID, CustomerID, OrderDate) VALUES (1005, 'CUST9417', '2022-11-05');",
"INSERT INTO Orders (OrderID, CustomerID, OrderDate) VALUES (1006, 'CUST7990', '2024-11-02');",
"INSERT INTO Orders (OrderID, CustomerID, OrderDate) VALUES (1007, 'CUST9043', '2022-01-09');",
"INSERT INTO Orders (OrderID, CustomerID, OrderDate) VALUES (1008, 'CUST8362', '2024-09-26');",
"INSERT INTO Orders (OrderID, CustomerID, OrderDate) VALUES (1009, 'CUST1412', '2023-01-18');",
"INSERT INTO Orders (OrderID, CustomerID, OrderDate) VALUES (1010, 'CUST8394', '2022-12-02');"
]
2025-10-13 11:21:09 [INFO] Row 1 inserted successfully.
2025-10-13 11:21:09 [INFO] Row 2 inserted successfully.
2025-10-13 11:21:09 [INFO] Row 3 inserted successfully.
2025-10-13 11:21:09 [INFO] Row 4 inserted successfully.
2025-10-13 11:21:09 [INFO] Row 5 inserted successfully.
2025-10-13 11:21:09 [INFO] Row 6 inserted successfully.
2025-10-13 11:21:09 [INFO] Row 7 inserted successfully.
2025-10-13 11:21:09 [INFO] Row 8 inserted successfully.
2025-10-13 11:21:09 [INFO] Row 9 inserted successfully.
2025-10-13 11:21:09 [INFO] Row 10 inserted successfully.
2025-10-13 11:21:09 [INFO] All insert operations completed.
2025-10-13 11:21:09 [ERROR] Insert failed for row 1: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Violation of PRIMARY KEY constraint 'PK__Orders__C3905BAFE16ED7BE'. Cannot insert duplicate key in object 'dbo.Orders'. The duplicate key value is (1001).
2025-10-13 11:21:09 [ERROR] Insert failed for row 2: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Violation of PRIMARY KEY constraint 'PK__Orders__C3905BAFE16ED7BE'. Cannot insert duplicate key in object 'dbo.Orders'. The duplicate key value is (1002).
2025-10-13 11:21:09 [ERROR] Insert failed for row 3: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Violation of PRIMARY KEY constraint 'PK__Orders__C3905BAFE16ED7BE'. Cannot insert duplicate key in object 'dbo.Orders'. The duplicate key value is (1003).
2025-10-13 11:21:09 [ERROR] Insert failed for row 4: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Violation of PRIMARY KEY constraint 'PK__Orders__C3905BAFE16ED7BE'. Cannot insert duplicate key in object 'dbo.Orders'. The duplicate key value is (1004).
2025-10-13 11:21:09 [ERROR] Insert failed for row 5: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Violation of PRIMARY KEY constraint 'PK__Orders__C3905BAFE16ED7BE'. Cannot insert duplicate key in object 'dbo.Orders'. The duplicate key value is (1005).
2025-10-13 11:21:09 [ERROR] Insert failed for row 6: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Violation of PRIMARY KEY constraint 'PK__Orders__C3905BAFE16ED7BE'. Cannot insert duplicate key in object 'dbo.Orders'. The duplicate key value is (1006).
2025-10-13 11:21:09 [ERROR] Insert failed for row 7: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Violation of PRIMARY KEY constraint 'PK__Orders__C3905BAFE16ED7BE'. Cannot insert duplicate key in object 'dbo.Orders'. The duplicate key value is (1007).
2025-10-13 11:21:09 [ERROR] Insert failed for row 8: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Violation of PRIMARY KEY constraint 'PK__Orders__C3905BAFE16ED7BE'. Cannot insert duplicate key in object 'dbo.Orders'. The duplicate key value is (1008).
2025-10-13 11:21:09 [ERROR] Insert failed for row 9: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Violation of PRIMARY KEY constraint 'PK__Orders__C3905BAFE16ED7BE'. Cannot insert duplicate key in object 'dbo.Orders'. The duplicate key value is (1009).
2025-10-13 11:21:09 [ERROR] Insert failed for row 10: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Violation of PRIMARY KEY constraint 'PK__Orders__C3905BAFE16ED7BE'. Cannot insert duplicate key in object 'dbo.Orders'. The duplicate key value is (1010).
2025-10-13 11:21:09 [INFO] All insert operations completed.
2025-10-13 11:21:09 [INFO] SQL statement prepared successfully.
2025-10-13 11:21:09 [INFO] SQL statement prepared successfully.
2025-10-13 11:21:09 [ERROR] Insert failed for row 1: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Violation of PRIMARY KEY constraint 'PK__Orders__C3905BAFE16ED7BE'. Cannot insert duplicate key in object 'dbo.Orders'. The duplicate key value is (1001).
2025-10-13 11:21:09 [ERROR] Insert failed for row 2: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Violation of PRIMARY KEY constraint 'PK__Orders__C3905BAFE16ED7BE'. Cannot insert duplicate key in object 'dbo.Orders'. The duplicate key value is (1002).
2025-10-13 11:21:09 [ERROR] Insert failed for row 3: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Violation of PRIMARY KEY constraint 'PK__Orders__C3905BAFE16ED7BE'. Cannot insert duplicate key in object 'dbo.Orders'. The duplicate key value is (1003).
2025-10-13 11:21:09 [ERROR] Insert failed for row 4: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Violation of PRIMARY KEY constraint 'PK__Orders__C3905BAFE16ED7BE'. Cannot insert duplicate key in object 'dbo.Orders'. The duplicate key value is (1004).
2025-10-13 11:21:09 [ERROR] Insert failed for row 5: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Violation of PRIMARY KEY constraint 'PK__Orders__C3905BAFE16ED7BE'. Cannot insert duplicate key in object 'dbo.Orders'. The duplicate key value is (1005).
2025-10-13 11:21:09 [ERROR] Insert failed for row 6: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Violation of PRIMARY KEY constraint 'PK__Orders__C3905BAFE16ED7BE'. Cannot insert duplicate key in object 'dbo.Orders'. The duplicate key value is (1006).
2025-10-13 11:21:09 [ERROR] Insert failed for row 7: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Violation of PRIMARY KEY constraint 'PK__Orders__C3905BAFE16ED7BE'. Cannot insert duplicate key in object 'dbo.Orders'. The duplicate key value is (1007).
2025-10-13 11:21:09 [ERROR] Insert failed for row 8: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Violation of PRIMARY KEY constraint 'PK__Orders__C3905BAFE16ED7BE'. Cannot insert duplicate key in object 'dbo.Orders'. The duplicate key value is (1008).
2025-10-13 11:21:09 [ERROR] Insert failed for row 9: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Violation of PRIMARY KEY constraint 'PK__Orders__C3905BAFE16ED7BE'. Cannot insert duplicate key in object 'dbo.Orders'. The duplicate key value is (1009).
2025-10-13 11:21:09 [ERROR] Insert failed for row 10: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Violation of PRIMARY KEY constraint 'PK__Orders__C3905BAFE16ED7BE'. Cannot insert duplicate key in object 'dbo.Orders'. The duplicate key value is (1010).
2025-10-13 11:21:09 [INFO] All insert operations completed.
2025-10-13 11:21:09 [ERROR] Insert failed for row 1: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Violation of PRIMARY KEY constraint 'PK__Orders__C3905BAFE16ED7BE'. Cannot insert duplicate key in object 'dbo.Orders'. The duplicate key value is (1001).
2025-10-13 11:21:09 [ERROR] Insert failed for row 2: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Violation of PRIMARY KEY constraint 'PK__Orders__C3905BAFE16ED7BE'. Cannot insert duplicate key in object 'dbo.Orders'. The duplicate key value is (1002).
2025-10-13 11:21:09 [ERROR] Insert failed for row 3: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Violation of PRIMARY KEY constraint 'PK__Orders__C3905BAFE16ED7BE'. Cannot insert duplicate key in object 'dbo.Orders'. The duplicate key value is (1003).
2025-10-13 11:21:09 [ERROR] Insert failed for row 4: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Violation of PRIMARY KEY constraint 'PK__Orders__C3905BAFE16ED7BE'. Cannot insert duplicate key in object 'dbo.Orders'. The duplicate key value is (1004).
2025-10-13 11:21:09 [ERROR] Insert failed for row 5: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Violation of PRIMARY KEY constraint 'PK__Orders__C3905BAFE16ED7BE'. Cannot insert duplicate key in object 'dbo.Orders'. The duplicate key value is (1005).
2025-10-13 11:21:09 [ERROR] Insert failed for row 6: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Violation of PRIMARY KEY constraint 'PK__Orders__C3905BAFE16ED7BE'. Cannot insert duplicate key in object 'dbo.Orders'. The duplicate key value is (1006).
2025-10-13 11:21:09 [ERROR] Insert failed for row 7: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Violation of PRIMARY KEY constraint 'PK__Orders__C3905BAFE16ED7BE'. Cannot insert duplicate key in object 'dbo.Orders'. The duplicate key value is (1007).
2025-10-13 11:21:09 [ERROR] Insert failed for row 8: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Violation of PRIMARY KEY constraint 'PK__Orders__C3905BAFE16ED7BE'. Cannot insert duplicate key in object 'dbo.Orders'. The duplicate key value is (1008).
2025-10-13 11:21:09 [ERROR] Insert failed for row 9: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Violation of PRIMARY KEY constraint 'PK__Orders__C3905BAFE16ED7BE'. Cannot insert duplicate key in object 'dbo.Orders'. The duplicate key value is (1009).
2025-10-13 11:21:09 [ERROR] Insert failed for row 10: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Violation of PRIMARY KEY constraint 'PK__Orders__C3905BAFE16ED7BE'. Cannot insert duplicate key in object 'dbo.Orders'. The duplicate key value is (1010).
2025-10-13 11:21:09 [INFO] All insert operations completed.
2025-10-13 11:21:09 [INFO] SQL statement prepared successfully.
2025-10-13 11:21:09 [INFO] SQL statement prepared successfully.
2025-10-13 11:21:09 [INFO] Query results 1: []
2025-10-13 11:21:09 [INFO] Query results 2: []
2025-10-13 11:21:09 [INFO] Prepared statement freed.
2025-10-13 11:21:09 [INFO] Database connection closed.
2025-10-13 11:21:09 [INFO] Query results 1: []
2025-10-13 11:21:09 [INFO] Query results 1: []
2025-10-13 11:21:10 [INFO] Query results 2: []
2025-10-13 11:21:10 [INFO] Query results 1: []
2025-10-13 11:21:10 [INFO] Query results 2: []
2025-10-13 11:21:10 [INFO] Prepared statement freed.
2025-10-13 11:21:10 [INFO] Database connection closed.
2025-10-13 11:21:10 [INFO] Prepared statement freed.
2025-10-13 11:21:10 [INFO] Database connection closed.
2025-10-13 11:21:10 [INFO] Query results 2: []
2025-10-13 11:21:10 [INFO] Prepared statement freed.
2025-10-13 11:21:10 [INFO] Database connection closed.
root@LAPTOP-N7FQVCR9 ~/sql-nodejs-demo#
Additional information
The issue stack as below. The error throwing out when the glibc releasing consolidate adjacent chunks and comparing the chunk's prev size and previous chunk current size, that's different. the chunk's prev size should be copied from the previous chunk's current size.
(rr) bt
#0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=) at ./nptl/pthread_kill.c:44
#1 __pthread_kill_internal (signo=6, threadid=) at ./nptl/pthread_kill.c:78
#2 __GI___pthread_kill (threadid=, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
#3 0x00007fb3f66bc27e in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#4 0x00007fb3f669f8ff in __GI_abort () at ./stdlib/abort.c:79
#5 0x00007fb3f66a07b6 in __libc_message_impl (fmt=fmt@entry=0x7fb3f68458d7 "%s\n") at ../sysdeps/posix/libc_fatal.c:134
#6 0x00007fb3f671fff5 in malloc_printerr (str=str@entry=0x7fb3f6848908 "corrupted size vs. prev_size in fastbins") at ./malloc/malloc.c:5772
#7 0x00007fb3f6720d5c in malloc_consolidate (av=0x7fb3f687aac0 <main_arena>) at ./malloc/malloc.c:4867
#8 0x00007fb3f6721da5 in _int_free_maybe_consolidate (av=0x7fb3f687aac0 <main_arena>, size=) at ./malloc/malloc.c:4779
#9 0x00007fb3f672243a in _int_free (av=0x7fb3f687aac0 <main_arena>, p=, have_lock=) at ./malloc/malloc.c:4646
#10 0x00007fb3f6724dae in __GI___libc_free (mem=0x3ae73210) at ./malloc/malloc.c:3398
#11 0x00007fb3cc28edfe in ?? () from /opt/microsoft/msodbcsql18/lib64/libmsodbcsql-18.5.so.1.1
#12 0x00007fb3cc29411f in SQLFreeHandle () from /opt/microsoft/msodbcsql18/lib64/libmsodbcsql-18.5.so.1.1
#13 0x00007fb3cef668aa in ?? () from /lib/x86_64-linux-gnu/libodbc.so.2
#14 0x00007fb3cef72b9a in ?? () from /lib/x86_64-linux-gnu/libodbc.so.2
#15 0x00007fb3cf0bd83a in std::_Sp_counted_ptr_inplace<mssql::OdbcHandleImpl<(short)1, mssql::IOdbcEnvironmentHandle>, std::allocator<mssql::OdbcHandleImpl<(short)1, mssql::IOdbcEnvironmentHandle> >, (__gnu_cxx::_Lock_policy)2>::_M_dispose() () from /root/sql-nodejs-demo/node_modules/msnodesqlv8/build/Release/sqlserver.node
#16 0x00007fb3cf0bc73a in std::_Sp_counted_ptr_inplace<mssql::OdbcEnvironment, std::allocatormssql::OdbcEnvironment, (__gnu_cxx::_Lock_policy)2>::_M_dispose() ()
from /root/sql-nodejs-demo/node_modules/msnodesqlv8/build/Release/sqlserver.node
#17 0x00007fb3cf0b9ada in std::shared_ptrmssql::IOdbcEnvironment::~shared_ptr() () from /root/sql-nodejs-demo/node_modules/msnodesqlv8/build/Release/sqlserver.node
#18 0x00007fb3f66bea76 in __run_exit_handlers (status=0, listp=, run_list_atexit=run_list_atexit@entry=true, run_dtors=run_dtors@entry=true) at ./stdlib/exit.c:108
#19 0x00007fb3f66bebbe in __GI_exit (status=) at ./stdlib/exit.c:138
#20 0x00007fb3f66a11d1 in __libc_start_call_main (main=main@entry=0xe576d0
#21 0x00007fb3f66a128b in __libc_start_main_impl (main=0xe576d0 , argc=2, argv=0x7ffeeb26bd28, init=, fini=, rtld_fini=, stack_end=0x7ffeeb26bd18)
at ../csu/libc-start.c:360
#22 0x0000000000e5f38e in _start ()
The previous size field of chunk is double freed via below 2 locations. modified the chunk as cert_st->references.
#0 0x00007f6783ef53d7 in CRYPTO_DOWN_REF (refcnt=0x5621298aee70, ret=0x7ffeca97b3c4) at include/internal/refcount.h:51
#1 0x00007f6783ef5e7d in ssl_cert_free (c=0x5621298aedc0) at ssl/ssl_cert.c:269
#2 0x00007f6783f0a1b8 in SSL_CTX_free (a=0x5621298e8640) at ssl/ssl_lib.c:4162
#3 0x00007f6783b67fb8 in SSLLocks::Terminate () at xxxsql.cpp:1931
#4 SSLSingleton::~SSLSingleton (this=, __in_chrg=) at xxxsql.cpp:2059
#5 0x00007f6783b6b1fc in SSLLocks::Initialize () at xxxsql.cpp:1903
#6 SSLSingleton::SSLSingleton (this=0x7f6783e11d20) at xxxsql.cpp:2007
#7 SSLSingleton::Instance () at xxxsql.cpp:2042
#8 ProviderFactory::FormatLastError (pSNIError=0x7ffeca97b4a0, dwNativeError=2281848624, dwCurMsgLen=2212536552) at xxxsql.cpp:2124
#9 0x00007f6783b5e541 in SNI_Conn::SNI_Conn (this=0x562129889bb0) at yyysql.cpp:419
#10 0x00007f6783b61213 in InterlockedIncrement (atomic=0xcc) at /mnt/storage/1/s/Sql/Ntdbms/sqlncli/xplat/include/InterlockedAtomic_gcc.h:25
#11 SNIPartialReadSync (pConn=0x0, pOldPacket=, cbBytesToRead=2212536552, timeout=-896027488) at yyysql.cpp:2019
#12 0x00007f6783b26f63 in CTdsParser::GetConnection (this=0x7f6788023f30, pwszSrv2Connect=, eNetSrv2Connect=, pLoginInfo=0x7f6783e0a0e8, pvUsrData=, fOverrideCache=, fFailoverEnabled=0, fSPNSpecified=0, dwTimeout=808464485, phConn=0x3038373130302070, pfFatalError=0x30323a3830203030) at cccc.cpp:479
#13 0x00007f6783a94246 in ExportImp::SQLFreeEnv (lpenv=0x5621298aee70) at dddd.cpp:444
#14 0x00007f6783a94712 in ExportImp::SQLDisconnect (lpdbc=0x5621298d4b50) at dddd.cpp:1220
#15 0x00007f679aa2474b in close_pooled_connection (ptr=0x562129901180) at /build/unixodbc-WNgXyL/unixodbc-2.3.12/DriverManager/ggggg.c:2916
#16 0x00007f679aa30b9a in __strip_from_pool (env=0x562129782eb0) at /build/unixodbc-WNgXyL/unixodbc-2.3.12/DriverManager/ggggg.c:3101
#17 __SQLFreeHandle (handle_type=, handle=0x562129782eb0) at /build/unixodbc-WNgXyL/unixodbc-2.3.12/DriverManager/ggggggg.c:283
#18 0x00007f679ab7b83a in std::_Sp_counted_ptr_inplace<mssql::OdbcHandleImpl<(short)1, mssql::IOdbcEnvironmentHandle>, std::allocator<mssql::OdbcHandleImpl<(short)1, mssql::IOdbcEnvironmentHandle> >, (__gnu_cxx::_Lock_policy)2>::_M_dispose() () from/root/sql-nodejs-demo/node_modules/msnodesqlv8/build/Release/sqlserver.node
#19 0x00007f679ab7a73a in std::_Sp_counted_ptr_inplace<mssql::OdbcEnvironment, std::allocatormssql::OdbcEnvironment, (__gnu_cxx::_Lock_policy)2>::_M_dispose() () from /root/sql-nodejs-demo/node_modules/msnodesqlv8/build/Release/sqlserver.node
#20 0x00007f679ab77ada in std::shared_ptrmssql::IOdbcEnvironment::~shared_ptr() () from /root/sql-nodejs-demo/node_modules/msnodesqlv8/build/Release/sqlserver.node
#21 0x00007f67a2120a76 in __run_exit_handlers (status=0, listp=, run_list_atexit=run_list_atexit@entry=true, run_dtors=run_dtors@entry=true) at ./stdlib/exit.c:108
#22 0x00007f67a2120bbe in __GI_exit (status=) at ./stdlib/exit.c:138
#23 0x00007f67a21031d1 in __libc_start_call_main (main=main@entry=0x5620f359a247 <main(int, char**)>, argc=argc@entry=2, argv=argv@entry=0x7ffeca97b968) at ../sysdeps/nptl/libc_start_call_main.h:74
#24 0x00007f67a210328b in __libc_start_main_impl (main=0x5620f359a247 <main(int, char**)>, argc=2, argv=0x7ffeca97b968, init=, fini=, rtld_fini=, stack_end=0x7ffeca97b958) at ../csu/libc-start.c:360
#25 0x00005620f163baf5 in _start ()
2nd place modifying, the same chunk recognized as bio_st->crypto_rwlock.
(rr) bt
#0 _int_free_create_chunk (nextsize=48, nextchunk=0x5621298aee70, size=192, p=0x5621298aedb0, av=0x7f67a22dcac0 <main_arena>) at ./malloc/malloc.c:4747
#1 _int_free_merge_chunk (av=0x7f67a22dcac0 <main_arena>, p=0x5621298aedb0, size=) at ./malloc/malloc.c:4700
#2 0x00007f67a218443a in _int_free (av=0x7f67a22dcac0 <main_arena>, p=, have_lock=) at ./malloc/malloc.c:4646
#3 0x00007f67a2186dae in __GI___libc_free (mem=0x5621298aedc0) at ./malloc/malloc.c:3398
#4 0x00005620f344f579 in CRYPTO_free (str=0x5621298aedc0, file=0x5620f5e31e20 "../deps/openssl/openssl/crypto/threads_pthread.c", line=147) at ../deps/openssl/openssl/crypto/mem.c:263
#5 0x00005620f3460cdf in CRYPTO_THREAD_lock_free (lock=0x5621298aedc0) at ../deps/openssl/openssl/crypto/threads_pthread.c:147
#6 0x00005620f3313e88 in BIO_free (a=0x5621298af5b0) at ../deps/openssl/openssl/crypto/bio/bio_lib.c:152
#7 0x00005620f33155e7 in BIO_free_all (bio=0x0) at ../deps/openssl/openssl/crypto/bio/bio_lib.c:761
#8 0x00007f6783f0395a in ossl_ssl_connection_free (ssl=0x5621298ed160) at ssl/dddd.c:1485
#9 0x00007f6783f033b8 in SSL_free (s=0x5621298ed160) at ssl/dddd.c:1387
#10 0x00007f6783b67f9c in SSLLocks::Terminate () at tttqqqqqq.cpp:1929
#11 SSLSingleton::~SSLSingleton (this=, __in_chrg=) at tttqqqqqq.cpp:2059
#12 0x00007f6783b6b1fc in SSLLocks::Initialize () at tttqqqqqq.cpp:1903
#13 SSLSingleton::SSLSingleton (this=0x7f6783e11d20) at tttqqqqqq.cpp:2007
#14 SSLSingleton::Instance () at tttqqqqqq.cpp:2042
#15 ProviderFactory::FormatLastError (pSNIError=0x7ffeca97b4a0, dwNativeError=2281848624, dwCurMsgLen=2212536552) at tttqqqqqq.cpp:2124
#16 0x00007f6783b5e541 in SNI_Conn::SNI_Conn (this=0x562129889bb0) at 11111:419
#17 0x00007f6783b61213 in InterlockedIncrement (atomic=0xcc) at /mnt/storage/1/s/Sql/Ntdbms/sqlncli/xplat/include/fff.h:25
#18 SNIPartialReadSync (pConn=0x0, pOldPacket=, cbBytesToRead=2212536552, timeout=-896027488) at 11111:2019
#19 0x00007f6783b26f63 in CTdsParser::GetConnection (this=0x7f6788023f30, pwszSrv2Connect=, eNetSrv2Connect=, pLoginInfo=0x7f6783e0a0e8, pvUsrData=, fOverrideCache=, fFailoverEnabled=0, fSPNSpecified=0, dwTimeout=808464485, phConn=0x3038373130302070, pfFatalError=0x30323a3830203030) at ghh.cpp:479
#20 0x00007f6783a94246 in ExportImp::SQLFreeEnv (lpenv=0x7f67a22dcac0 <main_arena>) at bbbbb.cpp:444
#21 0x00007f6783a94712 in ExportImp::SQLDisconnect (lpdbc=0x5621298d4b50) at bbbbb.cpp:1220
#22 0x00007f679aa2474b in close_pooled_connection (ptr=0x562129901180) at /build/unixodbc-WNgXyL/unixodbc-2.3.12/DriverManager/vvvvvv.c:2916
#23 0x00007f679aa30b9a in __strip_from_pool (env=0x562129782eb0) at /build/unixodbc-WNgXyL/unixodbc-2.3.12/DriverManager/vvvvvv.c:3101
#24 __SQLFreeHandle (handle_type=, handle=0x562129782eb0) at /build/unixodbc-WNgXyL/unixodbc-2.3.12/DriverManager/hhhh.c:283
#25 0x00007f679ab7b83a in std::_Sp_counted_ptr_inplace<mssql::OdbcHandleImpl<(short)1, mssql::IOdbcEnvironmentHandle>, std::allocator<mssql::OdbcHandleImpl<(short)1, mssql::IOdbcEnvironmentHandle> >, (__gnu_cxx::_Lock_policy)2>::_M_dispose() () from /root/sql-nodejs-demo/node_modules/msnodesqlv8/build/Release/sqlserver.node
#26 0x00007f679ab7a73a in std::_Sp_counted_ptr_inplace<mssql::OdbcEnvironment, std::allocatormssql::OdbcEnvironment, (__gnu_cxx::_Lock_policy)2>::_M_dispose() () from /root/sql-nodejs-demo/node_modules/msnodesqlv8/build/Release/sqlserver.node
#27 0x00007f679ab77ada in std::shared_ptrmssql::IOdbcEnvironment::~shared_ptr() () from /root/sql-nodejs-demo/node_modules/msnodesqlv8/build/Release/sqlserver.node
#28 0x00007f67a2120a76 in __run_exit_handlers (status=0, listp=, run_list_atexit=run_list_atexit@entry=true, run_dtors=run_dtors@entry=true) at ./stdlib/exit.c:108
#29 0x00007f67a2120bbe in __GI_exit (status=) at ./stdlib/exit.c:138
#30 0x00007f67a21031d1 in __libc_start_call_main (main=main@entry=0x5620f359a247 <main(int, char**)>, argc=argc@entry=2, argv=argv@entry=0x7ffeca97b968) at ../sysdeps/nptl/libc_start_call_main.h:74
#31 0x00007f67a210328b in __libc_start_main_impl (main=0x5620f359a247 <main(int, char**)>, argc=2, argv=0x7ffeca97b968, init=, fini=, rtld_fini=, stack_end=0x7ffeca97b958) at ../csu/libc-start.c:360
#32 0x00005620f163baf5 in _start ()
This object misleading caused by the imcompatible openssl module in the stack where as msodbcsql using system openssl 3.2.3. while nodejs has global static openssl function/symbols, so the nodejs symbol would be used in openssl 3.2.3 by fault.
After compiling the nodejs 22.19.0 with shared library openssl issue resolved.