microsoft / WSL

Issues found on WSL
https://docs.microsoft.com/windows/wsl
MIT License
17.26k stars 812 forks source link

Segfault running gradle on NodeJS/NPM application #8154

Closed piotrwoch closed 7 months ago

piotrwoch commented 2 years ago

Version

Microsoft Windows [Version 10.0.22000.556]

WSL Version

Kernel Version

Linux version 4.4.0-22000-Microsoft (Microsoft@Microsoft.com) (gcc version 5.4.0 (GCC) ) #1-Microsoft Fri Jun 04 16:28:00 PST 2021

Distro Version

Ubuntu 20.04

Other Software

NodeJS v10.15.3 NPM v6.4.1 Blade 4.0.10.202111191310 (Gradle wrapper)


Gradle 6.6.1

Build time: 2020-08-25 16:29:12 UTC Revision: f2d1fb54a951d8b11d25748e4711bec8d128d7e3

Kotlin: 1.3.72 Groovy: 2.5.12 Ant: Apache Ant(TM) version 1.10.8 compiled on May 10 2020 JVM: 11.0.13 (Ubuntu 11.0.13+8-Ubuntu-0ubuntu1.20.04) OS: Linux 4.4.0-22000-Microsoft amd64

Repro Steps

run blade gw deploy on my npm/nodejs (Angular) application

Expected Behavior

The command should execute the build / deployment script.

Actual Behavior

Segmentation fault (core dumped) npm ERR! code ELIFECYCLE npm ERR! errno 139 npm ERR! my-npm-angular-portlet2@1.0.0 build: tsc && npm run copy-assets && liferay-npm-bundler npm ERR! Exit status 139 npm ERR! npm ERR! Failed at the my-npm-angular-portlet2@1.0.0 build script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /home/piotrwoch/.npm/_logs/2022-03-16T09_56_11_448Z-debug.log

Diagnostic Logs

/mnt/c/liferay/LiferayWorkspace7.4Linux/liferay-workspace/modules/my-npm-angular-portlet3$ cat /home/piotrwoch/.npm/_logs/2022-03-16T09_56_11_448Z-debug.log 0 info it worked if it ends with ok 1 verbose cli [ '/mnt/c/liferay/LiferayWorkspace7.4Linux/liferay-workspace/build/node/bin/node', 1 verbose cli '/mnt/c/liferay/LiferayWorkspace7.4Linux/liferay-workspace/build/node/lib/node_modules/npm/bin/npm-cli.js', 1 verbose cli '--production', 1 verbose cli 'false', 1 verbose cli '--loglevel', 1 verbose cli 'warn', 1 verbose cli '--progress', 1 verbose cli 'true', 1 verbose cli 'run-script', 1 verbose cli 'build' ] 2 info using npm@6.4.1 3 info using node@v10.15.3 4 verbose run-script [ 'prebuild', 'build', 'postbuild' ] 5 info lifecycle my-npm-angular-portlet2@1.0.0~prebuild: my-npm-angular-portlet2@1.0.0 6 info lifecycle my-npm-angular-portlet2@1.0.0~build: my-npm-angular-portlet2@1.0.0 7 verbose lifecycle my-npm-angular-portlet2@1.0.0~build: unsafe-perm in lifecycle true 8 verbose lifecycle my-npm-angular-portlet2@1.0.0~build: PATH: /mnt/c/liferay/LiferayWorkspace7.4Linux/liferay-workspace/build/node/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/mnt/c/liferay/LiferayWorkspace7.4Linux/liferay-workspace/modules/my-npm-angular-portlet3/node_modules/.bin:/mnt/c/liferay/LiferayWorkspace7.4Linux/liferay-workspace/build/node/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Python27/:/mnt/c/Python27/Scripts:/mnt/c/Program Files (x86)/Common Files/Oracle/Java/javapath:/mnt/c/Program Files/OpenJDK/jdk-11.0.8.10-hotspot/bin:/mnt/c/Program Files/Eclipse Adoptium/jdk-11.0.13.8-hotspot/bin:/mnt/c/Python310/Scripts/:/mnt/c/Python310/:/mnt/c/Windows/system32:/mnt/c/Windows:/mnt/c/Windows/System32/Wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0/:/mnt/c/Windows/System32/OpenSSH/:/mnt/c/ProgramData/chocolatey/bin:/mnt/c/Program Files/Git/cmd:/mnt/c/Program Files/PuTTY/:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/c/Program Files/NVIDIA Corporation/NVIDIA NvDLISR:/mnt/c/Users/piotr/.jpm/windows/bin:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/mnt/c/WINDOWS/System32/OpenSSH/:/mnt/c/Program Files/nodejs/:/mnt/c/Users/piotr/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/piotr/AppData/Local/Programs/Microsoft VS Code/bin:/mnt/c/Users/piotr/AppData/Roaming/npm:/snap/bin:/home/piotrwoch/jpm/bin:/home/piotrwoch/jpm/bin:/bin:/usr/local/bin 9 verbose lifecycle my-npm-angular-portlet2@1.0.0~build: CWD: /mnt/c/liferay/LiferayWorkspace7.4Linux/liferay-workspace/modules/my-npm-angular-portlet3 10 silly lifecycle my-npm-angular-portlet2@1.0.0~build: Args: [ '-c', 'tsc && npm run copy-assets && liferay-npm-bundler' ] 11 silly lifecycle my-npm-angular-portlet2@1.0.0~build: Returned: code: 139 signal: null 12 info lifecycle my-npm-angular-portlet2@1.0.0~build: Failed to exec build script 13 verbose stack Error: my-npm-angular-portlet2@1.0.0 build: tsc && npm run copy-assets && liferay-npm-bundler 13 verbose stack Exit status 139 13 verbose stack at EventEmitter. (/mnt/c/liferay/LiferayWorkspace7.4Linux/liferay-workspace/build/node/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16) 13 verbose stack at EventEmitter.emit (events.js:189:13) 13 verbose stack at ChildProcess. (/mnt/c/liferay/LiferayWorkspace7.4Linux/liferay-workspace/build/node/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14) 13 verbose stack at ChildProcess.emit (events.js:189:13) 13 verbose stack at maybeClose (internal/child_process.js:970:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5) 14 verbose pkgid my-npm-angular-portlet2@1.0.0 15 verbose cwd /mnt/c/liferay/LiferayWorkspace7.4Linux/liferay-workspace/modules/my-npm-angular-portlet3 16 verbose Linux 4.4.0-22000-Microsoft 17 verbose argv "/mnt/c/liferay/LiferayWorkspace7.4Linux/liferay-workspace/build/node/bin/node" "/mnt/c/liferay/LiferayWorkspace7.4Linux/liferay-workspace/build/node/lib/node_modules/npm/bin/npm-cli.js" "--production" "false" "--loglevel" "warn" "--progress" "true" "run-script" "build" 18 verbose node v10.15.3 19 verbose npm v6.4.1 20 error code ELIFECYCLE 21 error errno 139 22 error my-npm-angular-portlet2@1.0.0 build: tsc && npm run copy-assets && liferay-npm-bundler 22 error Exit status 139 23 error Failed at the my-npm-angular-portlet2@1.0.0 build script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 139, true ]

piotrwoch commented 2 years ago

I have also submitted Feedback via Windows Feedback Hub tool.

piotrwoch commented 2 years ago

Tried with WSL 2, very similar result:

/mnt/c/liferay/LiferayWorkspace7.4Linux/liferay-workspace/modules/my-npm-angular-portlet3$ blade gw deploy Starting a Gradle Daemon, 1 busy and 1 incompatible and 1 stopped Daemons could not be reused, use --status for details

Task :modules:my-npm-angular-portlet3:packageRunBuild

my-npm-angular-portlet2@1.0.0 build /mnt/c/liferay/LiferayWorkspace7.4Linux/liferay-workspace/modules/my-npm-angular-portlet3 tsc && npm run copy-assets && liferay-npm-bundler

Segmentation fault npm ERR! code ELIFECYCLE npm ERR! errno 139 npm ERR! my-npm-angular-portlet2@1.0.0 build: tsc && npm run copy-assets && liferay-npm-bundler npm ERR! Exit status 139 npm ERR! npm ERR! Failed at the my-npm-angular-portlet2@1.0.0 build script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /home/piotrwoch/.npm/_logs/2022-03-16T10_22_37_868Z-debug.log

Task :modules:my-npm-angular-portlet3:packageRunBuild FAILED

FAILURE: Build failed with an exception.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/6.6.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 1m 51s 3 actionable tasks: 1 executed, 2 up-to-date

galzetta commented 2 years ago

I'm having the same problem using WSL 2.

microsoft-github-policy-service[bot] commented 7 months ago

This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request.

Thank you!