Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 644 of 808  Not logged in ELOG logo
New entries since:Thu Jan 1 01:00:00 1970
ID Date Icon Author Author Email Categorydown OS ELOG Version Subject
  1956   Fri Sep 22 22:12:18 2006 Reply Steve Jonessteve.jones@freescale.comBug reportOther2.6.2-1714Re: SVN1714 will not run in 'daemon" mode on Solaris8

Stefan Ritt wrote:

Steve Jones wrote:
On Solaris, SVN1714 will not go into daemon mode. Running the compiled version under TRUSS (which provides a dump of every system call) and shows precisely where elog is failing. I have attached two TRUSS outputs: one where it errors out and the other where it runs but "interactively". Both runs are as root, simply one with and one without the "-D"


The "one where it errors out" does not look like an error. It does the "fork()" at the end and the main thread ends, that's how it's supposed to be.




Quote:
Ok, I got it. I've attached the TRUSS output where we follow the fork. It appears that elogd cannot open any of the specified files then gives up. What was throwing me is no error output, even to STDERR. When I run the same but without the -D flag the files are opened fine.

There are also strange system calls that differ, and I thought it might be due to the setuid(60001) -nobody- but the the non-daemn mode also sets to nobody and works fine.
Attachment 1: truss-daemon-1714.txt
sudo truss -f /sysadm/www/elog/elogd -f /var/run/cr-elogd.pid -c /sysadm/www/elog/cr-elogd.cfg -D 
16352:  execve("/sysadm/www/elog/elogd", 0xFFBEFACC, 0xFFBEFAE8)  argc = 6
16352:  resolvepath("/usr/lib/ld.so.1", "/usr/lib/ld.so.1", 1023) = 16
16352:  open("/var/ld/ld.config", O_RDONLY)             Err#2 ENOENT
16352:  stat("/usr/lib/libsocket.so.1", 0xFFBEF3F0)     = 0
16352:  open("/usr/lib/libsocket.so.1", O_RDONLY)       = 3
16352:  mmap(0x00000000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xFF390000
16352:  mmap(0x00000000, 114688, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON, -1, 0) = 0xFF370000
16352:  mmap(0xFF370000, 40558, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xFF370000
16352:  mmap(0xFF38A000, 4365, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 40960) = 0xFF38A000
16352:  munmap(0xFF37A000, 65536)                       = 0
16352:  memcntl(0xFF370000, 14496, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
16352:  close(3)                                        = 0
16352:  stat("/usr/lib/libnsl.so.1", 0xFFBEF3F0)        = 0
16352:  open("/usr/lib/libnsl.so.1", O_RDONLY)          = 3
16352:  mmap(0xFF390000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xFF390000
16352:  mmap(0x00000000, 712704, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON, -1, 0) = 0xFF280000
16352:  mmap(0xFF280000, 580118, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xFF280000
16352:  mmap(0xFF31E000, 33184, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 581632) = 0xFF31E000
16352:  mmap(0xFF328000, 23240, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANON, -1, 0) = 0xFF328000
16352:  munmap(0xFF30E000, 65536)                       = 0
16352:  memcntl(0xFF280000, 83788, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
16352:  close(3)                                        = 0
16352:  stat("/usr/lib/libc.so.1", 0xFFBEF3F0)          = 0
16352:  open("/usr/lib/libc.so.1", O_RDONLY)            = 3
16352:  mmap(0xFF390000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xFF390000
16352:  mmap(0x00000000, 802816, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON, -1, 0) = 0xFF180000
16352:  mmap(0xFF180000, 702456, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xFF180000
16352:  mmap(0xFF23C000, 24772, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 704512) = 0xFF23C000
16352:  munmap(0xFF22C000, 65536)                       = 0
16352:  memcntl(0xFF180000, 113528, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
16352:  close(3)                                        = 0
16352:  stat("/usr/lib/libdl.so.1", 0xFFBEF3F0)         = 0
16352:  open("/usr/lib/libdl.so.1", O_RDONLY)           = 3
16352:  mmap(0xFF390000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xFF390000
16352:  mmap(0x00000000, 8192, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON, -1, 0) = 0xFF360000
16352:  mmap(0xFF360000, 2302, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xFF360000
16352:  close(3)                                        = 0
16352:  stat("/usr/lib/libmp.so.2", 0xFFBEF3F0)         = 0
16352:  open("/usr/lib/libmp.so.2", O_RDONLY)           = 3
16352:  mmap(0xFF390000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xFF390000
16352:  mmap(0x00000000, 90112, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON, -1, 0) = 0xFF340000
16352:  mmap(0xFF340000, 11316, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xFF340000
16352:  mmap(0xFF354000, 865, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 16384) = 0xFF354000
16352:  munmap(0xFF344000, 65536)                       = 0
16352:  mmap(0x00000000, 8192, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFF270000
16352:  memcntl(0xFF340000, 3124, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
16352:  close(3)                                        = 0
16352:  stat("/usr/platform/SUNW,UltraAX-i2/lib/libc_psr.so.1", 0xFFBEF1D8) = 0
16352:  open("/usr/platform/SUNW,UltraAX-i2/lib/libc_psr.so.1", O_RDONLY) = 3
16352:  mmap(0xFF390000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xFF390000
16352:  mmap(0xFF3A501C, 16384, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON, -1, 0) = 0xFF260000
16352:  mmap(0xFF260000, 13800, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xFF260000
16352:  close(3)                                        = 0
16352:  munmap(0xFF390000, 8192)                        = 0
16352:  getgid()                                        = 1 [1]
16352:  getuid()                                        = 0 [0]
16352:  time()                                          = 1158947397
16352:  brk(0x010E0A80)                                 = 0
16352:  brk(0x010E2A80)                                 = 0
16352:  open("/usr/share/lib/zoneinfo/US/Central", O_RDONLY) = 3
16352:  read(3, " T Z i f\0\0\0\0\0\0\0\0".., 8192)     = 1262
16352:  close(3)                                        = 0
16352:  open("/sysadm/www/elog/cr-elogd.cfg", O_RDONLY) = 3
16352:  close(3)                                        = 0
16352:  stat("/sysadm/www/elog/cr-elogd.cfg", 0xFFBEF1F8) = 0
16352:  brk(0x010E2A80)                                 = 0
16352:  brk(0x010E8A80)                                 = 0
16352:  open("/sysadm/www/elog/cr-elogd.cfg", O_RDONLY) = 3
16352:  lseek(3, 0, SEEK_END)                           = 21208
16352:  lseek(3, 0, SEEK_SET)                           = 0
16352:  brk(0x010E8A80)                                 = 0
16352:  brk(0x010ECA80)                                 = 0
16352:  read(3, " [ g l o b a l ]\n # # #".., 21208)    = 21208
16352:  close(3)                                        = 0
16352:  brk(0x010ECA80)                                 = 0
16352:  brk(0x010EEA80)                                 = 0
16352:  brk(0x010EEA80)                                 = 0
16352:  brk(0x010F0A80)                                 = 0
16352:  brk(0x010F0A80)                                 = 0
16352:  brk(0x010F2A80)                                 = 0
16352:  brk(0x010F2A80)                                 = 0
16352:  brk(0x010F4A80)                                 = 0
16352:  stat("/usr/lib/locale/english/english.so.2", 0xFFBEE2D8) Err#2 ENOENT
16352:  stat("resources/eloglang.", 0xFFBEEFE8)         Err#2 ENOENT
16352:  stat("crlogbooks", 0xFFBEF368)                  = 0
16352:  stat("/sysadm/www/elog", 0xFFBEF368)            = 0
16352:  brk(0x010F4A80)                                 = 0
16352:  brk(0x0110CA80)                                 = 0
16352:  brk(0x0110CA80)                                 = 0
16352:  brk(0x01124A80)                                 = 0
16352:  so_socket(2, 2, 0, "", 1)                       = 3
16352:  setsockopt(3, 65535, 4, 0xFFBC97D4, 4, 1)       = 0
16352:  bind(3, 0xFFBEF2B8, 16, 3)                      = 0
16352:  fstat(-1, 0xFFBC9528)                           Err#9 EBADF
16352:  open("/dev/conslog", O_WRONLY)                  = 4
16352:  fcntl(4, F_SETFD, 0x00000001)                   = 0
16352:  fstat(4, 0xFFBC9528)                            = 0
16352:  fork()                                          = 16353
16353:  fork()          (returning as child ...)        = 16352
16353:  close(0)                                        = 0
16353:  open("/dev/null", O_RDWR)                       = 0
16353:  close(1)                                        = 0
16353:  open("/dev/null", O_RDWR)                       = 1
16353:  close(2)                                        = 0
16353:  open("/dev/null", O_RDWR)                       = 2
16353:  setsid()                                        = 16353
16353:  chdir("/")                                      = 0
16353:  umask(0)                                        = 022
16353:  fstat(4, 0xFFBC92D8)                            = 0
16353:  time()                                          = 1158947397
16353:  getpid()                                        = 16353 [16352]
16353:  putmsg(4, 0xFFBC8990, 0xFFBC8984, 0)            = 0
16353:  open("/var/run/syslog_door", O_RDONLY)          = 5
16353:  door_info(5, 0xFFBC88C8)                        = 0
16353:  getpid()                                        = 16353 [16352]
16353:  door_call(5, 0xFFBC88B0)                        = 0
16353:  close(5)                                        = 0
16353:  fstat(4, 0xFFBC92D8)                            = 0
16353:  time()                                          = 1158947397
16353:  getpid()                                        = 16353 [16352]
16353:  putmsg(4, 0xFFBC8990, 0xFFBC8984, 0)            = 0
16353:  open("/var/run/syslog_door", O_RDONLY)          = 5
16353:  door_info(5, 0xFFBC88C8)                        = 0
16353:  getpid()                                        = 16353 [16352]
16353:  door_call(5, 0xFFBC88B0)                        = 0
16353:  close(5)                                        = 0
16353:  getuid()                                        = 0 [0]
16353:  stat("/var/run/cr-elogd.pid", 0xFFBC9690)       Err#2 ENOENT
16353:  open("/var/run/cr-elogd.pid", O_RDWR|O_CREAT, 0644) = 5
16353:  getpid()                                        = 16353 [16352]
16353:  write(5, " 1 6 3 5 3\n", 6)                     = 6
16353:  close(5)                                        = 0
16353:  sigaction(SIGTERM, 0xFFBC9560, 0xFFBC95E0)      = 0
16353:  sigaction(SIGINT, 0xFFBC9560, 0xFFBC95E0)       = 0
16353:  sigaction(SIGPIPE, 0xFFBC9560, 0xFFBC95E0)      = 0
16353:  sigaction(SIGHUP, 0xFFBC9560, 0xFFBC95E0)       = 0
16353:  getuid()                                        = 0 [0]
16353:  open64("/etc/.name_service_door", O_RDONLY)     = 5
16353:  fcntl(5, F_SETFD, 0x00000001)                   = 0
16353:  door_info(5, 0xFF242748)                        = 0
16353:  door_call(5, 0xFFBC74D8)                        = 0
16353:  setegid(14109)                                  = 0
16353:  sysconfig(_CONFIG_NGROUPS)                      = 16
16353:  open("/etc/default/nss", O_RDONLY)              = 6
16353:  fcntl(6, F_DUPFD, 0x00000100)                   Err#22 EINVAL
16353:  read(6, " #   i d e n t\t " @ ( #".., 1024)     = 754
16353:  read(6, 0x010E3B08, 1024)                       = 0
16353:  close(6)                                        = 0
16353:  open("/etc/nsswitch.conf", O_RDONLY)            = 6
16353:  fcntl(6, F_DUPFD, 0x00000100)                   Err#22 EINVAL
16353:  read(6, " #\n #   " h o s t s : "".., 1024)     = 1024
16353:  read(6, " s   n i s\n s e n d m a".., 1024)     = 126
16353:  read(6, 0x010E3B68, 1024)                       = 0
16353:  close(6)                                        = 0
16353:  stat("/usr/lib/nss_files.so.1", 0xFFBC8AF8)     = 0
16353:  open("/usr/lib/nss_files.so.1", O_RDONLY)       = 6
16353:  mmap(0x00000000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE, 6, 0) = 0xFF250000
16353:  mmap(0x00000000, 98304, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON, -1, 0) = 0xFF160000
16353:  mmap(0xFF160000, 19978, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 6, 0) = 0xFF160000
16353:  mmap(0xFF176000, 1760, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 6, 24576) = 0xFF176000
16353:  munmap(0xFF166000, 65536)                       = 0
16353:  memcntl(0xFF160000, 6884, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
16353:  close(6)                                        = 0
16353:  munmap(0xFF250000, 8192)                        = 0
16353:  open("/etc/group", O_RDONLY|O_LARGEFILE)        = 6
16353:  fcntl(6, F_DUPFD, 0x00000100)                   Err#22 EINVAL
16353:  read(6, " r o o t : : 0 : r o o t".., 1024)     = 278
16353:  read(6, 0x010E3BE0, 1024)                       = 0
16353:  close(6)                                        = 0
16353:  stat("/usr/lib/nss_nis.so.1", 0xFFBC8AF8)       = 0
16353:  open("/usr/lib/nss_nis.so.1", O_RDONLY)         = 6
16353:  mmap(0x00000000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE, 6, 0) = 0xFF250000
16353:  mmap(0x00000000, 98304, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON, -1, 0) = 0xFF140000
16353:  mmap(0xFF140000, 22032, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 6, 0) = 0xFF140000
16353:  mmap(0xFF156000, 1836, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 6, 24576) = 0xFF156000
16353:  munmap(0xFF146000, 65536)                       = 0
16353:  memcntl(0xFF140000, 7460, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
16353:  close(6)                                        = 0
16353:  munmap(0xFF250000, 8192)                        = 0
16353:  sigfillset(0xFF2428D0)                          = 0
16353:  sysinfo(SI_SRPC_DOMAIN, "cde-tx32.sps.mot.com", 256) = 21
16353:  getpid()                                        = 16353 [16352]
16353:  open("/var/yp/binding/cde-tx32.sps.mot.com/cache_binding", O_RDONLY|O_LARGEFILE) = 6
16353:  fcntl(6, F_DUPFD, 0x00000100)                   Err#22 EINVAL
16353:  fcntl(6, F_GETLK, 0xFFBC87BC)                   = 0
16353:  read(6, "\0\0\001\0\0\001\0\0\001".., 1024)     = 144
16353:  close(6)                                        = 0
16353:  open("/dev/udp", O_RDWR)                        = 6
16353:  ioctl(6, I_FIND, "timod")                       = 0
16353:  ioctl(6, I_PUSH, "timod")                       = 0
16353:  sigprocmask(SIG_SETMASK, 0xFFBC888C, 0xFFBC887C) = 0
16353:  ioctl(6, I_STR, 0xFFBC8700)                     = 0
16353:  fstat(6, 0xFFBC8688)                            = 0
16353:  ioctl(6, I_STR, 0xFFBC8700)                     = 0
16353:  sigprocmask(SIG_SETMASK, 0xFFBC887C, 0x00000000) = 0
16353:  ioctl(6, I_FLUSH, FLUSHRW)                      = 0
16353:  fstat(6, 0xFFBC86F0)                            = 0
16353:  sigprocmask(SIG_SETMASK, 0xFFBC8890, 0xFFBC8880) = 0
16353:  ioctl(6, I_STR, 0xFFBC87F8)                     = 0
16353:  sigprocmask(SIG_SETMASK, 0xFFBC8880, 0x00000000) = 0
16353:  brk(0x01124A80)                                 = 0
16353:  brk(0x01132A80)                                 = 0
16353:  fstat(6, 0xFFBC8618)                            = 0
16353:  ioctl(6, I_STR, 0xFFBC8720)                     = 0
16353:  fstat(6, 0xFFBC8518)                            = 0
16353:  sigprocmask(SIG_SETMASK, 0xFFBC86B8, 0xFFBC86A8) = 0
16353:  ioctl(6, I_STR, 0xFFBC8620)                     = 0
16353:  sigprocmask(SIG_SETMASK, 0xFFBC86A8, 0x00000000) = 0
16353:  brk(0x01132A80)                                 = 0
16353:  brk(0x01136A80)                                 = 0
16353:  getpid()                                        = 16353 [16352]
16353:  fstat(6, 0xFFBC85F0)                            = 0
16353:  ioctl(6, I_STR, 0xFFBC876C)                     = 0
16353:  brk(0x01136A80)                                 = 0
16353:  brk(0x01138A80)                                 = 0
16353:  fstat(6, 0xFFBC8894)                            = 0
16353:  fcntl(6, F_SETFD, 0x00000001)                   = 0
16353:  fstat(6, 0xFFBC8968)                            = 0
16353:  open("/etc/netconfig", O_RDONLY|O_LARGEFILE)    = 7
16353:  fcntl(7, F_DUPFD, 0x00000100)                   Err#22 EINVAL
16353:  read(7, " # p r a g m a   i d e n".., 1024)     = 1024
16353:  read(7, " t s           t p i _ c".., 1024)     = 215
16353:  read(7, 0x010EA2B0, 1024)                       = 0
16353:  lseek(7, 0, SEEK_SET)                           = 0
16353:  read(7, " # p r a g m a   i d e n".., 1024)     = 1024
16353:  read(7, " t s           t p i _ c".., 1024)     = 215
16353:  read(7, 0x010EA2B0, 1024)                       = 0
16353:  close(7)                                        = 0
16353:  open("/dev/udp", O_RDONLY)                      = 7
16353:  ioctl(7, 0xC00C6982, 0xFFBC8104)                = 0
16353:  close(7)                                        = 0
16353:  door_info(5, 0xFFBC6640)                        = 0
16353:  door_call(5, 0xFFBC6628)                        = 0
16353:  open("/dev/udp", O_RDWR)                        = 7
16353:  ioctl(7, I_FIND, "timod")                       = 0
16353:  ioctl(7, I_PUSH, "timod")                       = 0
16353:  sigprocmask(SIG_SETMASK, 0xFFBC8794, 0xFFBC8784) = 0
16353:  ioctl(7, I_STR, 0xFFBC8608)                     = 0
16353:  fstat(7, 0xFFBC8590)                            = 0
16353:  brk(0x01138A80)                                 = 0
16353:  brk(0x0113AA80)                                 = 0
16353:  brk(0x0113AA80)                                 = 0
16353:  brk(0x0113EA80)                                 = 0
16353:  ioctl(7, I_STR, 0xFFBC8608)                     = 0
16353:  sigprocmask(SIG_SETMASK, 0xFFBC8784, 0x00000000) = 0
16353:  ioctl(7, I_FLUSH, FLUSHRW)                      = 0
16353:  fstat(7, 0xFFBC85F8)                            = 0
16353:  sigprocmask(SIG_SETMASK, 0xFFBC8798, 0xFFBC8788) = 0
16353:  ioctl(7, I_STR, 0xFFBC8700)                     = 0
16353:  sigprocmask(SIG_SETMASK, 0xFFBC8788, 0x00000000) = 0
16353:  fstat(7, 0xFFBC8520)                            = 0
16353:  ioctl(7, I_STR, 0xFFBC8628)                     = 0
16353:  fstat(7, 0xFFBC8420)                            = 0
16353:  sigprocmask(SIG_SETMASK, 0xFFBC85C0, 0xFFBC85B0) = 0
16353:  ioctl(7, I_STR, 0xFFBC8528)                     = 0
16353:  sigprocmask(SIG_SETMASK, 0xFFBC85B0, 0x00000000) = 0
16353:  brk(0x0113EA80)                                 = 0
16353:  brk(0x0115EA80)                                 = 0
16353:  getpid()                                        = 16353 [16352]
16353:  fstat(7, 0xFFBC84F8)                            = 0
16353:  ioctl(7, I_STR, 0xFFBC8674)                     = 0
16353:  brk(0x0115EA80)                                 = 0
16353:  brk(0x01160A80)                                 = 0
16353:  time()                                          = 1158947397
16353:  fstat(7, 0xFFBC85B0)                            = 0
16353:  putmsg(7, 0xFFBC874C, 0xFFBC8864, 0)            = 0
16353:  poll(0x0113CF9C, 1, 15000)                      = 1
16353:  fstat(7, 0xFFBC85A8)                            = 0
16353:  getmsg(7, 0xFFBC8748, 0x010E4360, 0xFFBC8774)   = 0
16353:  fstat(7, 0xFFBC8688)                            = 0
16353:  sigprocmask(SIG_SETMASK, 0xFFBC8810, 0xFFBC8800) = 0
16353:  close(7)                                        = 0
16353:  sigprocmask(SIG_SETMASK, 0xFFBC8800, 0x00000000) = 0
16353:  open("/dev/tcp", O_RDWR)                        = 7
16353:  ioctl(7, I_FIND, "timod")                       = 0
16353:  ioctl(7, I_PUSH, "timod")                       = 0
16353:  sigprocmask(SIG_SETMASK, 0xFFBC88D4, 0xFFBC88C4) = 0
16353:  ioctl(7, I_STR, 0xFFBC8748)                     = 0
16353:  fstat(7, 0xFFBC86D0)                            = 0
16353:  ioctl(7, I_STR, 0xFFBC8748)                     = 0
16353:  sigprocmask(SIG_SETMASK, 0xFFBC88C4, 0x00000000) = 0
16353:  ioctl(7, I_FLUSH, FLUSHRW)                      = 0
16353:  fstat(7, 0xFFBC8738)                            = 0
16353:  sigprocmask(SIG_SETMASK, 0xFFBC88D8, 0xFFBC88C8) = 0
16353:  ioctl(7, I_STR, 0xFFBC8840)                     = 0
16353:  sigprocmask(SIG_SETMASK, 0xFFBC88C8, 0x00000000) = 0
16353:  fstat(7, 0xFFBC8708)                            = 0
16353:  fstat(7, 0xFFBC86D0)                            = 0
16353:  sigprocmask(SIG_SETMASK, 0xFFBC8870, 0xFFBC8860) = 0
16353:  ioctl(7, I_STR, 0xFFBC87D8)                     = 0
16353:  sigprocmask(SIG_SETMASK, 0xFFBC8860, 0x00000000) = 0
16353:  fcntl(7, F_GETFL, 0x00000000)                   = 2
16353:  fstat64(7, 0xFFBC8708)                          = 0
16353:  fstat(7, 0xFFBC8610)                            = 0
16353:  fstat(7, 0xFFBC85B0)                            = 0
16353:  ioctl(7, I_STR, 0xFFBC872C)                     = 0
16353:  fstat(7, 0xFFBC85D0)                            = 0
16353:  sigprocmask(SIG_BLOCK, 0xFFBC86D8, 0xFFBC8748)  = 0
16353:  ioctl(7, I_NREAD, 0xFFBC8684)                   = 0
... 1591 more lines ...
  1976   Tue Oct 10 23:29:53 2006 Reply Steve Jonessteve.jones@freescale.comBug reportOther2.6.2-1714Re: SVN1723 (was SVN1714) will not run in 'daemon" mode on Solaris8

Steve Jones wrote:

Stefan Ritt wrote:

Steve Jones wrote:
On Solaris, SVN1714 will not go into daemon mode. Running the compiled version under TRUSS (which provides a dump of every system call) and shows precisely where elog is failing. I have attached two TRUSS outputs: one where it errors out and the other where it runs but "interactively". Both runs are as root, simply one with and one without the "-D"


The "one where it errors out" does not look like an error. It does the "fork()" at the end and the main thread ends, that's how it's supposed to be.




Quote:
Ok, I got it. I've attached the TRUSS output where we follow the fork. It appears that elogd cannot open any of the specified files then gives up. What was throwing me is no error output, even to STDERR. When I run the same but without the -D flag the files are opened fine.

There are also strange system calls that differ, and I thought it might be due to the setuid(60001) -nobody- but the the non-daemn mode also sets to nobody and works fine.



Quote:

I just compiled SVN1723 and tried the generic elogd.cfg -- of course *that works!*. Something in my complex config that causes elog to barf when it is attempting to fork the daemon process. To me the TRUSS output indicates that elog can't seem to find any logfile to work on -- very bizarre.
  1977   Wed Oct 11 00:19:05 2006 Reply Steve Jonessteve.jones@freescale.comBug reportOther2.6.2-1714Re: SVN1723 (was SVN1714) will not run in 'daemon" mode on Solaris8

Steve Jones wrote:

Steve Jones wrote:

Stefan Ritt wrote:

Steve Jones wrote:
On Solaris, SVN1714 will not go into daemon mode. Running the compiled version under TRUSS (which provides a dump of every system call) and shows precisely where elog is failing. I have attached two TRUSS outputs: one where it errors out and the other where it runs but "interactively". Both runs are as root, simply one with and one without the "-D"


The "one where it errors out" does not look like an error. It does the "fork()" at the end and the main thread ends, that's how it's supposed to be.




Quote:
Ok, I got it. I've attached the TRUSS output where we follow the fork. It appears that elogd cannot open any of the specified files then gives up. What was throwing me is no error output, even to STDERR. When I run the same but without the -D flag the files are opened fine.

There are also strange system calls that differ, and I thought it might be due to the setuid(60001) -nobody- but the the non-daemn mode also sets to nobody and works fine.



Quote:

I just compiled SVN1723 and tried the generic elogd.cfg -- of course *that works!*. Something in my complex config that causes elog to barf when it is attempting to fork the daemon process. To me the TRUSS output indicates that elog can't seem to find any logfile to work on -- very bizarre.

Stefan, you might find this interesting. I went ahead and removed all references to pre-existing logbook directories and restarted with TRUSS tracing the program. Elogd managed to go into daemon mode but the minute it received a request it generated a segmentation fault. Notice that even though elog could not open the logging directory it went ahead and went into polling mode. I have no idea what "/var/run/syslog_door" is. Working on isolating.
4190:   seteuid(60001)                                  = 0
4190:   stat("/sysadm/www/elog/cr-elogd.cfg", 0xFFBC9558) = 0
4190:   stat("/usr/lib/locale/english/english.so.2", 0xFFBC85C0) Err#2 ENOENT
4190:   stat("/sysadm/www/elog/resources/eloglang.", 0xFFBC9348) Err#2 ENOENT
4190:   listen(3, 5, 1)                                 = 0
4190:   fstat(4, 0xFFBC9318)                            = 0
4190:   time()                                          = 1160518513
4190:   getpid()                                        = 4190 [1]
4190:   putmsg(4, 0xFFBC89D0, 0xFFBC89C4, 0)            = 0
4190:   open("/var/run/syslog_door", O_RDONLY)          = 7
4190:   door_info(7, 0xFFBC8908)                        = 0
4190:   getpid()                                        = 4190 [1]
4190:   door_call(7, 0xFFBC88F0)                        = 0
4190:   close(7)                                        = 0
4190:   open("crlogbooks/logs/elogaccess.log", O_RDWR|O_APPEND|O_CREAT, 0644) Err#2 ENOENT
4190:   poll(0xFFBC7640, 1, 1000)                       = 0
4190:   poll(0xFFBC7640, 1, 1000)       (sleeping...)
4190:   poll(0xFFBC7640, 1, 1000)                       = 0
4190:   poll(0xFFBC7640, 1, 1000)                       = 0
4190:   poll(0xFFBC7640, 1, 1000)                       = 1
4190:   accept(3, 0xFFBEF300, 0xFFBC9830, 1)            = 7
4190:   time()                                          = 1160518516
4190:   poll(0xFFBC7640, 1, 6000)                       = 1
4190:   recv(7, " G E T   /   H T T P / 1".., 100000, 0) = 610
4190:       Incurred fault #6, FLTBOUNDS  %pc = 0x0001EA1C
4190:         siginfo: SIGSEGV SEGV_MAPERR addr=0xFF3EFE30
4190:       Received signal #11, SIGSEGV [default]
4190:         siginfo: SIGSEGV SEGV_MAPERR addr=0xFF3EFE30
4190:           *** process killed ***


  1978   Wed Oct 11 08:18:14 2006 Reply Stefan Rittstefan.ritt@psi.chBug reportOther2.6.2-1714Re: SVN1723 (was SVN1714) will not run in 'daemon" mode on Solaris8

Steve Jones wrote:
There are also strange system calls that differ, and I thought it might be due to the setuid(60001) -nobody- but the the non-daemn mode also sets to nobody and works fine.


The elogd program opens the port (which might be below 1024 and thus needs privileges), then either become daemon or not, then changes to the user and group specified in elogd.cfg. So this behaviour should be the same on both cases.



Steve Jones wrote:
I just compiled SVN1723 and tried the generic elogd.cfg -- of course *that works!*. Something in my complex config that causes elog to barf when it is attempting to fork the daemon process.


That's a good starting point. Take your config file, strip one option after the other, and see which is the offending one. This helps us tracking down the problem.



Steve Jones wrote:
I have no idea what "/var/run/syslog_door" is.


I have not either. But one thing which is different in the daemon mode that all output is redirected to the syslog facility via the function call redirect_to_syslog();. This routine was not written by myself so I don't know 100% what it's doing, just under Linux it works fine. Try to outcomment this function and try again.
  1979   Wed Oct 11 11:37:03 2006 Disagree Gregory M. Caugheycaugheygm@aol.comBug reportWindows2.6.2-1722Elog v2.6.2-1722 appears to have broken "Suppress default [0|1|2|3]" option on Windows XP box
Hi Stefan!

Been running Elog-2.6.2-1714 successfully for a while and yesterday decided to download and experiment with the latest Elog-2.6.2-1722 build. I want to report a possible bug involving the "Suppress default" option when running build 2.6.2-1722 on a Windows XP laptop. I installed 2.6.2-1722 into a development folder and copied my current production 'elogd.cfg' file and other custom files to the development folder. Test postings produced the following results:

1.) The "Suppress default [0|1|2|3]" option causes the [] Suppress Email notification to display or not display as expected.

2.) However, email notifications will be sent under all circumstances regardless of which parameter selected.

3.) Downgrading to Elog-2.6.2-1714 produces the expected behavior.

I am running Windows XP with all current upgrades and security patches and Internet Explorer 7 - version: 7.0.5700.6

Regards, Greg
  1980   Wed Oct 11 11:47:29 2006 Reply Stefan Rittstefan.ritt@psi.chBug reportWindows2.6.2-1722Re: Elog v2.6.2-1722 appears to have broken "Suppress default [0|1|2|3]" option on Windows XP box

Gregory M. Caughey wrote:
2.) However, email notifications will be sent under all circumstances regardless of which parameter selected.


Thanks for reporting that problem. I just implemented Suppress email on edit and this could have had some side effect. I tried however to reproduce your problem and was not able to. Trying the "minimal" configuration file, the email notifications were suppressed if the check box was checked, or if Suppress default = 3. Can you check if it works with a minimal config file, and if yes, what option in your "full" config file causes this effect?
  1983   Wed Oct 11 19:37:10 2006 Idea Gregory M. Caugheycaugheygm@aol.comBug reportWindows2.6.2-1722Re: Elog v2.6.2-1722 appears to have broken "Suppress default [0|1|2|3]" option on Windows XP box

Stefan Ritt wrote:

Gregory M. Caughey wrote:
2.) However, email notifications will be sent under all circumstances regardless of which parameter selected.


Thanks for reporting that problem. I just implemented Suppress email on edit and this could have had some side effect. I tried however to reproduce your problem and was not able to. Trying the "minimal" configuration file, the email notifications were suppressed if the check box was checked, or if Suppress default = 3. Can you check if it works with a minimal config file, and if yes, what option in your "full" config file causes this effect?

OK, you're absolutely correct. When I run Elog-2.6.2-1722 with a minimal 'elogd.cfg' the "Suppress default [0|1|2|3]" flag does appear to behave as expected. Taking your advice I went through my local 'elogd.cfg' evaluating items to see where the problem starts and I found a problem. In my local config file I use conditional attributes to modify the "category" and "type" fields (in the posting form) and here is what I'm finding wrong. For this example I have set "Suppress default = 3" and the following actions take place:

1.) Select "New" to begin a post and the form displays correctly with NO "[] Suppress Email notification" checkbox showing.

2.) When selecting "Category" an choosing an appropriate menu item the form is then redrawn and now there is a problem, the "[] Suppress Email notification" checkbox is displaying. The checkbox does work correctly but the behavior I'm expecting is for no checkbox to display during the composition of this posting. Am I misunderstanding the behavior of the "Suppress default = 3" flag?

3.) Each of the other flag parameters appear to work as expected as used in the above example.

I have attached screenshots that demonstrate this behavior as well as a snippet of the 'elogd.cfg' file.

Hope this helps a little...

Thanks, Greg
Attachment 1: Capture10-11-2006-5.05.21_AM.jpg
Capture10-11-2006-5.05.21_AM.jpg
Attachment 2: Capture10-11-2006-5.06.40_AM.jpg
Capture10-11-2006-5.06.40_AM.jpg
Attachment 3: Capture10-11-2006-5.09.34_AM.jpg
Capture10-11-2006-5.09.34_AM.jpg
  1987   Fri Oct 13 16:59:13 2006 Reply Stefan Rittstefan.ritt@psi.chBug reportWindows2.6.2-1722Re: Elog v2.6.2-1722 appears to have broken "Suppress default [0|1|2|3]" option on Windows XP box

Gregory M. Caughey wrote:
Hope this helps a little...


Yepp it helped. I could reproduce your problem and fix it. Can you try elog262-4.exe (Revision 1729)?
ELOG V3.1.5-3fb85fa6