Issues installing Bro 2.0-B on FreeBSD 8.0

During a fresh install of Bro I had the following issues and was curious to know if others have seen similar.

Bro compiled and ran just fine. But cron job that called “broctl cron” would never complete and just kept creating new processes. The result was when I wasn’t looking it eventually crashed the box with too many processes.

After a morning of using Bro’s debug output, I was able to trace it down to a confluence of a few issues:
1- FreeBSD doesn’t have bash in the path on a default install
2- The python subprocess.poll() function would always return none and failed to fail to indicate the subprocess had died.

The result of these two items was that when broctl called the helper function check-pid it would fail with “env: bash: No such file or directory” but because python’s poll() was only returning a None the help code would block on the readline() and leave the “broctl cron” process hung. I’m running FreeBSD 8.0 and python 2.7.2

Also is there a way to search the mailing list. I tried to search to see if this issue had been seen by others but I wasn’t able to search the mailing list.

In any case, many thanks for the tool and any help working with it.

Tom MK

Hi Tom!

After a morning of using Bro's debug output, I was able to trace it down to a confluence of a few issues:
1- FreeBSD doesn't have bash in the path on a default install

Hm, I guess we should add bash to the quick start guide for freebsd. Thanks for pointing that out.

We do need to still spend some more time finding weird edge cases like this where things aren't failing gracefully. What you are experiencing is definitely not intended behavior. Does everything work if you install bash?

Also is there a way to search the mailing list. I tried to search to see if this issue had been seen by others but I wasn't able to search the mailing list.

If you use the google custom search box on our webpage it should search the mailing list (as well as the ticket tracker, website, and blog). I suppose we should point that out somewhere.

  .Seth

Hi Tom!

After a morning of using Bro's debug output, I was able to trace it down to a confluence of a few issues:
1- FreeBSD doesn't have bash in the path on a default install

Hm, I guess we should add bash to the quick start guide for freebsd. Thanks for pointing that out.

We do need to still spend some more time finding weird edge cases like this where things aren't failing gracefully.

Glad I could help. Let me know if you'd like me to add anything to the issue log for this, I wasn't sure if it warranted an issue entry.

What you are experiencing is definitely not intended behavior. Does everything work if you install bash?

Just to be clear bash was installed but it defaults to /usr/local/bin which isn't in cron's path in a default install. So the I after install you probably also want to do something about cron's path. My solution was an entry like

0-59/5 * * * * * env PATH=/usr/local/bin:/usr/local/bro/bin:$PATH broctl cron

The other issue with the failure of python's popen has me more worried. I was stoked to see how you guys handled those cases and really sorry to see that python had that issue. I found an old bug for a 2.3 version but I'm not sure what was causing it in my environment. It could be something foolish in my setup but I didn't have time to explore it further. If no one else is seeing that issue I'll mark it up to something in my system.

In any case, thanks for the system. It was fun to finally have some time to work with it.

     Tom MK

Yeah, and we may also want to add a configure check to broctl that
bails out is there's no bash and/or gives a warning of there's a bash
but not in PATH.

Robin