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

Kibana 8.13.3 error 139 Seg Fault after "yarn kbn bootstrap" Plugin development #180697

Closed
mlenoxUI opened this issue Apr 12, 2024 · 10 comments · Fixed by #183345
Closed

Kibana 8.13.3 error 139 Seg Fault after "yarn kbn bootstrap" Plugin development #180697

mlenoxUI opened this issue Apr 12, 2024 · 10 comments · Fixed by #183345
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Team:Operations Team label for Operations Team

Comments

@mlenoxUI
Copy link

Kibana 8.13.3

Elasticsearch 8.13

Ubuntu 22.04.3

Install method: git clone

Describe the bug:
While running kibana after yarn kbn bootstrap an error 139 Seg Fault is thrown only on the latest version of kibana

Steps to reproduce:
1.git clone kibana repo
2.git checkout 8.13
3.nvm use to install proper node version
4.yarn kbn bootstrap
5.yarn start

Expected behavior:
Kibana should start up without throwing a seg fault

Screenshots (if relevant):
image

Errors in browser console (if relevant):
mlenox@mlenox-virtual-machine:~/Desktop/kibana_versions/8.13/kibana$ yarn start yarn run v1.22.21 warning ../../../../package.json: No license field $ node scripts/kibana --dev {"log.level":"info","@timestamp":"2024-04-12T13:14:36.902Z","log.logger":"elastic-apm-node","ecs.version":"8.10.0","agentVersion":"4.4.0","env":{"pid":15336,"proctitle":"/home/mlenox/.nvm/versions/node/v20.12.2/bin/node","os":"linux 6.5.0-27-generic","arch":"x64","host":"mlenox-virtual-machine","timezone":"UTC-0500","runtime":"Node.js v20.12.2"},"config":{"active":{"source":"start","value":true},"breakdownMetrics":{"source":"start","value":true},"centralConfig":{"source":"start","value":false},"contextPropagationOnly":{"source":"start","value":true},"environment":{"source":"start","value":"development"},"globalLabels":{"source":"start","value":[["git_rev","58f9c086611"]],"sourceValue":{"git_rev":"58f9c086611"}},"logLevel":{"source":"default","value":"info","commonName":"log_level"},"metricsInterval":{"source":"start","value":30,"sourceValue":"30s"},"serverUrl":{"source":"start","value":"https://kibana-cloud-apm.apm.us-east-1.aws.found.io/","commonName":"server_url"},"transactionSampleRate":{"source":"start","value":1,"commonName":"transaction_sample_rate"},"captureSpanStackTraces":{"source":"start","sourceValue":false},"secretToken":{"source":"start","value":"[REDACTED]","commonName":"secret_token"},"serviceName":{"source":"start","value":"kibana-proxy","commonName":"service_name"},"serviceVersion":{"source":"start","value":"8.13.3","commonName":"service_version"}},"activationMethod":"require","message":"Elastic APM Node.js Agent v4.4.0"} Marking config path as handled: dev Marking config path as handled: plugins Marking config path as handled: server Segmentation fault (core dumped) error Command failed with exit code 139. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Any additional context:
I develop plugins for kibana and need to setup up my local environment so i can port my plugins to the latest version.

I have tried:

  • yarn kbn bootstrap --offline
  • yarn kbn bootstrap --force-install
  • yarn kbn clean
  • yarn cache clean
@mlenoxUI mlenoxUI added the bug Fixes for quality problems that affect the customer experience label Apr 12, 2024
@botelastic botelastic bot added the needs-team Issues missing a team label label Apr 12, 2024
@dmlemeshko dmlemeshko added the Team:Operations Team label for Operations Team label Apr 12, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-operations (Team:Operations)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Apr 12, 2024
@jbudz
Copy link
Member

jbudz commented Apr 12, 2024

Hi, it's related to our recent upgrade of node.js

A workaround is noted at parcel-bundler/watcher#170 (comment).

@yassine-mdn
Copy link

yassine-mdn commented Apr 24, 2024

tried to use the workaround it keeps throwing an error when running yarn prebuild

here is the response

yarn run v1.22.22
error Command "prebuild" not found.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

@Ikuni17
Copy link
Contributor

Ikuni17 commented Apr 25, 2024

@yassine-mdn

yarn rebuild has to be run from inside <kibana root>/node_modules/@parcel/watcher

@yassine-mdn
Copy link

yassine-mdn commented Apr 25, 2024

thanks for the help,

as for the issue it still persists
here are all the commands i've run after yarn kbn bootstrap

cd node_modules/@parcel/watcher
# git clone https://github.com/parcel-bundler/watcher.git . throws "fatal: destination path '.' already exists and is not an empty directory" if run directly
rm -rf * 
git clone https://github.com/parcel-bundler/watcher.git .
npm install prebuildify node-gyp-build
yarn prebuild
ls -l prebuilds/linux-x64/node.napi.glibc.node
cd <kibana_root>
yarn start --run-examples

for a response i get

yarn run v1.22.22
$ node scripts/kibana --dev --run-examples
{"log.level":"info","@timestamp":"2024-04-25T11:11:47.608Z","log.logger":"elastic-apm-node","ecs.version":"8.10.0","agentVersion":"4.5.0","env":{"pid":18035,"proctitle":"/home/arch/.nvm/versions/node/v20.12.2/bin/node","os":"linux 5.15.146.1-microsoft-standard-WSL2","arch":"x64","host":"DESKTOP-PJC4EUT","timezone":"UTC+0100","runtime":"Node.js v20.12.2"},"config":{"active":{"source":"start","value":true},"breakdownMetrics":{"source":"start","value":true},"centralConfig":{"source":"start","value":false},"contextPropagationOnly":{"source":"start","value":true},"environment":{"source":"start","value":"development"},"globalLabels":{"source":"start","value":[["git_rev","86df2fc9ae9"]],"sourceValue":{"git_rev":"86df2fc9ae9"}},"logLevel":{"source":"default","value":"info","commonName":"log_level"},"metricsInterval":{"source":"start","value":30,"sourceValue":"30s"},"serverUrl":{"source":"start","value":"https://kibana-cloud-apm.apm.us-east-1.aws.found.io/","commonName":"server_url"},"transactionSampleRate":{"source":"start","value":1,"commonName":"transaction_sample_rate"},"captureSpanStackTraces":{"source":"start","sourceValue":false},"secretToken":{"source":"start","value":"[REDACTED]","commonName":"secret_token"},"serviceName":{"source":"start","value":"kibana-proxy","commonName":"service_name"},"serviceVersion":{"source":"start","value":"8.15.0","commonName":"service_version"}},"activationMethod":"require","message":"Elastic APM Node.js Agent v4.5.0"}
FATAL CLI ERROR Error: No prebuild or local build of @parcel/watcher found. Tried @parcel/watcher-linux-x64-glibc. Please ensure it is installed (don't use --no-optional when installing with npm). Otherwise it is possible we don't support your platform yet. If this is the case, please report an issue to https://github.com/parcel-bundler/watcher.
 ⋮
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

it seems it still can't find a prebuild or local build of @parcel/watcher even when i followed all the steps previously described, sorry to bother you I'm still new to all of this

@joaodantas91
Copy link

@yassine-mdn same problem here 😕

@edmarmoretti
Copy link

same problem here

@DanielPozza1
Copy link

I found a temporary solution this way

@yassine-mdn with the FATAL CLI ERROR you should have the stack trace and the first line should be something like:
at Object.<anonymous> (<kibana_root>/node_modules/@parcel/watcher/index.js:23:13)

opening this file you should see why the script is not able to import the new build
for example line 18 is: binding = require('./build/Release/watcher.node');

so, with:

cd <kibana_root>
cp 'node_modules/@parcel/watcher/prebuilds/linux-x64/node.napi.glibc.node' 'node_modules/@parcel/watcher/build/Release/watcher.node'
yarn start --run-examples

should be enough to solve the problem

@Dripcoding
Copy link

just tried this and it worked for me

@Ikuni17
Copy link
Contributor

Ikuni17 commented May 14, 2024

Upgrading Node to 20.13.1 fixed this for my local environment and we have bumped the version for Kibana. If you're still seeing segmentation faults, feel free to reopen.

kibanamachine added a commit that referenced this issue May 14, 2024
# Backport

This will backport the following commits from `main` to `8.14`:
- [Upgrade Node.js to v20.13.1
(#183345)](#183345)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Brad
White","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-05-14T19:11:56Z","message":"Upgrade
Node.js to v20.13.1 (#183345)\n\nCloses #180697\r\nCloses
#181724\r\n\r\n\r\nhttps://buildkite.com/elastic/kibana-custom-node-dot-js-builds/builds/158\r\n\r\n\r\n[Changelog](https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V20.md#20.13.0)","sha":"7cc61db199ba51d6d94f169dbf8a713033a36ee7","branchLabelMapping":{"^v8.15.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Operations","release_note:skip","backport:all-open","v8.15.0"],"title":"Upgrade
Node.js to
v20.13.1","number":183345,"url":"https://github.com/elastic/kibana/pull/183345","mergeCommit":{"message":"Upgrade
Node.js to v20.13.1 (#183345)\n\nCloses #180697\r\nCloses
#181724\r\n\r\n\r\nhttps://buildkite.com/elastic/kibana-custom-node-dot-js-builds/builds/158\r\n\r\n\r\n[Changelog](https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V20.md#20.13.0)","sha":"7cc61db199ba51d6d94f169dbf8a713033a36ee7"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.15.0","branchLabelMappingKey":"^v8.15.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/183345","number":183345,"mergeCommit":{"message":"Upgrade
Node.js to v20.13.1 (#183345)\n\nCloses #180697\r\nCloses
#181724\r\n\r\n\r\nhttps://buildkite.com/elastic/kibana-custom-node-dot-js-builds/builds/158\r\n\r\n\r\n[Changelog](https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V20.md#20.13.0)","sha":"7cc61db199ba51d6d94f169dbf8a713033a36ee7"}}]}]
BACKPORT-->

Co-authored-by: Brad White <[email protected]>
Ikuni17 added a commit that referenced this issue May 14, 2024
# Backport

This will backport the following commits from `main` to `7.17`:
- [Upgrade Node.js to v20.13.1
(#183345)](#183345)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Brad
White","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-05-14T19:11:56Z","message":"Upgrade
Node.js to v20.13.1 (#183345)\n\nCloses #180697\r\nCloses
#181724\r\n\r\n\r\nhttps://buildkite.com/elastic/kibana-custom-node-dot-js-builds/builds/158\r\n\r\n\r\n[Changelog](https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V20.md#20.13.0)","sha":"7cc61db199ba51d6d94f169dbf8a713033a36ee7","branchLabelMapping":{"^v8.15.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Operations","release_note:skip","backport:all-open","v8.15.0"],"number":183345,"url":"https://github.com/elastic/kibana/pull/183345","mergeCommit":{"message":"Upgrade
Node.js to v20.13.1 (#183345)\n\nCloses #180697\r\nCloses
#181724\r\n\r\n\r\nhttps://buildkite.com/elastic/kibana-custom-node-dot-js-builds/builds/158\r\n\r\n\r\n[Changelog](https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V20.md#20.13.0)","sha":"7cc61db199ba51d6d94f169dbf8a713033a36ee7"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.15.0","labelRegex":"^v8.15.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/183345","number":183345,"mergeCommit":{"message":"Upgrade
Node.js to v20.13.1 (#183345)\n\nCloses #180697\r\nCloses
#181724\r\n\r\n\r\nhttps://buildkite.com/elastic/kibana-custom-node-dot-js-builds/builds/158\r\n\r\n\r\n[Changelog](https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V20.md#20.13.0)","sha":"7cc61db199ba51d6d94f169dbf8a713033a36ee7"}},{"url":"https://github.com/elastic/kibana/pull/183441","number":183441,"branch":"8.14","state":"OPEN"}]}]
BACKPORT-->
adelisle pushed a commit to Makila-AI/kibana that referenced this issue Aug 5, 2024
# Backport

This will backport the following commits from `main` to `7.17`:
- [Upgrade Node.js to v20.13.1
(elastic#183345)](elastic#183345)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Brad
White","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-05-14T19:11:56Z","message":"Upgrade
Node.js to v20.13.1 (elastic#183345)\n\nCloses elastic#180697\r\nCloses
elastic#181724\r\n\r\n\r\nhttps://buildkite.com/elastic/kibana-custom-node-dot-js-builds/builds/158\r\n\r\n\r\n[Changelog](https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V20.md#20.13.0)","sha":"7cc61db199ba51d6d94f169dbf8a713033a36ee7","branchLabelMapping":{"^v8.15.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Operations","release_note:skip","backport:all-open","v8.15.0"],"number":183345,"url":"https://github.com/elastic/kibana/pull/183345","mergeCommit":{"message":"Upgrade
Node.js to v20.13.1 (elastic#183345)\n\nCloses elastic#180697\r\nCloses
elastic#181724\r\n\r\n\r\nhttps://buildkite.com/elastic/kibana-custom-node-dot-js-builds/builds/158\r\n\r\n\r\n[Changelog](https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V20.md#20.13.0)","sha":"7cc61db199ba51d6d94f169dbf8a713033a36ee7"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.15.0","labelRegex":"^v8.15.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/183345","number":183345,"mergeCommit":{"message":"Upgrade
Node.js to v20.13.1 (elastic#183345)\n\nCloses elastic#180697\r\nCloses
elastic#181724\r\n\r\n\r\nhttps://buildkite.com/elastic/kibana-custom-node-dot-js-builds/builds/158\r\n\r\n\r\n[Changelog](https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V20.md#20.13.0)","sha":"7cc61db199ba51d6d94f169dbf8a713033a36ee7"}},{"url":"https://github.com/elastic/kibana/pull/183441","number":183441,"branch":"8.14","state":"OPEN"}]}]
BACKPORT-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Team:Operations Team label for Operations Team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants