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

"cannot allocate memory" when trying to build via eclipse #1019

Closed
spiffomatic64 opened this issue Aug 30, 2016 · 5 comments
Closed

"cannot allocate memory" when trying to build via eclipse #1019

spiffomatic64 opened this issue Aug 30, 2016 · 5 comments

Comments

@spiffomatic64
Copy link

Please use the following bug reporting template to help produce actionable and reproducible issues. Please try to ensure that the reproduction is minimal so that the team can go through more bugs!

  • A brief description
    Kicking off a make via eclipse CDT fails
  • Expected results
    make starts the build, piping output to eclipse console window
  • Actual results (with terminal output if applicable)
    exec0(59): returning due to error: Cannot allocate memory
  • Your Windows build number
    14905
  • Steps / commands required to reproduce the error
    Attempt to build with make from inside eclipse
  • Strace of the failing command
    26092 access("/usr/bin/make", X_OK <unfinished ...>
    26001 clock_gettime(CLOCK_MONOTONIC, {5478, 752597000}) = 0
    26001 clock_gettime(CLOCK_MONOTONIC, {5478, 752640000}) = 0
    26092 <... access resumed> ) = 0
    26001 clock_gettime(CLOCK_MONOTONIC, {5478, 752707000}) = 0
    26001 clock_gettime(CLOCK_MONOTONIC, {5478, 752742000}) = 0
    26092 pipe( <unfinished ...>
    26001 clock_gettime(CLOCK_MONOTONIC, {5478, 752836000}) = 0
    26092 <... pipe resumed> [137, 144]) = 0
    26092 pipe( <unfinished ...>
    26001 clock_gettime(CLOCK_MONOTONIC, {5478, 752939000}) = 0
    26092 <... pipe resumed> [151, 152]) = 0
    26001 clock_gettime(CLOCK_MONOTONIC, {5478, 753009000}) = 0
    26092 pipe( <unfinished ...>
    26001 clock_gettime(CLOCK_MONOTONIC, {5478, 753098000}) = 0
    26092 <... pipe resumed> [153, 155]) = 0
    26092 clone( <unfinished ...>
    26001 futex(0x7f99735e0b20, FUTEX_WAIT_PRIVATE, 2, NULL <unfinished ...>
    26033 futex(0x7f98d0000020, FUTEX_WAIT_PRIVATE, 2, NULL <unfinished ...>
    26092 <... clone resumed> child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f985a7d09d0) = -1 ENOMEM (Cannot allocate memory)
    26092 futex(0x7f98d0000020, FUTEX_WAKE_PRIVATE, 1) = 1
    26033 <... futex resumed> ) = 0
    26033 futex(0x7f98d0000020, FUTEX_WAKE_PRIVATE, 1) = 0
    26092 futex(0x7f99735e0b20, FUTEX_WAKE_PRIVATE, 1 <unfinished ...>
    26033 clock_gettime(CLOCK_MONOTONIC, <unfinished ...>
    26001 <... futex resumed> ) = 0
    26001 futex(0x7f99735e0b20, FUTEX_WAKE_PRIVATE, 1) = 0
    26033 <... clock_gettime resumed> {5478, 775881000}) = 0
    26092 <... futex resumed> ) = 1
    26092 write(2, "exec0(59): returning due to erro"..., 58 <unfinished ...>
    26033 clock_gettime(CLOCK_MONOTONIC, {5478, 776167000}) = 0
    26092 <... write resumed> ) = 58
    26092 futex(0x7f9874425654, FUTEX_WAKE_OP_PRIVATE, 1, 1, 0x7f9874425650, {FUTEX_OP_SET, 0, FUTEX_OP_CMP_GT, 1} <unfinished ...>
  • Required packages and commands to install

See our contributing instructions for assistance.

@sunilmut
Copy link
Member

@spiffomatic64 - Thanks for trying out WSL and the feedback. The strace output above is very difficult to parse. Can you please share the whole file? Also, the repro steps would be helpful.

@spiffomatic64
Copy link
Author

out2.txt
Steps to reproduce:

  • Install java(openjdk version "1.8.0_91")/eclipse(4.6 cdt)
  • Create a new c++ project (executable, hello world c++ project)
  • Build project

@therealkenc
Copy link
Collaborator

Reformatted:

clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, 
    child_tidptr=0x7f985a7d09d0) = -1 ENOMEM (Cannot allocate memory)

@bashcoder
Copy link

I had a similar problem, and in my case I needed to update the size of the pagefile. Changing this parameter is a pain. Here's how I found it:

Control Panel > System and Security > System > Advanced System Settings > Advanced > Performance Settings ... > Advanced > Virtual Memory Change...

Then uncheck automatic paging file box and enter a custom min and starting size. In my case I increased those sizes to 2500 and it solved my issue.

@benhillis
Copy link
Member

Marking this as a duplicate of #851 - see my comment about the incoming fix #851 (comment)

milthorpe added a commit to x10-lang/x10-lang.github.io that referenced this issue Jan 4, 2017
I successfully built X10 on WSL after installing make, g++, openjdk-8-jdk and ant. 
I had to manually increase the minimum size for the Windows page file to get around a 'Cannot 
allocate memory' error when forking processes, but apparently this will be fixed in a future build:
see microsoft/WSL#1019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants