Bug 3171 - tcpdump on sparc (U10) dumps core.
tcpdump on sparc (U10) dumps core.
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: glibc (Show other bugs)
6.0
sparc Linux
medium Severity medium
: ---
: ---
Assigned To: Cristian Gafton
:
: 2444 3172 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1999-05-30 23:45 EDT by pfeif
Modified: 2008-05-01 11:37 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 1999-07-28 01:19:14 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description pfeif 1999-05-30 23:45:07 EDT
[root@mycroft sparc]# /usr/sbin/tcpdump -i eth0 host \
updates.redhat.com
Bus error (core dumped)
[root@mycroft updates]# uname -rm
2.2.5-15 sparc64
[root@mycroft updates]#

	-Marc Heckmann
Comment 1 pfeif 1999-05-30 23:56:59 EDT
Found the problem, it's realted to nscd:

[root@mycroft /root]# /etc/rc.d/init.d/nscd start
Starting Name Switch Cache Daemon:                       [  OK  ]
[root@mycroft /root]# /usr/sbin/tcpdump -i eth0 host cais
Bus error (core dumped)
[root@mycroft /root]# /etc/rc.d/init.d/nscd stop
Stopping Name Switch Cache Daemon: nscd
[root@mycroft /root]# /usr/sbin/tcpdump -i eth0 host cais
tcpdump: listening on eth0
23:52:57.715560 mycroft.836 > cais.790: udp 84
23:52:57.716193 cais.790 > mycroft.836: udp 100 (DF)
23:52:57.725775 mycroft.837 > cais.790: udp 92
[..SNIP..]
23:52:57.750261 cais.790 > mycroft.891: udp 28 (DF)
12 packets received by filter
0 packets dropped by kernel
[root@mycroft /root]#
Comment 2 David Lawrence 1999-06-01 17:07:59 EDT
I have verified this to be true on a sparc machine with stock 6.0
with /etc/rc.d/init.d/nscd running:

tcpdump -i eth0 			works fine
tcpdump -i eth0 host 207.175.42.6 	works fine
tcpdump -i eth0 host mrhanky            fails with Bus Error
tcpdump -i eth0 host localhost          fails with Bus Error
Comment 3 David Lawrence 1999-06-01 17:52:59 EDT
*** Bug 3172 has been marked as a duplicate of this bug. ***

Here's an strace of tcpdump with nscd running:

[root@mycroft /root]# strace /usr/sbin/tcpdump -i eth0 \
host cais
execve("/usr/sbin/tcpdump", ["/usr/sbin/tcpdump", "-i",
"eth0", "host", "cais"], [/* 21 vars */]) = 0
brk(0)                                  = 0xda87c
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such
file or directory
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=19057, ...}) = 0
mmap(0, 19057, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7001a000
close(3)                                = 0
open("/lib/libc.so.6", O_RDONLY)        = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=4237650, ...}) = 0
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0"..., 8192) = 8192
mmap(0, 1065572, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) =
0x7002a000
mprotect(0x70112000, 115300, PROT_NONE) = 0
mmap(0x7011a000, 65536, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED, 3, 0xe0000) = 0x7011a000
mmap(0x7012a000, 16996, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7012a000
close(3)                                = 0
munmap(0x7001a000, 19057)               = 0
personality(PER_LINUX)                  = 0
getpid()                                = 5144
time(NULL)                              = 928124111
getpagesize()                           = 0x2000
brk(0)                                  = 0xda87c
brk(0xda8a4)                            = 0xda8a4
brk(0xdc000)                            = 0xdc000
open("/etc/localtime", O_RDONLY)        = 3
read(3, "TZif\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 44) = 44
read(3, "\234\275\1\360\234\344d\300\236\270"..., 920) = 920
read(3, "\0\1\0\1\0\1\0\1\0\1\0\1\0\1\0\1"..., 230) = 230
fstat(3, {st_mode=S_IFREG|0644, st_size=1218, ...}) = 0
mmap(0, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7001a000
read(3, "\377\377\307\300\1\0\377\377\271"..., 8192) = 24
close(3)                                = 0
munmap(0x7001a000, 8192)                = 0
socket(PF_INET, SOCK_PACKET, 0x3 /* IPPROTO_??? */) = 3
bind(3, {sin_family=AF_INET, sin_port=htons(25972),
sin_addr=inet_addr("104.48.0.0")}, 16) = 0
ioctl(3, SIOCGIFHWADDR, 0xeffffad8)     = 0
ioctl(3, SIOCGIFMTU, 0xeffffad8)        = 0
ioctl(3, SIOCGIFFLAGS, 0xeffffad8)      = 0
ioctl(3, SIOCSIFFLAGS, 0xeffffad8)      = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 4
ioctl(4, SIOCGIFADDR, 0xeffffad8)       = 0
ioctl(4, SIOCGIFNETMASK, 0xeffffad8)    = 0
close(4)                                = 0
getuid()                                = 0
setuid(0)                               = 0
brk(0xe2000)                            = 0xe2000
ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0
gettimeofday({928124111, 57304}, NULL)  = 0
getpid()                                = 5144
open("/etc/resolv.conf", O_RDONLY)      = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=71, ...}) = 0
mmap(0, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7001a000
read(4, "search dsm.space.gc.ca\nnameserv"..., 8192) = 71
read(4, "", 8192)                       = 0
close(4)                                = 0
munmap(0x7001a000, 8192)                = 0
socket(PF_UNIX, SOCK_STREAM, 0)         = 4
connect(4, {sun_family=AF_UNIX,
sun_path="/var/run/.nscd_socket"}, 110) = 0
write(4, "\0\0\0\2\0\0\0\4\0\0\0\5", 12) = 12
write(4, "cais\0", 5)                   = 5
read(4, "\0\0\0\0\0\0\0\1\0\0\0\25\0\0\0\0"..., 32) = 32
readv(4, [{"cais.dsm.space.gc.ca\0", 21}, {"", 0},
{"\n\24J\327", 4}, {"\0\0\0\0\0\0\0\0\0\0\377\377\n\24"...,
16}], 4) = 41
read(4, NULL, 0)                        = 0
close(4)                                = 0
--- SIGBUS (Bus error) ---
+++ killed by SIGBUS +++
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Without nscd it works fine:

[root@mycroft /root]# /etc/rc.d/init.d/nscd stop
Stopping Name Switch Cache Daemon: nscd
[root@mycroft /root]#  /usr/sbin/tcpdump -i eth0 host cais
tcpdump: listening on eth0
00:17:48.456653 mycroft.dsm.space.gc.ca.1048 >
cais.dsm.space.gc.ca.domain: 62112+ (38)
00:17:48.457028 cais.dsm.space.gc.ca.domain >
mycroft.dsm.space.gc.ca.1048: 62112* 1/1/1 (99) (DF)
[SNIP]

6 packets received by filter
0 packets dropped by kernel
[root@mycroft /root]#
Comment 4 David Miller 1999-06-02 06:34:59 EDT
*** Bug 2444 has been marked as a duplicate of this bug. ***

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.


------- Additional Comments From jbj@redhat.com  05/01/99 12:49 -------
sendmail-8.9.3-10 runs fine on my ultra1. Could you supply more info
please?

------- Additional Comments From Jonathan.Sergent@Sun.COM  05/03/99 14:31 -------
[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.

------- Additional Comments From jbj@redhat.com  05/04/99 11:58 -------
Could you please supply a back trace? I dunno how to reproduce
this problem otherwise ... Thanks.

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


------- Additional Comments From sergent@Eng.Sun.COM  05/05/99 21:13 -------
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.

------- Additional Comments From sergent@Eng.Sun.COM  05/05/99 21:22 -------
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.

------- Additional Comments From davem@redhat.com  05/17/99 23:15 -------
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.

------- Additional Comments From sergent@io.com  05/18/99 01:27 -------
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.)

------- Additional Comments From davem@redhat.com  05/18/99 02:02 -------
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.


------- Additional Comments From sergent@Eng.Sun.COM  05/19/99 19:44 -------
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.

------- Additional Comments From sergent@Eng.Sun.COM  05/19/99 20:16 -------
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 5 Cristian Gafton 1999-07-28 01:19:59 EDT
Fixed in glibc-2.1.2-1 and later, available in rawhide.

Note You need to log in before you can comment on or make changes to this bug.