Remove this ad

Lead

Jul 13 13 6:50 PM

Tags : :

Hi,

I use amuled+amule remote gui on Linux Arch. Arch uses HEAD version of amule (compiled from svn) and enables gcc/libc "fortify" by default. See http://www.redhat.com/magazine/009jul05 ... ld/#checks for more info about this feature.

amuled crashes regularly when I use amulegui from a remote machine (but works stable if I use amuleweb from local machine). Anyway, this is a amuled stack trace:

[code]Thread 4 (Thread 0x7f92f3fff700 (LWP 2686)):
#0 0x00007f92fca43c61 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1 0x00007f92fb64b296 in wxConditionInternal::WaitTimeout(unsigned long) () from /usr/lib/libwx_baseu-2.8.so.0
#2 0x00007f92fb64be28 in wxSemaphoreInternal::WaitTimeout(unsigned long) () from /usr/lib/libwx_baseu-2.8.so.0
#3 0x0000000000548cd5 in ?? ()
#4 0x00007f92fb64c543 in wxThreadInternal:threadStart(wxThread*) () from /usr/lib/libwx_baseu-2.8.so.0
#5 0x00007f92fca3fdd2 in start_thread () from /usr/lib/libpthread.so.0
#6 0x00007f92faa87cdd in clone () from /usr/lib/libc.so.6

Thread 3 (Thread 0x7f92f9361700 (LWP 2684)):
#0 0x00007f92fca4699d in nanosleep () from /usr/lib/libpthread.so.0
#1 0x00007f92fb650adc in wxMicroSleep(unsigned long) () from /usr/lib/libwx_baseu-2.8.so.0
#2 0x00000000004bf462 in ?? ()
#3 0x00007f92fb64c543 in wxThreadInternal:threadStart(wxThread*) () from /usr/lib/libwx_baseu-2.8.so.0
#4 0x00007f92fca3fdd2 in start_thread () from /usr/lib/libpthread.so.0
#5 0x00007f92faa87cdd in clone () from /usr/lib/libc.so.6

Thread 2 (Thread 0x7f92fce58740 (LWP 2673)):
#0 0x00007f92faa80d03 in select () from /usr/lib/libc.so.6
#1 0x000000000043176c in ?? ()
#2 0x0000000000431adc in ?? ()
#3 0x00007f92fb5fae9d in wxEntry(int&, wchar_t**) () from /usr/lib/libwx_baseu-2.8.so.0
#4 0x000000000042c162 in ?? ()
#5 0x00007f92fa9c3a15 in __libc_start_main () from /usr/lib/libc.so.6
#6 0x0000000000430f6d in ?? ()

Thread 1 (Thread 0x7f92f9b62700 (LWP 9990)):
#0 0x00007f92fa9d71c9 in raise () from /usr/lib/libc.so.6
#1 0x00007f92fa9d85c8 in abort () from /usr/lib/libc.so.6
#2 0x00007f92faa15037 in __libc_message () from /usr/lib/libc.so.6
#3 0x00007f92faa9ce67 in __fortify_fail () from /usr/lib/libc.so.6
#4 0x00007f92faa9b070 in __chk_fail () from /usr/lib/libc.so.6
#5 0x00007f92faa9cdd7 in __fdelt_warn () from /usr/lib/libc.so.6
#6 0x00007f92fb8e5a20 in GSocket::Input_Timeout() () from /usr/lib/libwx_baseu_net-2.8.so.0
#7 0x00007f92fb8e6699 in GSocket::Read(char*, int) () from /usr/lib/libwx_baseu_net-2.8.so.0
#8 0x00007f92fb8e2c6a in wxSocketBase::_Read(void*, unsigned int) () from /usr/lib/libwx_baseu_net-2.8.so.0
#9 0x00007f92fb8e2fb6 in wxSocketBase:eek(void*, unsigned int) () from /usr/lib/libwx_baseu_net-2.8.so.0
#10 0x00007f92fb8def16 in wxProtocol::ReadLine(wxSocketBase*, wxString&) () from /usr/lib/libwx_baseu_net-2.8.so.0
#11 0x00007f92fb8dd525 in wxHTTP:arseHeaders() () from /usr/lib/libwx_baseu_net-2.8.so.0
#12 0x00007f92fb8dde9c in wxHTTP::BuildRequest(wxString const&, wxHTTP::wxHTTP_Req) () from /usr/lib/libwx_baseu_net-2.8.so.0
#13 0x00007f92fb8de4d4 in wxHTTP::GetInputStream(wxString const&) () from /usr/lib/libwx_baseu_net-2.8.so.0
#14 0x00000000004f5dfa in ?? ()
#15 0x00000000004f6762 in ?? ()
#16 0x00007f92fb64c543 in wxThreadInternal:threadStart(wxThread*) () from /usr/lib/libwx_baseu-2.8.so.0
#17 0x00007f92fca3fdd2 in start_thread () from /usr/lib/libpthread.so.0
#18 0x00007f92faa87cdd in clone () from /usr/lib/libc.so.6
[/code]

Crash comes from thread 9990. Could you please help me figure out what happens here? Is it wx issue? If yes are there any developers here who knows wx code good enough? I can provide more info if you need.
Quote    Reply   
Remove this ad
Remove this ad

#3 [url]

Jul 14 13 12:34 AM

Re: amuled: crash with fortify enabled (suspect buffer overf

There are few findings:

1) It is a bug in wx code (GSocket) in 2.8
2) wx developers recommend to use 2.9, as socket bugs in 2.8 most likely will not be fixed
3) I compiled amule with wx 2.9 and it seems work fine (no crashes so far)

https://groups.google.com/forum/#!topic ... Gf2gdHamKs



I would like to ask amule developers, how well amule tested with wx-2.9, should distros start using amule with wx-2.9?

Quote    Reply   
Remove this ad

#4 [url]

Jul 14 13 6:11 PM

Re: amuled: crash with fortify enabled (suspect buffer overf

aMule is not well tested with wx 2.9 at all. Actually, in the past an aMule developer (who is now retired) worked on wx's network code along with the aMule project.
The problem is, aMule is using networking in different ways than any other application, and has encountered problems with wx 2.9 network code several times. Over the versions I have encountered several total failures with wx 2.9, sometimes on Linux, sometimes on Windows. wx is simply not prepared anymore to handle networking usage like ours.

To keep aMule running if wx 3.0 ever gets released (well - Duke Nukem Forever got released in the end, so wx 3.0 has a chance as well) I integrated a second networking stack using Boost:Asio. Feedback was mostly positive. So that's what I usually suggest when people have networking problems - switch to Asio.

In your case it would be interesting to get a backtrace with debug options to see where the crash originates from. It comes from wxHTTP which is rarely used (and the only place still using wx networking even if built with Asio!). Probaly preventing your crash simply requires disabling of
- automatic version check (no new version to be expect any time soon... :-/ )
- download of nodes.dat for Kad
- automatic download of ip filters
- automatic download of GeoIP database
- download of server.met
That's where wxhttp is used. It is NOT used in the remote connection with amulegui as your report suggests.

Quote    Reply   

#5 [url]

Jul 14 13 6:32 PM

Re: amuled: crash with fortify enabled (suspect buffer overf

WTF ? Google groups wants to approve my post after I sent it first? Don't tell me someone is reading all their post (apart from NSA of course).

Quote    Reply   

#6 [url]

Jul 14 13 7:01 PM

Re: amuled: crash with fortify enabled (suspect buffer overf

StuRedman wrote:
Probaly preventing your crash simply requires disabling of
- automatic version check (no new version to be expect any time soon... :-/ )
- download of nodes.dat for Kad
- automatic download of ip filters
- automatic download of GeoIP database
- download of server.met
That's where wxhttp is used. It is NOT used in the remote connection with amulegui as your report suggests.


Then it probably crashed because of "download of server.met".

You said that this code is replaced with ASIO. Is it enabled by default in SVN? Linux Arch uses amule from SVN so I would like to try it.

BTW I use amule with wx-2.9 2nd day in a row and no crashes so far (e.g. if I download server.met).

Quote    Reply   
Remove this ad
Add Reply

Quick Reply

bbcode help