Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 28416 - re-emerge portage gives segmentation fault on gentoo-hardened
Summary: re-emerge portage gives segmentation fault on gentoo-hardened
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-10 22:58 UTC by Jetchko Jekov
Modified: 2003-12-07 23:16 UTC (History)
1 user (show)

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 Jetchko Jekov 2003-09-10 22:58:41 UTC
when trying to re-emerge portage-2.0.49-r3 on hardened gentoo system with 
kernel 2.4.20-hardened-r4 it gives me a segmenation fault in merge stage: 
 >>> /usr/lib/portage/bin/regenworld.sh 
>>> /usr/lib/portage/bin/repoman 
>>> /usr/lib/portage/bin/xpak 
Segmentation fault 
This is only in case when a python-selinux module is installed 
if I unmerge that python-selinux and try  
emerge portage --nodeps portage is emerged with some strange errors 
Recalculating the counter... Counter updated successfully. 
>>> Clearing invalid entries in dependancy cache...grep: Invalid regular 
expression 
wc: write error: Broken pipe 
wc: write error: Broken pipe 
.... 
wc: write error: Broken pipe 
wc: write error: Broken pipe 
 ...done! 
>>> Regenerating /etc/ld.so.cache... 
>>> sys-apps/portage-2.0.49-r3 merged. 
 
but in case when python-selinux is not installed 
and I issue a  
ACCEPT_KEYWORDS='~x86' emerge portage 
which emerge python-selinux module first and then portage itself 
all works as expected without errors 
 

Reproducible: Always
Steps to Reproduce:
1.
2.
3.



Portage 2.0.49-r3 (selinux-x86-1.4, gcc-3.2.3, glibc-2.3.2-r1, 
2.4.20-hardened-r4) 
================================================================= 
System uname: 2.4.20-hardened-r4 i686 Pentium II (Deschutes) 
distcc 2.10 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled] 
ACCEPT_KEYWORDS="x86" 
AUTOCLEAN="yes" 
CFLAGS="-march=pentium2 -O3 -pipe" 
CHOST="i686-pc-linux-gnu" 
COMPILER="gcc3" 
CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config 
/usr/kde/2/share/config /usr/kde/3/share/config" 
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" 
CXXFLAGS="-march=pentium2 -O3 -pipe" 
DISTDIR="/usr/portage/distfiles" 
FEATURES="sandbox ccache autoaddcvs loadpolicy distcc" 
GENTOO_MIRRORS="http://gentoo/ http://gentoo.oregonstate.edu 
http://www.ibiblio.org/pub/Linux/distributions/gentoo" 
MAKEOPTS="-j2" 
PKGDIR="/usr/portage/packages" 
PORTAGE_TMPDIR="/var/tmp" 
PORTDIR="/usr/portage" 
PORTDIR_OVERLAY="" 
SYNC="rsync://linora.flavia.com/gentoo-portage" 
USE="x86 crypt ncurses selinux zlib berkdb readline tcpd pam ssl perl python -X 
-gtk -gnome -kde -alsa nls gdbm"
Comment 1 Joshua Brindle (RETIRED) gentoo-dev 2003-09-14 20:18:24 UTC
i am unable to reproduce this
you can disable the selinux module either by unmerging python-selinux or just deleting /usr/lib/python2.2/site-packages/selinux.so so it won't try and load but so that i can get a grasp on this problem i'd like a gdb backtrace and if possible an strace of the segfault, thanks
Comment 2 Jetchko Jekov 2003-09-19 00:31:50 UTC
Strange... 
I can reproduce this every time 
yesterday i started clean install without using ~x86. This way only unstable 
packages in my system are  
sys-apps/selinux-small-2003040709-r4 
dev-python/python-selinux-1.2 
dev-python/pexpect-0.97 
 
no changes ... 
i can't get backtrace log ...  
gw root # gdb /usr/bin/python2.2 core 
GNU gdb 5.3 
Copyright 2002 Free Software Foundation, Inc. 
GDB is free software, covered by the GNU General Public License, and you are 
welcome to change it and/or distribute copies of it under certain conditions. 
Type "show copying" to see the conditions. 
There is absolutely no warranty for GDB.  Type "show warranty" for details. 
This GDB was configured as "i686-pc-linux-gnu"...(no debugging symbols 
found)... 
Core was generated by `python2.2 /usr/bin/emerge portage'. 
Program terminated with signal 11, Segmentation fault. 
Reading symbols from /lib/libdl.so.2...(no debugging symbols found)...done. 
Loaded symbols for /lib/libdl.so.2 
Reading symbols from /lib/libpthread.so.0...(no debugging symbols 
found)...done. 
Loaded symbols for /lib/libpthread.so.0 
Reading symbols from /lib/libutil.so.1...(no debugging symbols found)...done. 
Loaded symbols for /lib/libutil.so.1 
Reading symbols from 
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/libstdc++.so.5...(no debugging symbols 
found)...done. 
Loaded symbols for /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/libstdc++.so.5 
Reading symbols from /lib/libm.so.6...(no debugging symbols found)...done. 
Loaded symbols for /lib/libm.so.6 
Reading symbols from 
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/libgcc_s.so.1...done. 
Loaded symbols for /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/libgcc_s.so.1 
Reading symbols from /lib/libc.so.6...done. 
Loaded symbols for /lib/libc.so.6 
Reading symbols from /lib/ld-linux.so.2...done. 
Loaded symbols for /lib/ld-linux.so.2 
Reading symbols from /usr/lib/python2.2/lib-dynload/strop.so...done. 
Loaded symbols for /usr/lib/python2.2/lib-dynload/strop.so 
Reading symbols from /usr/lib/python2.2/lib-dynload/time.so...done. 
Loaded symbols for /usr/lib/python2.2/lib-dynload/time.so 
Reading symbols from /usr/lib/python2.2/lib-dynload/select.so...done. 
Loaded symbols for /usr/lib/python2.2/lib-dynload/select.so 
Reading symbols from /usr/lib/python2.2/lib-dynload/math.so...done. 
Loaded symbols for /usr/lib/python2.2/lib-dynload/math.so 
Reading symbols from /usr/lib/python2.2/lib-dynload/cPickle.so...done. 
Loaded symbols for /usr/lib/python2.2/lib-dynload/cPickle.so 
Reading symbols from /usr/lib/python2.2/lib-dynload/cStringIO.so...done. 
Loaded symbols for /usr/lib/python2.2/lib-dynload/cStringIO.so 
Reading symbols from /usr/lib/python2.2/lib-dynload/_socket.so...done. 
Loaded symbols for /usr/lib/python2.2/lib-dynload/_socket.so 
Reading symbols from /usr/lib/python2.2/site-packages/missingos.so...done. 
Loaded symbols for /usr/lib/python2.2/site-packages/missingos.so 
Reading symbols from /usr/lib/python2.2/lib-dynload/fcntl.so...done. 
Loaded symbols for /usr/lib/python2.2/lib-dynload/fcntl.so 
Reading symbols from /usr/lib/python2.2/lib-dynload/grp.so...done. 
Loaded symbols for /usr/lib/python2.2/lib-dynload/grp.so 
Reading symbols from /usr/lib/python2.2/lib-dynload/pwd.so...done. 
Loaded symbols for /usr/lib/python2.2/lib-dynload/pwd.so 
Reading symbols from /lib/libnss_compat.so.2...done. 
Loaded symbols for /lib/libnss_compat.so.2 
Reading symbols from /lib/libnsl.so.1...done. 
Loaded symbols for /lib/libnsl.so.1 
Reading symbols from /usr/lib/python2.2/site-packages/fchksum.so...done. 
Loaded symbols for /usr/lib/python2.2/site-packages/fchksum.so 
Reading symbols from /usr/lib/libz.so.1...done. 
Loaded symbols for /usr/lib/libz.so.1 
Reading symbols from /usr/lib/python2.2/site-packages/selinux.so...done. 
Loaded symbols for /usr/lib/python2.2/site-packages/selinux.so 
#0  0x00000b80 in ?? () 
(gdb) bt 
#0  0x00000b80 in ?? () 
Cannot access memory at address 0x3 
 
last 50 lines of strace log are: 
rename("/var/tmp/portage/portage-2.0.49-r3/image/usr/lib/portage/bin/repoman", 
"/usr/lib/portage/bin/repoman") = -1 EXDEV (Invalid cross-device link) 
security(0xf97cff8c, 0xc, 0, 0xbfffea00, 0x82235f4) = 240 
security(0xf97cff8c, 0x25, 0xbfffe990, 0xbfffea00, 0x82235f4) = 0 
security(0xf97cff8c, 0x14, 0xbfffe990, 0x839beac, 0x83a5b88) = 5 
open("/var/tmp/portage/portage-2.0.49-r3/image/usr/lib/portage/bin/repoman", 
O_RDONLY|O_LARGEFILE) = 6 
read(6, "#!/usr/bin/python2.2\n# Copyright"..., 16384) = 16384 
write(5, "#!/usr/bin/python2.2\n# Copyright"..., 16384) = 16384 
read(6, "rtage.evaluate(portage.tokenize("..., 16384) = 16384 
write(5, "rtage.evaluate(portage.tokenize("..., 16384) = 16384 
read(6, "==\".\":\n\t\t\t\t\txs=xs[1:]\n\t\t\t\tif xs["..., 16384) = 1645 
write(5, "==\".\":\n\t\t\t\t\txs=xs[1:]\n\t\t\t\tif xs["..., 1645) = 1645 
read(6, "", 16384)                      = 0 
close(5)                                = 0 
close(6)                                = 0 
unlink("/var/tmp/portage/portage-2.0.49-r3/image/usr/lib/portage/bin/repoman") 
= 0 
utime("/usr/lib/portage/bin/repoman", [2003/09/19-13:29:05, 
2003/09/19-13:29:05]) = 0 
write(1, ">>> /usr/lib/portage/bin/repoman"..., 33) = 33 
lstat64("/var/tmp/portage/portage-2.0.49-r3/image/usr/lib/portage/bin/xpak", 
{st_mode=S_IFREG|0755, st_size=365, ...}) = 0 
lstat64("/usr/lib/portage/bin/xpak", {st_mode=S_IFREG|0755, st_size=365, ...}) 
= 0 
open("/var/tmp/portage/portage-2.0.49-r3/image/usr/lib/portage/bin/xpak", 
O_RDONLY|O_LARGEFILE) = 5 
read(5, "#!/usr/bin/python2.2\n# Copyright"..., 32768) = 365 
read(5, "", 32403)                      = 0 
close(5)                                = 0 
lstat64("/usr/lib/portage/bin/xpak", {st_mode=S_IFREG|0755, st_size=365, ...}) 
= 0 
rename("/var/tmp/portage/portage-2.0.49-r3/image/usr/lib/portage/bin/xpak", 
"/usr/lib/portage/bin/xpak") = -1 EXDEV (Invalid cross-device link) 
security(0xf97cff8c, 0xc, 0, 0xbfffea00, 0x822355c) = 240 
security(0xf97cff8c, 0x25, 0xbfffe990, 0xbfffea00, 0x822355c) = 0 
security(0xf97cff8c, 0x14, 0xbfffe990, 0x83a2ef4, 0x83a5b88) = 5 
open("/var/tmp/portage/portage-2.0.49-r3/image/usr/lib/portage/bin/xpak", 
O_RDONLY|O_LARGEFILE) = 6 
read(6, "#!/usr/bin/python2.2\n# Copyright"..., 16384) = 365 
write(5, "#!/usr/bin/python2.2\n# Copyright"..., 365) = 365 
read(6, "", 16384)                      = 0 
close(5)                                = 0 
close(6)                                = 0 
unlink("/var/tmp/portage/portage-2.0.49-r3/image/usr/lib/portage/bin/xpak") = 0 
utime("/usr/lib/portage/bin/xpak", [2003/09/19-13:29:05, 2003/09/19-13:29:05]) 
= 0 
write(1, ">>> /usr/lib/portage/bin/xpak\n", 30) = 30 
lstat64("/var/tmp/portage/portage-2.0.49-r3/image/usr/lib/portage/bin/pmake", 
{st_mode=S_IFLNK|0777, st_size=5, ...}) = 0 
lstat64("/usr/lib/portage/bin/pmake", {st_mode=S_IFLNK|0777, st_size=5, ...}) = 
0 
readlink("/var/tmp/portage/portage-2.0.49-r3/image/usr/lib/portage/bin/pmake", 
"emake", 4096) = 5 
readlink("/var/tmp/portage/portage-2.0.49-r3/image/usr/lib/portage/bin/pmake", 
"emake", 4096) = 5 
stat64("/usr/lib/portage/bin/emake", {st_mode=S_IFREG|0755, st_size=679, ...}) 
= 0 
lstat64("/usr/lib/portage/bin/pmake", {st_mode=S_IFLNK|0777, st_size=5, ...}) = 
0 
unlink("/usr/lib/portage/bin/pmake")    = 0 
readlink("/var/tmp/portage/portage-2.0.49-r3/image/usr/lib/portage/bin/pmake", 
"emake", 4096) = 5 
security(0xf97cff8c, 0xc, 0, 0xbfffead0, 0x82237fc) = 240 
security(0xf97cff8c, 0x26, 0xbfffea70, 0xbfffead0, 0x82237fc) = 0 
security(0xf97cff8c, 0x17, 0xbfffead0, 0x8223704, 0x838fe80) = 0 
--- SIGSEGV (Segmentation fault) @ 0 (0) --- 
+++ killed by SIGSEGV +++ 
 
Comment 3 John Davis (zhen) (RETIRED) gentoo-dev 2003-12-06 23:03:27 UTC
have you tried upgrading kernel versions? Also, are there any suspicious messages in when you run dmesg? If so, please paste.
Comment 4 Jetchko Jekov 2003-12-07 23:16:42 UTC
ow, this bug report is very, very old.
it was a problem in python-selinux module which is resolved