Open blshkv opened 3 years ago
Hi,
can you please re-compile with the cmake flag -DCMAKE_BUILD_TYPE=Debug
set?
Otherwise your core file is useless.
if the error re-occurs, can you please provide the core file.
I've tried to reproduce, but in my case it's always starting w/o an issue.
The thing is I did compile it with this setting. Double checked it, /ettercap/build/CMakeCache.txt has it set:
//Choose the type of build, options are: None Debug Release RelWithDebInfo
CMAKE_BUILD_TYPE:STRING=Debug
CMAKE_C_FLAGS_DEBUG:STRING=-O0 -ggdb3 -DDEBUG -fno-common -Wall -Wno-pointer-sign -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -Wextra -Wredundant-decls
CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
//Flags used by the linker during DEBUG builds.
CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=
// DEBUG builds.
CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=
// during DEBUG builds.
CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=
// during DEBUG builds.
CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING=
// during the make. This is useful for debugging only. With Visual
FREETYPE_LIBRARY_DEBUG:FILEPATH=FREETYPE_LIBRARY_DEBUG-NOTFOUND
ZLIB_LIBRARY_DEBUG:FILEPATH=ZLIB_LIBRARY_DEBUG-NOTFOUND
//ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG
CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG
CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG
CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG
CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG
CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: FREETYPE_LIBRARY_DEBUG
FREETYPE_LIBRARY_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: ZLIB_LIBRARY_DEBUG
ZLIB_LIBRARY_DEBUG-ADVANCED:INTERNAL=1```
OK thanks. Maybe the limit for the coredump is too low. Could you please issue the following command (as root) before you reproduce the issue that generates the core file:
ulimit -c unlimited
Please also note, that the core file will be uniquely named. So more recent core files may not be named core but core.1 or simlar. Please check the timestamp to select the correct and latest core dump.
nop, no help. I set both set ec_uid to 0
and ulimit -c unlimited
. The bt
output still "blank"
I'm using gcc-9.3.0
Any other ideas?
use gdb to start it? :)
sudo gdb --args ./src/ettercap -G
GNU gdb (Gentoo 9.2 vanilla) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://bugs.gentoo.org/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./src/ettercap...
(gdb) run
Starting program: /home/user/Downloads/ettercap/build/src/ettercap -G
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
ettercap 0.8.4-rc copyright 2001-2020 Ettercap Development Team
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff77bef50 in g_type_check_instance_cast () from /usr/lib64/libgobject-2.0.so.0
(gdb) bt
#0 0x00007ffff77bef50 in g_type_check_instance_cast () at /usr/lib64/libgobject-2.0.so.0
#1 0x00007ffff7a8e655 in gtkui_init () at /home/user/Downloads/ettercap/src/interfaces/gtk3/ec_gtk3.c:286
#2 0x00007ffff7f77f5f in ui_init () at /home/user/Downloads/ettercap/src/ec_ui.c:51
#3 0x00007ffff7f5c7f0 in libettercap_ui_init () at /home/user/Downloads/ettercap/src/ec_libettercap.c:54
#4 0x000055555555884c in main (argc=2, argv=0x7fffffffe518) at /home/user/Downloads/ettercap/src/ec_main.c:97
just in case if you need it, libgobject is part of glib which is compiled with the following options:
[ebuild R ] dev-libs/glib-2.64.5:2::gentoo USE="dbus (mime) xattr -debug -fam -gtk-doc (-selinux) -static-libs -systemtap -test -utils" ABI_X86="32 (64) (-x32)" 4,667 KiB
("-" means not enabled)
Thanks for the hints. You're running it on a Gentoo?
Yes, correct. I also use the hardened profile
I followed the official guideline (https://github.com/Ettercap/ettercap/wiki/Providing-debug-information), compiled the latest git (the latest 0.8.3.1 is crashing too).
Here is the output:
and the -w pcap file was not created