# [Critical Bug] 当部署 TiKV 在 linux 内核的机器上而且内核的 patch 版本大于 255, TiKV 就会 panic

## Issue

<https://github.com/eminence/procfs/issues/136>

<https://github.com/tikv/tikv/issues/11702>

<https://github.com/tikv/tikv/issues/10997>

<https://github.com/tikv/tikv/pull/11458>

<https://github.com/tikv/tikv/pull/11703>

## Root Cause

TiKV 的一个依赖库 `procfs` 有一个 bug ([https://github.com/eminence/procfs/issues/136](https://github.com/eminence/procfs/issues/136) ) 会解析内核 patch 版本为一个 u8 整数并直接 unwrap 解析结果，当内核 patch 版本超过 u8 的最大值 255 时，解析结果会是一个 error, 直接 unwrap error 会导致 panic

Diagnostic Steps
如果部署 TiKV 在 linux 内核的机器上而且内核的 patch 版本大于 255, 比如在这样的机器上部署新集群或者扩容 TiKV，TiKV 会因为 panic 而无法启动.

* With the linux kernel where the kernel patch version (like 256 in 4.14.256-197.484.amzn2.x86_64) is greater than 255

## Resolution

升级到版本 v4.0.17, v5.0.7, v5.1.4, v5.2.4

## Workaround

部署 TiKV 至 linux 内核 patch 版本小于 255 的机器

或降级机器的 linux 内核版本至 patch 版本小于 255 的版本
