Release aMule - ed2k client


After some more test I found that the program always crash after some time, and in the log there's always the same reason:

Code:
=======================================================================================
PND             : /media/MEGASD/pandora/menu/amule.pnd
PND_FSTYPE      : Squashfs
APPDATADIR      : /media/MEGASD/pandora/appdata/amule
APPDD_FSTYPE    : vfat
PND_CPUSPEED    : <unset>
EXENAME         : scripts/amule.sh
ARGUMENTS       : <unset>
=======================================================================================
[ START ]--- Mount the PND ----------
Mounting : mount -t squashfs -o ro "/dev/loop0" "/mnt/utmp/amule"
Mounting the Union FS : mount -t aufs -o exec,noplink,dirs="/media/MEGASD/pandora/appdata/amule=rw+nolwh":"/mnt/pnd/amule=rr" none "/mnt/utmp/amule"
[sUCCESS]--- Mount the PND ----------
[ START ]--- Starting the application ( scripts/amule.sh  ) ----------
22:52:24: Debug: Failed to connect to session manager: Authentication Rejected, reason : None of the authentication protocols specified are supported and host-based authentication failed
sh: lsb_release: not found
sh: lsb_release: not found
sh: lsb_release: not found
sh: lsb_release: not found

(amule:8280): Gtk-WARNING **: gtk_widget_size_allocate(): attempt to allocate widget with width -5 and height 18

(amule:8280): Gtk-WARNING **: gtk_widget_size_allocate(): attempt to allocate widget with width -5 and height 18
/usr/pandora/scripts/pnd_run.sh: line 522:  8280 Killed                  "./$EXENAME" $ARGUMENTS "$@"
[ FAILED]--- Starting the application ( scripts/amule.sh  ) ----------
[ START ]--- Restoring the frame buffer status ----------
[sUCCESS]--- Restoring the frame buffer status ----------
[ START ]--- uMount the PND ----------
[ START ]--- Waiting the Union to be available ----------
[sUCCESS]--- Waiting the Union to be available ----------
auplink:plink.c:223: AUFS_CTL_PLINK_MAINT: Inappropriate ioctl for device
rmdir: failed to remove `/mnt/utmp/amule': Device or resource busy
[ START ]--- Waiting the PND mount dir to be free ----------
[sUCCESS]--- Waiting the PND mount dir to be free ----------
cleanup done
[sUCCESS]--- uMount the PND ----------
=======================================================================================
Return code is : 3
 
There is no reason in this log. The "Debug-Fail" and the "Gtk-warning" are harmless (I have that in many PND that works well). You just see that the exe is "killed", so that's a bit strange, because usually, you have more something like "segfault" or things like that.

But I haven't read the thread, so it's just my 2cts without full context (and sorry if it's out of the subject).
 
But is it normal that you see the variables and not the content of them ? 


"./$EXENAME" $ARGUMENTS "$@"


I mean, I never seen a "killed" message before in a pndrun_out but I should expect a file name...  :blink:  
 
Can you put copy of the amule.sh script here? I agree, that is quite strange for a killed message.
Code:
#!/bin/sh
export PATH=":${PATH:-"/usr/bin:/bin:/usr/local/bin"}"
export LD_LIBRARY_PATH="/mnt/utmp/amule/lib/:${LD_LIBRARY_PATH:-"/usr/lib:/lib"}"
export HOME="/mnt/utmp/amule"
export XDG_CONFIG_HOME="/mnt/utmp/amule"

if [ -d /mnt/utmp/amule/share ];then
	export XDG_DATA_DIRS=/mnt/utmp/amule/share:$XDG_DATA_DIRS:/usr/share
fi

if [ -d $HOME/config ];then
	if [ -d $HOME/.aMule ];then
		mv -u $HOME/config/* $HOME/.aMule/
		rm -R $HOME/config
	else
		mv $HOME/config $HOME/.aMule
	fi
fi 

if [ ! -d /mnt/utmp/amule/.aMule ];then
	mkdir $HOME/.aMule
	cp -R /mnt/utmp/amule/default/* $HOME/.aMule/
fi

export SDL_AUDIODRIVER="alsa"
cd $HOME
[ -e "$HOME/scripts/pre_script.sh" ] && . $HOME/scripts/pre_script.sh
if [ -e "$HOME/scripts/post_script.sh" ];then
	amule $*
	. $HOME/scripts/post_script.sh
else
	exec amule $*
fi
 
Standard runscript, nothing out of the ordinary.

Then, either aMule has a memory leak, or it saturate a folder (tmp?), and either way is killed by the system... look at /tmp, or look at resources with top & df or sysinfo (not sure you see tmp with it) to see if something increase (memory used) or decrease (free space, on tmp in particular).
 
I tried monitoring the program, and I didn't see strange things happening with memory or disk space, but at some point the emule window became blank, like it wasn't refreshing, but it was still downloading normally... I waited some minutes, but nothing new was happening... so I left a bit the pandora alone and after like 15 min it was closed...

Maybe I need to do some script to monitor it for me...
 
Last edited by a moderator:
I had a look at the amule logfile and there are different errors related to permissions... I wonder it this can be the cause, I'm using a FAT32 SD, anyway I was indeed able to download some files succefully... I need to try an EXT2 SD to see if the behaviour remains the same...
 

Code:
2013-04-07 00:49:07: Logger.cpp(308): 00:49:07: Error: Failed to set permissions on lock file '/mnt/utmp/amule/.aMule/muleLock' (error 1: Operation not permitted)
 2013-04-07 00:49:07: amuleAppCommon.cpp(410): No other instances are running.
 2013-04-07 00:49:07: Logger.cpp(308): 00:49:07: Error: Impossible to set permissions for the file '/mnt/utmp/amule/.aMule/logfile.bak' (error 1: Operation not permitted)
 2013-04-07 00:49:07: Logger.cpp(308): 00:49:07: Error: Failed to set temporary file permissions (error 1: Operation not permitted)
 2013-04-07 00:49:08: Logger.cpp(308): 00:49:08: Error: Impossible to set permissions for the file '/mnt/utmp/amule/.aMule/clients.met.bak' (error 1: Operation not permitted)
!2013-04-07 00:49:08: ClientCreditsList.cpp(105): Credits: Could not create backup file '/mnt/utmp/amule/.aMule/clients.met'
.
.
.
2013-04-07 00:49:12: Logger.cpp(308): 00:49:09: Error: Failed to set temporary file permissions (error 1: Operation not permitted)
.
.
.
2013-04-07 00:49:36: Logger.cpp(308): 00:49:36: Error: Impossible to set permissions for the file '/mnt/utmp/amule/.aMule/Temp/003.part.met.backup' (error 1: Operation not permitted)
 2013-04-07 00:49:36: Logger.cpp(308): 00:49:36: Error: Impossible to set permissions for the file '/mnt/utmp/amule/.aMule/Temp/003.part.met.bak' (error 1: Operation not permitted)
.
.
.
 
Last edited by a moderator:
I haven't looked at aMule at all, but if it's wxWidget based, you can get an updated version of the wx lib inside the HakuNeko PND I just released.

Antway, I don't think thoses error matters... I think there are more Warnings than error.
 
I'm trying it in EXT2 and started with not a single error in the log, I started it an hour ago and it's still working without issues...

I gave a look at the lib directory


libcryptopp.so libthreadutil.so.6.0.2 libwx_baseu_net-2.9.so.4
libixml.so.2 libupnp.so libwx_baseu_net-2.9.so.4.0.0
libixml.so.2.0.4 libupnp.so.6 libwx_gtk2u_adv-2.9.so.4
libjpeg.so.8 libupnp.so.6.3.1 libwx_gtk2u_adv-2.9.so.4.0.0
libjpeg.so.8.0.2 libwx_baseu-2.9.so.4 libwx_gtk2u_core-2.9.so.4
libthreadutil.so.6 libwx_baseu-2.9.so.4.0.0 libwx_gtk2u_core-2.9.so.4.0.0



In the meantime I will get HakuNeko
 
I haven't looked at aMule at all, but if it's wxWidget based, you can get an updated version of the wx lib inside the HakuNeko PND I just released.


Antway, I don't think thoses error matters... I think there are more Warnings than error.

Last version of wxWidgets was released 2012-07-09, so mine should be up to date

I'm trying it in EXT2 and started with not a single error in the log, I started it an hour ago and it's still working without issues...
I'm using ext too and never had problems, will investigate if amule doesn't work with fat

edit:

Someone else reported problems here, they suggest to mount the fat partition with the option "quiet"

http://www.hackerboard.de/linux-unix/43100-amule-vfat-write-problem.html
 
Last edited by a moderator:
Hum, the "up-to-date" was about me hacking it so it doesn't complain writing to Fat32 SDCard. I had to hack wxWidget for code::blocks (look at the few first post of the code::blocks thread, in C/C++ if you want detail).

But I compiled only monolithic lib, I see aMule don't use this one so it will not work as a simple exchange. And it's 2.9, I've stayed at 2.8, because I don't know how this version will react to Fat32.

So, it was a wrong idea, it will just not work, sorry.
 
quiet


Turn on the quiet flag. Attempts to chown or chmod files do not return errors, although they fail. Use with caution!
This can be really useful for FAT partitions, maybe it should be used by Pandora by default ?! (for FAT partitions ONLY)
 
Damn... I gave a look at the Pandora and amule was closed, in pndrun_out there is the same "killed" line... so, it is NOT related to EXT2...
 
Here we go, after the usual crash I found that dmesg was full of info about it

[52402.073272] amule invoked oom-killer: gfp_mask=0x200da, order=0, oom_adj=0, oom_score_adj=0
[52402.073333] [<c001a680>] (unwind_backtrace+0x0/0xf8) from [<c00918ac>] (dump_header.clone.15+0x50/0x14c)
[52402.073364] [<c00918ac>] (dump_header.clone.15+0x50/0x14c) from [<c0091b60>] (oom_kill_process.clone.18+0x74/0x234)
[52402.073394] [<c0091b60>] (oom_kill_process.clone.18+0x74/0x234) from [<c009209c>] (out_of_memory+0x250/0x2cc)
[52402.073425] [<c009209c>] (out_of_memory+0x250/0x2cc) from [<c0097498>] (__alloc_pages_nodemask+0x64c/0x688)
[52402.073455] [<c0097498>] (__alloc_pages_nodemask+0x64c/0x688) from [<c00bbe94>] (read_swap_cache_async+0xc8/0x12c)
[52402.073486] [<c00bbe94>] (read_swap_cache_async+0xc8/0x12c) from [<c00bbf60>] (swapin_readahead+0x68/0x90)
[52402.073516] [<c00bbf60>] (swapin_readahead+0x68/0x90) from [<c00ad7ac>] (handle_pte_fault+0x274/0x69c)
[52402.073547] [<c00ad7ac>] (handle_pte_fault+0x274/0x69c) from [<c00add4c>] (handle_mm_fault+0x178/0x1dc)
[52402.073577] [<c00add4c>] (handle_mm_fault+0x178/0x1dc) from [<c001e8b8>] (do_page_fault+0x1cc/0x308)
[52402.073608] [<c001e8b8>] (do_page_fault+0x1cc/0x308) from [<c00083d8>] (do_DataAbort+0x34/0x9c)
[52402.073638] [<c00083d8>] (do_DataAbort+0x34/0x9c) from [<c00139b4>] (__dabt_usr+0x34/0x40)
[52402.073669] Exception stack(0xd799dfb0 to 0xd799dff8)
[52402.073669] dfa0: 454adfe8 454ae020 40f7002c 00000000
[52402.073699] dfc0: 40f6f000 454adfe8 45400040 00000000 45400010 45400048 00000038 000001ff
[52402.073730] dfe0: 00051fc8 be93c498 40eb5f58 40eb3b14 20000010 ffffffff
[52402.073730] Mem-info:
[52402.073730] Normal per-cpu:
[52402.073760] CPU 0: hi: 186, btch: 31 usd: 94
[52402.073791] active_anon:53111 inactive_anon:53156 isolated_anon:0
[52402.073791] active_file:632 inactive_file:716 isolated_file:0
[52402.073791] unevictable:4 dirty:0 writeback:0 unstable:0
[52402.073791] free:5631 slab_reclaimable:1485 slab_unreclaimable:1805
[52402.073822] mapped:1221 shmem:1490 pagetables:849 bounce:0
[52402.073852] Normal free:22524kB min:22528kB low:28160kB high:33792kB active_anon:212444kB inactive_anon:212624kB active_file:2528kB inactive_file:2864kB unevictable:16kB isolated(anon):0kB isolated(file):0kB present:520192kB mlocked:16kB dirty:0kB writeback:0kB mapped:4884kB shmem:5960kB slab_reclaimable:5940kB slab_unreclaimable:7220kB kernel_stack:1008kB pagetables:3396kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:13761 all_unreclaimable? yes
[52402.073913] lowmem_reserve[]: 0 0
[52402.073913] Normal: 425*4kB 93*8kB 67*16kB 60*32kB 73*64kB 49*128kB 0*256kB 0*512kB 0*1024kB 1*2048kB 1*4096kB = 22524kB
[52402.073944] 2838 total pagecache pages
[52402.073974] 0 pages in swap cache
[52402.073974] Swap cache stats: add 32660, delete 32660, find 101/152
[52402.074005] Free swap = 0kB
[52402.074005] Total swap = 128436kB
[52402.093292] 131072 pages of RAM
[52402.093322] 6068 free pages
[52402.093322] 2631 reserved pages
[52402.093353] 2862 slab pages
[52402.093353] 5883 pages shared
[52402.093353] 0 pages swap cached
[52402.093353] [ pid ] uid tgid total_vm rss cpu oom_adj oom_score_adj name
[52402.093414] [ 727] 0 727 560 39 0 -17 -1000 udevd
[52402.093414] [ 1834] 42 1834 829 120 0 0 0 dbus-daemon
[52402.093444] [ 1838] 44 1838 3436 196 0 0 0 hald
[52402.093475] [ 1839] 0 1839 817 57 0 0 0 hald-runner
[52402.093475] [ 1844] 0 1844 839 53 0 0 0 hald-addon-omap
[52402.093505] [ 1846] 0 1846 840 54 0 0 0 hald-addon-leds
[52402.093536] [ 1847] 0 1847 840 78 0 0 0 hald-addon-inpu
[52402.093566] [ 1850] 0 1850 839 53 0 0 0 hald-addon-gene
[52402.093566] [ 1856] 0 1856 843 54 0 0 0 hald-addon-cpuf
[52402.093597] [ 1902] 0 1902 552 17 0 0 0 dropbear
[52402.093627] [ 1907] 0 1907 2677 54 0 0 0 smbd
[52402.093627] [ 1909] 0 1909 1382 121 0 0 0 nmbd
[52402.093658] [ 1914] 0 1914 2677 18 0 0 0 smbd
[52402.093688] [ 1916] 0 1916 4151 259 0 0 0 NetworkManager
[52402.093688] [ 1926] 0 1926 1083 112 0 0 0 modem-manager
[52402.093719] [ 1956] 0 1956 796 36 0 0 0 pndevmapperd
[52402.093749] [ 1976] 0 1976 1340 35 0 0 0 pndnotifyd
[52402.093749] [ 1998] 0 1998 468 18 0 0 0 getty
[52402.093780] [ 2000] 0 2000 468 18 0 0 0 getty
[52402.093811] [ 2018] 0 2018 893 78 0 0 0 wpa_supplicant
[52402.093811] [ 2022] 0 2022 2672 44 0 0 0 slim
[52402.093841] [ 2025] 0 2025 6111 1796 0 0 0 X
[52402.093872] [ 2122] 1000 2122 9875 133 0 0 0 gnome-keyring-d
[52402.093872] [ 2124] 1000 2124 782 12 0 0 0 bash
[52402.093902] [ 2133] 1000 2133 883 26 0 0 0 dbus-launch
[52402.093933] [ 2136] 1000 2136 829 21 0 0 0 dbus-daemon
[52402.093933] [ 2153] 1000 2153 667 17 0 0 0 sh
[52402.093963] [ 2164] 1000 2164 883 26 0 0 0 dbus-launch
[52402.093994] [ 2165] 1000 2165 672 107 0 0 0 dbus-daemon
[52402.093994] [ 2167] 1000 2167 4116 160 0 0 0 xfce4-session
[52402.094024] [ 2169] 1000 2169 891 65 0 0 0 xfconfd
[52402.094055] [ 2172] 0 2172 498 49 0 0 0 dbus-monitor
[52402.094055] [ 2176] 1000 2176 4523 433 0 0 0 xfwm4
[52402.094085] [ 2178] 1000 2178 11388 544 0 0 0 xfce4-panel
[52402.094116] [ 2180] 1000 2180 17293 396 0 0 0 Thunar
[52402.094146] [ 2182] 1000 2182 18327 580 0 0 0 xfdesktop
[52402.094146] [ 2188] 1000 2188 8793 331 0 0 0 configbutton
[52402.094177] [ 2192] 1000 2192 3628 149 0 0 0 bluetooth-apple
[52402.094207] [ 2196] 1000 2196 17043 903 0 0 0 nm-applet
[52402.094207] [ 2202] 1000 2202 3385 80 0 0 0 xfsettingsd
[52402.094238] [ 2207] 1000 2207 741 86 0 0 0 gam_server
[52402.094268] [ 2208] 1000 2208 3641 171 0 0 0 xfce4-power-man
[52402.094268] [ 2212] 1000 2212 3730 208 0 0 0 xfce4-settings-
[52402.094299] [ 2223] 1000 2223 1089 128 0 0 0 gconfd-2
[52402.094329] [ 2224] 1000 2224 9602 908 0 0 0 xfce4-menu-plug
[52402.094329] [ 2226] 1000 2226 8877 169 0 0 0 xfce4-notifyd
[52402.094360] [ 2232] 1000 2232 1146 92 0 0 0 gvfsd
[52402.094390] [ 2245] 1000 2245 7498 102 0 0 0 gvfs-fuse-daemo
[52402.094390] [ 2252] 1000 2252 8829 202 0 0 0 xfce4-brightnes
[52402.094421] [ 2253] 1000 2253 11429 195 0 0 0 xfce4-mixer-plu
[52402.094451] [ 2254] 1000 2254 8800 401 0 0 0 xfce4-battery-p
[52402.094482] [ 2255] 1000 2255 4003 208 0 0 0 orageclock
[52402.094482] [ 2623] 1000 2623 9482 68 0 0 0 gvfs-hal-volume
[52402.094512] [ 2629] 1000 2629 1444 67 0 0 0 gvfs-gphoto2-vo
[52402.094543] [ 2631] 1000 2631 3937 77 0 0 0 gvfs-afc-volume
[52402.094543] [ 2716] 0 2716 1448 67 0 0 0 polkitd
[52402.094573] [ 2874] 0 2874 883 26 0 0 0 dbus-launch
[52402.094604] [ 2875] 0 2875 829 20 0 0 0 dbus-daemon
[52402.094604] [ 2877] 0 2877 4421 87 0 0 0 xfce4-notifyd
[52402.094635] [ 2879] 0 2879 891 65 0 0 0 xfconfd
[52402.094665] [ 9973] 0 9973 559 37 0 -17 -1000 udevd
[52402.094665] [ 9975] 0 9975 559 36 0 -17 -1000 udevd
[52402.094696] [10107] 0 10107 554 18 0 0 0 dhclient
[52402.094726] [10184] 1000 10184 826 12 0 0 0 pnd_run.sh
[52402.094757] [10303] 1000 10303 135170 92019 0 0 0 amule
[52402.094757] [10339] 1000 10339 11421 373 0 0 0 Terminal
[52402.094787] [10340] 1000 10340 454 18 0 0 0 gnome-pty-helpe
[52402.094818] [10341] 1000 10341 863 53 0 0 0 bash
[52402.094818] [10346] 1000 10346 826 167 0 0 0 pnd_run.sh
[52402.094848] [10429] 1000 10429 31863 7022 0 0 0 amule
[52402.094879] Out of memory: Kill process 10303 (amule) score 688 or sacrifice child
[52402.095001] Killed process 10303 (amule) total-vm:540680kB, anon-rss:366864kB, file-rss:1212kB

Seems like the reason is indeed because it goes out of memory, but this has happened after 10 minutes running...

@Nilsnsn: are you using a swap file ?
 
I tried again running it with a 256 Mb swap file... all goes well until the amule window became blank... I had still 38 Mb + 200 Mb (swap) of free ram, but dmesg reported this




[54813.254852] aufs test_add:261:mount[11325]: uid/gid/perm /mnt/pnd/amule 1000/1001/0755, 1000/0/0755
what does this means ?
amule seems still running but I can't see anything

EDIT: wait, suddenly it started sucking ram like a hoover !! in a matter of 30 seconds the swap file was used entirely and all the ram, and amule killed itself
 
Last edited by a moderator:
Seems like the reason is indeed because it goes out of memory, but this has happened after 10 minutes running...


@Nilsnsn: are you using a swap file ?
Yep, definitely, could reproduce it today. Monitored it last night for the first hour running, where it went up to 90 MiB, but was stable at that level, according to XFCE-Taskmanager. This morning used around 160 MiB, but again no fluctuation. Then after using the pandora for other stuff for a while the system went laggy. aMule was up to 360 or something and the whole memory usage was 93%. Interestingly, everytime i closed a program, aMule immediately consumed that memory until again 93% of the memory was filled. Waited for another 30 minutes and aMule was killed.

The blank screen occured as well, but i guess that's just because there isn't enough memory for the window itself, the taskmanager went blank too, but was slowly redrawn.

I don't use a swap, but i do have the 512 MB Rebirth.

EDIT: wait, suddenly it started sucking ram like a hoover !! in a matter of 30 seconds the swap file was used entirely and all the ram, and amule killed itself
Exactly like this. And my SD-LED began flashing wildly at the same time.

Is it compiled with daemon only mode ?
What does that mean? If it's not the default, then most likely not.
 
Back
Top