FiberError/NoMemoryError error related to csv gem occurs when upgrading from ruby 3.1 to 3.3
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start by comparing csv 3.2.5 and 3.2.8, especially commit acc05116c55579b78925dd27024969b9daf69135, and reproduce the reported FiberError, NoMemoryError, and CPU increase under Ruby 3.1.4 or 3.3.5. Done means identifying the regression and adding a fix or regression test showing that the affected CSV loading path no longer fails or causes the reported increase.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- Ruby
- Stars
- 220
- Forks
- 139
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 2
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ruby/csv
-
Unknown converter name is silently accepted and later fails with "undefined method 'arity' for nil"Open
Difficulty 2/5 1-3 hours Newbie friendliness 57/100
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
Timeout on WindowsMay be free again @kou claimed this 406 days ago, and no pull request is open. Open
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
Similar issues
-
🐛 bug 👩💻 équipe CE 🧑🏭 entreprises
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
betagouv/conseillers-entreprises#4808 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
yosiat/panko_serializer#250 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
cline/mcp-marketplace#3886 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100