RE: [Exim] Libc_r

Pàgina inicial
Delete this message
Reply to this message
Autor: Juha Saarinen
Data:  
A: Philip Hazel
CC: Exim-Users@Exim. Org
Assumpte: RE: [Exim] Libc_r
:: That site ceased to be the primary FTP site about 18 months ago. Only
:: last week I finally removed everything from it. The new FTP site is
::
:: ftp://ftp.csx.cam.ac.uk/pub/software/email/exim/

OK, will notify the FreeBSD maintainer of that. Also pulled down a fresh
copy from the new ftp site, and built it. These libc_r warnings showed up
towards the very end of the compile:

gcc -o exim  accept.o child.o daemon.o dbfn.o debug.o deliver.o direct.o
directory.o dns.o drtables.o exim.o expand.o filter.o globals.o  header.o
host.o log.o match.o moan.o os.o parse.o queue.o  readconf.o retry.o
rewrite.o  route.o search.o smtp_in.o smtp_out.o spool_in.o spool_out.o
store.o string.o tls.o tod.o transport.o tree.o verify.o perl.o version.o
libident/libident.a pcre/libpcre.a directors/directors.a  routers/routers.a
transports/transports.a lookups/lookups.a
uths.a  -lcrypt         -Wl,-R/usr/lib -Wl,-E -pthread -lperl -lm
/usr/libdata/perl/5.00503/mach/auto/DynaLoader/DynaLoader.a -L/usr/libdata/p
erl/5.00503/mach/CORE -lperl -lm -lc -lcrypt -lperl -lm
/usr/lib/libc_r.so: WARNING!  setkey(3) not present in the system!
/usr/lib/libc_r.so: warning: this program uses gets(), which is unsafe.
/usr/lib/libc_r.so: warning: mktemp() possibly used unsafely; consider using
mkstemp()
/usr/lib/libc_r.so: WARNING!  des_setkey(3) not present in the system!
/usr/lib/libc_r.so: WARNING!  encrypt(3) not present in the system!
/usr/lib/libc_r.so: warning: tmpnam() possibly used unsafely; consider using
mkstemp()
/usr/lib/libc_r.so: warning: this program uses f_prealloc(), which is
stupid.
/usr/lib/libc_r.so: WARNING!  des_cipher(3) not present in the system!
/usr/lib/libc_r.so: warning: tempnam() possibly used unsafely; consider
using mkstemp()


>>> exim binary built


su-2.05# make install

Installation directory is /usr/local/sbin

cp exim /usr/local/sbin
/usr/sbin/chown root /usr/local/sbin/exim
chmod a+x /usr/local/sbin/exim
chmod u+s /usr/local/sbin/exim
cp exim_dumpdb /usr/local/sbin
cp exim_fixdb /usr/local/sbin
cp exim_tidydb /usr/local/sbin
cp exinext /usr/local/sbin
cp exiwhat /usr/local/sbin
cp exim_dbmbuild /usr/local/sbin
cp exicyclog /usr/local/sbin
cp ../util/exigrep /usr/local/sbin
cp ../util/eximstats /usr/local/sbin
cp ../util/exiqsumm /usr/local/sbin

Configuration file /usr/local/etc/configure already exists
(Copied it there manually earlier.)

Exim installation complete


Same result as with the ports version of Exim:

# /usr/local/sbin/exim -d9 -bd -q30m
Exim version 3.22 debug level 9 uid=0 gid=0
probably Berkeley DB version 1.8x (native mode)
Caller is an admin user
Caller is a trusted user
originator: uid=0 gid=0 login=root name=Charlie Root
port = 25
listening on all interfaces
pid written to /var/spool/exim/exim-daemon.pid
LOG: 0 MAIN
exim 3.22 daemon started: pid=2600, -q30m, listening for SMTP on port 25
set_process_info: 2600 daemon: -q30m, listening on port 25
daemon running with uid=0 gid=0 euid=0 egid=0
SIGALRM received
1 queue-runner process running
Starting queue-runner: pid 2601
listening on port 25...
LOG: 0 MAIN
Start queue run: pid=2601
queue running main directory
LOG: 0 MAIN
End queue run: pid=2601
Segmentation fault

pid 2600 (exim), uid 0: exited on signal 11

2001-05-01 11:05:12 exim 3.22 daemon started: pid=2600, -q30m, listening for
SMTP on port 25
2001-05-01 11:05:12 Start queue run: pid=2601
2001-05-01 11:05:12 End queue run: pid=2601

:: ... so it died after completing a queue run. (And I presume it's the
:: daemon that died, not just the queue runner?) That suggests that the
:: problem might be in the code for reaping completed processes.
::
:: Wait a minute. Exim doesn't reap completed processes until it wakes up
:: for some other reason. So, the question is: was process 9148 still
:: running after this test, or not? I rather suspect not, because after a
:: queue runner has logged "End queue run", all it does is exit. Hmm.
:: Unless it crashed while trying to write the log? Was that message "End
:: queue run" actually written to the log?

Yes.

2001-04-30 21:06:57 exim 3.22 daemon started: pid=9166, -q30m, listening for
SMTP on port 25
2001-04-30 21:06:57 Start queue run: pid=9167
2001-04-30 21:06:57 End queue run: pid=9167

:: You may have to insert some debug_printf() calls into the code to narrow
:: this down further. One place is at the very end of queue_run() in the
:: queue.c module - after the log writing. Another might be after the call
:: to queue_run() in exim.c, just before it exits. If they all succeed, the
:: problem must be in the daemon.c module.

OK... exim.c is a bit cryptic for me, but I put in a debug_printf() at line
1745

   fprintf(stderr, "exim abandoned: unknown, malformed, or incomplete "
      "option %s\n", arg);
    exit(EXIT_FAILURE);
    }
  debug_printf("Is this where the queue run ends in exim.c?\n");
  }


Is that the right place?


In queue.c, I put it on line 582 and 584:

if (!recurse)
  {
  if (smtp_etrn_serialize && deliver_selectstring != NULL)
    transport_end_serialized("etrn-runs", deliver_selectstring);
  log_write(log_queue_run_level, LOG_MAIN, "End queue run: %s", log_detail);
  debug_printf("Really the end of the queue run...\n");
  }
 debug_printf("Or does it end here?\n");
}


Result:

su-2.05# /usr/local/sbin/exim -d9 -bd -q30m
Exim version 3.22 debug level 9 uid=0 gid=0
probably Berkeley DB version 1.8x (native mode)
Is this where the queue run ends in exim.c?
Is this where the queue run ends in exim.c?
Is this where the queue run ends in exim.c?
Caller is an admin user
Caller is a trusted user
originator: uid=0 gid=0 login=root name=Charlie Root
port = 25
listening on all interfaces
pid written to /var/spool/exim/exim-daemon.pid
LOG: 0 MAIN
exim 3.22 daemon started: pid=4977, -q30m, listening for SMTP on port 25
set_process_info: 4977 daemon: -q30m, listening on port 25
daemon running with uid=0 gid=0 euid=0 egid=0
SIGALRM received
1 queue-runner process running
Starting queue-runner: pid 4978
listening on port 25...
LOG: 0 MAIN
Start queue run: pid=4978
queue running main directory
LOG: 0 MAIN
End queue run: pid=4978
Really the end of the queue run...
Or does it end here?
Segmentation fault