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

perf-memory test segfault #330

Open
yarda opened this issue Jun 15, 2021 · 2 comments
Open

perf-memory test segfault #330

yarda opened this issue Jun 15, 2021 · 2 comments

Comments

@yarda
Copy link
Contributor

yarda commented Jun 15, 2021

On Fedora Rawhide (f35):

19/29 Test #19: perf-memory ......................***Exception: SegFault  0.19 sec
./perf-memory
  PID.Thread  | Filename:line                    |   ms | Message
   35.1        ox-1.17.0/lunchbox/thread.cpp:155       0 Thread #1 type (anonymous namespace)::Watchdog successfully initialized
   35.Main     hbox-1.17.0/lunchbox/init.cpp:70        0 Log level DEBUG topics 4 date Wed Jun 16 00:40:29 2021
Segmentation fault (core dumped)
@yarda
Copy link
Contributor Author

yarda commented Jun 15, 2021

Running through valgrind:

==26== Memcheck, a memory error detector
==26== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==26== Using Valgrind-3.17.0 and LibVEX; rerun with -h for copyright info
==26== Command: ./perf-memory
==26== 
  PID.Thread  | Filename:line                    |   ms | Message
   26.1        ox-1.17.0/lunchbox/thread.cpp:155     103 Thread #1 type (anonymous namespace)::Watchdog successfully initialized
   26.Main     hbox-1.17.0/lunchbox/init.cpp:70      263 Log level DEBUG topics 4 date Wed Jun 16 00:47:20 2021
==26== Invalid write of size 8
==26==    at 0x484806D: memset (vg_replace_strmem.c:1270)
==26==    by 0x10C323: UnknownInlinedFun (string_fortified.h:59)
==26==    by 0x10C323: TaskThread::run() (memory.cpp:74)
==26==    by 0x10CF90: testMain(int, char**) (memory.cpp:93)
==26==    by 0x10BB0C: main (test.h:120)
==26==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==26== 
==26== 
==26== Process terminating with default action of signal 11 (SIGSEGV)
==26==  Access not within mapped region at address 0x0
==26==    at 0x484806D: memset (vg_replace_strmem.c:1270)
==26==    by 0x10C323: UnknownInlinedFun (string_fortified.h:59)
==26==    by 0x10C323: TaskThread::run() (memory.cpp:74)
==26==    by 0x10CF90: testMain(int, char**) (memory.cpp:93)
==26==    by 0x10BB0C: main (test.h:120)
==26==  If you believe this happened as a result of a stack
==26==  overflow in your program's main thread (unlikely but
==26==  possible), you can try to increase the size of the
==26==  main thread stack using the --main-stacksize= flag.
==26==  The main thread stack size used in this run was 8388608.
==26== 
==26== HEAP SUMMARY:
==26==     in use at exit: 7,514 bytes in 37 blocks
==26==   total heap usage: 62 allocs, 25 frees, 88,812 bytes allocated
==26== 
==26== LEAK SUMMARY:
==26==    definitely lost: 0 bytes in 0 blocks
==26==    indirectly lost: 0 bytes in 0 blocks
==26==      possibly lost: 320 bytes in 1 blocks
==26==    still reachable: 7,194 bytes in 36 blocks
==26==         suppressed: 0 bytes in 0 blocks
==26== Rerun with --leak-check=full to see details of leaked memory
==26== 
==26== For lists of detected and suppressed errors, rerun with: -s
==26== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
Segmentation fault (core dumped)

@yarda
Copy link
Contributor Author

yarda commented Jun 15, 2021

Run through gdb:

Thread 1 "perf-memory" received signal SIGSEGV, Segmentation fault.
0x00007ffff7993db1 in __memset_avx2_erms () from /lib64/libc.so.6
(gdb) bt
#0  0x00007ffff7993db1 in __memset_avx2_erms () from /lib64/libc.so.6
#1  0x0000555555558324 in memset (__len=<optimized out>, __ch=42, __dest=0x0) at /usr/include/bits/string_fortified.h:59
#2  TaskThread::run (this=0x7fffffffd360) at /builddir/build/BUILD/Lunchbox-1.17.0/tests/perf/memory.cpp:74
#3  0x0000555555558f91 in testMain (argc=1, argv=0x7fffffffdae8) at /builddir/build/BUILD/Lunchbox-1.17.0/tests/perf/memory.cpp:93
#4  0x0000555555557b0d in main (argc=1, argv=0x7fffffffdae8) at /builddir/build/BUILD/Lunchbox-1.17.0/lunchbox/test.h:120

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

No branches or pull requests

1 participant