Tencent / flare

Flare是广泛投产于腾讯广告后台的现代化C++开发框架,包含了基础库、RPC、各种客户端等。主要特点为易用性强、长尾延迟低。
Other
1.33k stars 200 forks source link

Does the server example in the flare example support 1 thread start? #133

Closed Fin-chan closed 8 months ago

Fin-chan commented 1 year ago

./build64_release/flare/example/rpc/server --port=5510 --logtostderr --flare_concurrency_hint=1 --flare_enable_watchdog=true

I1020 15:56:15.628629 27869 flare/init.cc:114] Flare started. I1020 15:56:15.629772 27869 flare/fiber/runtime.cc:425] Using fiber scheduling profile [io-heavy]. I1020 15:56:15.629823 27869 flare/fiber/runtime.cc:220] Starting 1 worker threads per group, for a total of 1 groups. The system is treated as UMA. I1020 15:56:15.635567 27869 flare/init.cc:122] Flare runtime initialized.

Unable to start successfully

0x804d8000 commented 1 year ago

No. We suggest a minimum of 4 threads.

Internally one thread is reserved for event loop, so using a single thread would mean no spare thread for handling user requests.

Fin-chan commented 1 year ago

HI @0x804d8000 ,Now I added LTO and Asan compilation parameters, suspected memory leak, I want to use gdb single step debugging, is there a way to make flare example sever set to 1 thread for easy debugging?

0x804d8000 commented 1 year ago

I'm afraid not. However you may consider using gdb's scheduler-locking facility to ease debugging.

Fin-chan commented 8 months ago

I've fixed the GCC12 LTO fiber switching bug. Thx~