Getting hobbit running on FreeBSD

Scott, Brian Brian.Scott at det.nsw.edu.au
Thu Sep 1 07:05:04 CEST 2005


Hello all,

I've just had a try at installing hobbit on various versions (5.3, 5.4)
of FreeBSD. I was getting segvs whenever hobbitd started. After a little
work with gdb I found that allocating some buffers was based on
hostcount when hostcount was zero. I presume that on some other
platforms a zero sized malloc returns some useful amount of memory but
not on FreeBSD (it claims to return some storage rather than NULL
depending on /etc/malloc.conf but apparently not enough).

I patched hobbitd.c to increase the size (without bothering to look at
the code in any detail) and now it doesn't segv on me.

I hope this helps someone else trying to make it run.

BTW: I also had to change the group of most of the installation to my
web server group after installation. I possibly could have created the
hobbit user in the web group to get arround this but somehow it seems
tacky.

Thanks for the nice software,

Brian


--- hobbit-4.1.1.orig/hobbitd/hobbitd.c Tue Jul 26 00:55:43 2005
+++ hobbit-4.1.1/hobbitd/hobbitd.c      Thu Sep  1 13:18:04 2005
@@ -2122,7 +2122,7 @@
 
                if (lastboardsize == 0) {
                        /* A guesstimate - 8 tests per hosts, 1KB/test
(only 1st line of msg) */
-                       bufsz = hostcount*8*1024; 
+                       bufsz = (hostcount+1)*8*1024; 
                }
                else {
                        /* Add 10% to the last size we used */
@@ -2274,7 +2274,7 @@
 
                if (lastboardsize == 0) {
                        /* A guesstimate - 8 tests per hosts, 2KB/test
(only 1st line of msg) */
-                       bufsz = hostcount*8*2048; 
+                       bufsz = (hostcount+1)*8*2048; 
                }
                else {
                        /* Add 10% to the last size we used */


**********************************************************************
This message is intended for the addressee named and may contain
privileged information or confidential information or both. If you
are not the intended recipient please delete it and notify the sender.
**********************************************************************



More information about the Xymon mailing list