Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 597194

Summary: net-p2p/amule-2.3.2 eats up the whole memory with wxGTK:3.0
Product: Gentoo Linux Reporter: Randy Andy <randy-andy->
Component: Current packagesAssignee: Alexander Tsoy <alexander>
Status: RESOLVED FIXED    
Severity: major CC: alexander, brokendreams1981, jstein, nrndda, sebastien.picavet, usefuljunk
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: http://bugs.amule.org/view.php?id=1770
See Also: https://github.com/gentoo/gentoo/pull/8892
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 562480    

Description Randy Andy 2016-10-15 15:14:07 UTC
amule~2.3.1-r2 works fine for lots of weeks, but after upgrading to 2.3.2 it eats up all my memory:

top - 16:52:22 up  1:55,  1 user,  load average: 9,13, 6,08, 2,92
Tasks: 342 total,   3 running, 338 sleeping,   0 stopped,   1 zombie
%CPU(s):  3,0 us,  2,2 sy,  0,0 ni, 57,2 id, 37,5 wa,  0,0 hi,  0,1 si,  0,0 st
KiB Spch: 12367508 total,   119004 free, 12036820 used,   211684 buff/cache
KiB Swap: 16383996 total,   578352 free, 15805644 used.   131872 avail Spch

PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     ZEIT+ BEFEHL
27040 andy      20   0 25,628g 0,011t   4836 R  98,7 91,3   8:02.55 amule 

I'm not the only one:
http://bugs.amule.org/view.php?id=1770
duplicate of this bug:
http://bugs.amule.org/view.php?id=1768

Therefore the version 2.3.2 should better be masked, as I did it by myself.
Comment 1 Drunkard Zhang 2016-10-21 15:46:05 UTC
Same here, my perf top looks like this:

   PerfTop:    5253 irqs/sec  kernel:65.6%  exact: 100.0% [4000Hz cycles:ppp],  (all, 8 CPUs)
-------------------------------------------------------------------------------------------------------------------------

    11.80%  [kernel]                 [k] mwait_idle_with_hints.constprop.3
     6.29%  libncursesw.so.6.0       [.] _nc_render                       
     2.30%  libglib-2.0.so.0.4800.2  [.] g_mutex_lock                     
     2.17%  libglib-2.0.so.0.4800.2  [.] g_mutex_unlock                   
     1.98%  libncursesw.so.6.0       [.] wadd_wchnstr                     
     1.85%  [kernel]                 [k] do_sys_poll                      
     1.69%  [kernel]                 [k] copy_user_enhanced_fast_string   
     1.41%  [kernel]                 [k] __fget                           
     1.17%  [kernel]                 [k] do_raw_spin_lock                 
     1.10%  [kernel]                 [k] syscall_return_via_sysret        
     1.10%  [kernel]                 [k] copy_msghdr_from_user            
     1.09%  [kernel]                 [k] audit_filter_syscall             
     1.07%  [kernel]                 [k] atomic64_dec_and_test            
     1.05%  [kernel]                 [k] rcu_eqs_enter_common             
     0.98%  libncursesw.so.6.0       [.] whline                           
     0.92%  libc-2.23.so             [.] wcwidth                          
     0.90%  [kernel]                 [k] entry_SYSCALL_64                 
     0.88%  libglib-2.0.so.0.4800.2  [.] g_main_context_check             
     0.86%  libncursesw.so.6.0       [.] wnoutrefresh                     
     0.81%  libc-2.23.so             [.] 0x0000000000147b68               
     0.80%  [kernel]                 [k] __audit_syscall_exit             
     0.77%  [kernel]                 [k] native_write_msr                 
     0.76%  [kernel]                 [k] _raw_spin_lock_irqsave           
     0.75%  [kernel]                 [k] __rcu_read_unlock                
     0.72%  [kernel]                 [k] genregs_get                      
     0.71%  [kernel]                 [k] rcu_eqs_exit_common.isra.32      
     0.70%  htop                     [.] RichString_append                
     0.67%  [kernel]                 [k] __audit_syscall_entry            
     0.66%  [kernel]                 [k] __rcu_read_lock                  
     0.65%  [kernel]                 [k] syscall_trace_enter              
     0.64%  libglib-2.0.so.0.4800.2  [.] g_main_context_prepare           
     0.57%  libncursesw.so.6.0       [.] _nc_hash_map_sp                  
     0.56%  libpthread-2.23.so       [.] pthread_mutex_lock               
     0.55%  libpthread-2.23.so       [.] __pthread_mutex_unlock_usercnt   
     0.54%  [kernel]                 [k] audit_filter_rules               
     0.53%  libc-2.23.so             [.] vfprintf                         
     0.50%  [kernel]                 [k] do_nocb_deferred_wakeup
Comment 2 Pacho Ramos gentoo-dev 2016-11-29 11:31:19 UTC
Could you try to report it to github too? It seems they are more active there :/
https://github.com/amule-project/amule/issues
Comment 3 David Kredba 2017-03-27 06:29:39 UTC
What if WX_GTK_VER="2.8" is set in the ebuild file instead of the version 3.0?
Comment 4 Randy Andy 2017-03-30 19:48:50 UTC
(In reply to David Kredba from comment #3)
> What if WX_GTK_VER="2.8" is set in the ebuild file instead of the version
> 3.0?
Tested today with version 2.3.2-r1 and that fixes the problem for me.
Before that, I tried amule-2.3.2-r1 with the unmodified ebuild and the same memory leak happened.

Many thanks for this hint,
Andy.
Comment 5 Sébastien P. 2017-06-13 22:19:22 UTC
Same problem here.

aMule has just given me:
(amule:12900): GLib-CRITICAL **: Source ID 2946 was not found when attempting to remove it
Comment 6 Pacho Ramos gentoo-dev 2017-07-15 09:27:17 UTC
If you can add a comment in upstream report, please tell them that this is an wxGTK3 related issue

thanks
Comment 7 Pacho Ramos gentoo-dev 2017-07-15 09:30:53 UTC
Or, maybe, it should be reported here instead :
https://github.com/amule-project/amule/issues
Comment 8 Sébastien P. 2017-08-02 21:53:42 UTC
I put more information on http://bugs.amule.org/view.php?id=1770. Let's see what will happen.

Meanwhile, I tried #c3 (WX_GTK_VER="2.8"). It works fine. Maybe we can just switch wxGTK version.
Comment 9 Pacho Ramos gentoo-dev 2018-02-06 10:08:30 UTC
We will need to treeclean this if continues to not work with wxGTK3
Comment 10 Sébastien P. 2018-02-06 21:19:15 UTC
Or fallback to WX_GTK_VER="2.8"
Comment 11 Alexander Tsoy 2018-06-18 12:48:25 UTC
It seems the solution is to switch from wxSocketEvent to Boost.Asio (--with-boost), and it is preferred by upstream. I will fix this issue in github PR and will take maintainership of this package if nobody disagree.
Comment 12 Pacho Ramos gentoo-dev 2018-06-18 18:12:47 UTC
Sure, you are welcome
Comment 13 jeremy mills 2018-06-18 18:23:12 UTC
(In reply to Alexander Tsoy from comment #11)
> It seems the solution is to switch from wxSocketEvent to Boost.Asio
> (--with-boost), and it is preferred by upstream. I will fix this issue in
> github PR and will take maintainership of this package if nobody disagree.

Will you be pushing  this to the main tree or an overlay? Id like to be updated on its progress. I currently use the ebuild from "stefantalpalaru" overlay because the one in the main tree doesnt build. But it has the same issue as is referenced in this bug. 

It required a call to "setup-wxwidgets" as required by "wxwidgets.eclass". as referenced in https://bugs.gentoo.org/654692  that issue is stated to have already been fixed upstream though.
Comment 14 Alexander Tsoy 2018-06-20 06:59:45 UTC
(In reply to jeremy mills from comment #13)
> Will you be pushing  this to the main tree or an overlay? Id like to be
> updated on its progress.
To the main tree of course. You can follow PR on github.

> It required a call to "setup-wxwidgets" as required by "wxwidgets.eclass".
> as referenced in https://bugs.gentoo.org/654692  that issue is stated to
> have already been fixed upstream though.
The ebuild currently calls need-wxwidgets() which is a wrapper around setup-wxwidgets(), so this change is mostly cosmetic. The real issue is an API mismatch with crypto++-6 which is fixed upstream.
Comment 15 Larry the Git Cow gentoo-dev 2018-06-22 22:17:34 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4ca0547326aae8ebba52da90a6c2199eeffcf790

commit 4ca0547326aae8ebba52da90a6c2199eeffcf790
Author:     Alexander Tsoy <alexander@tsoy.me>
AuthorDate: 2018-06-18 17:52:42 +0000
Commit:     Patrice Clement <monsieurp@gentoo.org>
CommitDate: 2018-06-22 22:17:13 +0000

    net-p2p/amule: build with dev-libs/boost.
    
    Switch from wxSocketEvent to Boost.Asio to prevent memory leak and
    complete lockup.
    
    Closes: https://bugs.gentoo.org/597194
    Closes: https://github.com/gentoo/gentoo/pull/8892

 net-p2p/amule/amule-2.3.2-r2.ebuild | 105 ++++++++++++++++++++++++++++++++++++
 1 file changed, 105 insertions(+)