Hi Rob,
bgpdump versions before 1.5.0 had thread-safety issues due to use of
global variables. If you are still having issues with the latest
version, please open an issue on Github so we can look into the problem.
Thanks,
Colin
On 2023-11-28 03:11, Rob Ballantyne wrote:
Hi,
I’m running into memory access exceptions when using
bgpdump_free_memory().
I’m collecting an interval worth of BGPDUMP_ENTRYs (1 minute worth)
into buckets. After I have a bucket full I do a pairwise computation
(that can take some time) of just this buckets data on a thread (from
a pool) while the main thread moves onto the second bucket (and then
starts up potentially another thread on the second bucket). …
After the thread completes its summary statistics computation, it
goes to call bgpdump_free_memory() on each of the BGPDUMP_ENTRY.
I mutex lock so that only on thread will execute in
bgpdump_free_memory() at a time.
Are there restrictions (express or implied) on how to call
bgpdump_free_memory() whether multi-threaded or not?
BTW, if I run just a single thread it does seem to work just fine.
Thanks,
Rob