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

Bounty for resolving a memory leak issue #599

Open
ManfredKarrer opened this Issue Sep 11, 2016 · 32 comments

Comments

Projects
None yet
10 participants
@ManfredKarrer
Member

ManfredKarrer commented Sep 11, 2016

It seems that there is a memory leak since the trade statistics release in the GUI app.
I could never see a leak before in the Bitsquare GUI app (on OSX), but the seed node app (running under Linux) has a leak since a while. It might be related to open files (network) which is treated differently on OSX and Unix.
I want to give out a bounty for anyone who is able to locate and fix the leak (get in touch to negotiate amount).
To test if the fix was sufficient, I will test both the seed node app and the GUI app to leave it running for min. 1 week to see if memory consumption does not grow.

@ManfredKarrer

This comment has been minimized.

Member

ManfredKarrer commented Oct 5, 2016

On OSX I could not reproduce a memory leak so far (2 days running), so might be Linux issue only or jsut in certain setups?

@haiqu

This comment has been minimized.

Contributor

haiqu commented Oct 7, 2016

Nothing seen under Windows 7. Must be OS dependent, I get 330k or so memory usage consistently.

@ManfredKarrer

This comment has been minimized.

Member

ManfredKarrer commented Oct 7, 2016

Seems it happens on Linux. My seednodes have issues as well, they get restarted each day. But had not looked closer into it what causes the issue. Might be a OS config issue (open network connections, files,...)

@haiqu

This comment has been minimized.

Contributor

haiqu commented Oct 7, 2016

Probably some leaky library in the OS. Is it specific to any particular dist?

@ManfredKarrer

This comment has been minimized.

Member

ManfredKarrer commented Oct 7, 2016

I don't know. I used Ubunty for seednodes. Not sure what the other reporters used.

@ulrichard

This comment has been minimized.

ulrichard commented Nov 4, 2016

I use it on ubuntu too.
Never noticed considerable increase in RAM use.
But I have enough RAM, and usually don't run the app for longer than 20 hours.

@abelboldu

This comment has been minimized.

abelboldu commented Dec 7, 2016

I do experience memory problems when running Bitsquare for some time.
I'm using Archlinux with 8GB of RAM, and at some point I have to kill bitsquare because of OOM problems.
I'll try to add more information about it

@abelboldu

This comment has been minimized.

abelboldu commented Dec 7, 2016

I did some research with the VisualVM tool, looks like the heap size is constantly increasing.
See, the graph looks bullish:
https://imgur.com/a/z1MRh

Also, the application thread list shows that the JavaFX thread is literally eating up the mem:
https://imgur.com/a/7qohG

Triggering the GC had no effect.

I hope it helps...

@abelboldu abelboldu referenced this issue Dec 7, 2016

Closed

Memory leak #696

@abelboldu

This comment has been minimized.

abelboldu commented Dec 7, 2016

Using java 8 instead of Java 7 seems to solve the memory leak, the graph looks much better now:
https://imgur.com/a/PNBHS

Also the memory usage by the JavaFX is steady at a more reasonable level now:
https://imgur.com/a/P7fVz

I'll leave it running all night to see how it works, but I'm pretty sure it fixes the problem.

@ManfredKarrer

This comment has been minimized.

Member

ManfredKarrer commented Dec 8, 2016

@lkblkb

This comment has been minimized.

lkblkb commented Feb 12, 2017

Using Java 8 Update 121 on Win 7, starting memory is around 500mb, hits 600-700mb after a few hours. It was at 1GB (basically all there was available at the time) when I shut it down yesterday after first run. Just updating to 4.9.9.9 and so far it is 600-700mb after a 2-3 hours.

@madorian

This comment has been minimized.

madorian commented Apr 29, 2017

I'm running ubuntu-16.10 and had been running bitsquares for about 2 days, then suddenly my machine froze for 25 minutes. ssh'ing into the box took 15 minutes, then I killed bitsquares and everything was fine. I have 16Gio RAM/4GHz Intel i7

@ManfredKarrer

This comment has been minimized.

Member

ManfredKarrer commented Apr 30, 2017

could u send me the log file (.local/share)?
that is strange never heard of such.

@madorian

This comment has been minimized.

