Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: memory leaks (DEV-237) #365

Merged
merged 27 commits into from
Jan 15, 2022
Merged

fix: memory leaks (DEV-237) #365

merged 27 commits into from
Jan 15, 2022

Conversation

subotic
Copy link
Contributor

@subotic subotic commented Dec 11, 2021

Running sipi (compiled with the debug flag) with Valgrind and uploading a few images yield the following output:

==1== Memcheck, a memory error detector
==1== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==1== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
==1== Command: /sipi/sipi --config=/sipi/config/sipi.knora-docker-config.lua
==1== 
Sipi: BUILD_TIMESTAMP: 2021-12-10 17:36
Sipi: BUILD_SCM_TAG: v3.3.1-4-g3df4eb9
Sipi: BUILD_SCM_REVISION: 3df4eb9f80162ee3968ba03eaae33cda028b4fcd
Sipi: Cache at "/sipi/cache" cachesize=104857600 nfiles=0 hysteresis=0.100000
Sipi: Starting SipiHttpServer::run()
Sipi: Sipi server starting
Sipi: Serving images from /sipi/images
Sipi: In Server::run
Sipi: Starting shttps server with 16 threads
Sipi: Creating thread pool....
Sipi: Added route /upload with script /sipi/scripts/upload.lua
Sipi: Added route /store with script /sipi/scripts/store.lua
Sipi: Added route /delete_temp_file with script /sipi/scripts/delete_temp_file.lua
Sipi: Added route /test_functions with script /sipi/scripts/test_functions.lua
Sipi: Added route /test_file_info with script /sipi/scripts/test_file_info.lua
Sipi: Added route /test_knora_session_cookie with script /sipi/scripts/test_knora_session_cookie.lua
Sipi: Server listening on HTTP port 1024
Ivan was here
BUILD_TIMESTAMP: 2021-12-10 17:36
BUILD_TIMESTAMP: 2021-12-10 17:36
BUILD_SCM_TAG: v3.3.1-4-g3df4eb9
BUILD_SCM_REVISION: 3df4eb9f80162ee3968ba03eaae33cda028b4fcd
Sipi: Accepted connection from 172.22.0.1
==1== Conditional jump or move depends on uninitialised value(s)
==1==    at 0x5E53A6: shttps::Server::run() (shttps/Server.cpp:1023)
==1==    by 0x541556: Sipi::SipiHttpServer::run() (src/SipiHttpServer.cpp:1800)
==1==    by 0x4759A5: main (src/sipi.cpp:1267)
==1== 
Sipi: Accepted connection from 172.22.0.1
==1== Syscall param socketcall.sendto(msg) points to uninitialised byte(s)
==1==    at 0x489377C: __libc_send (send.c:28)
==1==    by 0x489377C: send (send.c:23)
==1==    by 0x5D9A84: shttps::SocketControl::send_control_message(int, shttps::SocketControl::SocketInfo const&) (shttps/SocketControl.cpp:124)
==1==    by 0x5E5AA2: shttps::Server::run() (shttps/Server.cpp:1158)
==1==    by 0x541556: Sipi::SipiHttpServer::run() (src/SipiHttpServer.cpp:1800)
==1==    by 0x4759A5: main (src/sipi.cpp:1267)
==1==  Address 0x1ffeff9a8c is on thread 1's stack
==1==  in frame #2, created by shttps::Server::run() (shttps/Server.cpp:944)
==1== 
Sipi: Socket connection: timeout or socket closed from main
Sipi: upload.lua: wrote image file to /sipi/images/tmp/BJcWQHE0f1t-D9gFYbrRsQa.jp2
...
Sipi: upload.lua: wrote image file to /sipi/images/tmp/Dc1pT0HOV71-AzloQSqGlL2.jp2
==1== Conditional jump or move depends on uninitialised value(s)
==1==    at 0x5E53C5: shttps::Server::run() (shttps/Server.cpp:1024)
==1==    by 0x541556: Sipi::SipiHttpServer::run() (src/SipiHttpServer.cpp:1800)
==1==    by 0x4759A5: main (src/sipi.cpp:1267)
==1== 
==1== Conditional jump or move depends on uninitialised value(s)
==1==    at 0x5E53E4: shttps::Server::run() (shttps/Server.cpp:1024)
==1==    by 0x541556: Sipi::SipiHttpServer::run() (src/SipiHttpServer.cpp:1800)
==1==    by 0x4759A5: main (src/sipi.cpp:1267)
==1== 
Sipi: upload.lua: wrote image file to /sipi/images/tmp/9AdnTT89FIO-CevwuPlCRZ8.jp2
...
Sipi: upload.lua: wrote image file to /sipi/images/tmp/BsDnf0zCqIM-BthrDvzwJdS.jp2
==1== Conditional jump or move depends on uninitialised value(s)
==1==    at 0x5E5B35: shttps::Server::run() (shttps/Server.cpp:1166)
==1==    by 0x541556: Sipi::SipiHttpServer::run() (src/SipiHttpServer.cpp:1800)
==1==    by 0x4759A5: main (src/sipi.cpp:1267)
==1== 
==1== Conditional jump or move depends on uninitialised value(s)
==1==    at 0x5E5E31: shttps::Server::run() (shttps/Server.cpp:1210)
==1==    by 0x541556: Sipi::SipiHttpServer::run() (src/SipiHttpServer.cpp:1800)
==1==    by 0x4759A5: main (src/sipi.cpp:1267)
==1== 
==1== Conditional jump or move depends on uninitialised value(s)
==1==    at 0x5E5E6B: shttps::Server::run() (shttps/Server.cpp:1213)
==1==    by 0x541556: Sipi::SipiHttpServer::run() (src/SipiHttpServer.cpp:1800)
==1==    by 0x4759A5: main (src/sipi.cpp:1267)
==1== 
==1== Conditional jump or move depends on uninitialised value(s)
==1==    at 0x5E5EA5: shttps::Server::run() (shttps/Server.cpp:1216)
==1==    by 0x541556: Sipi::SipiHttpServer::run() (src/SipiHttpServer.cpp:1800)
==1==    by 0x4759A5: main (src/sipi.cpp:1267)
==1== 
==1== Conditional jump or move depends on uninitialised value(s)
==1==    at 0x5E5EDF: shttps::Server::run() (shttps/Server.cpp:1219)
==1==    by 0x541556: Sipi::SipiHttpServer::run() (src/SipiHttpServer.cpp:1800)
==1==    by 0x4759A5: main (src/sipi.cpp:1267)
==1== 
==1== Conditional jump or move depends on uninitialised value(s)
==1==    at 0x5E5F19: shttps::Server::run() (shttps/Server.cpp:1222)
==1==    by 0x541556: Sipi::SipiHttpServer::run() (src/SipiHttpServer.cpp:1800)
==1==    by 0x4759A5: main (src/sipi.cpp:1267)
==1== 
==1== Conditional jump or move depends on uninitialised value(s)
==1==    at 0x5E5F53: shttps::Server::run() (shttps/Server.cpp:1225)
==1==    by 0x541556: Sipi::SipiHttpServer::run() (src/SipiHttpServer.cpp:1800)
==1==    by 0x4759A5: main (src/sipi.cpp:1267)
==1== 
==1== Conditional jump or move depends on uninitialised value(s)
==1==    at 0x5E5F90: shttps::Server::run() (shttps/Server.cpp:1228)
==1==    by 0x541556: Sipi::SipiHttpServer::run() (src/SipiHttpServer.cpp:1800)
==1==    by 0x4759A5: main (src/sipi.cpp:1267)
==1== 
==1== Conditional jump or move depends on uninitialised value(s)
==1==    at 0x5E5FCA: shttps::Server::run() (shttps/Server.cpp:1231)
==1==    by 0x541556: Sipi::SipiHttpServer::run() (src/SipiHttpServer.cpp:1800)
==1==    by 0x4759A5: main (src/sipi.cpp:1267)
==1== 
==1== Conditional jump or move depends on uninitialised value(s)
==1==    at 0x5E6007: shttps::Server::run() (shttps/Server.cpp:1234)
==1==    by 0x541556: Sipi::SipiHttpServer::run() (src/SipiHttpServer.cpp:1800)
==1==    by 0x4759A5: main (src/sipi.cpp:1267)
==1== 
==1== Conditional jump or move depends on uninitialised value(s)
==1==    at 0x5E6044: shttps::Server::run() (shttps/Server.cpp:1237)
==1==    by 0x541556: Sipi::SipiHttpServer::run() (src/SipiHttpServer.cpp:1800)
==1==    by 0x4759A5: main (src/sipi.cpp:1267)
==1== 
Sipi: upload.lua: wrote image file to /sipi/images/tmp/4OBV5F7t5ma-EFy3D0z9JbT.jp2
Sipi: upload.lua: wrote image file to /sipi/images/tmp/HX36n8ScRCI-F3dMWLOlQND.jp2
Sipi: upload.lua: wrote image file to /sipi/images/tmp/58urrdjIcbF-C40uycBKRVO.jp2
Sipi: -->POLLNVAL
Sipi: -->POLLOUT
Sipi: -->POLLRDNORM
Sipi: -->POLLWRBAND
Sipi: -->POLLWRNORM
Sipi: upload.lua: wrote image file to /sipi/images/tmp/1i8vuhjdWnD-E8EKSVLYNTd.jp2
...
Sipi: upload.lua: wrote image file to /sipi/images/tmp/HrAS0dTSP5W-D52Q8Ul2AbM.jp2
Sipi: Accepted connection from 172.22.0.1
Sipi: Socket connection: timeout or socket closed from main
Sipi: Accepted connection from 172.22.0.1
Sipi: upload.lua: wrote image file to /sipi/images/tmp/FuTrwQskxBT-BbyOs2IJWPG.jp2
Sipi: upload.lua: wrote image file to /sipi/images/tmp/7hzkNdjECZp-DG19b4T8PTQ.jp2
Sipi: Accepted connection from 172.22.0.1
Sipi: Accepted connection from 172.22.0.1
Sipi: upload.lua: wrote image file to /sipi/images/tmp/Fag0y3dXDt1-BmBwvUP1JwM.jp2
...
Sipi: upload.lua: wrote image file to /sipi/images/tmp/LM5vksDuelt-CGexSfVH4Oi.jp2
Sipi: -->POLLWRNORM
Sipi: upload.lua: wrote image file to /sipi/images/tmp/CBB1iu1EwUx-CtSMs8bVf1S.jp2
...
Sipi: upload.lua: wrote image file to /sipi/images/tmp/HDGOTQRnFTp-EKMZkG70UCr.jp2
==1== Thread 2:
==1== Syscall param socketcall.sendto(msg) points to uninitialised byte(s)
==1==    at 0x489377C: __libc_send (send.c:28)
==1==    by 0x489377C: send (send.c:23)
==1==    by 0x5D9A84: shttps::SocketControl::send_control_message(int, shttps::SocketControl::SocketInfo const&) (shttps/SocketControl.cpp:124)
==1==    by 0x58D15D: shttps::Server::stop() (shttps/Server.h:506)
==1==    by 0x5E61D3: shttps::sig_thread(void*) (shttps/Server.cpp:107)
==1==    by 0x4888608: start_thread (pthread_create.c:477)
==1==    by 0x50BD292: clone (clone.S:95)
==1==  Address 0x5de9de4 is on thread 2's stack
==1==  in frame #2, created by shttps::Server::stop() (shttps/Server.h:502)
==1== 
DBG> 508 Sent stop message to stoppipe[1]=38

