Skip to content

Instantly share code, notes, and snippets.

@akitaonrails
Last active October 1, 2019 18:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save akitaonrails/f0cd567a39164447340bbbda24fa68d0 to your computer and use it in GitHub Desktop.
Save akitaonrails/f0cd567a39164447340bbbda24fa68d0 to your computer and use it in GitHub Desktop.
Unhandled exception: Cannot allocate new fiber stack: Cannot allocate memory (Errno)
GC Warning: Failed to expand heap by 2834432 bytes
GC Warning: Failed to expand heap by 790528 bytes
GC Warning: Out of Memory! Heap size: 5 MiB. Returning NULL!
Invalid memory access (signal 11) at address 0x60018
[0x5614ba5a4176] ???
[0x5614ba5a3e8f] __crystal_sigfault_handler +479
[0x7fd6dde91890] ???
[0x5614ba5931d5] ???
[0x5614ba59259b] ???
[0x5614ba591a06] ???
[0x5614ba587560] ???
[0x5614ba585272] ???
[0x5614ba59e5db] ???
[0x5614ba59cd15] ???
[0x5614ba583b42] main +50
[0x7fd6dd442b97] __libc_start_main +231
[0x5614ba57ff1a] _start +42
channel = Channel(Int32).new
n = 101_000
n.times do |_|
spawn do
sleep 0.001 # io block 1ms
channel.send 1
end
end
total = 0
n.times do
total += channel.receive
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment