Skip to content

Instantly share code, notes, and snippets.

@Ragmaanir
Last active March 16, 2016 20:48
Show Gist options
  • Save Ragmaanir/000bfd47e22448fa2a17 to your computer and use it in GitHub Desktop.
Save Ragmaanir/000bfd47e22448fa2a17 to your computer and use it in GitHub Desktop.
I, [2016-03-16 21:44:20 +0100 #7146] INFO -- : stylus
I, [2016-03-16 21:44:20 +0100 #7146] INFO -- : server
Invalid memory access (signal 11) at address 0x7f05532d9000
[4388389] *CallStack::print_backtrace:Int32 +117
[4365976] __crystal_sigfault_handler +56
[4517304] sigfault_handler +40
[139660930896704] ???
[4619738] GC_push_all_eager +94
[4455361] *Fiber#push_gc_roots<Fiber>:Void +17
[4365742] ~proc( -> Nil) +126
[4625053] GC_push_roots +283
[4610206] GC_mark_some +583
[4668345] GC_stopped_mark +296
[4667409] GC_try_to_collect_inner +317
[4672872] GC_collect_or_expand +235
[4600037] GC_alloc_large +208
[4601368] GC_generic_malloc +373
[4602348] GC_core_malloc +350
[4647509] GC_malloc +148
[4604165] GC_generic_or_special_malloc +72
[4604698] GC_realloc +484
[4364232] __crystal_realloc +8
[4458943] *Pointer(Fiber) +31
[4458073] *Array(Fiber) +41
[4458012] *Array(Fiber) +60
[4457915] *Array(Fiber) +27
[4457827] *Array(Fiber) +19
[4457798] *Array(Fiber) +6
[4468650] *IO::FileDescriptor#wait_readable<IO::FileDescriptor>:Nil +42
[4468306] *IO::FileDescriptor#unbuffered_read<IO::FileDescriptor, Slice(UInt8)>:Int64 +242
[4468812] *IO::FileDescriptor +76
[4467893] *IO::FileDescriptor +181
[4471581] *Event::SignalHandler#run<Event::SignalHandler>:Nil +125
[4367014] ~proc( -> Void) +22
[4456488] *Fiber#run<Fiber>:Nil +232
[4365878] ~proc(Fiber -> Nil) +6
[0] ???
I, [2016-03-16 21:44:37 +0100 #7327] INFO -- : stylus
I, [2016-03-16 21:44:37 +0100 #7327] INFO -- : server
I, [2016-03-16 21:44:37 +0100 #7327] INFO -- : server
I, [2016-03-16 21:44:37 +0100 #7327] INFO -- : server
I, [2016-03-16 21:44:42 +0100 #7327] INFO -- : stylus
I, [2016-03-16 21:44:47 +0100 #7327] INFO -- : stylus
NOTE: even though the script contains sleep statements, the output of e.g. the first three "server" string is without any delay.
I, [2016-03-16 21:45:06 +0100 #7506] INFO -- : stylus
I, [2016-03-16 21:45:06 +0100 #7506] INFO -- : server
I, [2016-03-16 21:45:11 +0100 #7506] INFO -- : server
I, [2016-03-16 21:45:11 +0100 #7506] INFO -- : stylus
I, [2016-03-16 21:45:16 +0100 #7506] INFO -- : server
NOTE: hangs
require "logger"
l = Logger.new(STDOUT)
stylus = Thread.new do
3.times do
l.info "stylus"
sleep 5
end
end
server = Thread.new do
3.times do
l.info "server"
sleep 5
end
end
[stylus, server].each(&.join)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment