-
Notifications
You must be signed in to change notification settings - Fork 7
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
FIO_ASSERT: return errno(22) #22
Comments
Sorry I wasn't clear before - but these are the errors I couldn't reproduce. I don't get the fatal errors from FYI: most of tests are for performance testing or to test specific behavior. The only truly relevant unit test is the test performed when calling |
In this case it was detected with CMake during the debug build with sanitizers. Lines 237 to 249 in 6bb41f2
|
Is it possible that the sanitizer is causing the error? such as by rewriting The reason I ask is that the error is actually part of the leak detection code, not the sanitizer... See: Lines 174 to 182 in 0d949a4
|
I have removed the sanitizers from debug mode (for tests) and the error persists. Also tried use Valgrind and not show mem-leak! * Testing randomness - bit frequency / hemming distance / chi-square.
WARNING: unintended fio_mmap allocation (slow): 16777216 bytes
FATAL: memory allocation failed.
FATAL: errno(12): Cannot allocate memory
==15749==
==15749== Process terminating with default action of signal 2 (SIGINT)
==15749== at 0x4A6794B: kill (syscall-template.S:120)
==15749== by 0x1508F6: fio___test_stl_random (./fio-stl/902 random.h:472)
==15749== by 0x11E517: fio_test_dynamic_types (./fio-stl/998 tests finish.h:305)
==15749== by 0x11E2A7: main (tests/stl.c:15)
==15749==
==15749== HEAP SUMMARY:
==15749== in use at exit: 75,472 bytes in 5 blocks
==15749== total heap usage: 27 allocs, 22 frees, 149,648 bytes allocated
==15749==
==15749== 80 bytes in 1 blocks are still reachable in loss record 1 of 5
==15749== at 0x4846BE0: realloc (vg_replace_malloc.c:1649)
==15749== by 0x48B2EBA: fio___state_map___alloc (./fio-stl/004 state callbacks.h:129)
==15749== by 0x48B28C5: fio___state_map___expand (./fio-stl/004 state callbacks.h:129)
==15749== by 0x4865F00: fio___state_map_set (./fio-stl/004 state callbacks.h:129)
==15749== by 0x4865CF3: fio_state_callback_add (./fio-stl/004 state callbacks.h:160)
==15749== by 0x48990F2: fio_postoffice_init (./fio-stl/420 pubsub.h:1035)
==15749== by 0x4004EED: call_init (dl-init.c:90)
==15749== by 0x4004EED: call_init (dl-init.c:27)
==15749== by 0x4004FDB: _dl_init (dl-init.c:137)
==15749== by 0x401B2BF: ??? (in /usr/lib/ld-linux-x86-64.so.2)
==15749==
==15749== 640 bytes in 1 blocks are still reachable in loss record 2 of 5
==15749== at 0x4846BE0: realloc (vg_replace_malloc.c:1649)
==15749== by 0x11F5DA: fio___state_map___alloc (./fio-stl/004 state callbacks.h:129)
==15749== by 0x11EFE5: fio___state_map___expand (./fio-stl/004 state callbacks.h:129)
==15749== by 0x11EBD4: fio___state_map_set (./fio-stl/004 state callbacks.h:129)
==15749== by 0x10D673: fio_state_callback_add (./fio-stl/004 state callbacks.h:160)
==15749== by 0x118B1C: fio_mem_test_unsafe___mem_state_setup (./fio-stl/010 mem.h:1216)
==15749== by 0x4A50DFD: call_init (libc-start.c:145)
==15749== by 0x4A50DFD: __libc_start_main@@GLIBC_2.34 (libc-start.c:347)
==15749== by 0x10D4D4: (below main) (in /home/kassane/Documentos/cstl/build/stl)
==15749==
==15749== 16,896 bytes in 1 blocks are still reachable in loss record 3 of 5
==15749== at 0x4846BE0: realloc (vg_replace_malloc.c:1649)
==15749== by 0x48D847A: fio___http_mime_map___alloc (./fio-stl/431 http handle.h:2900)
==15749== by 0x48D8145: fio___http_mime_map___expand (./fio-stl/431 http handle.h:2900)
==15749== by 0x48A9197: fio___http_mime_map_set (./fio-stl/431 http handle.h:2900)
==15749== by 0x48A8EEF: fio_http_mimetype_register (./fio-stl/431 http handle.h:2941)
==15749== by 0x48AA8BE: fio_http_mime_register_essential (./fio-stl/431 http handle.h:3020)
==15749== by 0x48A9583: fio___http_str_cache_static_builder (./fio-stl/431 http handle.h:3103)
==15749== by 0x4004EED: call_init (dl-init.c:90)
==15749== by 0x4004EED: call_init (dl-init.c:27)
==15749== by 0x4004FDB: _dl_init (dl-init.c:137)
==15749== by 0x401B2BF: ??? (in /usr/lib/ld-linux-x86-64.so.2)
==15749==
==15749== 16,896 bytes in 1 blocks are still reachable in loss record 4 of 5
==15749== at 0x4846BE0: realloc (vg_replace_malloc.c:1649)
==15749== by 0x14A54A: fio___http_mime_map___alloc (./fio-stl/431 http handle.h:2900)
==15749== by 0x14A215: fio___http_mime_map___expand (./fio-stl/431 http handle.h:2900)
==15749== by 0x149B77: fio___http_mime_map_set (./fio-stl/431 http handle.h:2900)
==15749== by 0x1498CF: fio_http_mimetype_register (./fio-stl/431 http handle.h:2941)
==15749== by 0x116CAE: fio_http_mime_register_essential (./fio-stl/431 http handle.h:3020)
==15749== by 0x115973: fio___http_str_cache_static_builder (./fio-stl/431 http handle.h:3103)
==15749== by 0x4A50DFD: call_init (libc-start.c:145)
==15749== by 0x4A50DFD: __libc_start_main@@GLIBC_2.34 (libc-start.c:347)
==15749== by 0x10D4D4: (below main) (in /home/kassane/Documentos/cstl/build/stl)
==15749==
==15749== 40,960 bytes in 1 blocks are still reachable in loss record 5 of 5
==15749== at 0x4846BE0: realloc (vg_replace_malloc.c:1649)
==15749== by 0x11F5DA: fio___state_map___alloc (./fio-stl/004 state callbacks.h:129)
==15749== by 0x11EFE5: fio___state_map___expand (./fio-stl/004 state callbacks.h:129)
==15749== by 0x11EBD4: fio___state_map_set (./fio-stl/004 state callbacks.h:129)
==15749== by 0x10D673: fio_state_callback_add (./fio-stl/004 state callbacks.h:160)
==15749== by 0x11DEA9: fio___leak_counter_const_fio_big_str_destroy (./fio-stl/200 string.h:1035)
==15749== by 0x4A50DFD: call_init (libc-start.c:145)
==15749== by 0x4A50DFD: __libc_start_main@@GLIBC_2.34 (libc-start.c:347)
==15749== by 0x10D4D4: (below main) (in /home/kassane/Documentos/cstl/build/stl)
==15749==
==15749== LEAK SUMMARY:
==15749== definitely lost: 0 bytes in 0 blocks
==15749== indirectly lost: 0 bytes in 0 blocks
==15749== possibly lost: 0 bytes in 0 blocks
==15749== still reachable: 75,472 bytes in 5 blocks
==15749== suppressed: 0 bytes in 0 blocks
==15749==
==15749== For lists of detected and suppressed errors, rerun with: -s
==15749== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) running DEBUG: testing leaks for fio___cli_amap_s
DEBUG: testing leaks for fio_cli_help_writer
DEBUG: testing leaks for fio_cli_ary
DEBUG: testing leaks for fio_cli_str
FATAL: fio___state_map_s `free` after `free` detected!
FATAL: errno(22): Invalid argument release ===============
On Fri, 29 Sep 2023 12:47:17 GMT
Testing PASSED for facil.io core version: 0.8.0-alpha.06
The facil.io library was originally coded by Boaz Segev.
Please give credit where credit is due.
Your support is only fair - give value for value.
(code contributions / donations)
FATAL: fio___state_map_s `free` after `free` detected!
FATAL: errno(0): Success |
FYI: On Windows there's a known ordering issue with the Since the program is exiting anyway (and since Windows is weird) I gave up on trying to fix this issue. I simply moved what I could to the So some tests might always report errors on Windows during program exit. |
Ref.: #15 #17
Output log
mustache
stl
base64
mempool
noop
client
The text was updated successfully, but these errors were encountered: