Bug 484749

Summary: Kernel 2.6.27.12-170.2.5.fc10.x86_64 caused random failures in glibc
Product: [Fedora] Fedora Reporter: H.J. Lu <hongjiu.lu>
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: low    
Version: 10CC: hpa, kernel-maint, kmcmartin
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 484672 Environment:
Last Closed: 2009-12-18 07:52:12 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:
Bug Depends On:    
Bug Blocks: 473254    
Attachments:
Description Flags
The diff between working and non-working kernels
none
A patch none

Description H.J. Lu 2009-02-09 19:29:53 UTC
+++ 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 20:00:45 UTC
Booting kernel 2.6.27.9-159.fc10.x86_64 fixes random failures
in "make check".

Comment 2 Chuck Ebbert 2009-02-10 08:32:18 UTC
Can you post some of the errors?

Comment 3 H.J. Lu 2009-02-10 14:27:08 UTC
/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 19:02:16 UTC
FWIW, the i686 kernel is OK.

Comment 5 H.J. Lu 2009-03-10 20:54:07 UTC
This regression was introduced by execshield change:

* Mon Jan 19 2009 Kyle McMartin <kyle>
- 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 21:00:15 UTC
This may be caused by the fix for bug 473254.

Comment 7 Kyle McMartin 2009-03-10 21:13:47 UTC
Uh? Execshield is i386 only... I'm curious how this could be breaking on x86_64?

Comment 8 H.J. Lu 2009-03-10 21:22:17 UTC
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 21:43:21 UTC
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 22:37:29 UTC
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 22:43:51 UTC
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 22:50:10 UTC
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-11 00:01:38 UTC
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-11 01:04:15 UTC
(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 16:05:59 UTC
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 09:49:39 UTC
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 07:52:12 UTC
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.