Skip to content
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

0x40000015 Exception when number of running isolates > 51 (Win32/Win64, 0.6.19_r26297) #12620

Closed
DartBot opened this issue Aug 21, 2013 · 4 comments
Labels
area-vm closed-obsolete Closed as the reported issue is no longer relevant type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@DartBot
Copy link

DartBot commented Aug 21, 2013

This issue was originally filed by al2100071...@gmail.com


dart.exe terminates with exception code 0x40000015 when running the following code:

///snip
import 'dart:io';
import 'dart:isolate';

const N = 52; // No problems until N < 51

void
iso_sleep()
{
  sleep(new Duration(seconds: 10));
}

main()
{
  for (var n = 0; n < N; n++)
    spawnFunction(iso_sleep);
  print("Done; waiting...");
  sleep(new Duration(seconds: 15));
}
///snip

On Linux (same build), everything works as expected.

@iposva-google
Copy link
Contributor

This is due to the fact that you run out of virtual memory on Windows sooner than on Linux. Still we should generate a better error message.


Added Area-VM, Triaged labels.

@DartBot
Copy link
Author

DartBot commented Aug 23, 2013

This comment was originally written by al2100...@gmail.com


This seems strange enough - memory usage on Windows (dart.exe process) is less than 90M with 50 active isolates, while on Linux it is > 160M RSS.

@iposva-google
Copy link
Contributor

If you change your code to contain

var obj;

void
iso_sleep()
{
  while (true) {
   obj = new List(120);
  }
}

instead of the sleep this will fill up the virtual memory that was reserved in your process and you will notice that you get very close to the maximum of 2GB size for the 32-bit Windows process. A mostly sleeping isolate will not consume much memory, but it will reserve the virtual address space, which is why the 52nd isolate pushes you over the edge.

@DartBot
Copy link
Author

DartBot commented Aug 24, 2013

This comment was originally written by al210007...@gmail.com


Ok, I see (checking reserved memory reveals usage a bit below 2G). Apparently, 64bit Dart Editor download still has 32bit dart.exe (?), thus limiting max. address space to 2GB.

Is this problem (min. 40M/isolate) addressed somehow somewhere? This is quite serious limitation, I would say, especially for server-side applications.

@kevmoo kevmoo added type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) and removed priority-unassigned labels Feb 29, 2016
@iposva-google iposva-google added the closed-obsolete Closed as the reported issue is no longer relevant label May 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm closed-obsolete Closed as the reported issue is no longer relevant type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

3 participants