Summary: | mysql-5.0.44-r1 bus error in gethostbyname_r on sparc with gcc-4.2.1 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Dan Callaghan <djc> |
Component: | [OLD] Server | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | mysql-bugs, sparc, yoswink |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | Sparc | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 371525 | ||
Attachments: | sparc-stack-arrays-auto-aligment.patch |
Description
Dan Callaghan
2007-10-13 16:25:39 UTC
emerge --info: Portage 2.1.3.9 (default-linux/sparc/sparc64/2007.0, gcc-4.2.1, glibc-2.5-r4, 2.6.22-gentoo-r5-LEM sparc64) ================================================================= System uname: 2.6.22-gentoo-r5-LEM sparc64 sun4v Timestamp of tree: Sat, 13 Oct 2007 15:20:01 +0000 ccache version 2.4 [enabled] app-shells/bash: 3.2_p17 dev-lang/python: 2.5.1-r2 dev-util/ccache: 2.4-r7 sys-apps/baselayout: 1.12.9-r2 sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.61-r1 sys-devel/automake: 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10 sys-devel/binutils: 2.17-r1 sys-devel/gcc-config: 1.3.16 sys-devel/libtool: 1.5.24 virtual/os-headers: 2.6.21 ACCEPT_KEYWORDS="sparc" CBUILD="sparc-unknown-linux-gnu" CFLAGS="-Os -mcpu=niagara -mvis -pipe" CHOST="sparc-unknown-linux-gnu" CONFIG_PROTECT="/etc /usr/share/X11/xkb" CONFIG_PROTECT_MASK="/etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo" CXXFLAGS="-Os -mcpu=niagara -mvis -pipe" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="" FEATURES="ccache distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://ftp.swin.edu.au/gentoo http://public.planetmirror.com/pub/gentoo http://distfiles.gentoo.org" LANG="en_AU.utf8" LC_ALL="en_AU.utf8" LDFLAGS="-Wl,-O1" MAKEOPTS="-j32" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage/djc" SYNC="rsync://rsync.au.gentoo.org/gentoo-portage" USE="acl apache2 bash-completion bitmap-fonts bzip2 cli cracklib dri gdbm gnome iconv ipv6 isdnlog kerberos ldap midi mudflap mysql ncurses nls nptl nptlonly openmp pam pcre ppds pppd python readline reflection samba session sparc spl sqlite sqlite3 ssl svg threads truetype-fonts type1-fonts unicode xattr xorg zlib" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="dummy fbdev glint mach64 mga r128 radeon sunbw2 suncg14 suncg3 suncg6 sunffb sunleo tdfx v4l voodoo" Unset: CTARGET, INSTALL_MASK, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS @Dan: All your assumptions seems to be right so you did the hard work. I just backported the patch already in gcc trunk[1] and make a patch for our current gcc: 4.2.1. If you want to test it, download the experimental ebuild: http://dev.gentoo.org/~yoswink/tmp/gcc-4.1.2-r1.ebuild and put the patch in $FILES/4.1.0/: http://dev.gentoo.org/~yoswink/tmp/sparc-stack-arrays-auto-aligment.patch Be careful, it could eat your mother-in-law ;) If after this patch the error is fixed, we'll call our gcc ninjas to include the patch in the tree. Thanks for reporting and searching the patch. [1] http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=129385 Created attachment 133793 [details, diff]
sparc-stack-arrays-auto-aligment.patch
Attach the patch again 4.1.2 just for the records.
P.D: sorry, in the previous comment I wrote 4.2.1, the correct is 4.1.2
This looks like a toolchain bug to me. Sparc hardly ever fixes gcc beyond suggesting patches. Ther's a trivial one attached, and LabMonkey can verify that this problem is present in mysql-5.0.54 built with gcc-4.1.2. If we have a gcc-4.1.2-r1 which includes this patch, we'll test it. yes, but we dont go adding arch-specific patches unless the arch in question OKs things first in this case the patch should be fine since it actually came from upstream gcc and people have validated (they have right?) that it works for them with the versions of gcc in question Actually, I'll test this as time permits. Most likely, next week (I made my own gcc-4.1.2.ebuild which applies the patch. Patch does apply correctly; it's just a matter of testing the compiler.) I've tested and confirmed that the supplied patch corrects this issue on my netra. gcc-4.1.2 as described above and mysql-5.0.54 Without the patched gcc, building mysql with -O1 in CFLAGS will avoid the bus error. After patching gcc and rebuilding mysql with -O2 at first I thought the problem still existed but then realized that I was still using distcc and that my helper machines did not have the patched gcc. I rebuilt mysql without distcc, with -O2, and with the patched gcc-4.1.2 and all appears to be well now. Patch is good for gcc-4.1.2 this is in gcc-4.3.2 ... do you guys still want this in 4.1.2 ? i dont really plan on making a new -r# for 4.1.2 at this point ... tossed into gcc-4.1.2 patchset http://sources.gentoo.org/gentoo/src/patchsets/gcc/4.1.2/gentoo/88_all_gcc41-sparc-stack-auto-align.patch?rev=1.1 |