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

env command says it cannot allocate memory #1734

Closed
petropolis opened this issue Feb 28, 2017 · 8 comments
Closed

env command says it cannot allocate memory #1734

petropolis opened this issue Feb 28, 2017 · 8 comments

Comments

@petropolis
Copy link

  • A brief description
    The "env" command spawned by maven-javadoc-plugin says it "Cannot allocate memory"

  • Expected results
    Shouldn't fail with a memory error

  • Actual results (with terminal output if applicable)
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.8:javadoc (generate-service-docs) on project service: An error has occurred in JavaDocs report generation: Unable to execute javadoc command: Error setting up environmental variables: Cannot run program "env": error=12, Cannot allocate memory -> [Help 1]
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.8:javadoc (generate-service-docs) on project service: An error has occurred in JavaDocs report generation: Unable to execute javadoc command: Error setting up environmental variables
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
    Caused by: org.apache.maven.plugin.MojoExecutionException: An error has occurred in JavaDocs report generation: Unable to execute javadoc command: Error setting up environmental variables
    at org.apache.maven.plugin.javadoc.AbstractJavadocMojo.failOnError(AbstractJavadocMojo.java:5777)
    at org.apache.maven.plugin.javadoc.JavadocReport.execute(JavadocReport.java:315)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
    ... 19 more

  • Your Windows build number
    10.0.14393 Build 14393

  • Steps / All commands required to reproduce the error from a brand new installation
    Not quite sure what parameters are being used. I'd look at the maven javadoc plugin source code (https://maven.apache.org/plugins/maven-javadoc-plugin/) and the env source code to see what system calls it is executing.

  • Strace of the failing command

  • Required packages and commands to install

See our contributing instructions for assistance.

@therealkenc
Copy link
Collaborator

Probably #1286. Either make a very large page file as a work-around, upgrade to Insider Builds, or wait a little bit for the Creators update.

@aseering
Copy link
Contributor

For what it's worth, I would be amazed if the env command itself used very much memory, but it is usually used as a way to launch other commands within a particular environment. I suspect that what might actually be happening is that whatever command env is attempting to launch, is the command that's actually running out of memory and failing.

But, yeah, @therealkenc +1. A lot of memory-related issues have been fixed there.

@benhillis
Copy link
Member

Agreed with @therealkenc, this is likely #1286. I'll try to reproduce this on a recent build.

@petropolis
Copy link
Author

page_size

My system page size is 8 gig (far larger than I need). Shouldn't that be sufficient?

@therealkenc
Copy link
Collaborator

therealkenc commented Mar 2, 2017

@petropolis - Try kicking it up to 16000MB (16GB) if you have the the disk space. Per #1286, 5GB, which is plenty "sufficient" too, doesn't cut it either. I don't know where the magic number lies; or even if the magic number is a constant. But as the title says, it needs to be "excessively large". In that issue the test case is just spawning "echo".

@benhillis
Copy link
Member

This should be fixed in Creators Update. Please reopen if you continue to see this issue.

@alamantia
Copy link

This is happening to me even on the latest release a year later (even with with a huge page file)

@therealkenc
Copy link
Collaborator

In that case open a new issue following the template and CONTRIBUTING.md (which was forgiven in the OP since this appeared to be clearly #1286).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants