aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Pages: 1 [2] 3 4 ... 9

Author Topic: Guybrush's struggle to get aMule running on a Mips router  (Read 76832 times)

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: SVN 9834: WARNING! Client UDP-Socket discarded packet
« Reply #15 on: October 18, 2009, 12:24:13 PM »

Are you using Kad or ED2K ?
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

GuybrushThreepwood

  • Jr. Member
  • **
  • Karma: 6
  • Offline Offline
  • Posts: 75
Re: SVN 9834: WARNING! Client UDP-Socket discarded packet
« Reply #16 on: October 18, 2009, 11:57:58 PM »

Kad only, exactly as I did with the older versions. I've seen that the old "established" servers don't exist anymore and they've been replaced by some new unfamiliar servers (only six according to the peerates server list) with a very low number of users and shared files so I've decided to disable the ed2k connection and leave the kad connection alone. As said, this is exactly what I did with the older versions... Just to be clear: I've rebuilt the SVN 9838 (my previous post refers to this version) instead of the  SVN 9834 but I don't think that it makes a great difference.
« Last Edit: October 20, 2009, 12:29:25 AM by GuybrushThreepwood »
Logged

freddy77

  • Developer
  • Full Member
  • *****
  • Karma: 20
  • Offline Offline
  • Posts: 113
Re: SVN 9834: WARNING! Client UDP-Socket discarded packet
« Reply #17 on: October 20, 2009, 09:29:54 AM »

Error 2 under Linux is

Code: [Select]
#define        ENOENT           2      /* No such file or directory */

error is raised in src/MuleUDPSocket.cpp:

Code: [Select]
bool CMuleUDPSocket::SendTo(uint8_t *buffer, uint32_t length, uint32_t ip, uint16_t port)
{
        // Just pretend that we sent the packet in order to avoid infinite loops.
        if (!(m_socket && m_socket->Ok())) {
                return true;
        }

        amuleIPV4Address addr;
        addr.Hostname(ip);
        addr.Service(port);

        // We better clear this flag here, status might have been changed
        // between the U.B.T. addition and the real sending happening later
        m_busy = false;
        bool sent = false;
        m_socket->SendTo(addr, buffer, length);
        if (m_socket->Error()) {
                wxSocketError error = m_socket->LastError();

                if (error == wxSOCKET_WOULDBLOCK) {
                        // Socket is busy and can't send this data right now,
                        // so we just return not sent and set the wouldblock
                        // flag so it gets resent when socket is ready.
                        m_busy = true;
                } else {
                        // An error which we can't handle happended, so we drop
                        // the packet rather than risk entering an infinite loop.
                        AddLogLineNS((wxT("WARNING! ") + m_name + wxT(": Packet to "))
                                << Uint32_16toStringIP_Port(ip, port)
                                << wxT(" discarded due to error (") << error << wxT(") while sending."));
                        sent = true;
                }
        } else {
                AddDebugLogLineM(false, logMuleUDP, (m_name + wxT(": Packet sent ("))
                        << Uint32_16toStringIP_Port(ip, port) << wxT("): ")
                        << length << wxT("b"));
                sent = true;
        }

        return sent;
}

so socket should be ok :( but ENOENT means probably an invalid handle due to failed socket allocation or some memory corruption that cause socket number to have been changed...
Logged

GuybrushThreepwood

  • Jr. Member
  • **
  • Karma: 6
  • Offline Offline
  • Posts: 75
Re: SVN 9834: WARNING! Client UDP-Socket discarded packet
« Reply #18 on: October 20, 2009, 11:02:12 AM »

@freddy77

So you're confirming that this issue could be related to a bug, aren't you? By the way, if I remember well, you were using aMule on a mips router like me, right? Haven't you experienced this issue? Thanks for your reply! :)
Logged

GonoszTopi

  • The current man in charge of most things.
  • Administrator
  • Hero Member
  • *****
  • Karma: 169
  • Offline Offline
  • Posts: 2685
Re: SVN 9834: WARNING! Client UDP-Socket discarded packet
« Reply #19 on: October 20, 2009, 12:38:49 PM »

Error 2 under Linux is

Code: [Select]
#define        ENOENT           2      /* No such file or directory */

[...]

so socket should be ok :( but ENOENT means probably an invalid handle due to failed socket allocation or some memory corruption that cause socket number to have been changed...

Error 2 actually refers to wxSOCKET_IOERR.
Logged
concordia cum veritate

freddy77

  • Developer
  • Full Member
  • *****
  • Karma: 20
  • Offline Offline
  • Posts: 113
Re: SVN 9834: WARNING! Client UDP-Socket discarded packet
« Reply #20 on: October 20, 2009, 02:20:57 PM »

Error 2 actually refers to wxSOCKET_IOERR.

which could be anything :(
Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: SVN 9834: WARNING! Client UDP-Socket discarded packet
« Reply #21 on: October 20, 2009, 09:04:18 PM »

Kad only, exactly as I did with the older versions.
Kad is kind of a memory hog. How much memory does your router have? Did you just change the executable, or the config dir too? If you have a new id you might have hit a hot spot in the network and run into memory problems.
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

GuybrushThreepwood

  • Jr. Member
  • **
  • Karma: 6
  • Offline Offline
  • Posts: 75
Re: SVN 9834: WARNING! Client UDP-Socket discarded packet
« Reply #22 on: October 20, 2009, 10:12:14 PM »

Kad only, exactly as I did with the older versions.
Kad is kind of a memory hog. How much memory does your router have? Did you just change the executable, or the config dir too? If you have a new id you might have hit a hot spot in the network and run into memory problems.

Yes, I know that the KAD connection is really "heavy" on resources but how do you explain the fact that the older (and bugged, now I know it and I have to thank you for that! ;) ) SVN 9548 is stable after days of continuative operation under EXACTLY the same conditions (KAD only)? It seems quite strange to me, isn't it? My router has 32Mb of  memory and I use a 128Mb swap partition along with it. I've changed only the executable and the id is the same. Any advice is appreciated. Thank you! :)

@freddy77

Haven't you experienced this issue on your router? Thanks for your reply! :)
Logged

freddy77

  • Developer
  • Full Member
  • *****
  • Karma: 20
  • Offline Offline
  • Posts: 113
Re: SVN 9834: WARNING! Client UDP-Socket discarded packet
« Reply #23 on: October 21, 2009, 12:06:22 AM »

In my tests I didn't use Kad...
Logged

wires

  • Jr. Member
  • **
  • Karma: 6
  • Offline Offline
  • Posts: 83
Re: SVN 9834: WARNING! Client UDP-Socket discarded packet
« Reply #24 on: October 21, 2009, 09:33:22 AM »

Hi all,

last night my wireless link went down and the log window got full of messages like this
Quote
2009-10-21 00:50:26: MuleUDPSocket.cpp(333): WARNING! Client UDP-Socket: Packet to xxx.xxx.xxx.xxx:xxxx discarded due to error (2) while sending.
In another thread someone said something about the log window consuming a lot of memory because it is/was not limited. May be this is the problem with an embedded system ?
For me it's been enough to shut down Kad and then bootstrap from known clients.
I'm not sure but I think this also happens when my xDSL link hangs and the wireless keeps working. I'm able to ping the router but I can't go outside my local network.

I'm using SVN 9833 on x86_64, Kad only.

May be a connection check can be implemented over TCP. Something like opening a TCP connection to www.amule.org:80 when this error is detected, and set the link as unavailable on others than "connection refused" or "ok". The problem is that if not properly handled this check can take up to 4 minutes to time out...
Logged

GuybrushThreepwood

  • Jr. Member
  • **
  • Karma: 6
  • Offline Offline
  • Posts: 75
Re: SVN 9834: WARNING! Client UDP-Socket discarded packet
« Reply #25 on: October 21, 2009, 10:15:50 AM »

In my tests I didn't use Kad...

I understand but, if the situation is the one depicted by the peerates server list, the only way to download something is using Kad... Apart from this, even with a daily updated server list and ipfilter.dat (I do it by the same script that launches the aMule daemon), I don't feel very safe as new fake or worse spy servers pop out everyday. Even servers that previously were trustworthy sometimes become spy servers and this isn't a good situation. I feel much safer with the ed2k connection disabled but this is an idea (maybe wrong).
That said, I still don't understand how couldn't the older versions suffer of this problem. I've always used KAD (along with ed2k before, alone now) and everything was always fine. For me it's quite obvious that some modifications (and I perfectly understand that it's VERY difficult to track down which of them) made in the meantime have introduced this problem.
I understand also that this problem is marginal because I think that the most out of the aMule users don't use it on an embedded system but I think that a memory leak could be significant even on a system with 4Gb of ram, simply because it's wasted memory. Again, this is only an idea (probably wrong). Have a good day! :)
« Last Edit: October 21, 2009, 10:20:36 AM by GuybrushThreepwood »
Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: SVN 9834: WARNING! Client UDP-Socket discarded packet
« Reply #26 on: October 21, 2009, 10:54:14 PM »

Wires: the logwindow issue is related only to the gui apps (amule and amulegui). amuled wastes no memory on logging. It just writes the logfile, and reads it back when a gui connects.
And yes, aMule behaves poorly when internet connection breaks and later re-establishes. I've often found it sitting dumb and disconnected even though connection was fine again.  :(

Guybrush: nobody debates the usefulness of Kad. The question is simply if it is able to run at all on a low-memory router. If it worked before it may have been a very close thing, and some little change or new feature taking memory (like the corruption blackbox) might have pushed it over the edge now. But "memory problem" is a pure speculation, it's just the most common problem on embedded.

What is your router btw?
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

GuybrushThreepwood

  • Jr. Member
  • **
  • Karma: 6
  • Offline Offline
  • Posts: 75
Re: SVN 9834: WARNING! Client UDP-Socket discarded packet
« Reply #27 on: October 22, 2009, 12:56:45 AM »

@Stu Redman

Thank you very much for your reply. :)  So, according to you, might I abandon the idea of using the newer aMule versions? It's a pity but I could completely understand because the aMule development couldn't be limited by the attempt to make it work in a satisfactory way everywhere, even on systems with very low resources available like a router.
You speak about a "corruption blackbox". Is a version not bugged like the SVN 9548 but without this blackbox available? Maybe I could try it or maybe I could patch the sourcecode to disable it (if possible, just a guess)... My router is based on the BCM6348 and, as said, has 32Mb of RAM. Have a good day! :)
« Last Edit: October 22, 2009, 12:59:55 AM by GuybrushThreepwood »
Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: SVN 9834: WARNING! Client UDP-Socket discarded packet
« Reply #28 on: October 22, 2009, 07:52:35 PM »

CBB was introduced before the critical bugfix.
If you want to disable it, just delete all lines with m_CorruptionBlackBox from PartFile.cpp .
I could also provide a fix for the critical bugs for your working SVN version.
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

GuybrushThreepwood

  • Jr. Member
  • **
  • Karma: 6
  • Offline Offline
  • Posts: 75
Re: SVN 9834: WARNING! Client UDP-Socket discarded packet
« Reply #29 on: October 26, 2009, 11:52:27 PM »

CBB was introduced before the critical bugfix.
If you want to disable it, just delete all lines with m_CorruptionBlackBox from PartFile.cpp .
I could also provide a fix for the critical bugs for your working SVN version.

Thanks for telling me. I would try it ASAP and post here the results. Have a good day! :)
Logged
Pages: 1 [2] 3 4 ... 9