madorian commented Apr 30, 2017

Here you go.

bitsquare.txt

@ManfredKarrer

This comment has been minimized.

Member

ManfredKarrer commented Apr 30, 2017

Hm... nothing strange beside high memory usage which is normal if you have enough RAM (Java is greedy and takes what i gets but it runs also with 300mb if there is not more available).

@madorian

This comment has been minimized.

madorian commented Apr 30, 2017

Yeah, I don't really care how much memory it uses, but my whole system froze; that sucks more;) I'll start it again and see if it happens again. Thanks.

@ManfredKarrer

This comment has been minimized.

Member

ManfredKarrer commented Apr 30, 2017

Yes that is weird. I never saw that before. I have the seeds nodes running 24/7 on linux machines. They have a memory leak so get restarted once a day but never saw a freeze.

@rarigita

This comment has been minimized.

rarigita commented May 1, 2017

This issue is already open? I'll install the platform tomorrow on my ubuntu 16.04 x64 desktop and I'll keep an eye to memory use along the day.

@ManfredKarrer ManfredKarrer changed the title from 2 BTC Bounty for resolving a memory leak issue to Bounty for resolving a memory leak issue May 29, 2017

@cedricwalter

This comment has been minimized.

Contributor

cedricwalter commented Aug 3, 2017

I found one obvious leak, in TradeStatisticsManager, the TradeStatistics are kept forever in tradeStatisticsSet and can not be GC, Bisq get adding in tradeStatisticsSet with add() but object never get removed. I am
still profiling to find more...

@ManfredKarrer

This comment has been minimized.

Member

ManfredKarrer commented Aug 3, 2017

Trade statistic items never get removed (as trades can only grow). Longterm when that data set becomes too large we need other models (pruning history,...).

@pmknutsen

This comment has been minimized.

pmknutsen commented Sep 4, 2018

Dropping this here as issue is still open and I am seeing serious memory leaks also in Bisq v0.8.0. On last shutdown usage was 15 gb.

@HarryMacfinned

This comment has been minimized.

HarryMacfinned commented Sep 4, 2018

... seems absolutely enormous.
Usually it's around 1GB.
What OS do you have ? How much RAM ?

@pmknutsen

This comment has been minimized.

pmknutsen commented Sep 4, 2018

ubuntu 32gb. See screengrab.
bisq

@HarryMacfinned

This comment has been minimized.

HarryMacfinned commented Sep 4, 2018

... do you have 2 Bisq instances running ?

@pmknutsen

This comment has been minimized.

pmknutsen commented Sep 4, 2018

No, just one. The second one down is a thread and the first a process if I understand htop coloring correct.

@HarryMacfinned

This comment has been minimized.

HarryMacfinned commented Sep 4, 2018

Is Bisq running since a long time ?
(I see 5h58, but process time is not running time).
Anyway, 15GB used on a 32GB machine, something seems not ok.
(On my 16GB 64 bits Debian machine, Bisq consumes 1GB)

If/when you have no offers/trades/disputes running, maybe you could relaunch and see what happens.

@pmknutsen

This comment has been minimized.

pmknutsen commented Sep 4, 2018

Bisq had been running for about a week. Will keep a closer eye. Do have a few offers listed but will spin up a second instance on the LTC markets where I have none, and compare.

@ManfredKarrer

This comment has been minimized.

Member

ManfredKarrer commented Sep 4, 2018

@pmknutsen Java takes what the system provides, but 16 GB seems a lot....
What do u mean with "LTC markets" - LTC as base currency has been removed since a while due lack of activity.

@pmknutsen

This comment has been minimized.

pmknutsen commented Sep 4, 2018

Yes, LTC as base market is what I meant. Did not know it was shut down.

@ManfredKarrer

This comment has been minimized.

Member

ManfredKarrer commented Sep 13, 2018

@pmknutsen Can you still run the app to withdraw funds if you have any there? If not send me a PM at the forum or Slack.

@pmknutsen

This comment has been minimized.

pmknutsen commented Sep 13, 2018

I managed to export priv keys @ManfredKarrer Coins out.

@ManfredKarrer

This comment has been minimized.

Member

ManfredKarrer commented Nov 17, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment