elastic / elasticsearch

Free and Open Source, Distributed, RESTful Search Engine
https://www.elastic.co/products/elasticsearch
Other
69.95k stars 24.74k forks source link

7.16 _disk_usage API - NullPointerException #87761

Closed Ginger-Panda closed 2 years ago

Ginger-Panda commented 2 years ago

Elasticsearch Version

"version": { "number": "7.16.2", "build_flavor": "default", "build_type": "docker", "build_hash": "2b937c44140b6559905130a8650c64dbd0879cfb", "build_date": "2021-12-18T19:42:46.604893745Z", "build_snapshot": false, "lucene_version": "8.10.1", "minimum_wire_compatibility_version": "6.8.0", "minimum_index_compatibility_version": "6.0.0-beta1" }

Installed Plugins

No response

Java Version

bundled

OS Version

http://docker.elastic.co/elasticsearch/elasticsearch:7.16.2

Problem Description

We're encountering a NullPointerException when attempting to use the _disk_usage API here. This is a follow-up ticket creation to the discussion here. Stack Trace provided below

Steps to Reproduce

curl -H 'Content-type: application/json' -XPOST 'http://e2-es-http.default.svc.cluster.local:9200/ents_12_65_content_2/_disk_usage?run_expensive_tasks=true&pretty&error_trace' -- output noted in "Logs" section below

We have extremely similar mappings / settings across environments / clusters / indices that potentially contains semi-sensitive information so it may take a bit to get redacted versions of those if needed.

Logs (if relevant)

{
  "error": { 
    "root_cause": [ 
      { 
        "type": "illegal_state_exception",
        "reason": "unknown response [[ents_12_65_content_2/OtZ6u9v-Tvuhe23mn1gzMA][[ents_12_65_content_2][2]] BroadcastShardOperationFailedException[]; nested: RemoteTransportException[[e2-es-datanode-05-3][10.52.124.7:9300][indices:admin/analyze_disk_usage[s]]]; nested: NullPointerException[Cannot invoke \"org.apache.lucene.index.PointValues.getMinPackedValue()\" because \"values\" is null];]",
        "stack_trace": "[unknown response [[ents_12_65_content_2/OtZ6u9v-Tvuhe23mn1gzMA][[ents_12_65_content_2][2]] BroadcastShardOperationFailedException[]; nested: RemoteTransportException[[e2-es-datanode-05-3][10.52.124.7:9300][indices:admin/analyze_disk_usage[s]]]; nested: NullPointerException[Cannot invoke \"org.apache.lucene.index.PointValues.getMinPackedValue()\" because \"values\" is null];]]; nested: IllegalStateException[unknown response [[ents_12_65_content_2/OtZ6u9v-Tvuhe23mn1gzMA][[ents_12_65_content_2][2]] BroadcastShardOperationFailedException[]; nested: RemoteTransportException[[e2-es-datanode-05-3][10.52.124.7:9300][indices:admin/analyze_disk_usage[s]]]; nested: NullPointerException[Cannot invoke \"org.apache.lucene.index.PointValues.getMinPackedValue()\" because \"values\" is null];]];\n\tat org.elasticsearch.ElasticsearchException.guessRootCauses(ElasticsearchException.java:639)\n\tat org.elasticsearch.ElasticsearchException.generateFailureXContent(ElasticsearchException.java:567)\n\tat org.elasticsearch.rest.BytesRestResponse.build(BytesRestResponse.java:140)\n\tat org.elasticsearch.rest.BytesRestResponse.<init>(BytesRestResponse.java:101)\n\tat org.elasticsearch.rest.BytesRestResponse.<init>(BytesRestResponse.java:81)\n\tat org.elasticsearch.rest.action.RestActionListener.onFailure(RestActionListener.java:55)\n\tat org.elasticsearch.rest.action.RestCancellableNodeClient$1.onFailure(RestCancellableNodeClient.java:96)\n\tat org.elasticsearch.action.support.TransportAction$1.onFailure(TransportAction.java:97)\n\tat org.elasticsearch.action.support.ContextPreservingActionListener.onFailure(ContextPreservingActionListener.java:38)\n\tat org.elasticsearch.action.ActionListener$Delegating.onFailure(ActionListener.java:66)\n\tat org.elasticsearch.action.support.broadcast.TransportBroadcastAction$AsyncBroadcastAction.finishHim(TransportBroadcastAction.java:260)\n\tat org.elasticsearch.action.support.broadcast.TransportBroadcastAction$AsyncBroadcastAction.onOperation(TransportBroadcastAction.java:247)\n\tat org.elasticsearch.action.support.broadcast.TransportBroadcastAction$AsyncBroadcastAction$1.handleException(TransportBroadcastAction.java:191)\n\tat org.elasticsearch.transport.TransportService$4.handleException(TransportService.java:853)\n\tat org.elasticsearch.transport.TransportService$ContextRestoreResponseHandler.handleException(TransportService.java:1481)\n\tat org.elasticsearch.transport.InboundHandler.lambda$handleException$3(InboundHandler.java:368)\n\tat org.elasticsearch.common.util.concurrent.EsExecutors$DirectExecutorService.execute(EsExecutors.java:285)\n\tat org.elasticsearch.transport.InboundHandler.handleException(InboundHandler.java:366)\n\tat org.elasticsearch.transport.InboundHandler.handlerResponseError(InboundHandler.java:358)\n\tat org.elasticsearch.transport.InboundHandler.messageReceived(InboundHandler.java:132)\n\tat org.elasticsearch.transport.InboundHandler.inboundMessage(InboundHandler.java:88)\n\tat org.elasticsearch.transport.TcpTransport.inboundMessage(TcpTransport.java:743)\n\tat org.elasticsearch.transport.InboundPipeline.forwardFragments(InboundPipeline.java:147)\n\tat org.elasticsearch.transport.InboundPipeline.doHandleBytes(InboundPipeline.java:119)\n\tat org.elasticsearch.transport.InboundPipeline.handleBytes(InboundPipeline.java:84)\n\tat org.elasticsearch.transport.netty4.Netty4MessageChannelHandler.channelRead(Netty4MessageChannelHandler.java:71)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)\n\tat io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)\n\tat io.netty.handler.logging.LoggingHandler.channelRead(LoggingHandler.java:280)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)\n\tat io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)\n\tat io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)\n\tat io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)\n\tat io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1374)\n\tat io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1237)\n\tat io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1286)\n\tat io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:507)\n\tat io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:446)\n\tat io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:276)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)\n\tat io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)\n\tat io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)\n\tat io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)\n\tat io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)\n\tat io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:719)\n\tat io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:620)\n\tat io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:583)\n\tat io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)\n\tat io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)\n\tat io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)\n\tat java.base/java.lang.Thread.run(Thread.java:833)\nCaused by: java.lang.IllegalStateException: unknown response [[ents_12_65_content_2/OtZ6u9v-Tvuhe23mn1gzMA][[ents_12_65_content_2][2]] BroadcastShardOperationFailedException[]; nested: RemoteTransportException[[e2-es-datanode-05-3][10.52.124.7:9300][indices:admin/analyze_disk_usage[s]]]; nested: NullPointerException[Cannot invoke \"org.apache.lucene.index.PointValues.getMinPackedValue()\" because \"values\" is null];]\n\tat org.elasticsearch.action.admin.indices.diskusage.TransportAnalyzeIndexDiskUsageAction.newResponse(TransportAnalyzeIndexDiskUsageAction.java:117)\n\tat org.elasticsearch.action.admin.indices.diskusage.TransportAnalyzeIndexDiskUsageAction.newResponse(TransportAnalyzeIndexDiskUsageAction.java:42)\n\tat org.elasticsearch.action.support.broadcast.TransportBroadcastAction$AsyncBroadcastAction.finishHim(TransportBroadcastAction.java:258)\n\t... 47 more\n"
      }
    ],
    "type": "illegal_state_exception",
    "reason": "unknown response [[ents_12_65_content_2/OtZ6u9v-Tvuhe23mn1gzMA][[ents_12_65_content_2][2]] BroadcastShardOperationFailedException[]; nested: RemoteTransportException[[e2-es-datanode-05-3][10.52.124.7:9300][indices:admin/analyze_disk_usage[s]]]; nested: NullPointerException[Cannot invoke \"org.apache.lucene.index.PointValues.getMinPackedValue()\" because \"values\" is null];]",
    "stack_trace": "java.lang.IllegalStateException: unknown response [[ents_12_65_content_2/OtZ6u9v-Tvuhe23mn1gzMA][[ents_12_65_content_2][2]] BroadcastShardOperationFailedException[]; nested: RemoteTransportException[[e2-es-datanode-05-3][10.52.124.7:9300][indices:admin/analyze_disk_usage[s]]]; nested: NullPointerException[Cannot invoke \"org.apache.lucene.index.PointValues.getMinPackedValue()\" because \"values\" is null];]\n\tat org.elasticsearch.action.admin.indices.diskusage.TransportAnalyzeIndexDiskUsageAction.newResponse(TransportAnalyzeIndexDiskUsageAction.java:117)\n\tat org.elasticsearch.action.admin.indices.diskusage.TransportAnalyzeIndexDiskUsageAction.newResponse(TransportAnalyzeIndexDiskUsageAction.java:42)\n\tat org.elasticsearch.action.support.broadcast.TransportBroadcastAction$AsyncBroadcastAction.finishHim(TransportBroadcastAction.java:258)\n\tat org.elasticsearch.action.support.broadcast.TransportBroadcastAction$AsyncBroadcastAction.onOperation(TransportBroadcastAction.java:247)\n\tat org.elasticsearch.action.support.broadcast.TransportBroadcastAction$AsyncBroadcastAction$1.handleException(TransportBroadcastAction.java:191)\n\tat org.elasticsearch.transport.TransportService$4.handleException(TransportService.java:853)\n\tat org.elasticsearch.transport.TransportService$ContextRestoreResponseHandler.handleException(TransportService.java:1481)\n\tat org.elasticsearch.transport.InboundHandler.lambda$handleException$3(InboundHandler.java:368)\n\tat org.elasticsearch.common.util.concurrent.EsExecutors$DirectExecutorService.execute(EsExecutors.java:285)\n\tat org.elasticsearch.transport.InboundHandler.handleException(InboundHandler.java:366)\n\tat org.elasticsearch.transport.InboundHandler.handlerResponseError(InboundHandler.java:358)\n\tat org.elasticsearch.transport.InboundHandler.messageReceived(InboundHandler.java:132)\n\tat org.elasticsearch.transport.InboundHandler.inboundMessage(InboundHandler.java:88)\n\tat org.elasticsearch.transport.TcpTransport.inboundMessage(TcpTransport.java:743)\n\tat org.elasticsearch.transport.InboundPipeline.forwardFragments(InboundPipeline.java:147)\n\tat org.elasticsearch.transport.InboundPipeline.doHandleBytes(InboundPipeline.java:119)\n\tat org.elasticsearch.transport.InboundPipeline.handleBytes(InboundPipeline.java:84)\n\tat org.elasticsearch.transport.netty4.Netty4MessageChannelHandler.channelRead(Netty4MessageChannelHandler.java:71)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)\n\tat io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)\n\tat io.netty.handler.logging.LoggingHandler.channelRead(LoggingHandler.java:280)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)\n\tat io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)\n\tat io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)\n\tat io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)\n\tat io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1374)\n\tat io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1237)\n\tat io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1286)\n\tat io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:507)\n\tat io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:446)\n\tat io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:276)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)\n\tat io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)\n\tat io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)\n\tat io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)\n\tat io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)\n\tat io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:719)\n\tat io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:620)\n\tat io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:583)\n\tat io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)\n\tat io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)\n\tat io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)\n\tat java.base/java.lang.Thread.run(Thread.java:833)\n"
  },
  "status": 500
}
elasticmachine commented 2 years ago

Pinging @elastic/es-search (Team:Search)

dnhatn commented 2 years ago

@ryanmorrisonlytics Thank you for reporting the issue. I've opened a fix for this in https://github.com/elastic/elasticsearch/pull/87826.