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

Invalid access: Can not convert empty value #6580

Closed
lilinghai opened this issue Jan 5, 2023 · 10 comments · Fixed by #6672
Closed

Invalid access: Can not convert empty value #6580

lilinghai opened this issue Jan 5, 2023 · 10 comments · Fixed by #6672
Labels
feature/developing severity/major type/bug The issue is confirmed as a bug.

Comments

@lilinghai
Copy link

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

daily run window function and the failed sql is select i, i, row_number() over w from window_function_0 window w as (partition by i order by id, i) order by 1, 2, 3, the full error info is Error 1105: other error for mpp stream: From MPP<query:<query_ts:0, local_query_id:0, server_id:0, start_ts:438529181194125313>,task_id:1>: Poco::Exception. Code: 1000, e.code() = 0, e.displayText() = Invalid access: Can not convert empty value., e.what() = Invalid access.

2. What did you expect to see? (Required)

3. What did you see instead (Required)

4. What is your TiFlash version? (Required)

@lilinghai lilinghai added the type/bug The issue is confirmed as a bug. label Jan 5, 2023
@gengliqi
Copy link
Contributor

gengliqi commented Jan 5, 2023

I encountered this panic too.

[2023/01/05 18:01:29.371 +08:00] [ERROR] [Exception.cpp:89] ["Poco::Exception. Code: 1000, e.code() = 0, e.displayText() = Invalid access: Can not convert empty value., e.what() = Invalid access"] [source="DB::RawCppPtr DB::PreHandleSnapshot(DB::EngineStoreServerWrap *, DB::BaseBuffView, uint64_t, DB::SSTViewVec, uint64_t, uint64_t)"] [thread_id=23]

@CalvinNeo
Copy link
Member

It is curious that we saw the same some errors in SchemaSyncService.
86bd92cc-81a6-4ed6-81d7-89274f4580ef

This may be a arm64 problem since pocoproject/poco#3331, however, we are not tested in arm64.

@CalvinNeo
Copy link
Member

CalvinNeo commented Jan 17, 2023

The mpp error is due to the schema syncer error

[source="DB::RawCppPtr DB::PreHandleSnapshot(DB::EngineStoreServerWrap *, DB::BaseBuffView, uint64_t, DB::SSTViewVec, uint64_t, uint64_t)"] [thread_id=50]
[2023/01/14 00:58:01.071 +08:00] [INFO] [TiDBSchemaSyncer.h:113] ["Start to sync schemas. current version is: 34 and try to sync schema version to: 39"] [source=SchemaSyncer] [thread_id=51]
[2023/01/14 00:58:01.071 +08:00] [DEBUG] [TiDBSchemaSyncer.h:171] ["Try load schema diffs."] [source=SchemaSyncer] [thread_id=51]
[2023/01/14 00:58:01.071 +08:00] [ERROR] [Exception.cpp:89] ["Poco::Exception. Code: 1000, e.code() = 0, e.displayText() = Invalid access: Can not convert empty value., e.what() = Invalid access"] [source="DB::RawCppPtr DB::PreHandleSnapshot(DB::EngineStoreServerWrap *, DB::BaseBuffView, uint64_t, DB::SSTViewVec, uint64_t, uint64_t)"] [thread_id=51]

ti-chi-bot pushed a commit that referenced this issue Jan 17, 2023
@CalvinNeo
Copy link
Member

Add log and see what the invalid data is

@CalvinNeo
Copy link
Member

Restart solved
3beaed8a-09d3-4c59-9ecd-d2bb7ecf258c

@CalvinNeo CalvinNeo reopened this Jan 19, 2023
@CalvinNeo
Copy link
Member

failed to deserialize {\"version\":40,\"type\":31,\"schema_id\":69,\"table_id\":71,\"old_table_id\":0,\"old_schema_id\":0,\"affected_options\":null}"

@JaySon-Huang
Copy link
Contributor

JaySon-Huang commented Jan 20, 2023

Does Poco::JSON not support parsing "affected_options": null?

@CalvinNeo
Copy link
Member

CalvinNeo commented Jan 20, 2023

No, the regenerate_schema_map is missing.

...
 old_table_id = obj->getValue<Int64>("old_table_id");
 old_schema_id = obj->getValue<Int64>("old_schema_id");
 regenerate_schema_map = obj->getValue<bool>("regenerate_schema_map");
...

@JaySon-Huang
Copy link
Contributor

JaySon-Huang commented Jan 20, 2023

Got it. So it is introduced by #6563 which tries to get a field that is not always set in SchemaDiff.

@CalvinNeo
Copy link
Member

CalvinNeo commented Jan 20, 2023

Ok, so seem this is due to the TiDB version is too old in the test env:

  1. Low TiDB/TiFlash version
  2. Restart TiFlash
  3. Error happens when new TiFlash and old TiDB
  4. Restart TiDB

ywqzzy pushed a commit to ywqzzy/tiflash_1 that referenced this issue Feb 13, 2023
ywqzzy pushed a commit to ywqzzy/tiflash_1 that referenced this issue Feb 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/developing severity/major type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants