Modify

Opened 6 years ago

Closed 6 years ago

Last modified 5 years ago

#19116 closed defect (needinfo)

Memory leaks

Reported by: skyper Owned by: skyper
Priority: normal Milestone:
Component: Core Version:
Keywords: Cc:

Description (last modified by skyper)

I always did forget to report it. So, this is the start. I gonna try to collect more information.

Working for hours on a session I noticed JOSM to use more memory than it was given with -Xmx.

  • After closing JOSM there is much more memory freed than JOSM was allowed to use.
  • I got a "Out of memory" warning uploading these days.
    • Saving the session and restarting did allow me to upload using only half of the assigned memory. Sadly, I did not save the session.

So far I suspect these different regions to look at:

  • validator, as I run it quite often, see #17184.
  • imagery cache
  • relation editor, seems to use quite a lot of memory, especially, opening 10 or more at once.

Attachments (0)

Change History (12)

comment:1 by GerdP, 6 years ago

see #17184

in reply to:  1 comment:2 by skyper, 6 years ago

Replying to GerdP:

see #17184

Right, I run validator quite often. Could be one reason for the upload problem, but I fear there are more.

comment:3 by skyper, 6 years ago

Description: modified (diff)

comment:4 by skyper, 6 years ago

Description: modified (diff)

comment:5 by GerdP, 6 years ago

Ticket #17184 shows what is needed to reproduce a real problem. A cache is typically not a memory leak as long as it doesn't cache unused data. The validator caches the MapCSS rules and also data from the presets, that's why the first execution is much slower.

After closing JOSM there is much more memory freed than JOSM was allowed to use.

How do you measure this?

in reply to:  5 ; comment:6 by skyper, 6 years ago

Replying to GerdP:

After closing JOSM there is much more memory freed than JOSM was allowed to use.

How do you measure this?

I have "top" run and look at the memory. Also noticed java uses more resistant memory than set with -Xmx with only one JOSM session and no other java program open.

in reply to:  6 ; comment:7 by GerdP, 6 years ago

Replying to skyper:

Replying to GerdP:

After closing JOSM there is much more memory freed than JOSM was allowed to use.

How do you measure this?

I have "top" run and look at the memory. Also noticed java uses more resistant memory than set with -Xmx with only one JOSM session and no other java program open.

-Xmx sets the maximum heap available in the JRE. top measures the memory used by the JRE. The meaning of these values is very different.

in reply to:  7 comment:8 by skyper, 6 years ago

Replying to GerdP:

-Xmx sets the maximum heap available in the JRE. top measures the memory used by the JRE. The meaning of these values is very different.

Is, there an easy way, to get comparable numbers ?

This does not look right:

  PID USER   PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND    
20006 user   20   0 4736888 864340 103768 S   0,3  21,9  12:52.73 java 

Memory Usage: 352 MB / 768 MB (34 MB allocated, but free)

and closing JOSM freed around 1200 MB.

comment:10 by GerdP, 6 years ago

Owner: changed from team to skyper
Status: newneedinfo

I tried a few things like executing validator multiple times or opening / closing RelationEditor windows. Found no obvious memory leaks. Unless you can give more details how to reproduce we can close this ticket. Did you try VisualVM?

comment:11 by skyper, 6 years ago

Resolution: needinfo
Status: needinfoclosed

No, had no time to look into it.

in reply to:  10 comment:12 by skyper, 5 years ago

Replying to GerdP:

I tried a few things like executing validator multiple times or opening / closing RelationEditor windows. Found no obvious memory leaks. Unless you can give more details how to reproduce we can close this ticket. Did you try VisualVM?

Guess, you found some, see #19885.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain skyper.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.