Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Segmentation fault at 0x00007fa2dba4b000 #266

Closed
ioquatix opened this issue Feb 4, 2020 · 16 comments
Closed

[BUG] Segmentation fault at 0x00007fa2dba4b000 #266

ioquatix opened this issue Feb 4, 2020 · 16 comments

Comments

@ioquatix
Copy link

@ioquatix ioquatix commented Feb 4, 2020

It only happens with RubyProf running.

koyoko% ./multi-client.rb -c 10000
146.96 connection/s [                                                                                                                                           ] 1/10000 ( 1s/ 0s) 0.22s     info: Command [oid=0x320] [pid=799239] [2020-02-04 20:11:12 +1300]
               | GC.start duration=0.0s GC.count=27
239.84 connection/s [=====                                                                                                                                    ] 366/10000 (39s/ 1s)/home/samuel/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/async-io-1.27.3/lib/async/io/buffer.rb:35: [BUG] Segmentation fault at 0x00007fa2dba4b000
ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux]

-- Control frame information -----------------------------------------------
c:0024 p:0004 s:0138 e:000136 METHOD /home/samuel/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/async-io-1.27.3/lib/async/io/buffer.rb:35
c:0023 p:0007 s:0132 e:000131 METHOD /home/samuel/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/async-io-1.27.3/lib/async/io/stream.rb:169
c:0022 p:0007 s:0127 e:000126 METHOD /home/samuel/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/protocol-http2-0.10.4/lib/protocol/http2/frame.rb:191
c:0021 p:0068 s:0122 e:000121 METHOD /home/samuel/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/protocol-http2-0.10.4/lib/protocol/http2/frame.rb:203
c:0020 p:0006 s:0117 e:000116 METHOD /home/samuel/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/protocol-http2-0.10.4/lib/protocol/http2/continuation_frame.rb:59
c:0019 p:0007 s:0111 e:000110 METHOD /home/samuel/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/protocol-http2-0.10.4/lib/protocol/http2/framer.rb:105
c:0018 p:0030 s:0106 e:000105 BLOCK  /home/samuel/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/protocol-http2-0.10.4/lib/protocol/http2/stream.rb:243
c:0017 p:0005 s:0101 e:000100 METHOD /home/samuel/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/protocol-http2-0.10.4/lib/protocol/http2/connection.rb:251
c:0016 p:0005 s:0097 e:000096 BLOCK  /home/samuel/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/async-http-0.50.2/lib/async/http/protocol/http2/connection.rb:85
c:0015 p:0022 s:0094 e:000093 METHOD /home/samuel/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/async-1.24.2/lib/async/semaphore.rb:80
c:0014 p:0006 s:0090 e:000089 METHOD /home/samuel/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/async-http-0.50.2/lib/async/http/protocol/http2/connection.rb:84
c:0013 p:0027 s:0085 e:000084 METHOD /home/samuel/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/protocol-http2-0.10.4/lib/protocol/http2/stream.rb:238
c:0012 p:0016 s:0077 e:000076 METHOD /home/samuel/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/protocol-http2-0.10.4/lib/protocol/http2/stream.rb:252
c:0011 p:0187 s:0071 e:000070 METHOD /home/samuel/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/async-http-0.50.2/lib/async/http/protocol/http2/response.rb:207
c:0010 p:0051 s:0062 e:000061 METHOD /home/samuel/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/async-http-0.50.2/lib/async/http/protocol/http2/client.rb:54
c:0009 p:0005 s:0056 e:000055 METHOD /home/samuel/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/protocol-http-0.13.1/lib/protocol/http/request.rb:53
c:0008 p:0006 s:0051 e:000050 METHOD /home/samuel/Documents/socketry/async-websocket/lib/async/websocket/connect_request.rb:99
c:0007 p:0065 s:0045 e:000044 METHOD /home/samuel/Documents/socketry/async-websocket/lib/async/websocket/request.rb:56
c:0006 p:0071 s:0040 e:000039 METHOD /home/samuel/Documents/socketry/async-websocket/lib/async/websocket/client.rb:95
c:0005 p:0013 s:0024 e:000022 BLOCK  ./multi-client.rb:64 [FINISH]
c:0004 p:---- s:0018 e:000017 CFUNC  :times
c:0003 p:0043 s:0014 E:000630 BLOCK  ./multi-client.rb:63
c:0002 p:0012 s:0009 e:000008 BLOCK  /home/samuel/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/async-1.24.2/lib/async/task.rb:258 [FINISH]
c:0001 p:---- s:0003 e:000002 (none) [FINISH]

There seem to be issues running with RubyProf.

I'll try to figure out what is going wrong.

@ioquatix
Copy link
Author

@ioquatix ioquatix commented Feb 4, 2020

-- C level backtrace information -------------------------------------------
/home/samuel/.rbenv/versions/2.7.0/lib/libruby.so.2.7(rb_vm_bugreport+0x573) [0x7fa2e8d9d4c3] vm_dump.c:755
[0x7fa2e8bc5557]
/home/samuel/.rbenv/versions/2.7.0/lib/libruby.so.2.7(sigsegv+0x49) [0x7fa2e8cfc269] signal.c:946
/usr/lib/libpthread.so.0(__restore_rt+0x0) [0x7fa2e8a5d930]
/home/samuel/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/ruby-prof-1.2.0/lib/ruby_prof.so(prof_frame_unpause+0x0) [0x7fa2e4cc9fe0] rp_stack.c:71
/home/samuel/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/ruby-prof-1.2.0/lib/ruby_prof.so(prof_frame_unpause) (null):0
/home/samuel/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/ruby-prof-1.2.0/lib/ruby_prof.so(prof_frame_push+0xb6) [0x7fa2e4cca0d6] rp_stack.c:118
/home/samuel/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/ruby-prof-1.2.0/lib/ruby_prof.so(prof_event_hook+0x487) [0x7fa2e4cc8c17] rp_profile.c:309
/home/samuel/.rbenv/versions/2.7.0/lib/libruby.so.2.7(tp_call_trace+0x29) [0x7fa2e8d9df29] vm_trace.c:1105
/home/samuel/.rbenv/versions/2.7.0/lib/libruby.so.2.7(exec_hooks_body+0x86) [0x7fa2e8d9e0c6] vm_trace.c:295
/home/samuel/.rbenv/versions/2.7.0/lib/libruby.so.2.7(exec_hooks_protected+0xb3) [0x7fa2e8d9e943] vm_trace.c:342
[0x7fa2e8da001a]
[0x7fa2e8d76414]
[0x7fa2e8d835d3]
[0x7fa2e8d89a54]
/home/samuel/.rbenv/versions/2.7.0/lib/libruby.so.2.7(rb_yield_1+0x2eb) [0x7fa2e8d8d11b] vm.c:1044
/home/samuel/.rbenv/versions/2.7.0/lib/libruby.so.2.7(int_dotimes+0x50) [0x7fa2e8c5cd20] numeric.c:5201
[0x7fa2e8d761dc]
[0x7fa2e8d8ae9b]
[0x7fa2e8d8368d]
[0x7fa2e8d8926c]
/home/samuel/.rbenv/versions/2.7.0/lib/libruby.so.2.7(rb_vm_invoke_proc+0x292) [0x7fa2e8d8e5c2] vm.c:1044
[0x7fa2e8b995e0]
/home/samuel/.rbenv/versions/2.7.0/lib/libruby.so.2.7(fiber_entry+0x9) [0x7fa2e8b99d09] cont.c:693
@cfis
Copy link
Member

@cfis cfis commented Feb 10, 2020

Is this reproducible? Could I see the multiclient code?

@ioquatix
Copy link
Author

@ioquatix ioquatix commented Feb 10, 2020

Yes, use this tag:

https://github.com/socketry/async-websocket/blob/v0.13.0/examples/chat/multi-client.rb

Enable the profiling code that's commented out.

In another tab, run ./config.ru for the server.

@ioquatix
Copy link
Author

@ioquatix ioquatix commented Feb 11, 2020

Could you reproduce the issue?

@cfis
Copy link
Member

@cfis cfis commented Feb 11, 2020

Yes. But annoyingly not in a debugger yet.

@cfis
Copy link
Member

@cfis cfis commented Feb 22, 2020

Ok, finally got back to this but unfortunately I can no longer reproduce it. This is on Fedora 31.

@cfis
Copy link
Member

@cfis cfis commented Feb 22, 2020

Could you try with ruby-prof 1.3?

@cfis
Copy link
Member

@cfis cfis commented Mar 12, 2020

Ping.

@ioquatix
Copy link
Author

@ioquatix ioquatix commented Mar 12, 2020

@cfis still reproducible as per above, here is backtrace:

koyoko% ./multi-client.rb
295.46 connection/s [========================================================                                                             ] 480/1000 ( 1s/ 1s)/home/samuel/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/async-1.24.2/lib/async/task.rb:59: [BUG] Segmentation fault at 0x00007fb186a90000
ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux]

-- Control frame information -----------------------------------------------
c:0006 p:0003 s:0029 e:000027 METHOD /home/samuel/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/async-1.24.2/lib/async/task.rb:59
c:0005 p:0032 s:0023 e:000022 METHOD /home/samuel/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/async-1.24.2/lib/async/condition.rb:40
c:0004 p:0009 s:0018 e:000017 METHOD /home/samuel/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/async-1.24.2/lib/async/queue.rb:47
c:0003 p:0021 s:0014 E:0026a0 BLOCK  ./multi-client.rb:46
c:0002 p:0012 s:0009 e:000008 BLOCK  /home/samuel/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/async-1.24.2/lib/async/task.rb:258 [FINISH]
c:0001 p:---- s:0003 e:000002 (none) [FINISH]

-- Ruby level backtrace information ----------------------------------------
/home/samuel/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/async-1.24.2/lib/async/task.rb:258:in `block in make_fiber'
./multi-client.rb:46:in `block (2 levels) in call'
/home/samuel/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/async-1.24.2/lib/async/queue.rb:47:in `dequeue'
/home/samuel/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/async-1.24.2/lib/async/condition.rb:40:in `wait'
/home/samuel/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/async-1.24.2/lib/async/task.rb:59:in `yield'

-- Machine register context ------------------------------------------------
 RIP: 0x00007fb18fc03150 RBP: 0x0000000000000000 RSP: 0x00007fb19107a908
 RAX: 0x0000000000000001 RBX: 0x000055bee43b8d90 RCX: 0x000055beda45bdc0
 RDX: 0x000055beda7d11c0 RDI: 0x00007fb186a8ffc8 RSI: 0x0000000000000002
  R8: 0x00007fb17c6df000  R9: 0x00007fb186a00000 R10: 0x0000000000000001
 R11: 0x0000000000000246 R12: 0x00007fb17c76f010 R13: 0x00007fb186a8ffc8
 R14: 0x000055bed9f659f0 R15: 0x000055bee43b8c70 EFL: 0x0000000000010202

-- C level backtrace information -------------------------------------------
/home/samuel/.rbenv/versions/2.7.0/lib/libruby.so.2.7(rb_vm_bugreport+0x573) [0x7fb193ccb4c3] vm_dump.c:755
/home/samuel/.rbenv/versions/2.7.0/lib/libruby.so.2.7(rb_bug_for_fatal_signal+0xe7) [0x7fb193af3557] error.c:658
/home/samuel/.rbenv/versions/2.7.0/lib/libruby.so.2.7(sigsegv+0x49) [0x7fb193c2a269] signal.c:946
/usr/lib/libpthread.so.0(__restore_rt+0x0) [0x7fb19398a800]
/home/samuel/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/ruby-prof-1.3.0/lib/ruby_prof.so(prof_frame_unpause+0x0) [0x7fb18fc03150] rp_stack.c:71
/home/samuel/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/ruby-prof-1.3.0/lib/ruby_prof.so(prof_frame_unpause) (null):0
/home/samuel/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/ruby-prof-1.3.0/lib/ruby_prof.so(prof_frame_push+0xb6) [0x7fb18fc03246] rp_stack.c:118
/home/samuel/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/ruby-prof-1.3.0/lib/ruby_prof.so(prof_event_hook+0x498) [0x7fb18fc028d8] rp_profile.c:314
/home/samuel/.rbenv/versions/2.7.0/lib/libruby.so.2.7(tp_call_trace+0x29) [0x7fb193ccbf29] vm_trace.c:1105
/home/samuel/.rbenv/versions/2.7.0/lib/libruby.so.2.7(exec_hooks_body+0x86) [0x7fb193ccc0c6] vm_trace.c:295
/home/samuel/.rbenv/versions/2.7.0/lib/libruby.so.2.7(exec_hooks_protected+0xb3) [0x7fb193ccc943] vm_trace.c:342
/home/samuel/.rbenv/versions/2.7.0/lib/libruby.so.2.7(rb_exec_event_hooks+0x6a) [0x7fb193cce01a] vm_trace.c:386
/home/samuel/.rbenv/versions/2.7.0/lib/libruby.so.2.7(rb_exec_event_hook_orig+0x36) [0x7fb193ca4414] vm_core.h:1926
/home/samuel/.rbenv/versions/2.7.0/lib/libruby.so.2.7(vm_call_cfunc_with_frame) vm_insnhelper.c:2505
/home/samuel/.rbenv/versions/2.7.0/lib/libruby.so.2.7(vm_call_cfunc) vm_insnhelper.c:2539
/home/samuel/.rbenv/versions/2.7.0/lib/libruby.so.2.7(vm_sendish+0x96) [0x7fb193cb15d3] vm_insnhelper.c:4023
/home/samuel/.rbenv/versions/2.7.0/lib/libruby.so.2.7(vm_exec_core) insns.def:801
/home/samuel/.rbenv/versions/2.7.0/lib/libruby.so.2.7(rb_vm_exec+0x16c) [0x7fb193cb726c] vm.c:1920
/home/samuel/.rbenv/versions/2.7.0/lib/libruby.so.2.7(invoke_iseq_block_from_c+0x211) [0x7fb193cbc5c2] vm.c:1044
/home/samuel/.rbenv/versions/2.7.0/lib/libruby.so.2.7(invoke_block_from_c_proc) vm.c:1216
/home/samuel/.rbenv/versions/2.7.0/lib/libruby.so.2.7(vm_invoke_proc) vm.c:1238
/home/samuel/.rbenv/versions/2.7.0/lib/libruby.so.2.7(rb_vm_invoke_proc) vm.c:1259
/home/samuel/.rbenv/versions/2.7.0/lib/libruby.so.2.7(rb_fiber_start+0x1b0) [0x7fb193ac75e0] cont.c:1816
/home/samuel/.rbenv/versions/2.7.0/lib/libruby.so.2.7(fiber_entry+0x9) [0x7fb193ac7d09] cont.c:693
@cfis
Copy link
Member

@cfis cfis commented Mar 12, 2020

Bummer. Thanks for checking.

@cfis
Copy link
Member

@cfis cfis commented May 11, 2020

Ok, finally had a chance to look at this again. I can now reproduce the issue and after a fair bit of digging realized its caused by the merge fiber code. Its causing ruby-prof to mix the stacks of two different fibers, causing ruby-prof's internal stack to grow and grow until it crashes. Next, need to work out a solution.

@ioquatix
Copy link
Author

@ioquatix ioquatix commented May 12, 2020

Great effort figuring out what is going wrong.

@cfis
Copy link
Member

@cfis cfis commented May 12, 2020

Ok, my conclusion is merge_fibers is a bad idea. As you know, Ruby executes code via fibers, with there being one or more fibers per thread, with each fiber maintaining its own call stack.

By default ruby-prof maintains its own internal call stack per fiber. The way that merge_fibers works is it instead tells ruby-prof to maintain a call stack per thread. The point of merge_fibers it to make result more readable, but even in the simplest cases the results aren't correct. For example if you profile this method:

  def fiber_yield_resume
    fiber = Fiber.new do
              Fiber.yield 1
              Fiber.yield 2
            end

    fiber.resume
    fiber.resume
  end

The with merge_fiber false you'll get this (hopefully correct) result:

Thread ID: 1300
Fiber ID: 1280
Total Time: 5.9399986639618874e-05
Sort by: total_time

  %total   %self      total       self       wait      child            calls     name                          location
------------------------------------------------------------------------------------------------------------------------------------------------------
 100.00%  14.14%      0.000      0.000      0.000      0.000                1     FiberTest#test_fiber_resume    D:/src/ruby-prof/test/fiber_test.rb:286
                      0.000      0.000      0.000      0.000              1/1     FiberTest#fiber_yield_resume
------------------------------------------------------------------------------------------------------------------------------------------------------
                      0.000      0.000      0.000      0.000              1/1     FiberTest#test_fiber_resume
  85.86%  12.79%      0.000      0.000      0.000      0.000                1     FiberTest#fiber_yield_resume   D:/src/ruby-prof/test/fiber_test.rb:33
                      0.000      0.000      0.000      0.000              2/2     Fiber#resume
                      0.000      0.000      0.000      0.000              1/1     Class#new
------------------------------------------------------------------------------------------------------------------------------------------------------
                      0.000      0.000      0.000      0.000              2/2     FiberTest#fiber_yield_resume
  57.58%  23.57%      0.000      0.000      0.000      0.000                2     Fiber#resume                   
------------------------------------------------------------------------------------------------------------------------------------------------------
                      0.000      0.000      0.000      0.000              1/1     FiberTest#fiber_yield_resume
  15.49%   8.08%      0.000      0.000      0.000      0.000                1     Class#new                      
                      0.000      0.000      0.000      0.000              1/1     Fiber#initialize
------------------------------------------------------------------------------------------------------------------------------------------------------
                      0.000      0.000      0.000      0.000              1/1     Class#new
   7.41%   7.41%      0.000      0.000      0.000      0.000                1     Fiber#initialize               

* recursively called methods

Measure Mode: wall_time
Thread ID: 1300
Fiber ID: 1320
Total Time: 2.519995905458927e-05
Sort by: total_time

  %total   %self      total       self       wait      child            calls     name                          location
------------------------------------------------------------------------------------------------------------------------------------------------------
 100.00%  59.13%      0.000      0.000      0.000      0.000                1     FiberTest#fiber_yield_resume   D:/src/ruby-prof/test/fiber_test.rb:35
                      0.000      0.000      0.000      0.000              2/2     <Class::Fiber>#yield
------------------------------------------------------------------------------------------------------------------------------------------------------
                      0.000      0.000      0.000      0.000              2/2     FiberTest#fiber_yield_resume
  40.87%  21.03%      0.000      0.000      0.000      0.000                2     <Class::Fiber>#yield

But if you merge fibers, you'll get this incorrect result:

Measure Mode: wall_time
Thread ID: 1300
Fiber ID: 1300
Total Time: 7.54999928176403e-05
Sort by: total_time

  %total   %self      total       self       wait      child            calls     name                          location
------------------------------------------------------------------------------------------------------------------------------------------------------
 100.00%  10.73%      0.000      0.000      0.000      0.000                1     FiberTest#test_fiber_resume2   D:/src/ruby-prof/test/fiber_test.rb:296
                      0.000      0.000      0.000      0.000              1/1     FiberTest#fiber_yield_resume
------------------------------------------------------------------------------------------------------------------------------------------------------
                      0.000      0.000      0.000      0.000              1/1     FiberTest#test_fiber_resume2
  89.27%  10.86%      0.000      0.000      0.000      0.000                1     FiberTest#fiber_yield_resume   D:/src/ruby-prof/test/fiber_test.rb:33
                      0.000      0.000      0.000      0.000              1/1     Class#new
                      0.000      0.000      0.000      0.000              1/2     Fiber#resume
------------------------------------------------------------------------------------------------------------------------------------------------------
                      0.000      0.000      0.000      0.000              1/1     FiberTest#fiber_yield_resume
  44.24%   5.83%      0.000      0.000      0.000      0.000                1     Class#new                      
                      0.000      0.000      0.000      0.000              1/1     Fiber#initialize
------------------------------------------------------------------------------------------------------------------------------------------------------
                      0.000      0.000      0.000      0.000              1/1     Class#new
  38.41%  38.41%      0.000      0.000      0.000      0.000                1     Fiber#initialize               
------------------------------------------------------------------------------------------------------------------------------------------------------
                      0.000      0.000      0.000      0.000              1/2     Fiber#resume
                      0.000      0.000      0.000      0.000              1/2     FiberTest#fiber_yield_resume
  34.17%  27.55%      0.000      0.000      0.000      0.000                2    *Fiber#resume                   
                      0.000      0.000      0.000      0.000              2/2     <Class::Fiber>#yield
                      0.000      0.000      0.000      0.000              1/2     Fiber#resume
------------------------------------------------------------------------------------------------------------------------------------------------------
                      0.000      0.000      0.000      0.000              2/2     Fiber#resume
   6.62%   6.62%      0.000      0.000      0.000      0.000                2     <Class::Fiber>#yield           

* recursively called methods

Notice that now ruby-prof thinks the calls are recursive (they are not) and resume calls yield (it does not, its two different fibers).

So the obvious solution is take out merge fiber functionality. I am sympathetic to the problem that makes results harder to read, but that's better than incorrect results (or in real world cases crashes). If you look at the fiber_test.rb cases, and really look at the results, you'll also see they are incorrect.

Perhaps there is a way to merge the results together in Ruby after profiling is done?

@ioquatix
Copy link
Author

@ioquatix ioquatix commented May 12, 2020

Perhaps there is a way to merge the results together in Ruby after profiling is done?

That would make sense to me.

The point is, some users will want to merge threads, fibers, etc. They don't care how the function was called, just that it was, and how much of an impact it had on the performance of the application.

Falcon could literally spawn 10,000 or more fibers. So, I assume you will print one report per fiber? But that's not enough data to draw any meaningful conclusions.

@cfis
Copy link
Member

@cfis cfis commented May 12, 2020

Well 1 report, but 10,000 sections. So not helpul.

In the case of Falcon, are those fibers all workers that start with the same top level method and then will end up calling different methods depending on the incoming request? So the same idea as a thread pool in other webservers?

If that's the case, where all the fibers (or threads) have the same root method, then it seems possible to to merge the various call trees together. So maybe some flag called merge_results that would do that?

@ioquatix
Copy link
Author

@ioquatix ioquatix commented May 12, 2020

That's often the case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.