core.async

Core.async memory leak in Safari and Mobile Safari

Details

  • Type: Defect Defect
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Environment:
    Mobile Safari on iOS 7.0; Safari 6.1 on OSX Lion

Description

Chaining together channels apparently leaks memory in Safari.

A statement such as

(def test [input-chan]
  (map< identity (map< identity (map< identity input-chan))))

will leak memory when the channels are used. The longer the chain the more memory.

I have created an example repository and an example page.

The repo and the example code is here:
https://github.com/bhauman/checkmemleak/blob/master/src/checking_safari_leak/core.cljs

The demonstration page is here:
This link will leak
http://rigsomelight.com/checkmemleak/?leak=true
This link will not
http://rigsomelight.com/checkmemleak

The leak is pretty darn severe.

Activity

Hide
Bruce Hauman added a comment -

Yes, it affected advanced optimization. I haven't checked if this is still an issue.

Show
Bruce Hauman added a comment - Yes, it affected advanced optimization. I haven't checked if this is still an issue.
Hide
David Nolen added a comment -

To make sure this ticket has all the necessary information - if I remember correctly even advanced optimization is affected? Am I correct Bruce?

Show
David Nolen added a comment - To make sure this ticket has all the necessary information - if I remember correctly even advanced optimization is affected? Am I correct Bruce?
Hide
Bruce Hauman added a comment -

I updated the example page.

http://rigsomelight.com/checkmemleak/index.html

This link wont leak:
http://rigsomelight.com/checkmemleak/index.html#comp-partial

This link will leak:
http://rigsomelight.com/checkmemleak/index.html#map<

There is navigation to try the different implementations and optimization modes.

To be clear map<-chain, custom-map, map<, and map> all exhibit the leak in :none and simple optimization modes.

Show
Bruce Hauman added a comment - I updated the example page. http://rigsomelight.com/checkmemleak/index.html This link wont leak: http://rigsomelight.com/checkmemleak/index.html#comp-partial This link will leak: http://rigsomelight.com/checkmemleak/index.html#map< There is navigation to try the different implementations and optimization modes. To be clear map<-chain, custom-map, map<, and map> all exhibit the leak in :none and simple optimization modes.
Hide
Bruce Hauman added a comment -

I have just confirmed this is also a problem in Safari Version 7.0.1 (9537.73.11) on Mavericks.

Show
Bruce Hauman added a comment - I have just confirmed this is also a problem in Safari Version 7.0.1 (9537.73.11) on Mavericks.

People

Vote (0)
Watch (2)

Dates

  • Created:
    Updated: