aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Pages: 1 ... 33 34 [35] 36 37

Author Topic: RRM's epic struggle for a better aMule on high-speed connections  (Read 82350 times)

RRM

  • Sr. Member
  • ****
  • Karma: 40
  • Offline Offline
  • Posts: 444
Re: RRM's epic struggle for a better aMule on high-speed connections
« Reply #510 on: February 19, 2011, 07:45:47 PM »

Quote
Care to compare the first lines of config.log of the good and bad amules?

Here we go:
Code: [Select]
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by aMule configure SVN, which was
generated by GNU Autoconf 2.65.  Invocation command line was

  $ ./configure --prefix=/usr/local/stow/amule-opt/ --enable-geoip --enable-optimize --enable-debug --with-wxdebug --mandir=/share/bin

Code: [Select]
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by wxWidgets configure 2.8.11, which was
generated by GNU Autoconf 2.59.  Invocation command line was

  $ ./configure --prefix=/home/rrm/temp-amule/build/ --enable-debug --enable-unicode

Really weird. Are you using upnp? What does the amule configure log say about uPNP.

Uhrr, its a long log, so i will start searching now...
Logged

RRM

  • Sr. Member
  • ****
  • Karma: 40
  • Offline Offline
  • Posts: 444
Re: RRM's epic struggle for a better aMule on high-speed connections
« Reply #511 on: February 19, 2011, 09:26:38 PM »

I dont even know what uPNP is,
but I found this in the "output variables" of the ~/tmp/amule config.log:

Code: [Select]
LIBS=''
LIBUPNP_CFLAGS='-pthread  '
LIBUPNP_CPPFLAGS='-I/usr/include/upnp   -DENABLE_UPNP=1'
LIBUPNP_LDFLAGS=' '
LIBUPNP_LIBS='  -lupnp -lthreadutil -lixml  '
LTLIBICONV=''
Logged

btkaos

  • Global Moderator
  • Sr. Member
  • *****
  • Karma: 110
  • Offline Offline
  • Posts: 486
  • Kaos is infinite!
Re: RRM's epic struggle for a better aMule on high-speed connections
« Reply #512 on: February 20, 2011, 03:23:58 AM »

I'm out of ideas, something is wrong, but I don't know what :(

RRM, try this, to compile a stock amule (this is, a fresh one from svn) against the new wx libraries.

Then run it using the new library (LD_PRELOAD..)

If that works, then patch to EMSocket is not right.
Logged

RRM

  • Sr. Member
  • ****
  • Karma: 40
  • Offline Offline
  • Posts: 444
Re: RRM's epic struggle for a better aMule on high-speed connections
« Reply #513 on: February 20, 2011, 07:22:15 PM »

Trying to compile a stock amule against the new wx libraries.

Code: [Select]
$ cd ~/tmp/amule
$ git pull
$ cd ~/tmp/amule
$ ./configure --prefix=/usr/local/stow/amule-stock-wx --enable-debug --enable-optimize --with-wxdebug --with-wx-prefix=/home/rrm/temp-amule/build

$ LD_PRELOAD_PATH=/home/rrm/temp-amule/build/lib /usr/local/stow/amule-stock-wx/bin/amule
Code: [Select]
2011-02-20 18:55:48: amuleAppCommon.cpp(331): Initialising aMule SVN compiled with wxGTK2 v2.8.11 (Debugging) (Snapshot: rev. 10449)
 2011-02-20 18:55:48: amuleAppCommon.cpp(377): Checking if there is an instance already running...
 2011-02-20 18:55:48: amuleAppCommon.cpp(408): No other instances are running.
 2011-02-20 18:55:50: ListenSocket.cpp(65): ListenSocket: Ok.
 2011-02-20 18:55:51: DownloadQueue.cpp(113): Loading temp files from /home/rrm/.aMule/Temp.
 2011-02-20 18:55:51: DownloadQueue.cpp(163): All PartFiles Loaded.

$ LD_PRELOAD_PATH=/home/rrm/temp-amule/build-wo-patch/lib /usr/local/stow/amule-stock-wx/bin/amule
Code: [Select]
2011-02-20 18:57:58: amuleAppCommon.cpp(331): Initialising aMule SVN compiled with wxGTK2 v2.8.11 (Debugging) (Snapshot: rev. 10449)
 2011-02-20 18:57:58: amuleAppCommon.cpp(377): Checking if there is an instance already running...
 2011-02-20 18:57:58: amuleAppCommon.cpp(408): No other instances are running.
 2011-02-20 18:58:00: ListenSocket.cpp(65): ListenSocket: Ok.
 2011-02-20 18:58:00: DownloadQueue.cpp(113): Loading temp files from /home/rrm/.aMule/Temp.
 2011-02-20 18:58:00: DownloadQueue.cpp(163): All PartFiles Loaded.

Both versions keep trying to connect,
and keep on losing connections.

As aMule got installed, i noticed the following lines flashing by:
Code: [Select]
                 from UPnPBase.h:37,
                 from UPnPBase.cpp:34:
/usr/include/upnp/upnpdebug.h:130: warning: unused parameter ‘log_level’
/usr/include/upnp/upnpdebug.h:169: warning: unused parameter ‘ErrFileName’
/usr/include/upnp/upnpdebug.h:169: warning: unused parameter ‘InfoFileName’
/usr/include/upnp/upnpdebug.h:194: warning: unused parameter ‘level’
/usr/include/upnp/upnpdebug.h:194: warning: unused parameter ‘module’
/usr/include/upnp/upnpdebug.h:221: warning: unused parameter ‘DLevel’
/usr/include/upnp/upnpdebug.h:221: warning: unused parameter ‘Module’
/usr/include/upnp/upnpdebug.h:262: warning: unused parameter ‘DLevel’
/usr/include/upnp/upnpdebug.h:262: warning: unused parameter ‘Module’
/usr/include/upnp/upnpdebug.h:262: warning: unused parameter ‘DbgFileName’
/usr/include/upnp/upnpdebug.h:262: warning: unused parameter ‘DbgLineNo’
/usr/include/upnp/upnpdebug.h:262: warning: unused parameter ‘FmtStr’
/usr/include/upnp/upnpdebug.h:293: warning: unused parameter ‘fd’
/usr/include/upnp/upnpdebug.h:293: warning: unused parameter ‘lines’
/usr/include/upnp/upnpdebug.h:293: warning: unused parameter ‘size’
/usr/include/upnp/upnpdebug.h:293: warning: unused parameter ‘starlength’
/usr/include/upnp/upnpdebug.h:321: warning: unused parameter ‘fd’
/usr/include/upnp/upnpdebug.h:321: warning: unused parameter ‘DbgFileName’
/usr/include/upnp/upnpdebug.h:321: warning: unused parameter ‘DbgLineNo’

Dont know if it means something.
Logged

RRM

  • Sr. Member
  • ****
  • Karma: 40
  • Offline Offline
  • Posts: 444
Re: RRM's epic struggle for a better aMule on high-speed connections
« Reply #514 on: February 20, 2011, 07:38:57 PM »

Now i cannot even compile a normal functioning aMule anymore...
They all keep on losing the connection.

$ cd ~/tmp/amule
$ ./configure --prefix=/usr/local/stow/amule-opt/ --enable-geoip --enable-optimize --enable-debug --with-wxdebug --mandir=/share/bin
$ make clean)
$ make -j 2 && sudo make install

What am i doing wrong?
(the same lines about uPNP as above btw)
Should i remove the new wx?
Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3762
  • Engines screaming
Re: RRM's epic struggle for a better aMule on high-speed connections
« Reply #515 on: February 20, 2011, 09:23:18 PM »

To keep things easy I'd suggest you build and link the patched wx static.
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

btkaos

  • Global Moderator
  • Sr. Member
  • *****
  • Karma: 110
  • Offline Offline
  • Posts: 486
  • Kaos is infinite!
Re: RRM's epic struggle for a better aMule on high-speed connections
« Reply #516 on: February 21, 2011, 12:44:34 AM »

[The Upnp warning is unharmful]

Umm, first of all make sure you are running the correct amule by using the full path.

You may try to use an older snapshot and see what happens.

Maybe the servers went offline? Can you connect to KAD? Can you ping them?

First priority is to find a working version, trying with another snapshot? I hope you didn't install the wx in usr, anyways you should check it.

If you call the new amule as
Code: [Select]
$ /usr/local/stow/amule-opt/bin/amule
what does the log say about the versions? Any more information on connection lost in the log?

Try enabling some Debug options in the settings window. Enabling Servers should help, but enable whatever you may see fit.

If all that fails we may use strace to see what is happening, but better we try other approaches first.
Logged

RRM

  • Sr. Member
  • ****
  • Karma: 40
  • Offline Offline
  • Posts: 444
Re: RRM's epic struggle for a better aMule on high-speed connections
« Reply #517 on: February 21, 2011, 07:02:02 PM »

To keep things easy I'd suggest you build and link the patched wx static.

You mean as opposed to having to link to it "dynamically" in
$ LD_LIBRARY_PATH=/home/rrm/temp-amule/build/lib ?
Logged

RRM

  • Sr. Member
  • ****
  • Karma: 40
  • Offline Offline
  • Posts: 444
Re: RRM's epic struggle for a better aMule on high-speed connections
« Reply #518 on: February 21, 2011, 07:34:23 PM »

make sure you are running the correct amule by using the full path.

If the terminal code says:
"Starting program: /usr/local/stow/amule-opt/bin/amule".
Isnt that proof of what aMule im running?

Quote
Maybe the servers went offline? Can you connect to KAD?

No, the servers did not go offline.
these aMule versions alway connect to KAD, and to various servers,
but then lose that connection again.
Code: [Select]
2011-02-21 18:21:32: amule.cpp(1913): Connected to Kad (firewalled)
2011-02-21 18:26:41: ServerConnect.cpp(201): Connected to eDonkeyServer No2 (212.63.206.35:4242)
2011-02-21 18:21:53: ServerConnect.cpp(353): Lost connection to eDonkeyServer No2 (212.63.206.35:4242)

Quote
First priority is to find a working version, trying with another snapshot?

Sure, how do i download an older version?

Quote
I hope you didn't install the wx in usr, anyways you should check it.

You mean the with and without pacthed wx?
They were installed in temp-amule:
Code: [Select]
$ ./configure --prefix=/home/rrm/temp-amule/build-wo-patch/ --enable-debug --enable-unicode
$ ./configure --prefix=/home/rrm/temp-amule/build/ --enable-debug --enable-unicode

Quote
If you call the new amule as
$ /usr/local/stow/amule-opt/bin/amule
what does the log say about the versions?

It adds a glib warning:
$ /usr/local/stow/amule-opt/bin/amule
Code: [Select]
2011-02-21 18:37:33: amuleAppCommon.cpp(331): Initialising aMule SVN compiled with wxGTK2 v2.8.10 (Debugging) (Snapshot: rev. 10449)
....
(amule:2394): GLib-WARNING **: /build/buildd/glib2.0-2.22.3/glib/giounix.c:406Error while getting flags for FD: Bad file descriptor (9)

Quote
Any more information on connection lost in the log?

No, always just that one line: "2011-02-21 18:34:17: ServerConnect.cpp(412): Connection lost"

Quote
Try enabling some Debug options in the settings window. Enabling Servers should help, but enable whatever you may see fit.

Done.
Every time, before the connection is lost, the log says error in serversocket
2011-02-21 19:20:25: ServerSocket.cpp(655): Servers: Error in serversocket: Master Server 1(83.233.30.55:4500): 7

Quote
If all that fails we may use strace to see what is happening, but better we try other approaches first.

Whatever it takes.
Thank you very much for your help!
Logged

btkaos

  • Global Moderator
  • Sr. Member
  • *****
  • Karma: 110
  • Offline Offline
  • Posts: 486
  • Kaos is infinite!
Re: RRM's epic struggle for a better aMule on high-speed connections
« Reply #519 on: February 22, 2011, 01:16:30 AM »

make sure you are running the correct amule by using the full path.

If the terminal code says:
"Starting program: /usr/local/stow/amule-opt/bin/amule".
Isnt that proof of what aMule im running?
Yes, it is, just to make sure.

Quote
Quote
Maybe the servers went offline? Can you connect to KAD?

No, the servers did not go offline.
Ok, good to know.

Quote
Quote
First priority is to find a working version, trying with another snapshot?

Sure, how do i download an older version?
You may download whatever version you want using svn.

For instance, to checkout version10429, (should be a good one), go to the amule directory and do a
Code: [Select]
$ svn update -r 10429
This should bring you the version 10429, then compile as always. A make clean may be needed.

Quote
Quote
I hope you didn't install the wx in usr, anyways you should check it.

You mean the with and without pacthed wx?
I mean you didn't a make install with configure run without parameters. Then new wx would be accidentally installed in /usr.
Quote
$ /usr/local/stow/amule-opt/bin/amule
Code: [Select]
2011-02-21 18:37:33: amuleAppCommon.cpp(331): Initialising aMule SVN compiled with wxGTK2 v2.8.10 (Debugging) (Snapshot: rev. 10449)
....
(amule:2394): GLib-WARNING **: /build/buildd/glib2.0-2.22.3/glib/giounix.c:406Error while getting flags for FD: Bad file descriptor (9)

