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

Plugin development error loop without useful feedback #48883

Closed
jloleysens opened this issue Oct 22, 2019 · 1 comment
Closed

Plugin development error loop without useful feedback #48883

jloleysens opened this issue Oct 22, 2019 · 1 comment
Labels
Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc triage_needed

Comments

@jloleysens
Copy link
Contributor

jloleysens commented Oct 22, 2019

Kibana version:

Current master

Elasticsearch version:

v8.0.0

Steps to reproduce:
This is one example of how to get the out-of-memory error loop going.

  1. Change the value of devTools (here in searchprofiler) to a non-existent file.
  2. Run yarn start
  3. Wait for optimizer to kick in

Alternatively: if a non-existent module is imported into a ts file in combination with // @ts-ignore the same result is achieved.

Why would you ever do this? Primary reasons I can think of:

  • NP migration
  • Using "legacy" js in new ts
  • Building a new plugin

Expected behavior:

I would expect better feedback about the root cause. In the case described above it is the file that is not resolving correctly. Getting into this error state is very unhelpful.

Currently, for example, new platform migrations or instances of using js modules in ts modules can be very tricksy to debug.

Logs in console:
Looks like the cause is src/legacy/server/logging/apply_filters_to_keys.js: 27, but this is obviously triggered by something else (see steps above)

Sample of the repeating OOM exception:

...
<--- Last few GCs --->

[2754:0x108000000]    32454 ms: Mark-sweep 1042.7 (1283.5) -> 1042.3 (1239.0) MB, 331.2 / 0.0 ms  (average mu = 0.587, current mu = 0.000) last resort GC in old space requested
[2754:0x108000000]    32783 ms: Mark-sweep 1042.3 (1239.0) -> 1042.3 (1224.0) MB, 328.9 / 0.0 ms  (average mu = 0.410, current mu = 0.000) last resort GC in old space requested


<--- JS stacktrace --->

==== JS stack trace =========================================

Security context: 0x31754a99e6e1 <JSObject>
    0: builtin exit frame: parse(this=0x31754a991a19 <Object map = 0x3175208042a9>,0x31751136b4a9 <Very long string[131992282]>,0x31754a991a19 <Object map = 0x3175208042a9>)

    1: toPojo(aka toPojo) [0x3175f074e631] [/kibana/src/legacy/server/logging/apply_filters_to_keys.js:27] [bytecode=0x31756422b091 offset=30](this=0x3175574026f1 <undefined>,obj=0x317532d5..
...
@jloleysens jloleysens added the Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc label Oct 22, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-platform (Team:Platform)

@jloleysens jloleysens changed the title Plugin development error loop without good feedback Plugin development error loop without useful feedback Oct 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc triage_needed
Projects
None yet
Development

No branches or pull requests

3 participants