{
 "issue": {
  "id": 804,
  "iid": 14,
  "project_id": 76,
  "title": "SIGABRT in ioqueue",
  "description": "With a small chance the ioqueue causes a SIGABRT.\n\nBacktrace:\n```\nmunmap_chunk(): invalid pointer\n\nThread 1 \"rmrf\" received signal SIGABRT, Aborted.\n__pthread_kill_implementation (no_tid=0, signo=6, threadid=140737293531584) at ./nptl/pthread_kill.c:44\n44\t./nptl/pthread_kill.c: Datei oder Verzeichnis nicht gefunden.\n(gdb) backtrace \n#0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=140737293531584) at ./nptl/pthread_kill.c:44\n#1  __pthread_kill_internal (signo=6, threadid=140737293531584) at ./nptl/pthread_kill.c:78\n#2  __GI___pthread_kill (threadid=140737293531584, signo=signo@entry=6) at ./nptl/pthread_kill.c:89\n#3  0x00007ffff73a7476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26\n#4  0x00007ffff738d7f3 in __GI_abort () at ./stdlib/abort.c:79\n#5  0x00007ffff73ee6f6 in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x7ffff7540b8c \"%s\\n\")\n    at ../sysdeps/posix/libc_fatal.c:155\n#6  0x00007ffff7405d7c in malloc_printerr (str=str@entry=0x7ffff7543230 \"munmap_chunk(): invalid pointer\")\n    at ./malloc/malloc.c:5664\n#7  0x00007ffff740605c in munmap_chunk (p=<optimized out>) at ./malloc/malloc.c:3060\n#8  0x00007ffff740a51a in __GI___libc_free (mem=<optimized out>) at ./malloc/malloc.c:3381\n#9  0x0000555555587a91 in __gnu_cxx::new_allocator<unsigned char>::deallocate (__t=<optimized out>, \n    __p=<optimized out>, this=0x555555716ae8) at /usr/include/c++/11/ext/new_allocator.h:132\n#10 std::allocator<unsigned char>::deallocate (__n=<optimized out>, __p=<optimized out>, this=0x555555716ae8)\n    at /usr/include/c++/11/bits/allocator.h:199\n#11 std::allocator_traits<std::allocator<unsigned char> >::deallocate (__n=<optimized out>, __p=<optimized out>, \n    __a=...) at /usr/include/c++/11/bits/alloc_traits.h:496\n#12 std::_Vector_base<unsigned char, std::allocator<unsigned char> >::_M_deallocate (__n=<optimized out>, \n    __p=<optimized out>, this=0x555555716ae8) at /usr/include/c++/11/bits/stl_vector.h:354\n#13 std::_Vector_base<unsigned char, std::allocator<unsigned char> >::~_Vector_base (this=<optimized out>, \n    this=<optimized out>) at /usr/include/c++/11/bits/stl_vector.h:335\n#14 std::vector<unsigned char, std::allocator<unsigned char> >::~vector (this=<optimized out>, this=<optimized out>)\n    at /usr/include/c++/11/bits/stl_vector.h:683\n--Type <RET> for more, q to quit, c to continue without paging--\n#15 rmrf::net::iorecord::~iorecord (this=<optimized out>, this=<optimized out>) at submodules/rmrf/src/net/iorecord.hpp:14\n#16 std::destroy_at<rmrf::net::iorecord> (__location=0x555555716ae0) at /usr/include/c++/11/bits/stl_construct.h:88\n#17 std::_Destroy<rmrf::net::iorecord> (__pointer=0x555555716ae0) at /usr/include/c++/11/bits/stl_construct.h:149\n#18 std::_Destroy_aux<false>::__destroy<rmrf::net::iorecord*> (__last=<optimized out>, __first=0x555555716ae0)\n    at /usr/include/c++/11/bits/stl_construct.h:163\n#19 std::_Destroy<rmrf::net::iorecord*> (__last=<optimized out>, __first=<optimized out>) at /usr/include/c++/11/bits/stl_construct.h:196\n#20 std::_Destroy<rmrf::net::iorecord*, rmrf::net::iorecord> (__last=0x555555716cd8, __first=0x555555716ae0)\n    at /usr/include/c++/11/bits/alloc_traits.h:848\n#21 std::deque<rmrf::net::iorecord, std::allocator<rmrf::net::iorecord> >::_M_destroy_data_aux (this=<optimized out>, \n    __first={offset = 0, data = std::vector of length 33, capacity 33 = {63 '?', 14 '\\016', 111 'o', 13 '\\r', 80 'P', 85 'U', 0 '\\000', 0 '\\000', 255 '\\377', 255 '\\377', 255 '\\377', 255 '\\377', 255 '\\377', 255 '\\377', 1 '\\001', 42 '*', 16 '\\020', 78 'N', 111 'o', 32 ' ', 69 'E', 114 'r', 114 'r', 111 'o', 114 'r', 32 ' ', 111 'o', 99 'c', 99 'c', 117 'u', 114 'r', 101 'e', 100 'd'}, addr = {addr = {ss_family = 0, __ss_padding = '\\000' <wiederholt 117 Mal>, __ss_align = 0}, len = 0}}, \n    __last={offset = 0, data = std::vector of length 0, capacity 0, addr = {addr = {ss_family = 0, __ss_padding = '\\000' <wiederholt 117 Mal>, __ss_align = 0}, len = 512}}) at /usr/include/c++/11/bits/deque.tcc:864\n#22 0x00005555555c38f8 in std::deque<rmrf::net::iorecord, std::allocator<rmrf::net::iorecord> >::_M_destroy_data (\n    __last={offset = 0, data = std::vector of length 0, capacity 0, addr = {addr = {ss_family = 0, __ss_padding = '\\000' <wiederholt 117 Mal>, __ss_align = 0}, len = 512}}, \n    __first={offset = 0, data = std::vector of length 33, capacity 33 = {63 '?', 14 '\\016', 111 'o', 13 '\\r', 80 'P', 85 'U', 0 '\\000', 0 '\\000', 255 '\\377', 255 '\\377', 255 '\\377', 255 '\\377', 255 '\\377', 255 '\\377', 1 '\\001', 42 '*', 16 '\\020', 78 'N', 111 'o', 32 ' ', 69 'E', 114 'r', 114 'r', 111 'o', 114 'r', 32 ' ', 111 'o', 99 'c', 99 'c', 117 'u', 114 'r', 101 'e', 100 'd'}, addr = {addr = {ss_family = 0, __ss_padding = '\\000' <wiederholt 117 Mal>, __ss_align = 0}, len = 0}}, this=0x7fffec000c78) at /usr/include/c++/11/bits/stl_deque.h:2048\n#23 std::deque<rmrf::net::iorecord, std::allocator<rmrf::net::iorecord> >::~deque (this=<optimized out>, this=<optimized out>)\n    at /usr/include/c++/11/bits/stl_deque.h:1006\n#24 rmrf::net::ioqueue<rmrf::net::iorecord>::~ioqueue (this=<optimized out>, this=<optimized out>) at submodules/rmrf/src/net/ioqueue.hpp:27\n#25 rmrf::net::connection_client::~connection_client (this=<optimized out>, this=<optimized out>) at lib/rmrf-net/connection_client.cpp:24\n#26 0x00005555555c3a90 in rmrf::net::tcp_client::~tcp_client (this=<optimized out>, this=<optimized out>) at lib/rmrf-net/tcp_client.cpp:38\n#27 0x00005555555c2167 in std::destroy_at<rmrf::net::tcp_client> (__location=<optimized out>) at /usr/include/c++/11/bits/stl_construct.h:88\n#28 std::allocator_traits<std::allocator<rmrf::net::tcp_client> >::destroy<rmrf::net::tcp_client> (__p=<optimized out>, __a=...)\n    at /usr/include/c++/11/bits/alloc_traits.h:537\n#29 std::_Sp_counted_ptr_inplace<rmrf::net::tcp_client, std::allocator<rmrf::net::tcp_client>, (__gnu_cxx::_Lock_policy)2>::_M_dispose (\n    this=<optimized out>) at /usr/include/c++/11/bits/shared_ptr_base.h:528\n#30 0x00005555555b76b5 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (this=0x7fffec000bf0)\n    at /usr/include/c++/11/bits/shared_ptr_base.h:168\n#31 std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count (this=<optimized out>, this=<optimized out>)\n    at /usr/include/c++/11/bits/shared_ptr_base.h:705\n#32 std::__shared_ptr<rmrf::net::connection_client, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr (this=<optimized out>, this=<optimized out>)\n    at /usr/include/c++/11/bits/shared_ptr_base.h:1154\n#33 std::shared_ptr<rmrf::net::connection_client>::~shared_ptr (this=<optimized out>, this=<optimized out>)\n    at /usr/include/c++/11/bits/shared_ptr.h:122\n...\n```\n\nLocal var content:\n```\n(gdb) info locals\ntid = <optimized out>\nret = 0\npd = 0x7ffff46339c0\nold_mask = {__val = {528280977412, 140737343125376, 74, 74, 1, 140737488345487, 140737343108608, 140737341444183, 93825040799936, \n    140737343125376, 140737343108608, 140737341440554, 93824993374704, 140737488345952, 140737488345424, 140737350562810}}\nret = <optimized out>\npd = <optimized out>\nold_mask = <optimized out>\nret = <optimized out>\ntid = <optimized out>\nret = <optimized out>\nresultvar = <optimized out>\nresultvar = <optimized out>\n__arg3 = <optimized out>\n__arg2 = <optimized out>\n__arg1 = <optimized out>\n_a3 = <optimized out>\n_a2 = <optimized out>\n_a1 = <optimized out>\n__futex = <optimized out>\nresultvar = <optimized out>\n__arg3 = <optimized out>\n__arg2 = <optimized out>\n__arg1 = <optimized out>\n_a3 = <optimized out>\n_a2 = <optimized out>\n_a1 = <optimized out>\n__futex = <optimized out>\n__private = <optimized out>\n__oldval = <optimized out>\nresult = <optimized out>\n```\n\nArgs:\n```\n(gdb) info args\nno_tid = 0\nsigno = 6\nthreadid = 140737293531584\n```",
  "state": "opened",
  "created_at": "2023-05-16T10:25:50.838Z",
  "updated_at": "2023-05-16T10:25:50.838Z",
  "closed_at": null,
  "closed_by": null,
  "labels": [],
  "milestone": null,
  "assignees": [],
  "author": {
   "id": 32,
   "username": "doralitze",
   "public_email": "",
   "name": "Leon Dietrich",
   "state": "active",
   "locked": false,
   "avatar_url": "https://git.chaotikum.org/uploads/-/system/user/avatar/32/avatar.png",
   "web_url": "https://git.chaotikum.org/doralitze"
  },
  "type": "ISSUE",
  "assignee": null,
  "user_notes_count": 0,
  "merge_requests_count": 0,
  "upvotes": 0,
  "downvotes": 0,
  "start_date": null,
  "due_date": null,
  "confidential": false,
  "discussion_locked": null,
  "issue_type": "issue",
  "web_url": "https://git.chaotikum.org/ReadMailReallyFast/code/-/work_items/14",
  "time_stats": {
   "time_estimate": 0,
   "total_time_spent": 0,
   "human_time_estimate": null,
   "human_total_time_spent": null
  },
  "task_completion_status": {
   "count": 0,
   "completed_count": 0
  },
  "has_tasks": true,
  "task_status": "0 of 0 checklist items completed",
  "_links": {
   "self": "https://git.chaotikum.org/api/v4/projects/76/issues/14",
   "notes": "https://git.chaotikum.org/api/v4/projects/76/issues/14/notes",
   "award_emoji": "https://git.chaotikum.org/api/v4/projects/76/issues/14/award_emoji",
   "project": "https://git.chaotikum.org/api/v4/projects/76",
   "closed_as_duplicate_of": null
  },
  "references": {
   "short": "#14",
   "relative": "#14",
   "full": "ReadMailReallyFast/code#14"
  },
  "severity": "UNKNOWN",
  "moved_to_id": null,
  "imported": false,
  "imported_from": "none",
  "service_desk_reply_to": null
 },
 "discussions": []
}