Bug 484749 - Kernel 2.6.27.12-170.2.5.fc10.x86_64 caused random failures in glibc
Kernel 2.6.27.12-170.2.5.fc10.x86_64 caused random failures in glibc
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
10
x86_64 Linux
low Severity high
: ---
: ---
Assigned To: Kernel Maintainer List
Fedora Extras Quality Assurance
: Triaged
Depends On:
Blocks: 473254
  Show dependency treegraph
 
Reported: 2009-02-09 14:29 EST by H.J. Lu
Modified: 2009-12-18 02:52 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 484672
Environment:
Last Closed: 2009-12-18 02:52:12 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
The diff between working and non-working kernels (6.15 KB, text/plain)
2009-03-10 17:22 EDT, H.J. Lu
no flags Details
A patch (571 bytes, patch)
2009-03-10 20:01 EDT, H.J. Lu
no flags Details | Diff

  None (edit)
Description H.J. Lu 2009-02-09 14:29:53 EST
+++ This bug was initially created as a clone of Bug #484672 +++

When I ran "make check" for glibc in CVS as of 2009-02-09, I
saw many random failures ranging from segmentation fault to
illegal instruction under kernel 2.6.27.12-170.2.5.fc10.x86_64
on Fedora 10/Intel Q6700. I have no problems with kernel
2.6.27.9-73.fc9.x86_64 on Fedora 9.
Comment 1 H.J. Lu 2009-02-09 15:00:45 EST
Booting kernel 2.6.27.9-159.fc10.x86_64 fixes random failures
in "make check".
Comment 2 Chuck Ebbert 2009-02-10 03:32:18 EST
Can you post some of the errors?
Comment 3 H.J. Lu 2009-02-10 09:27:08 EST
/bin/sh: line 1: 22524 Segmentation fault      GCONV_PATH=/export/build/gnu/glibc/build-x86_64-linux/iconvdata LC_ALL=C /export/build/gnu/glibc/build-x86_64-linux/elf/ld-linux-x86-64.so.2 --library-path /export/build/gnu/glibc/build-x86_64-linux:/export/build/gnu/glibc/build-x86_64-linux/math:/export/build/gnu/glibc/build-x86_64-linux/elf:/export/build/gnu/glibc/build-x86_64-linux/dlfcn:/export/build/gnu/glibc/build-x86_64-linux/nss:/export/build/gnu/glibc/build-x86_64-linux/nis:/export/build/gnu/glibc/build-x86_64-linux/rt:/export/build/gnu/glibc/build-x86_64-linux/resolv:/export/build/gnu/glibc/build-x86_64-linux/crypt:/export/build/gnu/glibc/build-x86_64-linux/nptl /export/build/gnu/glibc/build-x86_64-linux/iconv/tst-iconv2 > /export/build/gnu/glibc/build-x86_64-linux/iconv/tst-iconv2.out
/bin/sh: line 1: 22670 Illegal instruction     GCONV_PATH=/export/build/gnu/glibc/build-x86_64-linux/iconvdata LC_ALL=C /export/build/gnu/glibc/build-x86_64-linux/elf/ld-linux-x86-64.so.2 --library-path /export/build/gnu/glibc/build-x86_64-linux:/export/build/gnu/glibc/build-x86_64-linux/math:/export/build/gnu/glibc/build-x86_64-linux/elf:/export/build/gnu/glibc/build-x86_64-linux/dlfcn:/export/build/gnu/glibc/build-x86_64-linux/nss:/export/build/gnu/glibc/build-x86_64-linux/nis:/export/build/gnu/glibc/build-x86_64-linux/rt:/export/build/gnu/glibc/build-x86_64-linux/resolv:/export/build/gnu/glibc/build-x86_64-linux/crypt:/export/build/gnu/glibc/build-x86_64-linux/nptl /export/build/gnu/glibc/build-x86_64-linux/locale/tst-C-locale > /export/build/gnu/glibc/build-x86_64-linux/locale/tst-C-locale.out
/bin/sh: line 1: 30632 Segmentation fault      GCONV_PATH=/export/build/gnu/glibc/build-x86_64-linux/iconvdata LC_ALL=C /export/build/gnu/glibc/build-x86_64-linux/elf/ld-linux-x86-64.so.2 --library-path /export/build/gnu/glibc/build-x86_64-linux:/export/build/gnu/glibc/build-x86_64-linux/math:/export/build/gnu/glibc/build-x86_64-linux/elf:/export/build/gnu/glibc/build-x86_64-linux/dlfcn:/export/build/gnu/glibc/build-x86_64-linux/nss:/export/build/gnu/glibc/build-x86_64-linux/nis:/export/build/gnu/glibc/build-x86_64-linux/rt:/export/build/gnu/glibc/build-x86_64-linux/resolv:/export/build/gnu/glibc/build-x86_64-linux/crypt:/export/build/gnu/glibc/build-x86_64-linux/nptl /export/build/gnu/glibc/build-x86_64-linux/math/test-ildoubl > /export/build/gnu/glibc/build-x86_64-linux/math/test-ildoubl.out
/bin/sh: line 1: 30692 Segmentation fault      GCONV_PATH=/export/build/gnu/glibc/build-x86_64-linux/iconvdata LC_ALL=C /export/build/gnu/glibc/build-x86_64-linux/elf/ld-linux-x86-64.so.2 --library-path /export/build/gnu/glibc/build-x86_64-linux:/export/build/gnu/glibc/build-x86_64-linux/math:/export/build/gnu/glibc/build-x86_64-linux/elf:/export/build/gnu/glibc/build-x86_64-linux/dlfcn:/export/build/gnu/glibc/build-x86_64-linux/nss:/export/build/gnu/glibc/build-x86_64-linux/nis:/export/build/gnu/glibc/build-x86_64-linux/rt:/export/build/gnu/glibc/build-x86_64-linux/resolv:/export/build/gnu/glibc/build-x86_64-linux/crypt:/export/build/gnu/glibc/build-x86_64-linux/nptl /export/build/gnu/glibc/build-x86_64-linux/setjmp/tst-setjmp > /export/build/gnu/glibc/build-x86_64-linux/setjmp/tst-setjmp.out
/bin/sh: line 1:  5647 Segmentation fault      GCONV_PATH=/export/build/gnu/glibc/build-x86_64-linux/iconvdata LC_ALL=C /export/build/gnu/glibc/build-x86_64-linux/elf/ld-linux-x86-64.so.2 --library-path /export/build/gnu/glibc/build-x86_64-linux:/export/build/gnu/glibc/build-x86_64-linux/math:/export/build/gnu/glibc/build-x86_64-linux/elf:/export/build/gnu/glibc/build-x86_64-linux/dlfcn:/export/build/gnu/glibc/build-x86_64-linux/nss:/export/build/gnu/glibc/build-x86_64-linux/nis:/export/build/gnu/glibc/build-x86_64-linux/rt:/export/build/gnu/glibc/build-x86_64-linux/resolv:/export/build/gnu/glibc/build-x86_64-linux/crypt:/export/build/gnu/glibc/build-x86_64-linux/nptl /export/build/gnu/glibc/build-x86_64-linux/io/test-stat2 Makefile . /export/build/gnu/glibc/build-x86_64-linux/io/test-stat2 > /export/build/gnu/glibc/build-x86_64-linux/io/test-stat2.out
/bin/sh: line 1:  8971 Segmentation fault      GCONV_PATH=/export/build/gnu/glibc/build-x86_64-linux/iconvdata LC_ALL=C /export/build/gnu/glibc/build-x86_64-linux/elf/ld-linux-x86-64.so.2 --library-path /export/build/gnu/glibc/build-x86_64-linux:/export/build/gnu/glibc/build-x86_64-linux/math:/export/build/gnu/glibc/build-x86_64-linux/elf:/export/build/gnu/glibc/build-x86_64-linux/dlfcn:/export/build/gnu/glibc/build-x86_64-linux/nss:/export/build/gnu/glibc/build-x86_64-linux/nis:/export/build/gnu/glibc/build-x86_64-linux/rt:/export/build/gnu/glibc/build-x86_64-linux/resolv:/export/build/gnu/glibc/build-x86_64-linux/crypt:/export/build/gnu/glibc/build-x86_64-linux/nptl /export/build/gnu/glibc/build-x86_64-linux/nptl/tst-cond19 > /export/build/gnu/glibc/build-x86_64-linux/nptl/tst-cond19.out
/bin/sh: line 1: 13057 Segmentation fault      GCONV_PATH=/export/build/gnu/glibc/build-x86_64-linux/iconvdata LC_ALL=C /export/build/gnu/glibc/build-x86_64-linux/elf/ld-linux-x86-64.so.2 --library-path /export/build/gnu/glibc/build-x86_64-linux:/export/build/gnu/glibc/build-x86_64-linux/math:/export/build/gnu/glibc/build-x86_64-linux/elf:/export/build/gnu/glibc/build-x86_64-linux/dlfcn:/export/build/gnu/glibc/build-x86_64-linux/nss:/export/build/gnu/glibc/build-x86_64-linux/nis:/export/build/gnu/glibc/build-x86_64-linux/rt:/export/build/gnu/glibc/build-x86_64-linux/resolv:/export/build/gnu/glibc/build-x86_64-linux/crypt:/export/build/gnu/glibc/build-x86_64-linux/nptl /export/build/gnu/glibc/build-x86_64-linux/nptl/tst-tls3 > /export/build/gnu/glibc/build-x86_64-linux/nptl/tst-tls3.out
/bin/sh: line 1: 15909 Segmentation fault      GCONV_PATH=/export/build/gnu/glibc/build-x86_64-linux/iconvdata LC_ALL=C /export/build/gnu/glibc/build-x86_64-linux/elf/ld-linux-x86-64.so.2 --library-path /export/build/gnu/glibc/build-x86_64-linux:/export/build/gnu/glibc/build-x86_64-linux/math:/export/build/gnu/glibc/build-x86_64-linux/elf:/export/build/gnu/glibc/build-x86_64-linux/dlfcn:/export/build/gnu/glibc/build-x86_64-linux/nss:/export/build/gnu/glibc/build-x86_64-linux/nis:/export/build/gnu/glibc/build-x86_64-linux/rt:/export/build/gnu/glibc/build-x86_64-linux/resolv:/export/build/gnu/glibc/build-x86_64-linux/crypt:/export/build/gnu/glibc/build-x86_64-linux/nptl /export/build/gnu/glibc/build-x86_64-linux/inet/test-inet6_opt > /export/build/gnu/glibc/build-x86_64-linux/inet/test-inet6_opt.out
/bin/sh: line 1: 21941 Segmentation fault      GCONV_PATH=/export/build/gnu/glibc/build-x86_64-linux/iconvdata LC_ALL=C /export/build/gnu/glibc/build-x86_64-linux/elf/ld-linux-x86-64.so.2 --library-path /export/build/gnu/glibc/build-x86_64-linux:/export/build/gnu/glibc/build-x86_64-linux/math:/export/build/gnu/glibc/build-x86_64-linux/elf:/export/build/gnu/glibc/build-x86_64-linux/dlfcn:/export/build/gnu/glibc/build-x86_64-linux/nss:/export/build/gnu/glibc/build-x86_64-linux/nis:/export/build/gnu/glibc/build-x86_64-linux/rt:/export/build/gnu/glibc/build-x86_64-linux/resolv:/export/build/gnu/glibc/build-x86_64-linux/crypt:/export/build/gnu/glibc/build-x86_64-linux/nptl /export/build/gnu/glibc/build-x86_64-linux/elf/tst-global1 > /export/build/gnu/glibc/build-x86_64-linux/elf/tst-global1.out
Comment 4 H.J. Lu 2009-03-03 14:02:16 EST
FWIW, the i686 kernel is OK.
Comment 5 H.J. Lu 2009-03-10 16:54:07 EDT
This regression was introduced by execshield change:

* Mon Jan 19 2009 Kyle McMartin <kyle@redhat.com>
- execshield fixes: should no longer generate spurious handled GPFs,
  fixes randomization of executables. also some clean ups.
Comment 6 H.J. Lu 2009-03-10 17:00:15 EDT
This may be caused by the fix for bug 473254.
Comment 7 Kyle McMartin 2009-03-10 17:13:47 EDT
Uh? Execshield is i386 only... I'm curious how this could be breaking on x86_64?
Comment 8 H.J. Lu 2009-03-10 17:22:17 EDT
Created attachment 334715 [details]
The diff between working and non-working kernels

Here is the diff between working and non-working kernels.
Is there anything which doesn't belong to x86-64 kernel?
Comment 9 Kyle McMartin 2009-03-10 17:43:21 EDT
My guess is the shlib randomization bits of execshield are horking up glibc... Those /would/ get applied on x86_64... I'm doing a build commenting those out now, and I'll post the URL when they're ready.

cheers, Kyle
Comment 10 Kyle McMartin 2009-03-10 18:37:29 EDT
Build is here:
http://koji.fedoraproject.org/koji/taskinfo?taskID=1235716

Hopefully it will succeed... It will at least narrow the failure down.
Comment 11 H.J. Lu 2009-03-10 18:43:51 EDT
I applied this patch:

--- linux-2.6.27.x86_64/mm/mmap.c.execshield	2009-03-10 14:47:03.000000000 -0
700
+++ linux-2.6.27.x86_64/mm/mmap.c	2009-03-10 14:45:13.000000000 -0700
@@ -1499,8 +1499,7 @@ arch_get_unmapped_exec_area(struct file 
 
 	if (!addr)
 		addr = randomize_range(SHLIB_BASE, 0x01000000, len);
-
-	if (addr) {
+	else {
 		addr = PAGE_ALIGN(addr);
 		vma = find_vma(mm, addr);
 		if (TASK_SIZE - len >= addr &&

and kernel works fine on Linux/x86-64.  Since arch_get_unmapped_exec_area
only works for 32bit address space, I don't think arch_pick_mmap_layout in
arch/x86/mm/mmap.c should do

mm->get_unmapped_exec_area = arch_get_unmapped_exec_area;

for 64bit processes. It should fix the problem and shorten 64bit programs
load time.
Comment 12 Kyle McMartin 2009-03-10 18:50:10 EDT
Yeah, I agree, I'll take a closer look at the changes. The build I posted above has the assignment stubbed out on x86_64, so it should resolve the issue as well.
Comment 13 H.J. Lu 2009-03-10 20:01:38 EDT
Created attachment 334733 [details]
A patch

I am testing this patch against kernel-2_6_27_19-170_2_44_fc10.
Comment 14 H.J. Lu 2009-03-10 21:04:15 EDT
(In reply to comment #13)
> Created an attachment (id=334733) [details]
> A patch
> 
> I am testing this patch against kernel-2_6_27_19-170_2_44_fc10.  

This patch works for me.
Comment 15 H.J. Lu 2009-03-11 12:05:59 EDT
kernel-2.6.27.19-78.2.31.fc9.x86_64 has the same bug.
My patch for Fedora 10 kernel works on Fedora 9 kernel.
Comment 16 Bug Zapper 2009-11-18 04:49:39 EST
This message is a reminder that Fedora 10 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 10.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '10'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 10's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 10 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 17 Bug Zapper 2009-12-18 02:52:12 EST
Fedora 10 changed to end-of-life (EOL) status on 2009-12-17. Fedora 10 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

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