Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 11960 - ISC dhcp 3.0-r4 dies with BUS error if compiled with -O2 -pipe on sparc64
Summary: ISC dhcp 3.0-r4 dies with BUS error if compiled with -O2 -pipe on sparc64
Status: VERIFIED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: Sparc Linux
: High normal
Assignee: Sparc Porters
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-12-11 08:45 UTC by Ross Jordan
Modified: 2003-09-26 04:54 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ross Jordan 2002-12-11 08:45:41 UTC
System details:
gcc version 3.2, Gentoo sparc 1.4_rc1 on ultra-10, SUN4U /w kernel 2.4.20 (vanilla).

Package: net-misc/dhcp version 3.0-rc4 (ISC Dynamic Host Configuration Protocol)
Compile flags (defaults): 
CHOST="sparc-unknown-linux-gnu"
CFLAGS="-mcpu=v8 -mtune=v9 -O2 -pipe"
CXXFLAGS="-O3 -pipe"

Problem: dhcpd dies with BUS error when first DHCP packets arrive.

# dhcpd -d -p 67
binding to user-specified port 67
Internet Software Consortium DHCP Server V3.0pl1
Copyright 1995-2001 Internet Software Consortium.
All rights reserved.
For info, please visit http://www.isc.org/products/DHCP
Wrote 0 deleted host decls to leases file.
Wrote 0 new dynamic host decls to leases file.
Wrote 0 leases to leases file.
Listening on LPF/eth0/08:00:20:a2:2c:9c/192.168.144.0/24
Sending on   LPF/eth0/08:00:20:a2:2c:9c/192.168.144.0/24
Sending on   Socket/fallback/fallback-net
Bus error

Here is a packet capture of the incoming packet:
# tcpdump -n -vv -s 2048 -X
09:43:06.213057 0.0.0.0.68 > 255.255.255.255.67: [no cksum]  xid:0x20950884
vend-rfc1048 DHCP:DISCOVER VC:"SUNW.JSIIep" (ttl 123, id 2, len 576)
0x0000	 4500 0240 0002 0000 7b11 3dac 0000 0000	E..@....{.=.....
0x0010	 ffff ffff 0044 0043 022c 0000 0101 0600	.....D.C.,......
0x0020	 2095 0884 0000 0000 0000 0000 0000 0000	................
0x0030	 0000 0000 0000 0000 0800 2095 1dc4 0000	................
0x0040	 0000 0000 0000 0000 0000 0000 0000 0000	................
0x0050	 0000 0000 0000 0000 0000 0000 0000 0000	................
0x0060	 0000 0000 0000 0000 0000 0000 0000 0000	................
0x0070	 0000 0000 0000 0000 0000 0000 0000 0000	................
0x0080	 0000 0000 0000 0000 0000 0000 0000 0000	................
0x0090	 0000 0000 0000 0000 0000 0000 0000 0000	................
0x00a0	 0000 0000 0000 0000 0000 0000 0000 0000	................
0x00b0	 0000 0000 0000 0000 0000 0000 0000 0000	................
0x00c0	 0000 0000 0000 0000 0000 0000 0000 0000	................
0x00d0	 0000 0000 0000 0000 0000 0000 0000 0000	................
0x00e0	 0000 0000 0000 0000 0000 0000 0000 0000	................
0x00f0	 0000 0000 0000 0000 0000 0000 0000 0000	................
0x0100	 0000 0000 0000 0000 6382 5363 3501 013c	........c.Sc5..<
0x0110	 0b53 554e 572e 4a53 4949 6570 ff00 0000	.SUNW.JSIIep....
0x0120	 0000 0000 0000 0000 0000 0000 0000 0000	................
0x0130	 0000 0000 0000 0000 0000 0000 0000 0000	................
0x0140	 0000 0000 0000 0000 0000 0000 0000 0000	................
0x0150	 0000 0000 0000 0000 0000 0000 0000 0000	................
0x0160	 0000 0000 0000 0000 0000 0000 0000 0000	................
0x0170	 0000 0000 0000 0000 0000 0000 0000 0000	................
0x0180	 0000 0000 0000 0000 0000 0000 0000 0000	................
0x0190	 0000 0000 0000 0000 0000 0000 0000 0000	................
0x01a0	 0000 0000 0000 0000 0000 0000 0000 0000	................
0x01b0	 0000 0000 0000 0000 0000 0000 0000 0000	................
0x01c0	 0000 0000 0000 0000 0000 0000 0000 0000	................
0x01d0	 0000 0000 0000 0000 0000 0000 0000 0000	................
0x01e0	 0000 0000 0000 0000 0000 0000 0000 0000	................
0x01f0	 0000 0000 0000 0000 0000 0000 0000 0000	................
0x0200	 0000 0000 0000 0000 0000 0000 0000 0000	................
0x0210	 0000 0000 0000 0000 0000 0000 0000 0000	................
0x0220	 0000 0000 0000 0000 0000 0000 0000 0000	................
0x0230	 0000 0000 0000 0000 0000 0000 0000 0000	................


Workaround:
Recompile dhcp without -O2 -pipe (i.e. CFLAGS="-mcpu=v8 -mtune=v9")
Comment 1 Jason Wever (RETIRED) gentoo-dev 2003-01-15 22:46:50 UTC
Looked into this a little tonight.  It appears to the the -O flags causing the
problem.  Going to try contacting the authors to see if they have any
suggestions.  If all else fails, will implement replace-flags in ebuild.
Comment 2 Jim Bray 2003-01-30 22:50:38 UTC
  I have discovered an architecture-independent bug in current Gentoo gcc
that may be what you are seeing here if loop-unrolling is involved.

http://bugs.gentoo.org/show_bug.cgi?id=14699
Comment 3 Jason Wever (RETIRED) gentoo-dev 2003-03-01 14:43:09 UTC
Tried posting the error to the dhcp mailing list but got no response. I have fixed the ebuild so it strips out the flags that were causing the Bus error (at least for me).  Please rsync and (re-)emerge dhcp-3.0_p2 and let me know how it goes.
Comment 4 Jason Wever (RETIRED) gentoo-dev 2003-08-17 07:27:20 UTC
Closing
Comment 5 Jason Wever (RETIRED) gentoo-dev 2003-09-26 04:54:29 UTC
Recent Gentoo Bugzilla move caused the status of this to change.  Changing
back.
Comment 6 Jason Wever (RETIRED) gentoo-dev 2003-09-26 04:54:45 UTC
Recent Gentoo Bugzilla move caused the status of this to change.  Changing
back.