wudisheng commented on issue #1860: URL: https://github.com/apache/incubator-brpc/issues/1860#issuecomment-1197675018
> This issue may be related to #1693. Although we have removed the `__const__` attribute of __errno_location(), but powerful link time optimization may still cache the tls errno location ? BTW-1: I also observed once that before `return nr` in `pappend_from_file_descriptor()`, `errno` is non-zero, but immediately in the outer callsite `errno` become zero. I couldn't find the corresponding debugging log at this time, but it sounds like LTO does collapse something around `errno`. BTW-2: During my investigation, I also tried using Clang-15 (instead of Clang-12) with exactly the same building configurations, then I observed a different coredump saying something like "bthread sched_to itself" or so, so it seems LTO may really break something in BRPC code base. BTW-3: About half a year ago, when we are using 0.9.7, I roughly tested LTO capabilities once and BRPC wasn't a block at that time (the service behaves correctly online at a benefited performance). Currently I have switched to a building mode that everything but BRPC in the entire dependency graph is built with ThinLTO, and the binary can be started without an immediate coredump (whether it behaves correctly may need a longer verification procedure). Let me know if you need any further context from my scenario. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
