Running TiDB in a virtual machine on Windows, both Dumpling backup and TiDB-Lightning data recovery work fine, but there are various errors when running directly on a physical Linux machine, even though the system images are the same

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: tidb在windows下跑虚拟机安装,dumpling备份和tidb-lightning恢复数据都正常,但是直接在物理机的linux下就各种报错,系统镜像都是一样的。

| username: TiDBer_FMAyvWEp

[TiDB Usage Environment] Production Environment / Testing / PoC
[TiDB Version]
[Reproduction Path] Running TiDB on a virtual machine under Windows, both dumpling backup and tidb-lightning data recovery work fine, but running directly on a physical Linux machine results in various errors, even though the system images are the same.
[Encountered Issues: Problem Phenomenon and Impact] Sometimes TiKV goes down and gets disconnected for no apparent reason, which is confusing.
[Resource Configuration] Go to TiDB Dashboard - Cluster Info - Hosts and take a screenshot of this page
[Attachments: Screenshots / Logs / Monitoring]
SIGILL: illegal instruction
[FATAL] [server.rs:1037] [“failed to start node: Engine(Other("[components/raftstore/src/store/fsm/store.rs:1320]: \"[components/raftstore/src/store/entry_storage.rs:557]: [region 8] entry at apply index 4643 doesn’t exist, may lose data.\""))”] [thread_id=1]

| username: zhaokede | Original post link

Compare the configurations to see if the parameters are exactly the same.

| username: TiDBer_FMAyvWEp | Original post link

They were all deployed using the same tutorial, and the commands executed were the same.

| username: zhaokede | Original post link

Flag: Illegal instruction. Startup failed, index entry 4643 does not exist, data may be lost;
Did this happen suddenly?

| username: 像风一样的男子 | Original post link

What CPU? Is it incompatible?

| username: TiDBer_FMAyvWEp | Original post link

CPU: AMD R9 7900X
Motherboard: MSI

| username: TiDBer_FMAyvWEp | Original post link

Yes, it is possible that the failure occurred while running tidb-lightning to restore data, which caused a certain tikv to fail, leading to tidb being unable to start.

| username: TiDBer_FMAyvWEp | Original post link

This is the latest error when running tidb-lightning.

| username: zhanggame1 | Original post link

Are the files of the restored data backup the same?

| username: TiDBer_FMAyvWEp | Original post link

The backup files restored on the virtual machine and the physical machine are different. Both sides used dumpling for backup first, and then ran tidb-lightning to restore the data. The virtual machine is normal, but the physical machine reports various errors.

| username: zhaokede | Original post link

The virtual machine is functioning normally. Try backing up the database from the virtual machine and restoring it to the physical machine’s database to test if it works correctly.

| username: zhanggame1 | Original post link

Well, it is also possible that there is an issue with the backup file.

| username: ziptoam | Original post link

I tried running it under WSL on Windows, and it feels pretty good.

| username: zhaokede | Original post link

The server configuration is quite good; otherwise, it might not be able to run.

| username: TiDBer_FMAyvWEp | Original post link

I don’t know how the performance of running TiDB on a virtual machine under Windows will be, and whether it will be much worse. The main issue is that there are many inexplicable problems when running on a physical machine. I have tried several Linux distributions for installation and operation, but restoring data has always been problematic and unsuccessful, which has made me lose confidence in running it on a physical machine. The key issue is that some problems may be irreparable once they occur, and it would be troublesome if data is lost.

| username: vincentLi | Original post link

I understand that the image only ensures the consistency of the image script and does not guarantee the consistency of the host environment, right? Is it possible that the host system is missing some libraries or the library versions are incorrect?