Summary: | >=sys-apps/coreutils-8.7 'sort' segfault (hardened profile) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Vladimir Solomatin <littleslash> |
Component: | [OLD] Core system | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | RESOLVED WORKSFORME | ||
Severity: | normal | CC: | cadu, hardened, kanelxake, pchrist |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
core
core2 |
Description
Vladimir Solomatin
2011-01-07 01:49:59 UTC
There seems to be some stuff going on here: did those sandbox errors appear with the upgrade of coreutils, or are they unrelated? Cold you also try to crash sort outside of portage and maybe even attach a backtrace of said segfault? Does downgrading to coreutils-8.5 make the problems go away? For me said versions of coreutils works fine on hardened, and at this stage I am unsure about if sort really is the culprit or if there is something more serious going on. what does `sort` misbehavior have to do with the sandbox output ? I have the same problem (but reproducible while building proprietary software) here on my machine since coreutils was upgraded. If I use coreutils < 8.7 I have no problems. Created attachment 259796 [details]
core
(In reply to comment #1) > Cold you also try to crash sort outside of portage and maybe even attach a > backtrace of said segfault? A can't reproduce crash sort outside of portage. > Does downgrading to coreutils-8.5 make the problems go away? Downgrading to coreutils-8.5 solve the proble (or compile coreutils-8.7 without optimization CFLAGS="-g -pipe" CXXFLAGS="${CFLAGS}"). # gdb sort -c core -d /var/tmp/portage/sys-apps/coreutils-8.7/work/coreutils-8.7/src/ GNU gdb (Gentoo 7.2 p1) 7.2 Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i686-pc-linux-gnu". For bug reporting instructions, please see: <http://bugs.gentoo.org/>... Reading symbols from /var/tmp/portage/sys-apps/coreutils-8.7/work/coreutils-8.7/src/sort...done. [New Thread 3824] [New Thread 3823] warning: Can't read pathname for load map: Input/output error. Reading symbols from /usr/lib/libsandbox.so...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libsandbox.so Reading symbols from /lib/libpthread.so.0...(no debugging symbols found)...done. Loaded symbols for /lib/libpthread.so.0 Reading symbols from /lib/libc.so.6...(no debugging symbols found)...done. Loaded symbols for /lib/libc.so.6 Reading symbols from /lib/libdl.so.2...(no debugging symbols found)...done. Loaded symbols for /lib/libdl.so.2 Reading symbols from /lib/ld-linux.so.2...(no debugging symbols found)...done. Loaded symbols for /lib/ld-linux.so.2 Core was generated by `sort -z -u'. Program terminated with signal 11, Segmentation fault. #0 0x01a445b2 in strcoll_l () from /lib/libc.so.6 (gdb) where #0 0x01a445b2 in strcoll_l () from /lib/libc.so.6 #1 0x01a3e331 in strcoll () from /lib/libc.so.6 #2 0x17491023 in strcoll_loop (s1=0xa58a500a "/dev/stdin", s1size=11, s2=0xa58a5015 "/", s2size=2) at memcoll.c:39 #3 memcoll0 (s1=0xa58a500a "/dev/stdin", s1size=11, s2=0xa58a5015 "/", s2size=2) at memcoll.c:110 #4 0x1748e4ba in xmemcoll0 (s1=0xa58a500a "/dev/stdin", s1size=11, s2=0xa58a5015 "/", s2size=2) at xmemcoll.c:71 #5 0x17485be0 in compare (a=0xa79a5018, b=0xa79a5008) at sort.c:2653 #6 0x17485d9a in sequential_sort (lines=<value optimized out>, nlines=<value optimized out>, temp=0xa79a4fc8, to_temp=false) at sort.c:3095 #7 0x17486c72 in sortlines (lines=0xa79a5038, dest=<value optimized out>, nthreads=1, total_lines=7, parent=0xb93b0bf4, lo_child=true, merge_queue=0xb93b0f8c, tfp=0x1b124a0, temp_output=0x0) at sort.c:3470 #8 0x174872c4 in sortlines_thread (data=0xb93b0c20) at sort.c:3404 #9 0x019b767f in start_thread () from /lib/libpthread.so.0 #10 0x01a9bd2e in clone () from /lib/libc.so.6 # gcc --version gcc (Gentoo Hardened 4.3.4 p1.2, pie-10.1.5) 4.3.4 Copyright (C) 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # gcc-config -l [1] i686-pc-linux-gnu-4.3.4 * [2] i686-pc-linux-gnu-4.3.4-hardenednopie [3] i686-pc-linux-gnu-4.3.4-vanilla [4] i686-pc-linux-gnu-4.4.4 [5] i686-pc-linux-gnu-4.4.4-hardenednopie [6] i686-pc-linux-gnu-4.4.4-hardenednopiessp [7] i686-pc-linux-gnu-4.4.4-hardenednossp [8] i686-pc-linux-gnu-4.4.4-vanilla # emerge -e system # cat virtual:libintl-0:20110114-093604.log * Package: virtual/libintl-0 * Repository: gentoo * Maintainer: alt@gentoo.org * USE: elibc_glibc kernel_linux userland_GNU x86 >>> Unpacking source... >>> Source unpacked in /var/tmp/portage/virtual/libintl-0/work >>> Compiling source in /var/tmp/portage/virtual/libintl-0/work ... >>> Source compiled. ACCESS DENIED open_rd: /usr/portage/profiles/base/profile.bashrc /usr/lib/portage/bin/ebuild.sh: line 43: /usr/portage/profiles/base/profile.bashrc: Permission denied ACCESS DENIED open_rd: /usr/portage/profiles/arch/x86/profile.bashrc /usr/lib/portage/bin/ebuild.sh: line 43: /usr/portage/profiles/arch/x86/profile.bashrc: Permission denied >>> Test phase [not enabled]: virtual/libintl-0 --------------------------- ACCESS VIOLATION SUMMARY --------------------------- LOG FILE "/var/log/sandbox/sandbox-27043.log" VERSION 1.0 FORMAT: F - Function called FORMAT: S - Access Status FORMAT: P - Path as passed to function FORMAT: A - Absolute Path (not canonical) FORMAT: R - Canonical Path FORMAT: C - Command Line F: open_rd S: deny P: /usr/portage/profiles/base/profile.bashrc A: /usr/portage/profiles/base/profile.bashrc R: /usr/portage/profiles/base/profile.bashrc C: /bin/bash /usr/lib/portage/bin/ebuild.sh test F: open_rd S: deny P: /usr/portage/profiles/arch/x86/profile.bashrc A: /usr/portage/profiles/arch/x86/profile.bashrc R: /usr/portage/profiles/arch/x86/profile.bashrc C: /bin/bash /usr/lib/portage/bin/ebuild.sh test -------------------------------------------------------------------------------- Press any key to continue... Portage 2.1.9.25 (hardened/linux/x86, gcc-4.3.4, glibc-2.11.2-r3, 2.6.28-hardened-r9 i686) ================================================================= System uname: Linux-2.6.28-hardened-r9-i686-Intel-R-_Core-TM-2_CPU_4300_@_1.80GHz-with-gentoo-1.12.14 Timestamp of tree: Thu, 13 Jan 2011 17:30:01 +0000 app-shells/bash: 4.1_p7 dev-lang/python: 2.6.6-r1 sys-apps/baselayout: 1.12.14-r1 sys-apps/sandbox: 2.4 sys-devel/autoconf: 2.65-r1 sys-devel/automake: 1.11.1 sys-devel/binutils: 2.20.1-r1 sys-devel/gcc: 4.3.4, 4.4.4-r2 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.2.10 sys-devel/make: 3.81-r2 virtual/os-headers: 2.6.30-r1 (sys-kernel/linux-headers) CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -g -pipe -march=i686" CHOST="i686-pc-linux-gnu" CXXFLAGS="-O2 -g -pipe -march=i686" LANG="en_US.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="en" MAKEOPTS="-j3" # cat kern.log Jan 14 12:36:06 zzzz kernel: [7765633.295068] sort[27069]: segfault at ac742099 ip 0147a5b2 sp aa5abff0 error 5 in libc-2.11.2.so[1400000+145000] # db sort -c core -d /var/tmp/portage/sys-apps/coreutils-8.7/work/coreutils-8.7/src/ GNU gdb (Gentoo 7.2 p1) 7.2 Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i686-pc-linux-gnu". For bug reporting instructions, please see: <http://bugs.gentoo.org/>... Reading symbols from /var/tmp/portage/sys-apps/coreutils-8.7/work/coreutils-8.7/src/sort...done. [New Thread 27069] [New Thread 27068] warning: Can't read pathname for load map: Input/output error. Reading symbols from /usr/lib/libsandbox.so...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libsandbox.so Reading symbols from /lib/libpthread.so.0...(no debugging symbols found)...done. Loaded symbols for /lib/libpthread.so.0 Reading symbols from /lib/libc.so.6...(no debugging symbols found)...done. Loaded symbols for /lib/libc.so.6 Reading symbols from /lib/libdl.so.2...(no debugging symbols found)...done. Loaded symbols for /lib/libdl.so.2 Reading symbols from /lib/ld-linux.so.2...(no debugging symbols found)...done. Loaded symbols for /lib/ld-linux.so.2 Core was generated by `sort -z -u'. Program terminated with signal 11, Segmentation fault. #0 0x0147a5b2 in strcoll_l () from /lib/libc.so.6 (gdb) bt #0 0x0147a5b2 in strcoll_l () from /lib/libc.so.6 #1 0x01474331 in strcoll () from /lib/libc.so.6 #2 0x17e06023 in strcoll_loop (s1=0xaa5ad00a "/dev/stdin", s1size=11, s2=0xaa5ad015 "/", s2size=2) at memcoll.c:39 #3 memcoll0 (s1=0xaa5ad00a "/dev/stdin", s1size=11, s2=0xaa5ad015 "/", s2size=2) at memcoll.c:110 #4 0x17e034ba in xmemcoll0 (s1=0xaa5ad00a "/dev/stdin", s1size=11, s2=0xaa5ad015 "/", s2size=2) at xmemcoll.c:71 #5 0x17dfabe0 in compare (a=0xac6ad018, b=0xac6ad008) at sort.c:2653 #6 0x17dfad9a in sequential_sort (lines=<value optimized out>, nlines=<value optimized out>, temp=0xac6acfc8, to_temp=false) at sort.c:3095 #7 0x17dfbc72 in sortlines (lines=0xac6ad038, dest=<value optimized out>, nthreads=1, total_lines=7, parent=0xb9b2da94, lo_child=true, merge_queue=0xb9b2de2c, tfp=0x15484a0, temp_output=0x0) at sort.c:3470 #8 0x17dfc2c4 in sortlines_thread (data=0xb9b2dac0) at sort.c:3404 #9 0x013ed67f in start_thread () from /lib/libpthread.so.0 #10 0x014d1d2e in clone () from /lib/libc.so.6 Created attachment 259805 [details]
core2
A can't reproduce crash sort after upgrade kernel from 2.6.28-hardened-r9 to 2.6.32-hardened-r31 |