leizongmin / leizongmin/node-segment

Out of memory

Open
#35 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1.2k
Forks
132
PR merge metrics
No merged PRs in 30d

Description

0: ExitFrame [pc: 0x2cd055041bd]

Security context: 0x3c146121e6c9
1: push [0x3c1461205449](this=0x3c14e6e825a1 <JSArray[1210033]>,0x3c14ed885719 <JSArray[48]>)
2: getChunks(aka getChunks) [0x3c143f66a319] [/Users/jim/Share/lab/gui/awtk/awtk/tools/word_gen/node_modules/segment/lib/module/DictTokenizer.js:~277] [pc=0x2cd05a10c20](this=0x3c1472f022e1 ,wordpos=0x3c1470b02311 ,pos=...

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 0x100033c31 node::Abort() [/usr/local/bin/node]
2: 0x1000353ea node::FatalTryCatch::~FatalTryCatch() [/usr/local/bin/node]
3: 0x10019bc9a v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/usr/local/bin/node]
4: 0x10056a072 v8::internal::Heap::FatalProcessOutOfMemory(char const*) [/usr/local/bin/node]
5: 0x100569029 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [/usr/local/bin/node]
6: 0x100566cb8 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/usr/local/bin/node]
7: 0x1005659c8 v8::internal::Heap::HandleGCRequest() [/usr/local/bin/node]
8: 0x100519708 v8::internal::StackGuard::HandleInterrupts() [/usr/local/bin/node]
9: 0x1007caf01 v8::internal::Runtime_StackGuard(int, v8::internal::Object**, v8::internal::Isolate*) [/usr/local/bin/node]
10: 0x2cd055041bd
11: 0x2cd05a51454

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Node.js heap failure and inspect getChunks in tools/word_gen/node_modules/segment/lib/module/DictTokenizer.js around line 277. Determine which input or operation causes the large JS arrays and heap exhaustion; done means the reported processing no longer terminates with an out-of-memory error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.