It seems that this is not connected to upload. Calling knora.json or info.json on a previously uploaded image results in the following valgrind output:

==1== Memcheck, a memory error detector
==1== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==1== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
==1== Command: /sipi/sipi --config=/sipi/config/sipi.knora-docker-config.lua
==1== 
Ivan was here
BUILD_TIMESTAMP: 2021-12-10 17:36
BUILD_TIMESTAMP: 2021-12-10 17:36
BUILD_SCM_TAG: v3.3.1-4-g3df4eb9
BUILD_SCM_REVISION: 3df4eb9f80162ee3968ba03eaae33cda028b4fcd
Sipi: BUILD_TIMESTAMP: 2021-12-10 17:36
Sipi: BUILD_SCM_TAG: v3.3.1-4-g3df4eb9
Sipi: BUILD_SCM_REVISION: 3df4eb9f80162ee3968ba03eaae33cda028b4fcd
Sipi: Cache at "/sipi/cache" cachesize=104857600 nfiles=0 hysteresis=0.100000
Sipi: Starting SipiHttpServer::run()
Sipi: Sipi server starting
Sipi: Serving images from /sipi/images
Sipi: In Server::run
Sipi: Starting shttps server with 16 threads
Sipi: Creating thread pool....
Sipi: Added route /upload with script /sipi/scripts/upload.lua
Sipi: Added route /store with script /sipi/scripts/store.lua
Sipi: Added route /delete_temp_file with script /sipi/scripts/delete_temp_file.lua
Sipi: Added route /test_functions with script /sipi/scripts/test_functions.lua
Sipi: Added route /test_file_info with script /sipi/scripts/test_file_info.lua
Sipi: Added route /test_knora_session_cookie with script /sipi/scripts/test_knora_session_cookie.lua
Sipi: Server listening on HTTP port 1024
Sipi: Accepted connection from 172.22.0.1
==1== Conditional jump or move depends on uninitialised value(s)
==1==    at 0x5E53A6: shttps::Server::run() (shttps/Server.cpp:1023)
==1==    by 0x541556: Sipi::SipiHttpServer::run() (src/SipiHttpServer.cpp:1800)
==1==    by 0x4759A5: main (src/sipi.cpp:1267)
==1== 
Sipi: Accepted connection from 172.22.0.1
==1== Syscall param socketcall.sendto(msg) points to uninitialised byte(s)
==1==    at 0x489377C: __libc_send (send.c:28)
==1==    by 0x489377C: send (send.c:23)
==1==    by 0x5D9A84: shttps::SocketControl::send_control_message(int, shttps::SocketControl::SocketInfo const&) (shttps/SocketControl.cpp:124)
==1==    by 0x5E5AA2: shttps::Server::run() (shttps/Server.cpp:1158)
==1==    by 0x541556: Sipi::SipiHttpServer::run() (src/SipiHttpServer.cpp:1800)
==1==    by 0x4759A5: main (src/sipi.cpp:1267)
==1==  Address 0x1ffeff9a8c is on thread 1's stack
==1==  in frame #2, created by shttps::Server::run() (shttps/Server.cpp:944)
==1== 
Sipi: Socket connection: timeout or socket closed from main
Sipi: upload.lua: wrote image file to /sipi/images/tmp/Eod3yXeDInC-BivTleswEGp.jp2
Sipi: pre_flight called in sipi.init-knora.lua
Sipi: pre_flight called in sipi.init-knora.lua
Sipi: pre_flight called in sipi.init-knora.lua
Sipi: pre_flight called in sipi.init-knora.lua
Sipi: pre_flight called in sipi.init-knora.lua
Sipi: pre_flight called in sipi.init-knora.lua
Sipi: pre_flight called in sipi.init-knora.lua
Sipi: pre_flight called in sipi.init-knora.lua
Sipi: pre_flight called in sipi.init-knora.lua
Sipi: pre_flight called in sipi.init-knora.lua
Sipi: pre_flight called in sipi.init-knora.lua
Sipi: pre_flight called in sipi.init-knora.lua
Sipi: pre_flight called in sipi.init-knora.lua
Sipi: pre_flight called in sipi.init-knora.lua
Sipi: pre_flight called in sipi.init-knora.lua
Sipi: pre_flight called in sipi.init-knora.lua
Sipi: pre_flight called in sipi.init-knora.lua
==1== Thread 5:
==1== Conditional jump or move depends on uninitialised value(s)
==1==    at 0x5A6EDD: Sipi::SipiSize::get_size(unsigned long, unsigned long, unsigned long&, unsigned long&, int&, bool&) (src/iiifparser/SipiSize.cpp:187)
==1==    by 0x5500B7: Sipi::iiif_send_info(shttps::Connection&, Sipi::SipiHttpServer*, shttps::LuaServer&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, bool) (src/SipiHttpServer.cpp:551)
==1==    by 0x544D05: Sipi::process_get_request(shttps::Connection&, shttps::LuaServer&, void*, void*) (src/SipiHttpServer.cpp:1216)
==1==    by 0x5E6E2D: shttps::Server::processRequest(std::istream*, std::ostream*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, int, bool, int&, bool) (shttps/Server.cpp:1310)
==1==    by 0x5E650E: shttps::process_request(void*) (shttps/Server.cpp:799)
==1==    by 0x4888608: start_thread (pthread_create.c:477)
==1==    by 0x50BD292: clone (clone.S:95)
==1== 
==1== Conditional jump or move depends on uninitialised value(s)
==1==    at 0x5A81C4: Sipi::SipiSize::get_size(unsigned long, unsigned long, unsigned long&, unsigned long&, int&, bool&) (src/iiifparser/SipiSize.cpp:374)
==1==    by 0x5500B7: Sipi::iiif_send_info(shttps::Connection&, Sipi::SipiHttpServer*, shttps::LuaServer&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, bool) (src/SipiHttpServer.cpp:551)
==1==    by 0x544D05: Sipi::process_get_request(shttps::Connection&, shttps::LuaServer&, void*, void*) (src/SipiHttpServer.cpp:1216)
==1==    by 0x5E6E2D: shttps::Server::processRequest(std::istream*, std::ostream*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, int, bool, int&, bool) (shttps/Server.cpp:1310)
==1==    by 0x5E650E: shttps::process_request(void*) (shttps/Server.cpp:799)
==1==    by 0x4888608: start_thread (pthread_create.c:477)
==1==    by 0x50BD292: clone (clone.S:95)
==1== 
==1== Conditional jump or move depends on uninitialised value(s)
==1==    at 0x5A8773: Sipi::SipiSize::get_size(unsigned long, unsigned long, unsigned long&, unsigned long&, int&, bool&) (src/iiifparser/SipiSize.cpp:429)
==1==    by 0x5500B7: Sipi::iiif_send_info(shttps::Connection&, Sipi::SipiHttpServer*, shttps::LuaServer&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, bool) (src/SipiHttpServer.cpp:551)
==1==    by 0x544D05: Sipi::process_get_request(shttps::Connection&, shttps::LuaServer&, void*, void*) (src/SipiHttpServer.cpp:1216)
==1==    by 0x5E6E2D: shttps::Server::processRequest(std::istream*, std::ostream*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, int, bool, int&, bool) (shttps/Server.cpp:1310)
==1==    by 0x5E650E: shttps::process_request(void*) (shttps/Server.cpp:799)
==1==    by 0x4888608: start_thread (pthread_create.c:477)
==1==    by 0x50BD292: clone (clone.S:95)
==1== 
==1== Conditional jump or move depends on uninitialised value(s)
==1==    at 0x4EC1402: std::ostreambuf_iterator<char, std::char_traits<char> > std::num_put<char, std::ostreambuf_iterator<char, std::char_traits<char> > >::_M_insert_int<long>(std::ostreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, char, long) const (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28)
==1==    by 0x4ECFD5E: std::ostream& std::ostream::_M_insert<long>(long) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28)
==1==    by 0x5A88BA: Sipi::SipiSize::get_size(unsigned long, unsigned long, unsigned long&, unsigned long&, int&, bool&) (src/iiifparser/SipiSize.cpp:433)
==1==    by 0x5500B7: Sipi::iiif_send_info(shttps::Connection&, Sipi::SipiHttpServer*, shttps::LuaServer&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, bool) (src/SipiHttpServer.cpp:551)
==1==    by 0x544D05: Sipi::process_get_request(shttps::Connection&, shttps::LuaServer&, void*, void*) (src/SipiHttpServer.cpp:1216)
==1==    by 0x5E6E2D: shttps::Server::processRequest(std::istream*, std::ostream*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, int, bool, int&, bool) (shttps/Server.cpp:1310)
==1==    by 0x5E650E: shttps::process_request(void*) (shttps/Server.cpp:799)
==1==    by 0x4888608: start_thread (pthread_create.c:477)
==1==    by 0x50BD292: clone (clone.S:95)
==1== 
==1== Use of uninitialised value of size 8
==1==    at 0x4EC110B: ??? (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28)
==1==    by 0x4EC142C: std::ostreambuf_iterator<char, std::char_traits<char> > std::num_put<char, std::ostreambuf_iterator<char, std::char_traits<char> > >::_M_insert_int<long>(std::ostreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, char, long) const (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28)
==1==    by 0x4ECFD5E: std::ostream& std::ostream::_M_insert<long>(long) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28)
==1==    by 0x5A88BA: Sipi::SipiSize::get_size(unsigned long, unsigned long, unsigned long&, unsigned long&, int&, bool&) (src/iiifparser/SipiSize.cpp:433)
==1==    by 0x5500B7: Sipi::iiif_send_info(shttps::Connection&, Sipi::SipiHttpServer*, shttps::LuaServer&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, bool) (src/SipiHttpServer.cpp:551)
==1==    by 0x544D05: Sipi::process_get_request(shttps::Connection&, shttps::LuaServer&, void*, void*) (src/SipiHttpServer.cpp:1216)
==1==    by 0x5E6E2D: shttps::Server::processRequest(std::istream*, std::ostream*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, int, bool, int&, bool) (shttps/Server.cpp:1310)
==1==    by 0x5E650E: shttps::process_request(void*) (shttps/Server.cpp:799)
==1==    by 0x4888608: start_thread (pthread_create.c:477)
==1==    by 0x50BD292: clone (clone.S:95)
==1== 
==1== Conditional jump or move depends on uninitialised value(s)
==1==    at 0x4EC111D: ??? (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28)
==1==    by 0x4EC142C: std::ostreambuf_iterator<char, std::char_traits<char> > std::num_put<char, std::ostreambuf_iterator<char, std::char_traits<char> > >::_M_insert_int<long>(std::ostreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, char, long) const (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28)
==1==    by 0x4ECFD5E: std::ostream& std::ostream::_M_insert<long>(long) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28)
==1==    by 0x5A88BA: Sipi::SipiSize::get_size(unsigned long, unsigned long, unsigned long&, unsigned long&, int&, bool&) (src/iiifparser/SipiSize.cpp:433)
==1==    by 0x5500B7: Sipi::iiif_send_info(shttps::Connection&, Sipi::SipiHttpServer*, shttps::LuaServer&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, bool) (src/SipiHttpServer.cpp:551)
==1==    by 0x544D05: Sipi::process_get_request(shttps::Connection&, shttps::LuaServer&, void*, void*) (src/SipiHttpServer.cpp:1216)
==1==    by 0x5E6E2D: shttps::Server::processRequest(std::istream*, std::ostream*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, int, bool, int&, bool) (shttps/Server.cpp:1310)
==1==    by 0x5E650E: shttps::process_request(void*) (shttps/Server.cpp:799)
==1==    by 0x4888608: start_thread (pthread_create.c:477)
==1==    by 0x50BD292: clone (clone.S:95)
==1== 
==1== Conditional jump or move depends on uninitialised value(s)
==1==    at 0x4EC1462: std::ostreambuf_iterator<char, std::char_traits<char> > std::num_put<char, std::ostreambuf_iterator<char, std::char_traits<char> > >::_M_insert_int<long>(std::ostreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, char, long) const (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28)
==1==    by 0x4ECFD5E: std::ostream& std::ostream::_M_insert<long>(long) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28)
==1==    by 0x5A88BA: Sipi::SipiSize::get_size(unsigned long, unsigned long, unsigned long&, unsigned long&, int&, bool&) (src/iiifparser/SipiSize.cpp:433)
==1==    by 0x5500B7: Sipi::iiif_send_info(shttps::Connection&, Sipi::SipiHttpServer*, shttps::LuaServer&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, bool) (src/SipiHttpServer.cpp:551)
==1==    by 0x544D05: Sipi::process_get_request(shttps::Connection&, shttps::LuaServer&, void*, void*) (src/SipiHttpServer.cpp:1216)
==1==    by 0x5E6E2D: shttps::Server::processRequest(std::istream*, std::ostream*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, int, bool, int&, bool) (shttps/Server.cpp:1310)
==1==    by 0x5E650E: shttps::process_request(void*) (shttps/Server.cpp:799)
==1==    by 0x4888608: start_thread (pthread_create.c:477)
==1==    by 0x50BD292: clone (clone.S:95)
==1== 
Sipi: pre_flight called in sipi.init-knora.lua
==1== Thread 2:
==1== Syscall param socketcall.sendto(msg) points to uninitialised byte(s)
==1==    at 0x489377C: __libc_send (send.c:28)
==1==    by 0x489377C: send (send.c:23)
==1==    by 0x5D9A84: shttps::SocketControl::send_control_message(int, shttps::SocketControl::SocketInfo const&) (shttps/SocketControl.cpp:124)
==1==    by 0x58D15D: shttps::Server::stop() (shttps/Server.h:506)
==1==    by 0x5E61D3: shttps::sig_thread(void*) (shttps/Server.cpp:107)
==1==    by 0x4888608: start_thread (pthread_create.c:477)
==1==    by 0x50BD292: clone (clone.S:95)
==1==  Address 0x5de9de4 is on thread 2's stack
==1==  in frame #2, created by shttps::Server::stop() (shttps/Server.h:502)
==1== 
DBG> 508 Sent stop message to stoppipe[1]=38

@subotic subotic changed the title fix: memory leak (DEV-237) fix: memory leaks (DEV-237) Jan 15, 2022
@subotic subotic merged commit c3b9b35 into main Jan 15, 2022
@subotic subotic deleted the wip/DEV-237-memory-leak branch January 15, 2022 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants