question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot read more PhysicalPlans from 0, successfully read index is /var/lib/iotdb/data/wal/root.ceshi.p1.s_1/0-1662101750410-1-0-0.tsfile/wal1. The reason is java.nio.BufferUnderflowException: null

See original GitHub issue

Describe the bug A clear and concise description of what the bug is.

version : 0.13.1 release

iotdb 安装完成之后;

[root@iotdb-103 logs]# /home/iotdb/sbin/start-cli.sh -h localhost -p 6667 -u root -pw root
---------------------
Starting IoTDB Cli
---------------------
 _____       _________  ______   ______
|_   _|     |  _   _  ||_   _ `.|_   _ \
  | |   .--.|_/ | | \_|  | | `. \ | |_) |
  | | / .'`\ \  | |      | |  | | |  __'.
 _| |_| \__. | _| |_    _| |_.' /_| |__) |
|_____|'.__.' |_____|  |______.'|_______/  version 0.13.1


IoTDB> login successfully
IoTDB> create storage group root.ceshi.p1.s_1;
>
> create schema template t4ceshi aligned (isa boolean encoding=RLE,isb boolean encoding=RLE,pv text encoding=DICTIONARY,
> sid int32 encoding=RLE,eq text encoding=DICTIONARY,pty int32 encoding=RLE,ityp int32 encoding=RLE,sti int64 encoding=RLE,
> pti int64 encoding=RLE,ori text encoding=PLAIN,sv text encoding=DICTIONARY,iv int32 encoding=RLE,dov double encoding=GORILLA,
> bv boolean encoding=RLE,dv int64 encoding=RLE,lv int64 encoding=RLE,stid int32 encoding=RLE,fv float encoding=RLE,
> cv text encoding=PLAIN,wv int32 encoding=RLE);
>
> set schema template t4ceshi to root.ceshi.p1.s_1;
>
>
>
> insert into root.ceshi.p1.s_1.sys3.eq1.pv2
> (timestamp,isa,isb,pv,sid,eq,pty,ityp,sti,pti,ori,sv,iv,dov,bv,dv,lv,stid,fv,cv,wv)
> aligned VALUES
> (NOW(),False,False,'ceshi',24,'ceshi',9,1,1660891161764,1660891161764,'0ce3','',null,null,
> null,null,null,19,1.1,'ceshi',null);
Msg: The statement is executed successfully.
Msg: The statement is executed successfully.
Msg: The statement is executed successfully.
Msg: The statement is executed successfully.
IoTDB>
IoTDB>
> insert into root.ceshi.p1.s_1.sys3.eq1.pv2
> (timestamp,isa,isb,pv,sid,eq,pty,ityp,sti,pti,ori,sv,iv,dov,bv,dv,lv,stid,fv,cv,wv)
> aligned VALUES
> (NOW(),False,False,'ceshi',24,'ceshi',9,1,1660891161764,1660891161764,'0ce3','',null,null,
> null,null,null,19,1.1,'ceshi',null);
Msg: The statement is executed successfully.
IoTDB>
IoTDB> insert into root.ceshi.p1.s_1.sys3.eq1.pv2
> (timestamp,isa,isb,pv,sid,eq,pty,ityp,sti,pti,ori,sv,iv,dov,bv,dv,lv,stid,fv,cv,wv)
> aligned VALUES
> (NOW(),False,False,'ceshi',24,'ceshi',9,1,1660891161764,1660891161764,'0ce3','',null,null,
> null,null,null,19,1.1,'ceshi',null);
Msg: The statement is executed successfully.
IoTDB> insert into root.ceshi.p1.s_1.sys3.eq1.pv2
> (timestamp,isa,isb,pv,sid,eq,pty,ityp,sti,pti,ori,sv,iv,dov,bv,dv,lv,stid,fv,cv,wv)
> aligned VALUES
> (NOW(),False,False,'ceshi',24,'ceshi',9,1,1660891161764,1660891161764,'0ce3','',null,null,
> null,null,null,19,1.1,'ceshi',null);
Msg: The statement is executed successfully.
IoTDB> select * from root.ceshi.p1.s_1.** align by device;
14:56:03.603 [main] DEBUG org.apache.iotdb.rpc.AutoResizingBuffer - org.apache.iotdb.rpc.AutoResizingBuffer@457c9034 expand from 1024 to 1536, request: 1107
+-----------------------------+------------------------------+--+-------------+-----+----+-------------+----+----+----+-----+----+---+---+----+----+-----+---+----+-----+-----+----+
|                         Time|                        Device|sv|          pti|   pv| ori|          sti| dov|  lv|stid|   eq|  iv|sid| fv|  dv|ityp|   cv|pty|  bv|  isa|  isb|  wv|
+-----------------------------+------------------------------+--+-------------+-----+----+-------------+----+----+----+-----+----+---+---+----+----+-----+---+----+-----+-----+----+
|2022-09-02T14:55:50.360+08:00|root.ceshi.p1.s_1.sys3.eq1.pv2|  |1660891161764|ceshi|0ce3|1660891161764|null|null|  19|ceshi|null| 24|1.1|null|   1|ceshi|  9|null|false|false|null|
|2022-09-02T14:55:58.059+08:00|root.ceshi.p1.s_1.sys3.eq1.pv2|  |1660891161764|ceshi|0ce3|1660891161764|null|null|  19|ceshi|null| 24|1.1|null|   1|ceshi|  9|null|false|false|null|
|2022-09-02T14:55:58.999+08:00|root.ceshi.p1.s_1.sys3.eq1.pv2|  |1660891161764|ceshi|0ce3|1660891161764|null|null|  19|ceshi|null| 24|1.1|null|   1|ceshi|  9|null|false|false|null|
|2022-09-02T14:55:59.586+08:00|root.ceshi.p1.s_1.sys3.eq1.pv2|  |1660891161764|ceshi|0ce3|1660891161764|null|null|  19|ceshi|null| 24|1.1|null|   1|ceshi|  9|null|false|false|null|
+-----------------------------+------------------------------+--+-------------+-----+----+-------------+----+----+----+-----+----+---+---+----+----+-----+---+----+-----+-----+----+
Total line number = 4
It costs 0.174s
IoTDB> exit
[root@iotdb-103 logs]# service iotdb restart
Redirecting to /bin/systemctl restart iotdb.service
[root@iotdb-103 logs]# /home/iotdb/sbin/start-cli.sh -h localhost -p 6667 -u root -pw root
---------------------
Starting IoTDB Cli
---------------------
 _____       _________  ______   ______
|_   _|     |  _   _  ||_   _ `.|_   _ \
  | |   .--.|_/ | | \_|  | | `. \ | |_) |
  | | / .'`\ \  | |      | |  | | |  __'.
 _| |_| \__. | _| |_    _| |_.' /_| |__) |
|_____|'.__.' |_____|  |______.'|_______/  version 0.13.1


IoTDB> login successfully
IoTDB> select * from root.ceshi.p1.s_1.** align by device;
+----+------+--+---+--+---+---+---+--+----+--+--+---+--+--+----+--+---+--+---+---+--+
|Time|Device|sv|pti|pv|ori|sti|dov|lv|stid|eq|iv|sid|fv|dv|ityp|cv|pty|bv|isa|isb|wv|
+----+------+--+---+--+---+---+---+--+----+--+--+---+--+--+----+--+---+--+---+---+--+
+----+------+--+---+--+---+---+---+--+----+--+--+---+--+--+----+--+---+--+---+---+--+
Empty set.
It costs 0.297s
IoTDB>


操作代码:


create storage group root.ceshi.p1.s_1;

create schema template t4ceshi aligned (isa boolean encoding=RLE,isb boolean encoding=RLE,pv text encoding=DICTIONARY,
sid int32 encoding=RLE,eq text encoding=DICTIONARY,pty int32 encoding=RLE,ityp int32 encoding=RLE,sti int64 encoding=RLE,
pti int64 encoding=RLE,ori text encoding=PLAIN,sv text encoding=DICTIONARY,iv int32 encoding=RLE,dov double encoding=GORILLA,
bv boolean encoding=RLE,dv int64 encoding=RLE,lv int64 encoding=RLE,stid int32 encoding=RLE,fv float encoding=RLE,
cv text encoding=PLAIN,wv int32 encoding=RLE);

set schema template t4ceshi to root.ceshi.p1.s_1;



insert into root.ceshi.p1.s_1.sys3.eq1.pv2
(timestamp,isa,isb,pv,sid,eq,pty,ityp,sti,pti,ori,sv,iv,dov,bv,dv,lv,stid,fv,cv,wv) 
aligned VALUES
(NOW(),False,False,'ceshi',24,'ceshi',9,1,1660891161764,1660891161764,'0ce3','',null,null,
null,null,null,19,1.1,'ceshi',null); 

重启iotdb的错误日志:

2022-09-02 14:56:14,415 [pool-10-IoTDB-Recovery-Thread-Pool-1] ERROR o.a.i.d.w.i.SingleFileLogReader:108 - Cannot read more PhysicalPlans from 0, successfully read index is /var/lib/iotdb/data/wal/root.ceshi.p1.s_1/0-1662101750410-1-0-0.tsfile/wal1. The reason is
java.nio.BufferUnderflowException: null
        at java.base/java.nio.Buffer.nextGetIndex(Buffer.java:647)
        at java.base/java.nio.HeapByteBuffer.getInt(HeapByteBuffer.java:388)
        at org.apache.iotdb.tsfile.utils.ReadWriteIOUtils.readInt(ReadWriteIOUtils.java:519)
        at org.apache.iotdb.db.qp.physical.crud.InsertRowPlan.fillValues(InsertRowPlan.java:459)
        at org.apache.iotdb.db.qp.physical.crud.InsertRowPlan.deserializeMeasurementsAndValues(InsertRowPlan.java:533)
        at org.apache.iotdb.db.qp.physical.crud.InsertRowPlan.deserialize(InsertRowPlan.java:518)
        at org.apache.iotdb.db.qp.physical.PhysicalPlan$Factory.create(PhysicalPlan.java:497)
        at org.apache.iotdb.db.writelog.io.BatchLogReader.readLogs(BatchLogReader.java:55)
        at org.apache.iotdb.db.writelog.io.BatchLogReader.<init>(BatchLogReader.java:47)
        at org.apache.iotdb.db.writelog.io.SingleFileLogReader.hasNext(SingleFileLogReader.java:100)
        at org.apache.iotdb.db.writelog.io.MultiFileLogReader.hasNext(MultiFileLogReader.java:57)
        at org.apache.iotdb.db.writelog.recover.LogReplayer.replayLogs(LogReplayer.java:105)
        at org.apache.iotdb.db.writelog.recover.TsFileRecoverPerformer.redoLogs(TsFileRecoverPerformer.java:290)
        at org.apache.iotdb.db.writelog.recover.TsFileRecoverPerformer.recover(TsFileRecoverPerformer.java:143)
        at org.apache.iotdb.db.engine.storagegroup.VirtualStorageGroupProcessor.recoverTsFiles(VirtualStorageGroupProcessor.java:786)
        at org.apache.iotdb.db.engine.storagegroup.VirtualStorageGroupProcessor.recover(VirtualStorageGroupProcessor.java:527)
        at org.apache.iotdb.db.engine.storagegroup.VirtualStorageGroupProcessor.<init>(VirtualStorageGroupProcessor.java:404)
        at org.apache.iotdb.db.engine.StorageEngine.buildNewStorageGroupProcessor(StorageEngine.java:707)
        at org.apache.iotdb.db.engine.storagegroup.virtualSg.StorageGroupManager.lambda$asyncRecover$0(StorageGroupManager.java:244)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)

Screenshots If applicable, add screenshots to help explain your problem.

image

Desktop (please complete the following information):

  • OS: [e.g. iOS] CentOS Linux release 7.9.2009 (Core)
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22] v0.13.1 release

Additional context Add any other context about the problem here.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
HTHoucommented, Sep 5, 2022

The bug is fixed, you can compile the latest the code on rel/0.13 branch to verify it.

0reactions
SunnySamancommented, Sep 2, 2022

希望能尽快,非常着急,因为这个问题我们软件的发布推迟了一版。

感谢

祝好!


北京城建智控科技股份有限公司

BEIJING URBAN CONSTRUCTION INTELLIGENT CONTROL CO.,LTD.

骆胜杰 | 研发部

地址/Add:北京市朝阳区西坝河南里22号华桐大厦

@.***

手机/Mob:+86-15120004204

保密声明:

此文件中可能含有机密类信息,仅限于上方提到的人员使用。若非以上人员或负责将该信息传送给上述人员的职员或代理人,严禁对此文件作任何形式的汇报、散布、传播及复制。若非此文件的指定收件人,请立即以邮件形式联系发件人并销毁所有原始文件的拷贝。

CONFIDENTIALITY NOTICE:

The information contained in this transmission may contain privileged and confidential information and is intended only for the use of the person(s) named above. If you are not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, any review, dissemination, distribution or duplication of this communication is strictly prohibited. If you are not the intended recipient, please contact the sender immediately by reply e-mail and destroy all copies of the original message.

---- Replied Message ---- | From | Chen @.> | | Date | 9/2/2022 18:46 | | To | @.> | | Cc | @.> , @.> | | Subject | Re: [apache/iotdb] Cannot read more PhysicalPlans from 0, successfully read index is /var/lib/iotdb/data/wal/root.ceshi.p1.s_1/0-1662101750410-1-0-0.tsfile/wal1. The reason is java.nio.BufferUnderflowException: null (Issue #7211) |

Hi. Thanks for reporting this bug, we will fix it as soon as possible.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

Read more comments on GitHub >

github_iconTop Results From Across the Web

How the built environment affects physical activity - PubMed
The link between the built environment and human behavior has long been of interest to the field of urban planning, but direct assessments...
Read more >
The Importance of Development Plans/Land Use Policy for ...
The focus of this training workshop is the development control function of the land use planning process and it is this activity with...
Read more >
Physical Plans and Designs - Design for Health
Planners and designers have often proposed that certain physical plans and designs are healthier. Some proposals are for specific elements such as trails ......
Read more >
How Do I... // Campus Physical and Environmental Planning ...
Go to main content. UCI.edu · Division of Finance and Administration | With U • For U · Download the With U •...
Read more >
History of urban planning - Wikipedia
The history of urban planning is a technical and political process concerned with the use of land and design of the urban environment,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found