FiberError/NoMemoryError error related to csv gem occurs when upgrading from ruby ​​3.1 to 3.3

未关闭
#326 8 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
ruby
领域
data

调研方向

首先比较 csv 3.2.5 和 3.2.8,尤其是提交 acc05116c55579b78925dd27024969b9daf69135,并在 Ruby 3.1.4 或 3.3.5 下复现报告的 FiberError、NoMemoryError 和 CPU 增加。完成的标准是确定该回归,并添加修复或回归测试,以表明受影响的 CSV 加载路径不再失败或导致报告的增加。

由索引模型根据 Issue 内容生成。

描述

When upgrading from ruby 3.1.4 to 3.3.5, FiberError/NoMemoryError error related to csv occurred in our system. In addition, when loading csv file, CPU load also increases compared to before.

  • FiberError: can't alloc machine stack to fiber (1 x 659456 bytes): Cannot allocate memory error
  • NoMemoryError: failed to allocate memory

After investigation we found the cause. It was caused by csv gem. When upgrading ruby ​​version, csv version is also updated (from 3.2.5 to 3.2.8)
Even if we try to keep ruby ​​3.1.4 and only update csv gem to 3.2.8, the FiberError/NoMemoryError error will still occur
We have upgraded ruby ​​3.3.5 and kept the csv gem version 3.2.5 (same as ruby ​​version 3.1.4) and FiberError/NoMemoryError didn't occur and CPU load also didn't increase

It seems that some changes from csv 3.2.5 to 3.2.8 caused the error. This commit of csv gem is very suspicious

主要语言
Ruby
星标
218
派生
135
平均合并
15 小时 40 分钟
30 天内合并 PR
1

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

ruby/csv 的其他 Issue

查看 ruby/csv 的全部 Issue

相似的 Issue

更多 Ruby Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。