[PATCH] D114846: [llvm] [Debuginfod] LLVM debuginfod server.

Noah Shutty via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 25 22:56:44 PDT 2022


noajshu added inline comments.


================
Comment at: llvm/tools/llvm-debuginfod/llvm-debuginfod.cpp:43
+static cl::opt<double>
+    ScanInterval("t", cl::init(10000),
+                 cl::desc("Number of seconds to wait between subsequent scans "
----------------
pcc wrote:
> phosek wrote:
> > 10000s is a long time between scans, elfutils defaults to 300s which I think would be better.
> If the server implements the following behavior, do we need a scan interval?
> 
> - If the build-id is not found by a local lookup, rescan immediately and look up the build-id again before returning 404.
> 
> - To protect against DoS attacks, do not rescan more frequently than once per N seconds (e.g. N = 30).
> 
> debuginfod does not have this behavior and it was somewhat of a pain point when using it for local development.
> 10000s is a long time between scans, elfutils defaults to 300s which I think would be better.

Thanks, will update this.

> If the server implements the following behavior, do we need a scan interval?

Thanks for this suggestion, this would be really nice for local development. I've just updated D114845 (which implements `DebuginfodCollection`) to support this behavior via `updateIfStale()`, though we still need to add the option here. It's not much trouble to support both periodic and on-demand update triggers, so perhaps we could allow the when-to-update behavior to be customized by the cl::opts.


================
Comment at: llvm/tools/llvm-debuginfod/llvm-debuginfod.cpp:43
+static cl::opt<double>
+    ScanInterval("t", cl::init(10000),
+                 cl::desc("Number of seconds to wait between subsequent scans "
----------------
noajshu wrote:
> pcc wrote:
> > phosek wrote:
> > > 10000s is a long time between scans, elfutils defaults to 300s which I think would be better.
> > If the server implements the following behavior, do we need a scan interval?
> > 
> > - If the build-id is not found by a local lookup, rescan immediately and look up the build-id again before returning 404.
> > 
> > - To protect against DoS attacks, do not rescan more frequently than once per N seconds (e.g. N = 30).
> > 
> > debuginfod does not have this behavior and it was somewhat of a pain point when using it for local development.
> > 10000s is a long time between scans, elfutils defaults to 300s which I think would be better.
> 
> Thanks, will update this.
> 
> > If the server implements the following behavior, do we need a scan interval?
> 
> Thanks for this suggestion, this would be really nice for local development. I've just updated D114845 (which implements `DebuginfodCollection`) to support this behavior via `updateIfStale()`, though we still need to add the option here. It's not much trouble to support both periodic and on-demand update triggers, so perhaps we could allow the when-to-update behavior to be customized by the cl::opts.
> 10000s is a long time between scans, elfutils defaults to 300s which I think would be better.




CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D114846/new/

https://reviews.llvm.org/D114846



More information about the llvm-commits mailing list