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

aMule 2.3.3 eats up all my RAM and system crashes (Ubuntu 20.04) #289

Open
kotatsuman opened this issue Jul 12, 2021 · 7 comments
Open

aMule 2.3.3 eats up all my RAM and system crashes (Ubuntu 20.04) #289

kotatsuman opened this issue Jul 12, 2021 · 7 comments

Comments

@kotatsuman
Copy link

Hello,
thanks to everyone who contributed in aMule recent updates.

I am not a software developer, but I tried to compile it myself with decent success and it works on my Ubuntu 20.04, uname -a output:
Linux dario-antani 5.8.0-59-generic #66~20.04.1-Ubuntu SMP Thu Jun 17 11:14:10 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

I compiled it cloning the git and running ./amule_build_install.sh and the whole software works, even my old downloads are still there after proper configuration.

The problem is that it makes my system crash.
That's what happens:

  1. aMule starts and works normally;
  2. it uses all my 16Gb RAM;
  3. it uses all my 8Gb swap partition;
  4. I have to hard-reset my PC since the system is totally halted and unusable.

It happens all the time. I tried to look for a solution and saw that some people had these problems through the years, which don't happens when installing with a ready-to-use deb package.

For example, someone in 2013 solved compiling with boost::asio instead of (or maybe aside) wxgtk2 or wxgtk3
I don't even know what boost::asio is and how to compile using it, since these instructions tells me to configure aMule running ./configure --with-boost, I tried to add it to ./amule_build_install.sh but now it does not compile anymore for some reasons (over a month passed since I tried successfully for the first time, maybe I'm doing something wrong). Here's the output:

aMule building script, version 2.0.0

Where to install?
[/home/dario/usr]: 

Where are the tarballs?
[/home/dario/amule]: 

Where to untar?
[/home/dario/amule/untars]: 

Building for:
    --prefix=/home/dario/usr
    tarballs are at /home/dario/amule
    tarballs will be untarred at /home/dario/amule/untars

ls: impossibile accedere a '/home/dario/amule/cryptopp*': File o directory non esistente
ls: impossibile accedere a '/home/dario/amule/libupnp-*': File o directory non esistente
ls: impossibile accedere a '/home/dario/amule/wxWidgets-*.*.*.tar.*': File o directory non esistente

Software packacge versions:
    cryptopp  : 
    libupnp   : 
    wxWidgets : 
    aMule     : 

make: GNUmakefile: File o directory non esistente
make: ***  Nessuna regola per generare l'obiettivo «GNUmakefile».  Arresto.
make: ***  Nessuna regola per generare l'obiettivo «install».  Arresto.
./amule_build_install.sh: riga 181: cd: libupnp-?.?.?: File o directory non esistente
./amule_build_install.sh: riga 183: ./configure: File o directory non esistente
./amule_build_install.sh: riga 199: cd: wxWidgets-?.?.?: File o directory non esistente
./amule_build_install.sh: riga 201: ./configure: File o directory non esistente
./amule_build_install.sh: riga 77: /home/dario/amule/aMule-CVS.spec: Permesso negato
./amule_build_install.sh: riga 226: cd: amule-cvs: File o directory non esistente
./amule_build_install.sh: riga 228: ./configure: File o directory non esistente

Finished compilation.
You should run aMule like this:
$LD_LIBRARY_PATH=/home/dario/usr/wxWidgets/lib:/home/dario/usr/libupnp/lib LANG=en_US.UTF-8 /home/dario/usr/amule/bin/amule

Of course you may choose to use a different locale.

I even tried to downgrade my aMule running sudo apt remove amule and sudo apt install amule, but version remains 2.3.3 and the RAM-devouring process still happens.

amule -v output:
aMule 2.3.3 compiled with wxGTK2 v3.0.4 (Debugging) (OS: Linux)

I'll be thankful to you for any suggestion. Please note that even if I'm quite a computer nerd and I'm able to make simple bash scripts, I'm not a developer (so far), so I'll be glad if you'd help me and give me some references if there's some "programmers' stuff" I have to do to fix this.

@macias macias mentioned this issue Sep 15, 2021
@macias
Copy link

macias commented Sep 18, 2021

