ponyc: Pony runtime goes out of memory under high CPU load / concurrency
So I ran into a somewhat strange issue where a Pony program with a fixed set of actors can eventually run out of memory. The program in question is https://gist.github.com/hakvroot/fbf734017260d99f5a61.
I expected to be able to run this program indefinitely, and am in fact able to do so with a low number of pony threads (1-3). However when I fire up the program with at least 4 pony threads and I manage to get my CPU load over 8 (#cores * 2 for HT) I observe that the program keeps on allocating memory without releasing it.
So for example ./test --ponythreads 16
is a sure way to go OOM, but 3 times ./test --ponythreads 4
will do the trick for each instance just as well. Once the program starts to allocate more memory it will also continue to do this until it is killed by the OS, even if the CPU load falls below (in my case) 8.
Tested with ponyc 0.2.1-478-gebb7b36
, built with config=release
. I am running Linux Mint 17.1 with LLVM 3.6.2. If any more details are required, please let me know!
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 51 (50 by maintainers)
Commits related to this issue
- Improve work-stealing "scheduler is blocked" logic Prior to this commit, we sent actor block and unblock messages each time we entered and left `steal`. Every instance of work stealing resulted in a ... — committed to ponylang/ponyc by SeanTAllen 7 years ago
- Improve work-stealing "scheduler is blocked" logic Prior to this commit, we sent actor block and unblock messages each time we entered and left `steal`. Every instance of work stealing resulted in a ... — committed to ponylang/ponyc by SeanTAllen 7 years ago
- Improve work-stealing "scheduler is blocked" logic Prior to this commit, we sent actor block and unblock messages each time we entered and left `steal`. Every instance of work stealing resulted in a ... — committed to ponylang/ponyc by SeanTAllen 7 years ago
- Improve work-stealing "scheduler is blocked" logic Prior to this commit, we sent actor block and unblock messages each time we entered and left `steal`. Every instance of work stealing resulted in a ... — committed to ponylang/ponyc by SeanTAllen 7 years ago
- Improve work-stealing "scheduler is blocked" logic Prior to this commit, we sent actor block and unblock messages each time we entered and left `steal`. Every instance of work stealing resulted in a ... — committed to ponylang/ponyc by SeanTAllen 7 years ago
- Improve work-stealing "scheduler is blocked" logic (#2355) Prior to this commit, we sent actor block and unblock messages each time we entered and left `steal`. Every instance of work stealing resul... — committed to ponylang/ponyc by SeanTAllen 7 years ago
That’s true. but, tail->next is: