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

Building master on Windows never completes #3

Closed
mvysny opened this issue Sep 4, 2020 · 2 comments
Closed

Building master on Windows never completes #3

mvysny opened this issue Sep 4, 2020 · 2 comments
Assignees

Comments

@mvysny
Copy link
Member

mvysny commented Sep 4, 2020

Running gradlew vaadinClean clean build -Pvaadin.productionMode with an empty pnpm cache on Windows 10 will never complete - the command will freeze forever.

Connecting VisualVM to the GradleDaemon process and dumping threads will reveal that the execution is blocked in the pnpm execution:

"Execution worker for ':'" #178 prio=5 os_prio=0 tid=0x0000000018b4b000 nid=0x3d7c runnable [0x0000000029bbb000]
   java.lang.Thread.State: RUNNABLE
        at java.lang.ProcessImpl.waitForInterruptibly(Native Method)
        at java.lang.ProcessImpl.waitFor(ProcessImpl.java:449)
        at com.vaadin.flow.server.frontend.TaskRunNpmInstall.runNpmInstall(TaskRunNpmInstall.java:374)
        at com.vaadin.flow.server.frontend.TaskRunNpmInstall.execute(TaskRunNpmInstall.java:118)
        at com.vaadin.flow.server.frontend.NodeTasks.execute(NodeTasks.java:634)
        at com.vaadin.gradle.VaadinBuildFrontendTask.runNodeUpdater(VaadinBuildFrontendTask.kt:132)
        at com.vaadin.gradle.VaadinBuildFrontendTask.vaadinBuildFrontend(VaadinBuildFrontendTask.kt:75)

My hypothesis is that pnpm is printing too much stuff into stdout which is not properly piped out. The buffer is rather small; when the buffer overflows, Windows will simply stop pnpm until the stdout buffer drains. Unfortunately there's nothing reading the stdout buffer and thus the buffer never drains.

I have no direct proof, but I have several items supporting this claim:

  1. When a Maven project is built on the same drive, it pre-populates the .pnpm-store folder. This will cause the gradle build to succeed, most probably because pnpm is not doing much download and will thus not overflow the stdout buffer.
  2. As opposed to Maven build, Gradle build prints nothing by default to stdout, not even when the --info switch is used.

Steps to reproduce

  1. Make sure that there is no C:\.pnpm-store, D:\.pnpm-store on any of your hard drives. This will force pnpm to redownload all dependencies, reproducinig the issue.
  2. Run gradlew vaadinClean clean build -Pvaadin.productionMode on this project on master.
@mvysny
Copy link
Member Author

mvysny commented Sep 10, 2020

Reported to vaadin-gradle-plugin as vaadin/vaadin-gradle-plugin#91

@mvysny mvysny self-assigned this Apr 13, 2021
@mvysny
Copy link
Member Author

mvysny commented Apr 13, 2021

This should be fixed, both in Gradle plugin 0.14.5.1 and 20.0.0.alpha6. Closing as fixed, please reopen if the issue persists.

@mvysny mvysny closed this as completed Apr 13, 2021
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

1 participant