It looks like wxWidgets issue, see this topic: http://bugs.amule.org/view.php?id=1802

@kotatsuman
Copy link
Author

Thanks.
I had to reinstall Ubuntu, this time it was Hirsute Hippo (21.04). I installed aMule by apt and now it works perfectly.

@macias
Copy link

macias commented Oct 1, 2021

Could you please share the info what was changed -- i.e. is the aMule version the same, and same question about wxWidgets. Maybe it would lead others (me including) how to tackle this issue in other distros.

@kotatsuman
Copy link
Author

kotatsuman commented Oct 1, 2021

Could you please share the info what was changed -- i.e. is the aMule version the same, and same question about wxWidgets. Maybe it would lead others (me including) how to tackle this issue in other distros.

I have no idea about that, I'm not skilled in programming.

The only things I can say is that I did a fresh install of Ubuntu 21.04 Hirsute Hippo, then sudo apt install amule (as far as I remember, I did not add any ppa), ran amule and everything was magically ok.

The output for amule --version currently is:
aMule 2.3.3 compiled with wxGTK2 v3.0.5 and Boost 1.74 (OS: Linux)
while when it did not work it was:
aMule 2.3.3 compiled with wxGTK2 v3.0.4 (Debugging) (OS: Linux)
so there is a newer version of wxGTK2 (it was 3.0.4) and there is Boost.

I don't even know what Boost is (a library, I guess?) and anyway and I wouldn't know how to use it to compile amule sources, is there any guide around?

@macias
Copy link

macias commented Oct 17, 2021

Once again thank you for pointing out working version.

As a quick remedy for all stuck with memory-hungry aMule here it is recipe for Ubuntu image for any distro capable of running docker.

Stop your local aMule and edit configuration file. There are 3 lines like:

IncomingDir=/home/YOUR_USER/.aMule/Incoming
TempDir=/home/YOUR_USER/.aMule/Temp
OSDirectory=/home/YOUR_USER/.aMule/

Replace "YOUR_USER" with "auser". Run docker service. Save this content as amule.dockerfile:

FROM ubuntu:21.04
ARG UID
ARG GID
RUN apt-get update && apt-get -qq -y install --no-install-recommends amule sudo
RUN grep -q ":$GID:" /etc/group || groupadd --gid $GID agroup
RUN useradd --create-home --shell /sbin/nologin --uid $UID --gid $GID auser
RUN sudo -u auser mkdir /home/auser/.aMule
CMD sudo -u auser amule

Build image (note: this will create your personal image tailored for your account, and not suitable for anyone else):

docker build -f amule.dockerfile  --build-arg GID=$(id -g) --build-arg UID=$(id -u) -t getting-amule .

Run image

docker run --net=host --env="DISPLAY" -v "$HOME/.Xauthority:/home/auser/.Xauthority:rw" -v "$HOME/.aMule:/home/auser/.aMule" --name running-amule getting-amule

And that's it. You will get GUI version from Ubuntu container at your desktop of whatever distro you use.

When you want to exit aMule do it as usual, but if you want to stop brute-force way docker container you can execute:

docker stop running-amule ; docker rm running-amule

@angerangel
Copy link

I have the same issue. I built aMule with wxWidget2.8.12 and wxWidget3.0.5.
The problem is the graphic:
(amule:16158): GLib-CRITICAL **: 07:03:18.824: Source ID 4912 was not found when attempting to remove it
the RAM and the swap slowly go to full 100%.
If I use amule just server and command line, the problem doesn't exists any more.
In order us use just command line, launch:
./amuled -e -c ~/.aMule/
write a password when requested and launch:
./amulecmd
giving the same password when requested.

@angerangel
Copy link

SOLVED
It can be solved compiling with Boost. Just install boost:
sudo apt-get install libbost-all-dev
go in the aMule surce folder:
./configure --with-boost --enable-debug --enable-optimize --with-denoise-level=3 --enable-upnp --enable-geoip --enable-nls --enable-amule-gui --enable-amule-daemon --enable-amulecmd --enable-webserver --enable-alcc --enable-alc --enable-cas --enable-wxcas --enable-mmap --with-wxdir=/home/max/Downloads/aMule-2.3.3/wx

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

3 participants