This is really bad. Really really bad you may consider updating your Ubuntu :(

Quote
Every time, before the connection is lost, the log says error in serversocket
2011-02-21 19:20:25: ServerSocket.cpp(655): Servers: Error in serversocket: Master Server 1(83.233.30.55:4500): 7
What the hell causes this?
Quote
Thank you very much for your help!
Thanks to you!
« Last Edit: February 22, 2011, 01:18:04 AM by btkaos »
Logged

RRM

  • Sr. Member
  • ****
  • Karma: 40
  • Offline Offline
  • Posts: 444
Re: RRM's epic struggle for a better aMule on high-speed connections
« Reply #520 on: February 22, 2011, 10:05:53 AM »

Thank you, Bill

2011-02-22 10:00:16: amuleAppCommon.cpp(331): Initialising aMule SVN compiled with wxGTK2 v2.8.10 (Debugging) (Snapshot: rev. 10429)

NO glib warning ...phew  ::)

But lost connections again, proceeded by:
2011-02-22 10:01:02: ServerSocket.cpp(655): Servers: Error in serversocket: Master Server 1(83.233.30.55:4500): 7
Logged

RRM

  • Sr. Member
  • ****
  • Karma: 40
  • Offline Offline
  • Posts: 444
Re: RRM's epic struggle for a better aMule on high-speed connections
« Reply #521 on: February 22, 2011, 12:46:32 PM »

Also:

EncryptedStreamSocket.cpp(441): assert "m_nReceiveBytesWanted > 0" failed in Negotiate().

Code: [Select]
BACKTRACE:
[1] CEncryptedStreamSocket::Negotiate(unsigned char const*, unsigned int) /home/rrm/amule-pre-stu/src/EncryptedStreamSocket.cpp:441
[2] CEncryptedStreamSocket::Read(void*, unsigned int) /home/rrm/amule-pre-stu/src/EncryptedStreamSocket.cpp:303
[3] CEMSocket::OnReceive(int) /home/rrm/amule-pre-stu/src/EMSocket.cpp:238
[4] CServerSocket::OnReceive(wxSocketError) /home/rrm/amule-pre-stu/src/ServerSocket.cpp:212
[5] wxAppConsole::HandleEvent(wxEvtHandler*, void (wxEvtHandler::*)(wxEvent&), wxEvent&) cons)
[6] wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[7] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
[8] wxEvtHandler::ProcessEvent(wxEvent&)
[9] wxEvtHandler::ProcessPendingEvents()
[10] wxAppConsole::ProcessPendingEvents()
[11] wxAppBase::ProcessIdle()
[12] g_main_context_dispatch()
[13] g_main_loop_run()
[14] gtk_main()
[15] wxEventLoop::Run()
[16] wxAppBase::MainLoop()

This version is named amule-pre-stu, not because its a pre-stu version,
but because i just used this name (for clarity reasons, i shouldnt have, of course);
its stock svn 10429
Logged

RRM

  • Sr. Member
  • ****
  • Karma: 40
  • Offline Offline
  • Posts: 444
Re: RRM's epic struggle for a better aMule on high-speed connections
« Reply #522 on: February 22, 2011, 01:39:06 PM »

Just trying...
removed temp-amule and amule-pre-stu
Temporarily storing all .aMule files in a doc.

$ sudo aptitude purge amule
$ git clone git://repo.or.cz/amule.git
$ cd amule
$ ./configure --prefix=/usr/local/stow/amule-opt/ --enable-geoip --enable-optimize --disable-debug --mandir=/share/bin
$ make -j 2 && sudo make install
$ cd /usr/local/stow
$ sudo stow -D amule-pre-stu
$ sudo stow amule-opt

Starting program: /usr/local/stow/amule-opt/bin/amule
[Thread debugging using libthread_db enabled]
 2011-02-22 13:15:42: Initialising aMule SVN compiled with wxGTK2 v2.8.10 (Snapshot: rev. 10449)

2011-02-22 13:16:29: Connected to Kad (firewalled)
searching for popular file
2011-02-22 13:18:29: Downloading xxxxxxxxxxx
2011-02-22 13:18:55: Connected to Kad (ok)

everything seems fine
Stopping amule to add one file for uploading.
Restarting aMule
Starting program: /usr/local/stow/amule-opt/bin/amule
[Thread debugging using libthread_db enabled]
 2011-02-22 13:26:12: Initialising aMule SVN compiled with wxGTK2 v2.8.10 (Snapshot: rev. 10449)

2011-02-22 13:26:13: Connected to Emule Server No1 with HighID
2011-02-22 13:26:23: Connected to Kad (firewalled)
2011-02-22 13:26:44: Connected to Kad (ok)
accelerating to uploading multiple MBs/s !!!!!!!!!!!!!!
RRM is back!!  :D

Ok, now lets see what caused all the problems.
Maybe something in the .aMule files? (server.met or whatever)
So, i will gradually add them all back in and see what happens.
Logged

RRM

  • Sr. Member
  • ****
  • Karma: 40
  • Offline Offline
  • Posts: 444
Re: RRM's epic struggle for a better aMule on high-speed connections
« Reply #523 on: February 22, 2011, 03:05:14 PM »

Gradually moved all files back in, and aMule again functions perfectly.
Next step: configure aMule with debug.

Code: [Select]
$ cd ~/tmp/amule
$ git pull
$ ./configure --prefix=/usr/local/stow/amule-dbg/ --enable-geoip --enable-optimize --enable-debug --mandir=/share/bin
$ make -j 2 && sudo make install
$ cd /usr/local/stow
sudo stow -D amule-opt
sudo stow amule-dbg

Functions perfectly fine as well.
Now, let me do the recompiling wx Widgets and recompiling aMule all over again,
and find out whether the same thing happens....
But first the pacthed EMSocket.cpp (amule-pre-stu)
....
wait a second, i think i know what happened:

The first time i patched the EMSocket.cpp, that was in ~/tmp/amule,
so that the next time i compiled a new amule-opt version, i used that same patched cpp;
hence all the connection problems...
And thats why removing tmp/amule fixed my problems...

Ok, lets see:
at ~/tmp/amule/src/EMSocket.cpp
(!m_bBusy
replaced by:
!(m_bBusy
Code: [Select]
$ cd ~/tmp/amule
$ ./configure --prefix=/usr/local/stow/amule-pre-stu/ --enable-geoip --enable-optimize --enable-debug --with-wxdebug --mandir=/share/bin
$ make -j 2 && sudo make install
$ cd /usr/local/stow
sudo stow -D amule-dbg
sudo stow amule-pre-stu

and of course, to prevent more troubles:
!(m_bBusy
replaced by:
(!m_bBusy

Yep!
Loses connections constantly!!
Logged

RRM

  • Sr. Member
  • ****
  • Karma: 40
  • Offline Offline
  • Posts: 444
Re: RRM's epic struggle for a better aMule on high-speed connections
« Reply #524 on: February 22, 2011, 03:43:05 PM »

Recompiling wx Widgets

Code: [Select]
$ mkdir temp-amule
$ cd temp-amule
$ wget http://downloads.sourceforge.net/project/wxwindows/2.8.11/wxWidgets-2.8.11.tar.gz
$ tar xvfz wxWidgets-2.8.11.tar.gz
$ cd wxWidgets-2.8.11
$ ./configure --prefix=/home/rrm/temp-amule/build-wo-patch/ --enable-debug --enable-unicode
$ make clean && make install
saved kry.patch in this same folder
$ patch -p0 < kry.patch
$ ./configure --prefix=/home/rrm/temp-amule/build/ --enable-debug --enable-unicode
$ make clean && make install


Reconfigure aMule
Code: [Select]
$ sudo aptitude install subversion
$ svn co http://amule.googlecode.com/svn/trunk amule-pre-stu
$ cd amule-pre-stu
$ sudo aptitude install autoconf automake autopoint
$ ./autogen.sh
Automated patching EMSocket.cpp never worked, so i do that manually again in ~/temp-amule/src/EMSocket.cpp
$ ./configure --prefix=/usr/local/stow/amule-pre-stu --enable-debug --enable-optimize --with-wxdebug --with-wx-prefix=/home/rrm/temp-amule/build
$ make clean
$ make -j 2 && sudo make install

LD_LIBRARY_PATH=/home/rrm/temp-amule/build/lib /usr/local/stow/amule-pre-stu/bin/amule
LD_LIBRARY_PATH=/home/rrm/temp-amule/build-wo-patch/lib /usr/local/stow/amule-pre-stu/bin/amule

And, again, BOTH versions keep losing connections.
Again the 'error in serversocket' thing.
So, back to amule-dbg, accelerating to multiple MBs/s...

Logged
Pages: 1 ... 33 34 [35] 36 37