building on Mandriva Corporate Server 4
list Daniel J McDonald
I finally broke my bb environment, so I'm again trying to get hobbit working. I took the srpm provided by Mandriva, replaced the allinone patch they had from Sep25 with the one from October 3rd, rebuilt the package, and installed it. When starting it, I see the following messages in /var/log/hobbit/hobbitlaunch.log 2006-11-21 08:10:49 hobbitlaunch starting 2006-11-21 08:10:49 Loading tasklist configuration from /usr/lib/hobbit/server/etc/hobbitlaunch.cfg 2006-11-21 08:10:49 xfree: Trying to free a NULL pointer During the build process, I get a lot of errors like: acklog.c: In function 'do_acklog': acklog.c:119: warning: pointer targets in passing argument 1 of 'nldecode' differ in signedness encoding.c: In function 'base64encode': encoding.c:31: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness encoding.c:34: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness encoding.c:50: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness encoding.c:60: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness encoding.c:75: warning: pointer targets in return differ in signedness encoding.c: In function 'base64decode': Any ideas? I'd really like to get this running, but I've never learned C.
list Daniel J McDonald
▸
On Tue, 2006-11-21 at 08:56 -0600, Daniel J McDonald wrote:
I finally broke my bb environment, so I'm again trying to get hobbit working. I took the srpm provided by Mandriva, replaced the allinone patch they had from Sep25 with the one from October 3rd, rebuilt the package, and installed it. When starting it, I see the following messages in /var/log/hobbit/hobbitlaunch.log 2006-11-21 08:10:49 hobbitlaunch starting 2006-11-21 08:10:49 Loading tasklist configuration from /usr/lib/hobbit/server/etc/hobbitlaunch.cfg 2006-11-21 08:10:49 xfree: Trying to free a NULL pointer
I finally found the core file: [hobbit at ldap ~]$ gdb /usr/lib/hobbit/server/bin/hobbitlaunch core GNU gdb 6.3-5mdk (Mandriva Linux release 2006.0) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i586-mandriva-linux-gnu"...(no debugging symbols found) Using host libthread_db library "/lib/tls/libthread_db.so.1". Reading symbols from shared object read from target memory...(no debugging symbols found)...done. Loaded system supplied DSO at 0xffffe000 Core was generated by `/usr/lib/hobbit/server/bin/hobbitlaunch --config=/usr/lib/hobbit/server/etc/hob'. Program terminated with signal 6, Aborted. warning: svr4_current_sos: Can't read pathname for load map: Input/output error Reading symbols from /lib/tls/libc.so.6...(no debugging symbols found)...done. Loaded symbols for /lib/tls/libc.so.6 Reading symbols from /lib/ld-linux.so.2...done. Loaded symbols for /lib/ld-linux.so.2 #0 0xffffe410 in __kernel_vsyscall () (gdb) bt #0 0xffffe410 in __kernel_vsyscall () #1 0xb7dd7051 in raise () from /lib/tls/libc.so.6 #2 0xb7dd8a3b in abort () from /lib/tls/libc.so.6 #3 0x0804e238 in ?? () #4 0x08053c50 in _IO_stdin_used () #5 0xbf8ff04c in ?? () #6 0xbf90004c in ?? () #7 0xb7d2d008 in ?? () #8 0x080552e4 in stdin () #9 0x00000000 in ?? () I'll try to hunt down the package that provides lib/tls and see if I can get a -debug packaghe loaded.
list Buchan Milne
▸
On Tuesday 21 November 2006 19:21, Daniel J McDonald wrote:
On Tue, 2006-11-21 at 08:56 -0600, Daniel J McDonald wrote:I finally broke my bb environment, so I'm again trying to get hobbit working. I took the srpm provided by Mandriva, replaced the allinone patch they had from Sep25 with the one from October 3rd, rebuilt the package, and installed it.
I don't think there's any functional difference in the patches, but package freeze was occurred before the release of the allinone patch.
▸
When starting it, I see the following messages in /var/log/hobbit/hobbitlaunch.log 2006-11-21 08:10:49 hobbitlaunch starting 2006-11-21 08:10:49 Loading tasklist configuration from /usr/lib/hobbit/server/etc/hobbitlaunch.cfg 2006-11-21 08:10:49 xfree: Trying to free a NULL pointerI finally found the core file: [hobbit at ldap ~]$ gdb /usr/lib/hobbit/server/bin/hobbitlaunch core GNU gdb 6.3-5mdk (Mandriva Linux release 2006.0) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i586-mandriva-linux-gnu"...(no debugging symbols found) Using host libthread_db library "/lib/tls/libthread_db.so.1". Reading symbols from shared object read from target memory...(no debugging symbols found)...done. Loaded system supplied DSO at 0xffffe000 Core was generated by `/usr/lib/hobbit/server/bin/hobbitlaunch --config=/usr/lib/hobbit/server/etc/hob'. Program terminated with signal 6, Aborted. warning: svr4_current_sos: Can't read pathname for load map: Input/output error Reading symbols from /lib/tls/libc.so.6...(no debugging symbols found)...done. Loaded symbols for /lib/tls/libc.so.6 Reading symbols from /lib/ld-linux.so.2...done. Loaded symbols for /lib/ld-linux.so.2 #0 0xffffe410 in __kernel_vsyscall () (gdb) bt #0 0xffffe410 in __kernel_vsyscall () #1 0xb7dd7051 in raise () from /lib/tls/libc.so.6 #2 0xb7dd8a3b in abort () from /lib/tls/libc.so.6 #3 0x0804e238 in ?? () #4 0x08053c50 in _IO_stdin_used () #5 0xbf8ff04c in ?? () #6 0xbf90004c in ?? () #7 0xb7d2d008 in ?? () #8 0x080552e4 in stdin () #9 0x00000000 in ?? () I'll try to hunt down the package that provides lib/tls and see if I can get a -debug packaghe loaded.
/lib/tls/libc.so.6 would be glibc ... However, I'm running a rebuild of the 4.2.0-2mdv package (client only, but it still has hobbitlaunch) on a 2006.0 machine with no problems, as well as on my cooker laptop and 2007.0 x86_64 desktop. Also, all the RedHat boxen in my environment run rebuilds of that package, including the hobbit server. Which files did you modify after installation? I haven't got a CS4 install around at the moment, but I'll see if I can change that ... Regards, Buchan (aka user-88e1743d6c68@xymon.invalid) -- Buchan Milne ISP Systems Specialist - Monitoring/Authentication Team Leader B.Eng,RHCE(803004789010797),LPIC-2(LPI000074592)
list Ralph Mitchell
▸
On 11/21/06, Daniel J McDonald <user-290ce4e24e19@xymon.invalid> wrote:
On Tue, 2006-11-21 at 08:56 -0600, Daniel J McDonald wrote:I finally broke my bb environment, so I'm again trying to get hobbit working. I took the srpm provided by Mandriva, replaced the allinone patch they had from Sep25 with the one from October 3rd, rebuilt the package, and installed it. When starting it, I see the following messages in /var/log/hobbit/hobbitlaunch.log 2006-11-21 08:10:49 hobbitlaunch starting 2006-11-21 08:10:49 Loading tasklist configuration from /usr/lib/hobbit/server/etc/hobbitlaunch.cfg 2006-11-21 08:10:49 xfree: Trying to free a NULL pointerI finally found the core file: [hobbit at ldap ~]$ gdb /usr/lib/hobbit/server/bin/hobbitlaunch core GNU gdb 6.3-5mdk (Mandriva Linux release 2006.0) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i586-mandriva-linux-gnu"...(no debugging symbols found) Using host libthread_db library "/lib/tls/libthread_db.so.1". Reading symbols from shared object read from target memory...(no debugging symbols found)...done. Loaded system supplied DSO at 0xffffe000 Core was generated by `/usr/lib/hobbit/server/bin/hobbitlaunch --config=/usr/lib/hobbit/server/etc/hob'. Program terminated with signal 6, Aborted. warning: svr4_current_sos: Can't read pathname for load map: Input/output error Reading symbols from /lib/tls/libc.so.6...(no debugging symbols found)...done. Loaded symbols for /lib/tls/libc.so.6 Reading symbols from /lib/ld-linux.so.2...done. Loaded symbols for /lib/ld-linux.so.2 #0 0xffffe410 in __kernel_vsyscall () (gdb) bt #0 0xffffe410 in __kernel_vsyscall () #1 0xb7dd7051 in raise () from /lib/tls/libc.so.6 #2 0xb7dd8a3b in abort () from /lib/tls/libc.so.6 #3 0x0804e238 in ?? () #4 0x08053c50 in _IO_stdin_used () #5 0xbf8ff04c in ?? () #6 0xbf90004c in ?? () #7 0xb7d2d008 in ?? () #8 0x080552e4 in stdin () #9 0x00000000 in ?? () I'll try to hunt down the package that provides lib/tls and see if I can get a -debug packaghe loaded.
I believe you'll find that /lib/tls is part of glibc. It's something to do with threads. Sorry I can't be a bit more specific, but I do remember it coming up in a discussion elsewhere about threaded/non-threaded C libs. Ralph Mitchell
list Daniel J McDonald
▸
On Tue, 2006-11-21 at 19:42 +0200, Buchan Milne wrote:
On Tuesday 21 November 2006 19:21, Daniel J McDonald wrote:On Tue, 2006-11-21 at 08:56 -0600, Daniel J McDonald wrote:I finally broke my bb environment, so I'm again trying to get hobbit working. I took the srpm provided by Mandriva, replaced the allinone patch they had from Sep25 with the one from October 3rd, rebuilt the package, and installed it.I don't think there's any functional difference in the patches, but package freeze was occurred before the release of the allinone patch.
Not complaining. I couldn't get the SRPM on cooker to compile and work either, so I thought I would try that... The CS4 distro doesn't include a hobbit server rpm, so I need to build one no matter what (at least, our private mirror doesn't have a tree with that RPM...)
/lib/tls/libc.so.6 would be glibc ...
Yeah, I found it, but I don't have glibc-devel available on CS4, so I've got to find the appropriate SRPM and rebuild it so I can install a -devel package.
▸
However, I'm running a rebuild of the 4.2.0-2mdv package (client only, but it still has hobbitlaunch) on a 2006.0 machine with no problems, as well as on my cooker laptop and 2007.0 x86_64 desktop.
I've tried it on 2006 and CS3 as well, and have not yet been able to get one to work.
▸
Also, all the RedHat boxen in my environment run rebuilds of that package, including the hobbit server. Which files did you modify after installation?
None. I wanted to see if I could just get hobbitd to listen on 1984 before I got anything else set up.
▸
I haven't got a CS4 install around at the moment, but I'll see if I can change that ...
I've got several, so if you need me to do somthing I'm glad to do it. -- Daniel J McDonald Lan/Wan Integrator desk: XXX.XXX.XXXX cell: XXX.XXX.XXXX
list Daniel J McDonald
▸
On Tue, 2006-11-21 at 13:45 -0600, Daniel J McDonald wrote:
On Tue, 2006-11-21 at 19:42 +0200, Buchan Milne wrote:On Tuesday 21 November 2006 19:21, Daniel J McDonald wrote:On Tue, 2006-11-21 at 08:56 -0600, Daniel J McDonald wrote:I finally broke my bb environment, so I'm again trying to get hobbit working. I took the srpm provided by Mandriva, replaced the allinone patch they had from Sep25 with the one from October 3rd, rebuilt the package, and installed it.
Here is an strace of it failing.
[hobbit at ldap ~]$ strace /usr/lib/hobbit/server/bin/hobbitlaunch
--config=/usr/lib/hobbit/server/etc/hobbitlaunch.cfg
--env=/usr/lib/hobbit/server/etc/hobbitserver.cfg
--log=/var/log/hobbit/hobbitlaunch.log
--pidfile=/var/log/hobbit/hobbitlaunch.pid
execve("/usr/lib/hobbit/server/bin/hobbitlaunch",
["/usr/lib/hobbit/server/bin/hobbi"...,
"--config=/usr/lib/hobbit/server/"...,
"--env=/usr/lib/hobbit/server/etc"...,
"--log=/var/log/hobbit/hobbitlaun"...,
"--pidfile=/var/log/hobbit/hobbit"...], [/* 51 vars */]) = 0
uname({sys="Linux", node="ldap.austin-energy.net", ...}) = 0
brk(0) = 0x8058000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or
directory)
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0xb7eee000
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=45365, ...}) = 0
old_mmap(NULL, 45365, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7ee2000
close(3) = 0
open("/lib/tls/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0 at O\1\000"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=1246360, ...}) = 0
old_mmap(NULL, 1252316, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE,
3, 0) = 0xb7db0000
old_mmap(0xb7edc000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|
MAP_DENYWRITE, 3, 0x12c000) = 0xb7edc000
old_mmap(0xb7ee0000, 7132, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|
MAP_ANONYMOUS, -1, 0) = 0xb7ee0000
close(3) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0xb7daf000
mprotect(0xb7edc000, 4096, PROT_READ) = 0
mprotect(0xb7f04000, 4096, PROT_READ) = 0
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7daf6c0,
limit:1048575, seg_32bit:1, contents:0, read_exec_only:0,
limit_in_pages:1, seg_not_present:0, useable:1}) = 0
munmap(0xb7ee2000, 45365) = 0
brk(0) = 0x8058000
brk(0x8079000) = 0x8079000
open("/usr/lib/hobbit/server/etc/hobbitserver.cfg", O_RDONLY|
O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=11745, ...}) = 0
mmap2(NULL, 131072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7d8f000
read(3, "# NB : Even though it might look"..., 131072) = 11745
read(3, "", 131072) = 0
close(3) = 0
munmap(0xb7d8f000, 131072) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|
SIGCHLD, child_tidptr=0xb7daf708) = 30538
open("/var/log/hobbit/hobbitlaunch.pid", O_WRONLY|O_CREAT|O_TRUNC|
O_LARGEFILE, 0666) = 3
fstat64(3, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
mmap2(NULL, 131072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7d8f000
write(3, "30538\n", 6) = 6
close(3) = 0
munmap(0xb7d8f000, 131072) = 0
exit_group(0) = ?
Process 30533 detached
--
Daniel J McDonald, CCIE # 2495, CISSP # 78281, CNX
Austin Energy
http://www.austinenergy.com
list Daniel J McDonald
▸
On Tue, 2006-11-21 at 16:09 -0600, Daniel J McDonald wrote:
On Tue, 2006-11-21 at 13:45 -0600, Daniel J McDonald wrote:On Tue, 2006-11-21 at 19:42 +0200, Buchan Milne wrote:On Tuesday 21 November 2006 19:21, Daniel J McDonald wrote:On Tue, 2006-11-21 at 08:56 -0600, Daniel J McDonald wrote:I finally broke my bb environment, so I'm again trying to get hobbit working. I took the srpm provided by Mandriva, replaced the allinone patch they had from Sep25 with the one from October 3rd, rebuilt the package, and installed it.Here is an strace of it failing.
Learning all sorts of things... here is strace -f, showing more than it just detaching...
[hobbit at ldap ~]$ strace -f /usr/lib/hobbit/server/bin/hobbitlaunch --config=/usr/lib/hobbit/server/etc/hobbitlaunch.cfg --env=/usr/lib/hobbit/server/etc/hobbitserver.cfg --log=/var/log/hobbit/hobbitlaunch.log --pidfile=/var/log/hobbit/hobbitlaunch.pid
▸
execve("/usr/lib/hobbit/server/bin/hobbitlaunch",["/usr/lib/hobbit/server/bin/hobbi"...,
"--config=/usr/lib/hobbit/server/"...,
"--env=/usr/lib/hobbit/server/etc"...,
"--log=/var/log/hobbit/hobbitlaun"...,
"--pidfile=/var/log/hobbit/hobbit"...], [/* 51 vars */]) = 0
uname({sys="Linux", node="ldap.austin-energy.net", ...}) = 0
brk(0) = 0x8058000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or
directory)
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0xb7fca000
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=45365, ...}) = 0
old_mmap(NULL, 45365, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7fbe000
▸
close(3) = 0
open("/lib/tls/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0 at O\1\000"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=1246360, ...}) = 0
old_mmap(NULL, 1252316, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE,
3, 0) = 0xb7e8c000
old_mmap(0xb7fb8000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|
MAP_DENYWRITE, 3, 0x12c000) = 0xb7fb8000
old_mmap(0xb7fbc000, 7132, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|
MAP_ANONYMOUS, -1, 0) = 0xb7fbc000
close(3) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0xb7e8b000
mprotect(0xb7fb8000, 4096, PROT_READ) = 0
mprotect(0xb7fe0000, 4096, PROT_READ) = 0
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7e8b6c0,
limit:1048575, seg_32bit:1, contents:0, read_exec_only:0,
limit_in_pages:1, seg_not_present:0, useable:1}) = 0
munmap(0xb7fbe000, 45365) = 0
▸
brk(0) = 0x8058000
brk(0x8079000) = 0x8079000
open("/usr/lib/hobbit/server/etc/hobbitserver.cfg", O_RDONLY|
O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=11745, ...}) = 0
mmap2(NULL, 131072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7e6b000
▸
read(3, "# NB : Even though it might look"..., 131072) = 11745
read(3, "", 131072) = 0
close(3) = 0
munmap(0xb7e6b000, 131072) = 0
clone(Process 25417 attached
child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0xb7e8b708) = 25417
[pid 25416] open("/var/log/hobbit/hobbitlaunch.pid", O_WRONLY|O_CREAT|
O_TRUNC|O_LARGEFILE, 0666) = 3
[pid 25417] setsid( <unfinished ...>
[pid 25416] fstat64(3, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
[pid 25416] mmap2(NULL, 131072, PROT_READ|PROT_WRITE, MAP_PRIVATE|
MAP_ANONYMOUS, -1, 0) = 0xb7e6b000
[pid 25416] write(3, "25417\n", 6) = 6
[pid 25417] <... setsid resumed> ) = 25417
[pid 25416] close(3) = 0
[pid 25416] munmap(0xb7e6b000, 131072) = 0
[pid 25416] exit_group(0) = ?
Process 25416 detached
close(0) = 0
open("/dev/null", O_RDONLY|O_LARGEFILE) = 0
close(1) = 0
open("/var/log/hobbit/hobbitlaunch.log", O_WRONLY|O_APPEND|O_CREAT|
O_LARGEFILE, 0666) = 1
fstat64(1, {st_mode=S_IFREG|0600, st_size=796, ...}) = 0
mmap2(NULL, 131072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7e6b000
fstat64(1, {st_mode=S_IFREG|0600, st_size=796, ...}) = 0
_llseek(1, 796, [796], SEEK_SET) = 0
close(2) = 0
open("/var/log/hobbit/hobbitlaunch.log", O_WRONLY|O_APPEND|O_CREAT|
O_LARGEFILE, 0666) = 2
fstat64(2, {st_mode=S_IFREG|0600, st_size=796, ...}) = 0
mmap2(NULL, 131072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7e4b000
fstat64(2, {st_mode=S_IFREG|0600, st_size=796, ...}) = 0
_llseek(2, 796, [796], SEEK_SET) = 0
getrlimit(RLIMIT_CORE, {rlim_cur=1000000*1024, rlim_max=RLIM_INFINITY})
= 0
setrlimit(RLIMIT_CORE, {rlim_cur=RLIM_INFINITY, rlim_max=RLIM_INFINITY})
= 0
rt_sigaction(SIGSEGV, {0x804d600, [], 0}, NULL, 8) = 0
rt_sigaction(SIGILL, {0x804d600, [], 0}, NULL, 8) = 0
rt_sigaction(SIGBUS, {0x804d600, [], 0}, NULL, 8) = 0
rt_sigaction(SIGPIPE, {SIG_IGN}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGUSR1, {SIG_IGN}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGUSR2, {0x804d660, [], 0}, NULL, 8) = 0
rt_sigaction(SIGHUP, {0x8049950, [], 0}, NULL, 8) = 0
rt_sigaction(SIGTERM, {0x8049950, [], 0}, NULL, 8) = 0
rt_sigaction(SIGCHLD, {0x8049950, [], 0}, NULL, 8) = 0
time(NULL) = 1164150324
open("/etc/localtime", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=1279, ...}) = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=1279, ...}) = 0
mmap2(NULL, 131072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7e2b000
read(3, "TZif\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\0\0\0\5\0"...,
131072) = 1279
close(3) = 0
munmap(0xb7e2b000, 131072) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1279, ...}) = 0
write(2, "2006-11-21 17:05:24 hobbitlaunch"..., 42) = 42
time(NULL) = 1164150324
time(NULL) = 1164150324
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1279, ...}) = 0
write(2, "2006-11-21 17:05:24 Loading task"..., 100) = 100
open("/usr/lib/hobbit/server/etc/hobbitlaunch.cfg", O_RDONLY|
O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=8992, ...}) = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=8992, ...}) = 0
mmap2(NULL, 131072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7e2b000
read(3, "#\n# The hobbitlaunch.cfg file is"..., 131072) = 8992
read(3, "", 131072) = 0
open("/etc/hobbit/hobbitlaunch.d", O_RDONLY|O_NONBLOCK|O_LARGEFILE|
O_DIRECTORY) = 4
fstat64(4, {st_mode=S_IFDIR|0755, st_size=48, ...}) = 0
fcntl64(4, F_SETFD, FD_CLOEXEC) = 0
mmap2(NULL, 135168, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7e0a000
stat64("/etc/hobbit/hobbitlaunch.d", {st_mode=S_IFDIR|0755,
st_size=48, ...}) = 0
getdents64(4, /* 2 entries */, 131072) = 48
getdents64(4, /* 0 entries */, 131072) = 0
munmap(0xb7e0a000, 135168) = 0
close(4) = 0
time(NULL) = 1164150324
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1279, ...}) = 0
write(2, "2006-11-21 17:05:24 xfree: Tryin"..., 57) = 57
rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0
tgkill(25417, 25417, SIGABRT) = 0
--- SIGABRT (Aborted) @ 0 (0) ---
Process 25417 detached
list Henrik Størner
read(3, "#\n# The hobbitlaunch.cfg file is"..., 131072) = 8992 read(3, "", 131072) = 0 time(NULL) = 1164150324
It dies while processing the hobbitlaunch.cfg file. Could you send me a copy of that file? Also, if you could run hobbitlaunch with the --debug option it would help. I don't know how Mandriva decided to do the Hobbit startup, but it would usually be in the ~hobbit/server/hobbit.sh file that you need to add "--debug" to the hobbitlaunch command. Regards, Henrik
list Daniel J McDonald
▸
On Wed, 2006-11-22 at 07:29 +0100, Henrik Stoerner wrote:
read(3, "#\n# The hobbitlaunch.cfg file is"..., 131072) = 8992 read(3, "", 131072) = 0 time(NULL) = 1164150324It dies while processing the hobbitlaunch.cfg file. Could you send me a copy of that file?
Attached
▸
Also, if you could run hobbitlaunch with the --debug option it would help. I don't know how Mandriva decided to do the Hobbit startup, but it would usually be in the ~hobbit/server/hobbit.sh file
/usr/lib/hobbit/server/hobbit.sh, where ~hobbit is /var/lib/hobbit
that you need to add "--debug" to the hobbitlaunch command.
No new information added to /var/log/hobbit/hobbitlaunch.log - just the same three lines I always get. Let me try interactive startup rather than running from init.d... Now, reading through the strace, I think it is dying when reading /etc/hobbit/hobbitlaunch.d/ There are no files there. Let's see what happens when I add one. I'll make it blank for now.... [mcdonalddj at ldap ~]$ sudo touch /etc/hobbit/hobbitlaunch.d/00_test.cfg [mcdonalddj at ldap ~]$ ls -l /etc/hobbit/hobbitlaunch.d/00_test.cfg -rw-r--r-- 1 root root 0 Nov 22 06:41 /etc/hobbit/hobbitlaunch.d/00_test.cfg And let's start it up again.... Hey, it starts now! Yeah! Ok, with even a single file in /etc/hobbitlaunch.d, even a blank file, it starts up and life is grand. Now I just have to replicate my old BB configuration and re-write the 300 paging rules, and re-write those parts of my heavily hacked bbmap that I never got working quite right in hobbit 4.1 but never pursued because 4.2 was going to add a new API to gather some of those details. At least that will keep me off the streets for a few days ;-) As I recall, the hobbitlaunch.d construct was added at Mandriva's request, to make packaging easier. Perhaps adding a comments-only file in that directory, named 00_sample.cfg, would be the quickest way to fix this. -------------- next part -------------- # # The hobbitlaunch.cfg file is loaded by "hobbitlaunch". # It controls which of the Hobbit modules to run, how often, and # with which parameters, options and environment variables. # # This is the main Hobbit daemon. This must be running on at least # one server in your setup. If you are setting up a server to do # just network tests or run bbproxy, it is OK to disable this (then # you also need to remove the "NEEDS hobbitd" lines for the tasks # you want to run). [hobbitd] ENVFILE /usr/lib/hobbit/server/etc/hobbitserver.cfg CMD hobbitd --pidfile=$BBSERVERLOGS/hobbitd.pid --restart=$BBTMP/hobbitd.chk --checkpoint-file=$BBTMP/hobbitd.chk --checkpoint-interval=600 --log=$BBSERVERLOGS/hobbitd.log --admin-senders=127.0.0.1,$BBSERVERIP --store-clientlogs=!msgs # "bbstatus" saves status-logs in text- and html-format, like the old Big Brother # daemon does. Unless you are using add-ons that directly access the log-files, you # will not need to run this module, and it is recommended that you keep it disabled # since storing the raw logs on disk can cause a significant load on your server. [bbstatus] DISABLED ENVFILE /usr/lib/hobbit/server/etc/hobbitserver.cfg NEEDS hobbitd CMD hobbitd_channel --channel=status --log=$BBSERVERLOGS/status.log hobbitd_filestore --status --html # "bbhistory" keeps track of the status changes that happen, in a manner that is # compatible with the Big Brother history logs. You probably do want to run this. [bbhistory] ENVFILE /usr/lib/hobbit/server/etc/hobbitserver.cfg NEEDS hobbitd CMD hobbitd_channel --channel=stachg --log=$BBSERVERLOGS/history.log hobbitd_history # "hostdata" stores the Hobbit client messages on disk when some status for a host # changes. This lets you access a lot of data collected from a host around the time # when a problem occurred. However, it may use a significant amount of disk space # if you have lots of Hobbit clients. # Note: The --store-clientlogs option for the [hobbitd] provides control over # which status-changes will cause a client message to be stored. [hostdata] ENVFILE /usr/lib/hobbit/server/etc/hobbitserver.cfg NEEDS hobbitd CMD hobbitd_channel --channel=clichg --log=$BBSERVERLOGS/hostdata.log hobbitd_hostdata # "bbdata" saves information sent using the BB "data" protocol, like the old Big Brother # daemon does. Unless you are using add-ons that directly access the data-files, you # will not need to run this module, and it is recommended that you keep it disabled # since storing the raw data on disk can cause a significant load on your BB server. # RRD graphs uses data-files, but since RRD is handled by the hobbitd_rrd module, you do # not need to run the "bbdata" module to get RRD graphs. [bbdata] DISABLED ENVFILE /usr/lib/hobbit/server/etc/hobbitserver.cfg NEEDS hobbitd CMD hobbitd_channel --channel=data --log=$BBSERVERLOGS/data.log hobbitd_filestore --data # "bbnotes" saves web note-files, that are sent using the BB "notes" protocol. This is # disabled by default; if you use the BB "notes" protocol, then you should enable this. [bbnotes] DISABLED ENVFILE /usr/lib/hobbit/server/etc/hobbitserver.cfg NEEDS hobbitd CMD hobbitd_channel --channel=notes --log=$BBSERVERLOGS/notes.log hobbitd_filestore --notes # "bbenadis" updates the files used to indicate that a host or test has been enabled or disabled. # Unless you are running server side scripts that look at these files, you do not need this. [bbenadis] DISABLED ENVFILE /usr/lib/hobbit/server/etc/hobbitserver.cfg NEEDS hobbitd CMD hobbitd_channel --channel=enadis --log=$BBSERVERLOGS/enadis.log hobbitd_filestore --enadis # "bbpage" sends out alerts. Note that this module is NOT compatible with the old Big Brother # system - it uses a different configuration file to determine how alerts get sent. If you want # alerts to go out via pager, e-mail or some other means, then you must run this module. [bbpage] ENVFILE /usr/lib/hobbit/server/etc/hobbitserver.cfg NEEDS hobbitd CMD hobbitd_channel --channel=page --log=$BBSERVERLOGS/page.log hobbitd_alert --checkpoint-file=$BBTMP/alert.chk --checkpoint-interval=600 # "rrdstatus" updates RRD files with information that arrives as "status" messages. # If you want RRD graphs of your monitoring data, then you want to run this. [rrdstatus] ENVFILE /usr/lib/hobbit/server/etc/hobbitserver.cfg NEEDS hobbitd CMD hobbitd_channel --channel=status --log=$BBSERVERLOGS/rrd-status.log hobbitd_rrd --rrddir=$BBVAR/rrd # "rrddata" updates RRD files with information that arrives as "data" messages. # If you want RRD graphs of your monitoring BB data, then you want to run this. [rrddata] ENVFILE /usr/lib/hobbit/server/etc/hobbitserver.cfg NEEDS hobbitd CMD hobbitd_channel --channel=data --log=$BBSERVERLOGS/rrd-data.log hobbitd_rrd --rrddir=$BBVAR/rrd # The client back-end module. You need this if you are running the Hobbit client on any system. [clientdata] ENVFILE /usr/lib/hobbit/server/etc/hobbitserver.cfg NEEDS hobbitd CMD hobbitd_channel --channel=client --log=$BBSERVERLOGS/clientdata.log hobbitd_client # "bbproxy" is the Hobbit proxy server that allows you to forward status messages # from a protected network to your Hobbit server. It is not enabled by default, # since it would conflict with the hobbitd task. # If you need to run this, then disabled hobbitd and the hobbitd-modules # above, then enable this. Make sure you enter the IP-address of your # Hobbit server in the command-line, so that the proxy knows where to forward # status messages. [bbproxy] DISABLED ENVFILE /usr/lib/hobbit/server/etc/hobbitserver.cfg CMD $BBHOME/bin/bbproxy --hobbitd --bbdisplay=YOUR.HOBBIT.SERVER.IP --report=$MACHINE.bbproxy --no-daemon --pidfile=$BBSERVERLOGS/bbproxy.pid LOGFILE $BBSERVERLOGS/bbproxy.log # "hobbitfetch" is used when you have clients that cannot connect to your Hobbit server, # but the Hobbit server can connect to the client. Normally the clients will initiate # a connection to the Hobbit server to deliver the data they collect, but this is # forbidden in some firewall setups. By enabling the hobbitfetch task, hosts that have # the "pulldata" tag in the bb-hosts file will be polled by hobbitfetch for their data. # # NOTE: On the clients you must enable the "msgcache" task, since this is what # hobbitfetch is talking to. [hobbitfetch] DISABLED ENVFILE /usr/lib/hobbit/server/etc/hobbitserver.cfg CMD $BBHOME/bin/hobbitfetch --server=YOUR.HOBBIT.SERVER.IP --no-daemon --pidfile=$BBSERVERLOGS/hobbitfetch.pid LOGFILE $BBSERVERLOGS/hobbitfetch.log # "bbdisplay" runs the bbgen tool to generate the Hobbit webpages from the status information that # has been received. Big Brother updated the webpages once every 5 minutes. The default here is to # run it every minute for faster updates, but you can change it if you have a highly loaded server # and dont need updates that often. [bbdisplay] ENVFILE /usr/lib/hobbit/server/etc/hobbitserver.cfg NEEDS hobbitd GROUP generators CMD bbgen $BBGENOPTS --report LOGFILE $BBSERVERLOGS/bb-display.log INTERVAL 1m # bbcombotest is an extension script for the Hobbit display server. It generates # status messages that are combined from the status of one or more normal statuses. # It is controlled via the bbcombotest.cfg file. [bbcombotest] ENVFILE /usr/lib/hobbit/server/etc/hobbitserver.cfg NEEDS hobbitd CMD $BBHOME/bin/bbcombotest LOGFILE $BBSERVERLOGS/bbcombotest.log INTERVAL 5m # "bbnet" runs the bbtest-net tool to perform the network based tests - i.e. http, smtp, ssh, dns and # all of the various network protocols we need to test. [bbnet] ENVFILE /usr/lib/hobbit/server/etc/hobbitserver.cfg NEEDS hobbitd CMD bbtest-net --report --ping --checkresponse LOGFILE $BBSERVERLOGS/bb-network.log INTERVAL 5m # "bbretest" picks up the tests that the normal network test consider "failed", and re-does those # tests more often. This enables Big Brother to pick up a recovered network service faster than # if it were tested only by the "bbnet" task (which only runs every 5 minutes). So if you have # servers with very high availability guarantees, running this task will make your availability # reports look much better. [bbretest] ENVFILE /usr/lib/hobbit/server/etc/hobbitserver.cfg NEEDS hobbitd CMD $BBHOME/ext/bbretest-net.sh LOGFILE $BBSERVERLOGS/bb-retest.log INTERVAL 1m # "hobbitclient" runs the Hobbit client. The client is installed automatically # when you install a Hobbit server (presumably, you do want to monitor the # Hobbit server ?), but there's no need to have two hobbitlaunch instances # running at the same time. So we'll just run it from here. # Note: If you are using another client package, you should disable this one. [hobbitclient] ENVFILE /usr/lib/hobbit/client/etc/hobbitclient.cfg NEEDS hobbitd CMD /usr/lib/hobbit/client/bin/hobbitclient.sh LOGFILE $BBSERVERLOGS/hobbitclient.log INTERVAL 5m directory /etc/hobbit/hobbitlaunch.d
list Henrik Størner
▸
On Wed, Nov 22, 2006 at 06:54:18AM -0600, Daniel J McDonald wrote:
Now, reading through the strace, I think it is dying when reading /etc/hobbit/hobbitlaunch.d/ There are no files there. Let's see what happens when I add one. I'll make it blank for now.... [mcdonalddj at ldap ~]$ sudo touch /etc/hobbit/hobbitlaunch.d/00_test.cfg [mcdonalddj at ldap ~]$ ls -l /etc/hobbit/hobbitlaunch.d/00_test.cfg -rw-r--r-- 1 root root 0 Nov 22 06:41 /etc/hobbit/hobbitlaunch.d/00_test.cfg And let's start it up again.... Hey, it starts now! Yeah!
OK, this patch should fix it.
Regards,
Henrik
-------------- next part --------------
--- lib/stackio.c 2006/07/20 16:06:41 1.20
+++ lib/stackio.c 2006/11/22 15:36:31
@@ -388,15 +388,17 @@
closedir(dirfd);
- if (fnsz) qsort(fnames, fnsz, sizeof(char *), namecompare);
- for (i=0; (i<fnsz); i++) {
- htnames_t *newitem = malloc(sizeof(htnames_t));
- newitem->name = fnames[i];
- newitem->next = fnlist;
- fnlist = newitem;
- }
+ if (fnsz) {
+ qsort(fnames, fnsz, sizeof(char *), namecompare);
+ for (i=0; (i<fnsz); i++) {
+ htnames_t *newitem = malloc(sizeof(htnames_t));
+ newitem->name = fnames[i];
+ newitem->next = fnlist;
+ fnlist = newitem;
+ }
- xfree(fnames);
+ xfree(fnames);
+ }
}
char *stackfgets(strbuffer_t *buffer, char *extraincl)
@@ -438,7 +440,7 @@
xfree(tmp->name); xfree(tmp);
return stackfgets(buffer, extraincl);
}
- else {
+ else if (fnlist) {
htnames_t *tmp = fnlist;
errprintf("WARNING: Cannot open include file '%s', line was:%s\n", fnlist->name, buffer);
@@ -447,6 +449,11 @@
if (eol) *eol = '\n';
return result;
}
+ else {
+ /* Empty directory include - return a blank line */
+ *result = '\0';
+ return result;
+ }
}
}
else if (result == NULL) {
list Daniel J McDonald
▸
On Wed, 2006-11-22 at 16:38 +0100, Henrik Stoerner wrote:
On Wed, Nov 22, 2006 at 06:54:18AM -0600, Daniel J McDonald wrote:Now, reading through the strace, I think it is dying when reading /etc/hobbit/hobbitlaunch.d/ There are no files there. Let's see what happens when I add one. I'll make it blank for now.... [mcdonalddj at ldap ~]$ sudo touch /etc/hobbit/hobbitlaunch.d/00_test.cfg [mcdonalddj at ldap ~]$ ls -l /etc/hobbit/hobbitlaunch.d/00_test.cfg -rw-r--r-- 1 root root 0 Nov 22 06:41 /etc/hobbit/hobbitlaunch.d/00_test.cfg And let's start it up again.... Hey, it starts now! Yeah!OK, this patch should fix it.
I've never been great with patch... But when I added to the RPM I got: + cd hobbit-4.2.0 + echo 'Patch #0 (hobbit-4.1.2-ignore-cdrom.patch.bz2):' Patch #0 (hobbit-4.1.2-ignore-cdrom.patch.bz2): + /usr/bin/bzip2 -d + patch -p1 -s + STATUS=0 + '[' 0 -ne 0 ']' + echo 'Patch #1 (hobbit-4.1.2-fix-apache-alias.patch.bz2):' Patch #1 (hobbit-4.1.2-fix-apache-alias.patch.bz2): + /usr/bin/bzip2 -d + patch -p1 -s + STATUS=0 + '[' 0 -ne 0 ']' + echo 'Patch #3 (hobbit-4.2.0-postrelease-patches-20061003.patch):' Patch #3 (hobbit-4.2.0-postrelease-patches-20061003.patch): + patch -p0 -s + echo 'Patch #4 (hobbit-4.2.0.fix-emptydir.patch.bz2):' Patch #4 (hobbit-4.2.0.fix-emptydir.patch.bz2): + /usr/bin/bzip2 -d + patch -p0 -s 3 out of 3 hunks FAILED -- saving rejects to file lib/stackio.c.rej error: Bad exit status from /var/tmp/rpm-tmp.93341 (%prep) Should I apply this patch before the postrelease patches?
Regards, Henrik