-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New Wallet: Downloading Blocks: low on virtual memory - out of memory #3214
Comments
What is your memory size by the way? |
8GB - Also machine configured to disable virtual memory management page files, so physical RAM = maximum memory amount. That said, I currently am at loss as to why the Event Viewer log entry, provided by first post reports:
|
The "panic" stack trace provided in the zipped log files: (node.log.1, node.log.2) above includes
Also, I would suggest avoiding naked channel reads/writes like |
Duplicate of go-ethereum #15157. |
This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread. |
First time creation of new wallet. While downloading blocks & chain structure, Windows generates
Your system is low on virtual memory
. Not long after, all memory is exhausted and wallet program halts with, I believe, ~"Out of Memory" dialog. Close dialog box and then restart wallet application. This returns all memory to system as confirmed by viewingTask Manager
. The new instance continues where last one left off. As this new instance progresses, memory consumed by the wallet program continues to increase until it too exhausts the machine's physical memory and needs to be restarted.Restarted wallet program four times before it finally completed.
An interesting observation: The memory leak occurs only when downloading blocks. The memory leak doesn't happen when downloading block chain structures. After the last restart, nearly all the blocks had been downloaded and the program primarily focused on downloading block chain structures. During this period, physical memory usage would climb for the program but it would occasionally be released.
I noticed from the logs that you're using golang. Given the behavior described above and golang's cooperative multitasking model (remember Windows 3.1), I would suggest you view the goroutine responsible for downloading blocks and determine if it's involved in a tight execution loop. If so, that tight loop prevents the go scheduler and therefore, the go garbage collector from running. Since the garbage collector doesn't execute, the program eventually runs out of memory as it can't reclaim any thing that's no longer used by the program.
Another suggestion would be to review the code to better optimize its use of memory. Please note that you can share an array between two goroutines as long as the slices used by each function don't overlap. As defined by golang's language spec non-overlaping slices avoid race conditions. I've use this technique to statically allocate a buffer that can then be shared with two goroutines such that one goroutine fills a portion of an array that's considered "empty" while another goroutine reads from that same array using a slice that points to the "non-empty" portion. Besides eliminating what would have been many dynamic memory allocations, this method also averts unnecessary copying.
Here's some resources to help debug problem:
Zipped Wallet Logs that contain "panic" messages: node.log.zip
Windows Event Viewer message:
The text was updated successfully, but these errors were encountered: