You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@iotdb.apache.org by "JiaXin Zhang (Jira)" <ji...@apache.org> on 2022/02/04 11:36:00 UTC

[jira] [Commented] (IOTDB-2504) The first count query in the CLI reports an exception

    [ https://issues.apache.org/jira/browse/IOTDB-2504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17487034#comment-17487034 ] 

JiaXin Zhang commented on IOTDB-2504:
-------------------------------------

I don't know how to reproduce this problem.How can I create the storage group and insert the data?

> The first count query in the CLI reports an exception
> -----------------------------------------------------
>
>                 Key: IOTDB-2504
>                 URL: https://issues.apache.org/jira/browse/IOTDB-2504
>             Project: Apache IoTDB
>          Issue Type: Bug
>          Components: Core/Server
>    Affects Versions: 0.12.4, 0.12.5
>            Reporter: xiaozhihong
>            Priority: Major
>
> description:
> Enter the CLI, the first execution of count reports 500 exception, and the query will be normal if executed again.
> step 1: start server
> step 2: enter cli
> step 3: execute sql
> {code:java}
> [xzh@i-s9p350bm apache-iotdb-0.12.5-SNAPSHOT-all-bin]$ ./sbin/start-cli.sh
> ---------------------
> Starting IoTDB Cli
> ---------------------
>  _____       _________  ______   ______    
> |_   _|     |  _   _  ||_   _ `.|_   _ \   
>   | |   .--.|_/ | | \_|  | | `. \ | |_) |  
>   | | / .'`\ \  | |      | |  | | |  __'.  
>  _| |_| \__. | _| |_    _| |_.' /_| |__) | 
> |_____|'.__.' |_____|  |______.'|_______/  version 0.12.5-SNAPSHOT
>                                            IoTDB> login successfully
> IoTDB> select count(s_0) from root.test.g_0.d_0
> Msg: 500: [INTERNAL_SERVER_ERROR] Exception occurred while executing "select count(s_0) from root.test.g_0.d_0". java.lang.NullPointerException
> IoTDB> select count(s_0) from root.test.g_0.d_0
> +----------------------------+
> |count(root.test.g_0.d_0.s_0)|
> +----------------------------+
> |                  2000000000|
> +----------------------------+
> Total line number = 1
> It costs 2.169s
>  {code}
> {code:java}
> 2022-01-28 18:02:17,168 [pool-17-IoTDB-Query-1] WARN  o.a.i.d.q.c.FileReaderManager:120 - Query has opened 40000 files !
>         at sun.nio.fs.UnixException.translateToIOException(UnixException.java:91)
>         at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
>         at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
>         at sun.nio.fs.UnixFileSystemProvider.newFileChannel(UnixFileSystemProvider.java:177)
>         at java.nio.channels.FileChannel.open(FileChannel.java:287)
>         at java.nio.channels.FileChannel.open(FileChannel.java:335)
>         at org.apache.iotdb.tsfile.read.reader.LocalTsFileInput.<init>(LocalTsFileInput.java:42)
>         at org.apache.iotdb.tsfile.fileSystem.fileInputFactory.LocalFSInputFactory.getTsFileInput(LocalFSInputFactory.java:38)
>         at org.apache.iotdb.tsfile.read.TsFileSequenceReader.<init>(TsFileSequenceReader.java:125)
>         at org.apache.iotdb.tsfile.read.TsFileSequenceReader.<init>(TsFileSequenceReader.java:111)
>         at org.apache.iotdb.db.query.control.FileReaderManager.get(FileReaderManager.java:128)
>         at org.apache.iotdb.db.engine.cache.TimeSeriesMetadataCache.get(TimeSeriesMetadataCache.java:139)
>         at org.apache.iotdb.db.utils.FileLoaderUtils.loadTimeSeriesMetadata(FileLoaderUtils.java:107)
>         at org.apache.iotdb.db.query.reader.series.SeriesReader.tryToUnpackAllOverlappedFilesToTimeSeriesMetadata(SeriesReader.java:915)
>         at org.apache.iotdb.db.query.reader.series.SeriesReader.hasNextFile(SeriesReader.java:242)
>         at org.apache.iotdb.db.query.reader.series.SeriesAggregateReader.hasNextFile(SeriesAggregateReader.java:94)
>         at org.apache.iotdb.db.query.executor.AggregationExecutor.aggregateFromReader(AggregationExecutor.java:242)
>         at org.apache.iotdb.db.query.executor.AggregationExecutor.aggregateOneSeries(AggregationExecutor.java:217)
>         at org.apache.iotdb.db.query.executor.AggregationExecutor.aggregateOneSeries(AggregationExecutor.java:166)
>         at org.apache.iotdb.db.query.executor.AggregationExecutor.executeWithoutValueFilter(AggregationExecutor.java:120)
>         at org.apache.iotdb.db.query.executor.QueryRouter.aggregate(QueryRouter.java:137)
>         at org.apache.iotdb.db.qp.executor.PlanExecutor.processDataQuery(PlanExecutor.java:539)
>         at org.apache.iotdb.db.qp.executor.PlanExecutor.processQuery(PlanExecutor.java:228)
>         at org.apache.iotdb.db.service.TSServiceImpl.createQueryDataSet(TSServiceImpl.java:1154)
>         at org.apache.iotdb.db.service.TSServiceImpl.access$600(TSServiceImpl.java:157)
>         at org.apache.iotdb.db.service.TSServiceImpl$QueryTask.call(TSServiceImpl.java:284)
>         at org.apache.iotdb.db.service.TSServiceImpl$QueryTask.call(TSServiceImpl.java:222)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>         at java.lang.Thread.run(Thread.java:748)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> 2022-01-28 18:02:15,099 [pool-14-IoTDB-RPC-Client-1] INFO  o.a.i.d.c.IoTDBThreadPoolFactory:55 - new fixed thread pool: Query, thread number: 8
> 2022-01-28 18:02:15,099 [pool-14-IoTDB-RPC-Client-1] INFO  o.a.i.d.c.IoTDBThreadPoolFactory:55 - new fixed thread pool: Query, thread number: 8
> 2022-01-28 18:02:16,777 [pool-17-IoTDB-Query-1] WARN  o.a.i.d.q.c.FileReaderManager:120 - Query has opened 30000 files !
> 2022-01-28 18:02:17,168 [pool-17-IoTDB-Query-1] WARN  o.a.i.d.q.c.FileReaderManager:120 - Query has opened 40000 files !
> 2022-01-28 18:02:17,578 [pool-17-IoTDB-Query-1] WARN  o.a.i.d.q.c.FileReaderManager:120 - Query has opened 50000 files !
> 2022-01-28 18:02:18,115 [pool-17-IoTDB-Query-1] WARN  o.a.i.d.q.c.FileReaderManager:120 - Query has opened 60000 files !
>         at sun.nio.fs.UnixException.translateToIOException(UnixException.java:91)
>         at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
>         at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
>         at sun.nio.fs.UnixFileSystemProvider.newFileChannel(UnixFileSystemProvider.java:177)
>         at java.nio.channels.FileChannel.open(FileChannel.java:287)
>         at java.nio.channels.FileChannel.open(FileChannel.java:335)
>         at org.apache.iotdb.tsfile.read.reader.LocalTsFileInput.<init>(LocalTsFileInput.java:42)
>         at org.apache.iotdb.tsfile.fileSystem.fileInputFactory.LocalFSInputFactory.getTsFileInput(LocalFSInputFactory.java:38)
>         at org.apache.iotdb.tsfile.read.TsFileSequenceReader.<init>(TsFileSequenceReader.java:125)
>         at org.apache.iotdb.tsfile.read.TsFileSequenceReader.<init>(TsFileSequenceReader.java:111)
>         at org.apache.iotdb.db.query.control.FileReaderManager.get(FileReaderManager.java:128)
>         at org.apache.iotdb.db.engine.cache.TimeSeriesMetadataCache.get(TimeSeriesMetadataCache.java:139)
>         at org.apache.iotdb.db.utils.FileLoaderUtils.loadTimeSeriesMetadata(FileLoaderUtils.java:107)
>         at org.apache.iotdb.db.query.reader.series.SeriesReader.tryToUnpackAllOverlappedFilesToTimeSeriesMetadata(SeriesReader.java:915)
>         at org.apache.iotdb.db.query.reader.series.SeriesReader.hasNextFile(SeriesReader.java:242)
>         at org.apache.iotdb.db.query.reader.series.SeriesAggregateReader.hasNextFile(SeriesAggregateReader.java:94)
>         at org.apache.iotdb.db.query.executor.AggregationExecutor.aggregateFromReader(AggregationExecutor.java:242)
>         at org.apache.iotdb.db.query.executor.AggregationExecutor.aggregateOneSeries(AggregationExecutor.java:217)
>         at org.apache.iotdb.db.query.executor.AggregationExecutor.aggregateOneSeries(AggregationExecutor.java:166)
>         at org.apache.iotdb.db.query.executor.AggregationExecutor.executeWithoutValueFilter(AggregationExecutor.java:120)
>         at org.apache.iotdb.db.query.executor.QueryRouter.aggregate(QueryRouter.java:137)
>         at org.apache.iotdb.db.qp.executor.PlanExecutor.processDataQuery(PlanExecutor.java:539)
>         at org.apache.iotdb.db.qp.executor.PlanExecutor.processQuery(PlanExecutor.java:228)
>         at org.apache.iotdb.db.service.TSServiceImpl.createQueryDataSet(TSServiceImpl.java:1154)
>         at org.apache.iotdb.db.service.TSServiceImpl.access$600(TSServiceImpl.java:157)
>         at org.apache.iotdb.db.service.TSServiceImpl$QueryTask.call(TSServiceImpl.java:284)
>         at org.apache.iotdb.db.service.TSServiceImpl$QueryTask.call(TSServiceImpl.java:222)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> java.util.concurrent.ExecutionException: java.lang.NullPointerException
> 2022-01-28 18:02:06,986 [pool-6-IoTDB-Compaction-1] INFO  o.a.i.d.e.c.l.LevelCompactionTsFileManagement:134 - root.test.g_0 [compaction] merge starts to delete file list
> 2022-01-28 18:02:06,987 [pool-6-IoTDB-Compaction-1] INFO  o.a.i.d.e.c.l.LevelCompactionTsFileManagement:124 - root.test.g_0 [compaction] merge starts to delete real file
> 2022-01-28 18:02:06,988 [pool-6-IoTDB-Compaction-1] INFO  o.a.i.d.e.c.ChunkCache:59 - ChunkCache size = 223755632
> 2022-01-28 18:02:06,992 [pool-6-IoTDB-Compaction-1] INFO  o.a.i.d.e.c.TimeSeriesMetadataCache:74 - TimeseriesMetadataCache size = 447511265
> 2022-01-28 18:02:15,099 [pool-14-IoTDB-RPC-Client-1] INFO  o.a.i.d.c.IoTDBThreadPoolFactory:55 - new fixed thread pool: Query, thread number: 8
> 2022-01-28 18:02:16,777 [pool-17-IoTDB-Query-1] WARN  o.a.i.d.q.c.FileReaderManager:120 - Query has opened 30000 files !
> 2022-01-28 18:02:17,168 [pool-17-IoTDB-Query-1] WARN  o.a.i.d.q.c.FileReaderManager:120 - Query has opened 40000 files !
> 2022-01-28 18:02:17,578 [pool-17-IoTDB-Query-1] WARN  o.a.i.d.q.c.FileReaderManager:120 - Query has opened 50000 files !
> 2022-01-28 18:02:18,115 [pool-17-IoTDB-Query-1] WARN  o.a.i.d.q.c.FileReaderManager:120 - Query has opened 60000 files !
>         at sun.nio.fs.UnixException.translateToIOException(UnixException.java:91)
>         at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
>         at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
>         at sun.nio.fs.UnixFileSystemProvider.newFileChannel(UnixFileSystemProvider.java:177)
>         at java.nio.channels.FileChannel.open(FileChannel.java:287)
>         at java.nio.channels.FileChannel.open(FileChannel.java:335)
>         at org.apache.iotdb.tsfile.read.reader.LocalTsFileInput.<init>(LocalTsFileInput.java:42)
>         at org.apache.iotdb.tsfile.fileSystem.fileInputFactory.LocalFSInputFactory.getTsFileInput(LocalFSInputFactory.java:38)
>         at org.apache.iotdb.tsfile.read.TsFileSequenceReader.<init>(TsFileSequenceReader.java:125)
>         at org.apache.iotdb.tsfile.read.TsFileSequenceReader.<init>(TsFileSequenceReader.java:111)
>         at org.apache.iotdb.db.query.control.FileReaderManager.get(FileReaderManager.java:128)
>         at org.apache.iotdb.db.engine.cache.TimeSeriesMetadataCache.get(TimeSeriesMetadataCache.java:139)
>         at org.apache.iotdb.db.utils.FileLoaderUtils.loadTimeSeriesMetadata(FileLoaderUtils.java:107)
>         at org.apache.iotdb.db.query.reader.series.SeriesReader.tryToUnpackAllOverlappedFilesToTimeSeriesMetadata(SeriesReader.java:915)
>         at org.apache.iotdb.db.query.reader.series.SeriesReader.hasNextFile(SeriesReader.java:242)
>         at org.apache.iotdb.db.query.reader.series.SeriesAggregateReader.hasNextFile(SeriesAggregateReader.java:94)
>         at org.apache.iotdb.db.query.executor.AggregationExecutor.aggregateFromReader(AggregationExecutor.java:242)
>         at org.apache.iotdb.db.query.executor.AggregationExecutor.aggregateOneSeries(AggregationExecutor.java:217)
>         at org.apache.iotdb.db.query.executor.AggregationExecutor.aggregateOneSeries(AggregationExecutor.java:166)
>         at org.apache.iotdb.db.query.executor.AggregationExecutor.executeWithoutValueFilter(AggregationExecutor.java:120)
>         at org.apache.iotdb.db.query.executor.QueryRouter.aggregate(QueryRouter.java:137)
>         at org.apache.iotdb.db.qp.executor.PlanExecutor.processDataQuery(PlanExecutor.java:539)
>         at org.apache.iotdb.db.qp.executor.PlanExecutor.processQuery(PlanExecutor.java:228)
>         at org.apache.iotdb.db.service.TSServiceImpl.createQueryDataSet(TSServiceImpl.java:1154)
>         at org.apache.iotdb.db.service.TSServiceImpl.access$600(TSServiceImpl.java:157)
>         at org.apache.iotdb.db.service.TSServiceImpl$QueryTask.call(TSServiceImpl.java:284)
>         at org.apache.iotdb.db.service.TSServiceImpl$QueryTask.call(TSServiceImpl.java:222)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>         at java.lang.Thread.run(Thread.java:748)
> 2022-01-28 18:02:18,545 [pool-14-IoTDB-RPC-Client-1] WARN  o.a.i.d.s.TSServiceImpl:2033 - [INTERNAL_SERVER_ERROR] Exception occurred while executing "select count(s_0) from root.test.g_0.d_0".
> java.util.concurrent.ExecutionException: java.lang.NullPointerException
>         at java.util.concurrent.FutureTask.report(FutureTask.java:122)
>         at java.util.concurrent.FutureTask.get(FutureTask.java:192)
>         at org.apache.iotdb.db.service.TSServiceImpl.executeStatement(TSServiceImpl.java:766)
>         at org.apache.iotdb.service.rpc.thrift.TSIService$Processor$executeStatement.getResult(TSIService.java:2373)
>         at org.apache.iotdb.service.rpc.thrift.TSIService$Processor$executeStatement.getResult(TSIService.java:2353)
>         at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:38)
>         at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:38)
>         at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:248)
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>         at java.lang.Thread.run(Thread.java:748)
> Caused by: java.lang.NullPointerException: null
>         at org.apache.iotdb.tsfile.read.TsFileSequenceReader.<init>(TsFileSequenceReader.java:131)
>         at org.apache.iotdb.tsfile.read.TsFileSequenceReader.<init>(TsFileSequenceReader.java:111)
>         at org.apache.iotdb.db.query.control.FileReaderManager.get(FileReaderManager.java:128)
>         at org.apache.iotdb.db.engine.cache.TimeSeriesMetadataCache.get(TimeSeriesMetadataCache.java:139)
>         at org.apache.iotdb.db.utils.FileLoaderUtils.loadTimeSeriesMetadata(FileLoaderUtils.java:107)
>         at org.apache.iotdb.db.query.reader.series.SeriesReader.tryToUnpackAllOverlappedFilesToTimeSeriesMetadata(SeriesReader.java:915)
>         at org.apache.iotdb.db.query.reader.series.SeriesReader.hasNextFile(SeriesReader.java:242)
>         at org.apache.iotdb.db.query.reader.series.SeriesAggregateReader.hasNextFile(SeriesAggregateReader.java:94)
>         at org.apache.iotdb.db.query.executor.AggregationExecutor.aggregateFromReader(AggregationExecutor.java:242)
>         at org.apache.iotdb.db.query.executor.AggregationExecutor.aggregateOneSeries(AggregationExecutor.java:217)
>         at org.apache.iotdb.db.query.executor.AggregationExecutor.aggregateOneSeries(AggregationExecutor.java:166)
>         at org.apache.iotdb.db.query.executor.AggregationExecutor.executeWithoutValueFilter(AggregationExecutor.java:120)
>         at org.apache.iotdb.db.query.executor.QueryRouter.aggregate(QueryRouter.java:137)
>         at org.apache.iotdb.db.qp.executor.PlanExecutor.processDataQuery(PlanExecutor.java:539)
>         at org.apache.iotdb.db.qp.executor.PlanExecutor.processQuery(PlanExecutor.java:228)
>         at org.apache.iotdb.db.service.TSServiceImpl.createQueryDataSet(TSServiceImpl.java:1154)
>         at org.apache.iotdb.db.service.TSServiceImpl.access$600(TSServiceImpl.java:157)
>         at org.apache.iotdb.db.service.TSServiceImpl$QueryTask.call(TSServiceImpl.java:284)
>         at org.apache.iotdb.db.service.TSServiceImpl$QueryTask.call(TSServiceImpl.java:222)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>         ... 3 common frames omitted
>  {code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)