[Bro] Creating new Val() in multi-threaded bro

Christian Kreibich christian at whoop.org
Mon Apr 23 15:55:54 PDT 2007


On Mon, 2007-04-23 at 01:43 +0530, Yuppie wrote:
> Bro Gurus,
> I'm trying to make Bro run multi-threaded... so wanted to ask if you
> guys have any experience with that. First of all, is Bro written to be
> multi-threaded?

Not currently, no.

> If not, can you guys point me to the places which
> would need some work to make it multi-threaded. Apparently with the
> complex interplay of data structures, it is hard to find those. I have
> fixed one such place in Type.cc in:
> BroType* base_type(TypeTag tag)
> where it was using a static base_types array. There may more lurking
> elsewhere, which I haven't been able to find.
> Esp, I'm facing this issue, where I'm trying to create a new Val()
> object and bro coredumps in one of the threads.

There are surely many places in the code in which static variables may
collide with multi-threaded operation. There will also be a number of
synchronization issues. The real question is what you are actually
trying to achieve, so you can adjust the architecture to run the
relevant tasks in separate threads. This may be non-trivial. That said,
it would clearly be interesting to parallelize the operation of
individual analyzers, for example.


More information about the Bro mailing list