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

Segmentation fault on Linux #344

Open
FreddieChopin opened this issue May 14, 2016 · 19 comments
Open

Segmentation fault on Linux #344

FreddieChopin opened this issue May 14, 2016 · 19 comments

Comments

@FreddieChopin
Copy link

I've just compiled Eiskaltdcpp for Arch Linux (using the packages from AUR) - both Qt and GTK versions. Each version results in "segmentation fault" when started. For now I can only provide "useless" info, which is a stack trace and output from GDB - both with no debugging information, but maybe that would be enough to track the issue.

$ eiskaltdcpp-gtk 
Segmentation fault (core dumped)
$ eiskaltdcpp-qt 
Installing handler for: Segmentation fault
Installing handler for: Aborted
Installing handler for: Bus error
Installing handler for: Terminated
Signal handlers installed.
Catching signal : Segmentation fault


*************************************************************
EiskaltDC++ version: 2.2.10-139-g52af555
Oops! Please report a bug at https://github.com/eiskaltdcpp/eiskaltdcpp/issues

Stacktrace below is usually useless. Useful bug report should include full backtrace:
https://github.com/eiskaltdcpp/eiskaltdcpp/wiki/How-to-make-bugreport

Stacktrace:
stack trace:
  /usr/lib/libc.so.6 : ()+0x33310  [0x7f24b27cc310]
  /usr/lib/libc.so.6 : ()+0x148580  [0x7f24b28e1580]
  /usr/lib/libstdc++.so.6 : std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::compare(unsigned long, unsigned long, char const*) const+0x6f  [0x7f24b253753f]
  /usr/lib/libeiskaltdcpp.so.2.3 : dcpp::DynDNS::Request()+0x78  [0x7f24b408e428]
  /usr/lib/libeiskaltdcpp.so.2.3 : dcpp::DynDNS::DynDNS()+0x1cb  [0x7f24b408e81b]
  /usr/lib/libeiskaltdcpp.so.2.3 : dcpp::startup(void (*)(void*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&), void*)+0x1c40  [0x7f24b40173a0]
  eiskaltdcpp-qt : main()+0x19e  [0x4c057e]
  /usr/lib/libc.so.6 : __libc_start_main()+0xf1  [0x7f24b27b9741]
  eiskaltdcpp-qt : _start()+0x29  [0x5347a9]
(gdb) run
Starting program: /usr/bin/eiskaltdcpp-qt 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7fffe8240700 (LWP 5152)]
Installing handler for: Segmentation fault
Installing handler for: Aborted
Installing handler for: Bus error
Installing handler for: Terminated
Signal handlers installed.
[New Thread 0x7fffde3d5700 (LWP 5153)]

Thread 1 "eiskaltdcpp-qt" received signal SIGSEGV, Segmentation fault.
0x00007ffff483e580 in __memcmp_sse4_1 () from /usr/lib/libc.so.6
(gdb) 

Please let me know if you need the full debug info - I'll recompile and test again.

@FreddieChopin
Copy link
Author

OK, I've rebuilt with debug info, but the output from GDB doesn't look much differently...

$ gdb eiskaltdcpp-qt
GNU gdb (GDB) 7.11
Copyright (C) 2016 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:
<http://www.gnu.org/software/gdb/bugs/>.
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 eiskaltdcpp-qt...done.
(gdb) run
Starting program: /usr/bin/eiskaltdcpp-qt 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7fffe8262700 (LWP 17724)]
Installing handler for: Segmentation fault
Installing handler for: Aborted
Installing handler for: Bus error
Installing handler for: Terminated
Signal handlers installed.
[New Thread 0x7fffde3d5700 (LWP 17725)]

Thread 1 "eiskaltdcpp-qt" received signal SIGSEGV, Segmentation fault.
0x00007ffff4860580 in __memcmp_sse4_1 () from /usr/lib/libc.so.6
(gdb) c
Continuing.
Catching signal : Segmentation fault


*************************************************************
EiskaltDC++ version: 2.2.10-139-g52af555
Oops! Please report a bug at https://github.com/eiskaltdcpp/eiskaltdcpp/issues

Stacktrace below is usually useless. Useful bug report should include full backtrace:
https://github.com/eiskaltdcpp/eiskaltdcpp/wiki/How-to-make-bugreport

Stacktrace:
stack trace:
  /usr/lib/libc.so.6 : ()+0x33310  [0x7ffff474b310]
  /usr/lib/libc.so.6 : ()+0x148580  [0x7ffff4860580]
  /usr/lib/libstdc++.so.6 : std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::compare(unsigned long, unsigned long, char const*) const+0x6f  [0x7ffff44b653f]
  /usr/lib/libeiskaltdcpp.so.2.3 : dcpp::DynDNS::Request()+0x76  [0x7ffff5fe9976]
  /usr/lib/libeiskaltdcpp.so.2.3 : dcpp::DynDNS::DynDNS()+0x1cb  [0x7ffff5fe9ccb]
  /usr/lib/libeiskaltdcpp.so.2.3 : dcpp::startup(void (*)(void*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&), void*)+0x180f  [0x7ffff5f8300f]
  /usr/bin/eiskaltdcpp-qt : main()+0x19e  [0x4c322e]
  /usr/lib/libc.so.6 : __libc_start_main()+0xf1  [0x7ffff4738741]
  /usr/bin/eiskaltdcpp-qt : _start()+0x29  [0x537479]

Thread 1 "eiskaltdcpp-qt" received signal SIGINT, Interrupt.
0x00007ffff4dcddc9 in raise () from /usr/lib/libpthread.so.0
(gdb) 

Please let me know what can I do to provide more info.

@tehnick
Copy link
Member

tehnick commented May 15, 2016

Hi. Just after segfault enter bt full in gdb and show us its output.
Some details about debugging are described in our wiki:
https://github.com/eiskaltdcpp/eiskaltdcpp/wiki/How-to-make-bugreport

Also I recommend to build EiskaltDC++ with -DCMAKE_BUILD_TYPE=RelWithDebInfo configure option instead of -DCMAKE_BUILD_TYPE=Debug. Because in a last case segfault might be in another place.

@FreddieChopin
Copy link
Author

@FreddieChopin
Copy link
Author

Just for the record - this exact revision works fine a9c136c

@dko4er
Copy link

dko4er commented May 18, 2016

The same segfault happened with my eiskaltdcpp after building from latest sources. I was able to workaround it by removing DCPlusPlus.xml file. Though you'd have to configure your client from scratch after that.

@vovochka404
Copy link
Member

Du you still have this malformed DCPlusPlus.xml file? Can you attach it or specify any deference between old one and new one?

@dko4er
Copy link

dko4er commented May 18, 2016

I should still have it in the backup. I'll check if I can do the diff without unveiling private info...

Stack trace also showed DynDNS request, i tried to delete "DynDNSServer" and "EnableDynDNS" lines but it did not help... Then I deleted the whole file.

@FreddieChopin
Copy link
Author

Good catch! In here it's the same - after I removed DCPlusPlus.xml file, I can start the latest version.

Here's the diff of my previous file and the new one, with some strings removed (I've configured a few things after the application started) - https://gist.github.com/FreddieChopin/57e198dd96d17872942160d4066bf853

What is VERY interesting is that with these settings it does start, but there's still a segfault when quitting the application (sorry, with no debug info this time):

$ eiskaltdcpp-qt
Installing handler for: Segmentation fault
Installing handler for: Aborted
Installing handler for: Bus error
Installing handler for: Terminated
Signal handlers installed.
Loading: Hash database
Loading: Shared Files
Loading: Download Queue
Loading: Users
UserList icons has been loaded
Application icons has been loaded
Error: No word lists can be found for the language "en_US".
Shutting down libdcpp...
Catching signal : Segmentation fault


*************************************************************
EiskaltDC++ version: 2.2.10-139-g52af555
Oops! Please report a bug at https://github.com/eiskaltdcpp/eiskaltdcpp/issues

Stacktrace below is usually useless. Useful bug report should include full backtrace:
https://github.com/eiskaltdcpp/eiskaltdcpp/wiki/How-to-make-bugreport

Stacktrace:
stack trace:
  /usr/lib/libc.so.6 : ()+0x33310  [0x7f3883dbb310]
  /usr/lib/libeiskaltdcpp.so.2.3 : dht::DHT::stop(bool)+0  [0x7f3885652a00]
  /usr/lib/libeiskaltdcpp.so.2.3 : dcpp::ConnectivityManager::mappingFinished(bool)+0x55  [0x7f388560e5d5]
  /usr/lib/libeiskaltdcpp.so.2.3 : dcpp::UPnPManager::run()+0x6aa  [0x7f388554976a]
  /usr/lib/libeiskaltdcpp.so.2.3 : dcpp::Thread::starter(void*)+0xa  [0x7f3885559fca]
  /usr/lib/libpthread.so.0 : ()+0x7474  [0x7f3884434474]
  /usr/lib/libc.so.6 : clone()+0x6d  [0x7f3883e6facd]

[freddie@INFERNUS ~]$

I've also noticed that when I did NOT modify the default config, there was no segfault at the exit. Basically I changed my user, e-mail, upload speed, share, download folders, configured ports, enabled "auto detect connection" and changed to "firewall with port forwarding". Now, experimenting some more, I tracked the segfault to the "auto detect connection" option - no matter what it detects, if it's enabled, the application segfaults at exit.

@vovochka404
Copy link
Member

@dko4er are you also using AUR (Arch) build?
Or what system do you use?

@dko4er
Copy link

dko4er commented May 20, 2016

@vovochka404 no I'm on Fedora 23.

@Markismus
Copy link

Markismus commented Jun 9, 2016

I ran into the same problem after using the AUR build v2.3.0.4958.52af555-1 (EiskaltDC++ version: 2.2.10-139-g52af555) on 4.5.4-1-ARCH.

Any progress on a solution?
After deleting DCPlusPlus.xml I am able to start, close and start it. After typing my nick it crashes again.

@sl1pkn07
Copy link
Contributor

i have the same problem

└───╼  eiskaltdcpp-qt 
Installing handler for: Violación de segmento
Installing handler for: Abortado
Installing handler for: Error del bus
Installing handler for: Terminado
Signal handlers installed.
Loading: Base de datos de índices
Loading: Archivos compartidos
Loading: Cola de Descargas
Loading: Usuarios
Los iconos de la lista de usuarios han sido cargados
Los iconos de la aplicación han sido cargados
Catching signal : Violación de segmento


*************************************************************
EiskaltDC++ version: 2.2.10-139-g52af555
Oops! Please report a bug at https://github.com/eiskaltdcpp/eiskaltdcpp/issues

Stacktrace below is usually useless. Useful bug report should include full backtrace:
https://github.com/eiskaltdcpp/eiskaltdcpp/wiki/How-to-make-bugreport

Stacktrace:
stack trace:
  /usr/lib/libc.so.6 : ()+0x33310  [0x7f5ae2d7e310]

builded with Qt 5.7.0

@sl1pkn07
Copy link
Contributor

sl1pkn07 commented Jul 8, 2016

any notice? in 3 weeks start the EuskalEncounter :/

@Markismus
Copy link

Markismus commented Jul 22, 2016

I got rid of this problem by switching from GTK to QT. It was suggested on Quora. Apparently, it is common that GTK crashes.

@dko4er
Copy link

dko4er commented Jul 22, 2016

@Markismus if you take a look at the original problem post you'll see that both versions crash.

@sl1pkn07
Copy link
Contributor

sl1pkn07 commented Jul 22, 2016

ok. idk what happend, but now works (greetings from the #EuskalEncounter24)

@Markismus
Copy link

@dko4er Ah, missed that. (Still. the problem with my crash been gone since the 22nd. So it wasn't the same after all. Sorry)

@pavelvat
Copy link
Member

pavelvat commented Oct 1, 2016

check 0d5dc1a

@FreddieChopin
Copy link
Author

It seems to fix the problem - at least for now, we'll see how that works after some more time. I'm writing this, because I noticed that deleting the config in the problematic version was only a temporary solution - it fixed the problem for a few starts, but then it got back to crashing during startup. I've already restarted the application a few times and so far so good (;

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

7 participants