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

IllegalArgumentException from node stats #56739

Closed
s-nel opened this issue May 14, 2020 · 7 comments
Closed

IllegalArgumentException from node stats #56739

s-nel opened this issue May 14, 2020 · 7 comments
Assignees
Labels
>bug :Data Management/Stats Statistics tracking and retrieval APIs Team:Data Management Meta label for data/management team

Comments

@s-nel
Copy link
Contributor

s-nel commented May 14, 2020

Elasticsearch version (bin/elasticsearch --version): 7.7.0

Plugins installed: [repository-azure, repository-s3]

JVM version (java -version): ESS

OS version (uname -a if on a Unix-like system): ESS Azure

Description of the problem including expected versus actual behavior:

Executing GET /_nodes/stats?level=shards responds with

{
  "error": {
    "root_cause": [
      {
        "type": "illegal_argument_exception",
        "reason": "Values less than -1 bytes are not supported: -8192b"
      }
    ],
    "type": "illegal_argument_exception",
    "reason": "Values less than -1 bytes are not supported: -8192b",
    "suppressed": [
      {
        "type": "illegal_state_exception",
        "reason": "Failed to close the XContentBuilder",
        "caused_by": {
          "type": "i_o_exception",
          "reason": "Unclosed object or array found"
        }
      }
    ]
  },
  "status": 400
}

Expect it to return 200 and node stats. Restarting the node fixes the issue. This is causing plan failures on ESS.

I believe #48380 is related, but this appears to be memory, not disk.

Steps to reproduce:

I don't have steps to reproduce.

Provide logs (if relevant):

Couldn't find any relevant logs from ES.

@s-nel s-nel added >bug needs:triage Requires assignment of a team area label labels May 14, 2020
@tvernum
Copy link
Contributor

tvernum commented May 14, 2020

I wonder if this is related to #54415

We've only seen this in CI on Debian8, but there's nothing about the analysis that implies it would be limited to that platform.

@tvernum tvernum added the :Data Management/Stats Statistics tracking and retrieval APIs label May 14, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-features (:Core/Features/Stats)

@elasticmachine elasticmachine added the Team:Data Management Meta label for data/management team label May 14, 2020
@danhermann danhermann self-assigned this May 14, 2020
@danhermann danhermann removed the needs:triage Requires assignment of a team area label label May 14, 2020
@danhermann
Copy link
Contributor

Fixed in #56435

@henrikno
Copy link
Contributor

I have a case which is very similar (Values less than -1 bytes are not supported: -1282646016b), however the stack trace shows it's during getting swap (org.elasticsearch.monitor.os.OsStats$Swap.getFree) instead of Mem.getUsed.
Also on 7.7.0 (openjdk version "14" 2020-03-17)
It looks like the fix only applied to Mem.getUsed, but probably needs to be applied here too.

Full stack trace here:
https://gist.github.com/henrikno/1fc3a2f64b12e0c50b8e51e04a16d16f

Swap looks sane in /proc/meminfo

SwapTotal:      10485756 kB
SwapFree:        2495052 kB

@danhermann
Copy link
Contributor

@henrikno, thanks for the report. We'll look into that case as well. We know that some JVMs can return OS memory as zero under certain circumstances, so if we can establish that that can happen for swap as well, we can apply the same fix.

@andrew-moldovan
Copy link

As an addition to what @henrikno wrote, "restarting" the affected node doesn't seem to have fixed anything in this case, unlike the original bug report.

@danhermann
Copy link
Contributor

I've opened #57312 for the negative values on the swap stats.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Data Management/Stats Statistics tracking and retrieval APIs Team:Data Management Meta label for data/management team
Projects
None yet
Development

No branches or pull requests

6 participants