# OS错误：[Errno 84] 访问数据集缓存时链接过多

- **ID:** `huggingface/dataset-cache-corruption`
- **领域:** huggingface
- **类别:** system_error
- **错误码:** `84`
- **验证级别:** ai_generated
- **修复率:** 85%

## 根因

Hugging Face数据集库在缓存目录中创建了大量符号链接，超过了文件系统的最大链接数（ext4上通常为32000）。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| datasets>=2.10.0 | active | — | — |
| transformers>=4.25.0 | active | — | — |

## 解决方案

1. ```
   Clear the entire datasets cache using datasets.set_caching_enabled(False) or remove the cache directory.
   ```
2. ```
   Set HF_DATASETS_CACHE to a filesystem with higher link limits (e.g., tmpfs or XFS).
   ```
3. ```
   Use streaming mode to avoid caching entirely.
   ```

## 无效尝试

- **** — Individual file deletion does not reduce the symlink count sufficiently; entire cache tree must be removed. (80% 失败率)
- **** — Reinstallation does not affect the existing cache directory structure. (95% 失败率)
