Bug 2444

Summary: sendmail will not start
Product: [Retired] Red Hat Linux Reporter: sergent
Component: sendmailAssignee: Jay Turner <jturner>
Status: CLOSED DUPLICATE QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 6.0CC: srevivo
Target Milestone: ---   
Target Release: ---   
Hardware: sparc   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 1999-06-02 10:34:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description sergent 1999-04-30 19:27:09 UTC
sendmail dumps core on startup.

System is Ultra 1/170.  Running RH 6.0 as downloaded
from gatekeeper.dec.com.

Have not tried to figure out why this happens.  If you guys
can't reproduce this, I can try debug it.

Comment 1 Jeff Johnson 1999-05-01 16:49:59 UTC
sendmail-8.9.3-10 runs fine on my ultra1. Could you supply more info
please?

Comment 2 jonathan.sergent 1999-05-03 18:31:59 UTC
[root@silveroak /root]# date
Mon May  3 11:25:10 PDT 1999
[root@silveroak /root]# /usr/sbin/sendmail -bd
Bus error (core dumped)
[root@silveroak /root]# ls -l core
-rw-------   1 root     root       573440 May  3 11:25 core
[root@silveroak /root]# gdb /usr/sbin/sendmail ./core
GNU gdb 4.17.0.11 with Linux support
Copyright 1998 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 "sparc-redhat-linux"...
(no debugging symbols found)...
Core was generated by `/usr/sbin/sendmail -bd'.
Program terminated with signal 10, Bus error.
Reading symbols from /lib/libdb.so.2...done.
Reading symbols from /lib/libresolv.so.2...done.
Reading symbols from /lib/libnsl.so.1...done.
Reading symbols from /lib/libc.so.6...done.
Reading symbols from /lib/ld-linux.so.2...done.
Reading symbols from /lib/libnss_files.so.2...done.
Reading symbols from /lib/libnss_nisplus.so.2...done.
Reading symbols from /lib/libnss_nis.so.2...done.
#0  0x29bf0 in getopt ()
(gdb) where
#0  0x29bf0 in getopt ()
#1  0x700b18d0 in __libc_start_main () at
../sysdeps/generic/libc-start.c:78
(gdb)
[root@silveroak /root]# rpm -V glibc
....L... c /etc/localtime
.......T c /etc/nsswitch.conf
[root@silveroak /root]# rpm -V sendmail
......G.   /etc/aliases.db
[root@silveroak /root]# ls -l /usr/sbin/sendmail
-rwsr-sr-x   1 root     root       344856 Apr 19 13:39
/usr/sbin/sendmail
[root@silveroak /root]# rpm -q sendmail
sendmail-8.9.3-10
[root@silveroak /root]# md5sum /usr/sbin/sendmail
ca5e7b93569a2a1969a63c1de86fbfb4  /usr/sbin/sendmail
[root@silveroak /root]# strace /usr/sbin/sendmail -bd 2>&1 | tail
connect(3, {sun_family=AF_UNIX, sun_path="/var/run/.nscd_socket"},
110) = 0
write(3, "\0\0\0\2\0\0\0\4\0\0\0\n", 12) = 12
write(3, "silveroak\0", 10)             = 10
read(3, "p\26\3244\0\0\0\1\0\0\0\26\0\0\0"..., 32) = 32
readv(3, [{"silveroak.Eng.Sun.COM\0", 22}, {"\0\0\0\n\0\0\0\16", 8},
{"\201\222rr", 4}, {"\0\0\0\0\0\0\0\0\0\0\377\377\201"..., 16}], 4) =
50
read(3, "silveroak\0silveroak.Eng\0", 24) = 24
close(3)                                = 0
uname({sys="Linux", node="silveroak", ...}) = 0
--- SIGBUS (Bus error) ---
+++ killed by SIGBUS +++

Dunno if this helps or not.  If I get a free moment I will grab the
SRPM and try building a version with debug symbols and trace down
myself why it's dumping core.

Comment 3 Jeff Johnson 1999-05-04 15:58:59 UTC
Could you please supply a back trace? I dunno how to reproduce
this problem otherwise ... Thanks.

------- Email Received From  Jonathan Sergent <sergent.com> 05/04/99 13:33 -------

Comment 4 sergent 1999-05-06 01:13:59 UTC
Jeff suggested that I upgrade my kernel.  I did that to no avail.

What _did_ work was not starting nscd.
This is apparently a bug in glibc.  I'm not sure if this happens on
other architectures or not.  Can you guys reproduce this if you start
nscd and then try to start sendmail (or just run sendmail -bd by
hand)?

If so then we should file a bug against nscd perhaps.

--jss.

Comment 5 sergent 1999-05-06 01:22:59 UTC
I should mention that having nscd work is a big deal for some people
who are in really big NIS domains:

$ ypcat passwd | wc -l
   12401

... and the machines running sendmail are going to be the machines
that would benefit from this most.

Comment 6 David Miller 1999-05-18 03:15:59 UTC
If you disable host NSCD lookups by specifying an "enable-cache"
value of "no" for the host cache in /etc/nscd.conf, does the
crash persist?

My current theory is that a locally alloca()'d buffer is being written
over in the hostname lookup code of NSCD.  You would not happen to
have IPv6 entires in your YP host tables, would you?  This would be
a useful clue too.

Comment 7 Sergent, Jonathan 1999-05-18 05:27:59 UTC
Turning off the host cache fixes things as far as I can tell
(sendmail starts up -- dunno if it would crash once it tried
to do a username lookup).

Turning on the host cache and turning off YP makes it still crash.
I'm pretty sure we do have some ipv6 hosts entries, but since it
crashes with YP turned off, I'm pretty sure this isn't the problem.
(I gave up on YP since my UID on the network here is >65000 so I
wasn't getting anything useful out of it.)

Comment 8 David Miller 1999-05-18 06:02:59 UTC
IPv6 entries could still be an issue, just because you turn off
YP does not mean you won't get them via DNS (and thus NSCD will
serve the same kinds of IPv6 host entries to clients which query it).

Could you do me a favor?  Take your sendmail compiled with debugging
and/or symbols not stripped, plus a core created from a crash, and
place them up for FTP somewhere so that I can try to nail this.
Thanks.

Comment 9 sergent 1999-05-19 23:44:59 UTC
Here is output from running the debugged version:

[root@silveroak obj.Linux.2.2.7.sparc64]# ps ax|grep sendmail
 5858 pts/3    S      0:00 grep sendmail
[root@silveroak obj.Linux.2.2.7.sparc64]# /etc/rc.d/init.d/nscd start
Starting Name Switch Cache Daemon: /u                      [  OK  ]
[root@silveroak obj.Linux.2.2.7.sparc64]# /usr/sbin/sendmail -bd
Bus error
[root@silveroak obj.Linux.2.2.7.sparc64]# ./sendmail -bd
Bus error
[root@silveroak obj.Linux.2.2.7.sparc64]# gdb ./sendmail
GNU gdb 4.17.0.11 with Linux support
Copyright 1998 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 "sparc-redhat-linux"...
(gdb) set args -bd
(gdb) run
Starting program:
/usr/src/redhat/BUILD/sendmail-8.9.3/src/obj.Linux.2.2.7.sparc64/./sendmail
-bd

Program received signal SIGBUS, Bus error.
0x2a560 in main (argc=2, argv=0xeffffaa4, envp=0x8a400) at main.c:533
533					snprintf(ipbuf, sizeof ipbuf, "[%.100s]"
(gdb) where
#0  0x2a560 in main (argc=2, argv=0xeffffaa4, envp=0x8a400) at
main.c:533
#1  0x700b18d0 in __libc_start_main () at
../sysdeps/generic/libc-start.c:78
(gdb)

Will send you email with a core file location separately.

Comment 10 sergent 1999-05-20 00:16:59 UTC
Here is output from running the debugged version:

[root@silveroak obj.Linux.2.2.7.sparc64]# ps ax|grep sendmail
 5858 pts/3    S      0:00 grep sendmail
[root@silveroak obj.Linux.2.2.7.sparc64]# /etc/rc.d/init.d/nscd start
Starting Name Switch Cache Daemon: /u                      [  OK  ]
[root@silveroak obj.Linux.2.2.7.sparc64]# /usr/sbin/sendmail -bd
Bus error
[root@silveroak obj.Linux.2.2.7.sparc64]# ./sendmail -bd
Bus error
[root@silveroak obj.Linux.2.2.7.sparc64]# gdb ./sendmail
GNU gdb 4.17.0.11 with Linux support
Copyright 1998 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 "sparc-redhat-linux"...
(gdb) set args -bd
(gdb) run
Starting program:
/usr/src/redhat/BUILD/sendmail-8.9.3/src/obj.Linux.2.2.7.sparc64/./sendmail
-bd

Program received signal SIGBUS, Bus error.
0x2a560 in main (argc=2, argv=0xeffffaa4, envp=0x8a400) at main.c:533
533					snprintf(ipbuf, sizeof ipbuf, "[%.100s]"
(gdb) where
#0  0x2a560 in main (argc=2, argv=0xeffffaa4, envp=0x8a400) at
main.c:533
#1  0x700b18d0 in __libc_start_main () at
../sysdeps/generic/libc-start.c:78
(gdb)

Will send you email with a core file location separately.

Comment 11 David Miller 1999-06-02 10:34:59 UTC
From looking at the provided core, and the easily reproducable
case in bugID 3171, I know now two things:

1) These are the same bug.
2) The bug is that nscd's client methods do not allocate the
   memory passed back in an aligned manner for the alias
   IP addresses, almost all applications access these entries
   as a full word, and thus get an unaligned exception on sparc.

A GLIBC update will be needed to fix this, I'm now looking more
deeply into it, and hopefully a patch will emerge from me :-)


*** This bug has been marked as a duplicate of 3171 ***