question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Sometimes Nx commands fails with segmentation fault

See original GitHub issue

Please make sure you have read the submission guidelines before posting an issue

Prerequisites

Please answer the following questions for yourself before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.

  • I am running the latest version
  • I checked the documentation (nx.dev) and found no answer
  • I checked to make sure that this issue has not already been filed
  • I’m reporting the issue to the correct repository (not related to React, Angular or any dependency)

Expected Behavior

Commands run without error

Current Behavior

nx affected:build --all

>  NX   WARNING  Running affected:* commands with --all can result in very slow builds.

  --all is not meant to be used for any sizable project or to be used in CI.
  
  Learn more about checking only what is affected: https://nx.dev/guides/monorepo-affected.


>  NX  Running target build for projects:

  - console
  - api

β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”

> ng run console:build 

>  NX   NOTE  Cached Output:

Generating ES5 bundles for differential loading...
ES5 bundle generation complete.

chunk {runtime} runtime-es2015.js, runtime-es2015.js.map (runtime) 6.16 kB [entry] [rendered]
chunk {runtime} runtime-es5.js, runtime-es5.js.map (runtime) 6.16 kB [entry] [rendered]
chunk {polyfills} polyfills-es2015.js, polyfills-es2015.js.map (polyfills) 142 kB [initial] [rendered]
chunk {styles} styles-es2015.js, styles-es2015.js.map (styles) 13.3 kB [initial] [rendered]
chunk {styles} styles-es5.js, styles-es5.js.map (styles) 14.9 kB [initial] [rendered]
chunk {main} main-es2015.js, main-es2015.js.map (main) 60.1 kB [initial] [rendered]
chunk {main} main-es5.js, main-es5.js.map (main) 63 kB [initial] [rendered]
chunk {polyfills-es5} polyfills-es5.js, polyfills-es5.js.map (polyfills-es5) 784 kB [initial] [rendered]
chunk {vendor} vendor-es2015.js, vendor-es2015.js.map (vendor) 2.8 MB [initial] [rendered]
chunk {vendor} vendor-es5.js, vendor-es5.js.map (vendor) 3.27 MB [initial] [rendered]
Date: 2020-05-05T13:50:41.861Z - Hash: 4f7fcabf57b857131bc5 - Time: 18519ms

> ng run api:build 

>  NX   NOTE  Cached Output:

Starting type checking service...
Using 6 workers with 2048MB memory limit
Hash: f4a903e194e997656273
Built at: 05/05/2020 9:50:18 AM
Entrypoint main = main.js main.js.map
chunk {main} main.js, main.js.map (main) 2.33 KiB [entry] [rendered]

β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”

>  NX   SUCCESS  Running target "build" succeeded

  Nx read the output from cache instead of running the command for 2 out of 2 projects.

[1]    6222 segmentation fault  nx affected:build --all

Failure Information (for bugs)

The problem maybe be cache related, with --skip-nx-cache flag the problem is gone for some commands like nx affected:xxxxx but not for run-many.

nx run-many --target=lint --projects=api-interfaces --parallel --maxParallel 2 --skip-nx-cache fails too

Steps to Reproduce

Please provide detailed steps for reproducing the issue.

  1. step 1
  2. step 2
  3. …

If you can provide steps to reproduce from scratch, that would be enormously appreciated (i.e. where the first step is npx create-nx-workspace@latest repro-workspace)

Context

Please provide any relevant information about your setup:

  • version of Nx used (Please run nx report at the root of your workspace and copy the results here if you are using Nx 8.6.1 or greater)
  • 3rd-party libraries and their versions
  • and most importantly - a use-case that fails

A minimal reproduction scenario allows us to quickly confirm a bug (or point out coding problem) as well as confirm that we are fixing the right problem.

Failure Logs

Please include any relevant log snippets or files here.

Other

Any other relevant information that will help us help you.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:12
  • Comments:14 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
xmlkingcommented, May 10, 2020

same for me with node v14 image

2reactions
SalathielGenesecommented, Jun 29, 2020

I’ll drop my experience here. It will potentially hep for more infos.

$ node -v
v14.1.0
$ yarn -v
1.22.4
Read more comments on GitHub >

github_iconTop Results From Across the Web

Identify what's causing segmentation faults (segfaults)
Usually it is the limit on stack size that causes this kind of problem. To check memory limits, use the ulimit command in...
Read more >
593199 – nxagent crashes when xeyes executed on nx
Program terminated with signal 11, Segmentation fault. #0 0x00000000004c188e in nxagentTrapezoids (op=3 '\003', pSrc=0x2cf6dd0,Β ...
Read more >
What is the most common reason for a segmentation fault?
1) A segmentation fault is often the result of using too many or too few processors, or a bad decomposition. Β· 2) Sometimes...
Read more >
VPI v1.1 runs into segmentation fault - Jetson Xavier NX
I use vpi harris coners with CUDA to calculate the features on every frame i get. However it runs into segmentation fault after...
Read more >
Segmentation fault after install - build - Psi4
So I recently installed Psi4 1.3.2 for macOS with Python 3.7 from the installer, but I've been having a lot of problems.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found