From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id D4D39138247 for ; Fri, 17 Jan 2014 17:14:39 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C2043E0BE6; Fri, 17 Jan 2014 17:14:33 +0000 (UTC) Received: from mail-pd0-f171.google.com (mail-pd0-f171.google.com [209.85.192.171]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 8767FE0BB5 for ; Fri, 17 Jan 2014 17:14:32 +0000 (UTC) Received: by mail-pd0-f171.google.com with SMTP id g10so3523073pdj.2 for ; Fri, 17 Jan 2014 09:14:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=g0sBjEx3zoJF0PBEQz2n9Ejk9xe06bsNlGOJNQsKwcs=; b=VPkzsl+SJbsd9e8s8YOSB/b1M1xybi3pnkeG1uTI3otshOL9+nO5BSLc0QGmsK9sgo Bj7pvhWNQVsHaf+GqAsD+7ayYg+91ehggiI0chMFUFA1eVdflGhc+9plNVRuj+zw/+W8 oS4AuF+akEFQJgt3U25LRtDjflv4WJqt3YDDpQU41xGSmBLpMNlp6pclK2yynr21+NKy sdjVmCFueHZYK5uTrWXu8ZVyaXqpy/Lg11EMKjW22OOU54kHlkOgSJZvzvYxcKOQYSDC blyxTaZQ/de+2F2yngXTjraMrgjXEFH8yVTqketWElZNBnrF1OrCA3qkRKHxZr3JBVJN Aubw== X-Received: by 10.66.171.196 with SMTP id aw4mr3305691pac.51.1389978871568; Fri, 17 Jan 2014 09:14:31 -0800 (PST) Received: from [192.168.247.60] (76-10-184-69.dsl.teksavvy.com. [76.10.184.69]) by mx.google.com with ESMTPSA id qw8sm24195253pbb.27.2014.01.17.09.14.29 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 17 Jan 2014 09:14:30 -0800 (PST) Message-ID: <52D964F5.5010202@gmail.com> Date: Fri, 17 Jan 2014 09:14:29 -0800 From: Daniel Frey User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Re: updating old box: segfaults with python References: <52CD3664.8010205@xunil.at> <201401081145.53124.michaelkintzios@gmail.com> <52CD3C61.8020002@xunil.at> <20140108162034.3b3c53d7@digimed.co.uk> <52CD7FA4.6020600@xunil.at> <52CD8B5B.8090009@xunil.at> <52CDD399.8070401@xunil.at> <1389255363.29604.0@numa-i.igpm.rwth-aachen.de> <52CE7311.5050408@xunil.at> <1389931674003-274799.post@n4.nabble.com> In-Reply-To: <1389931674003-274799.post@n4.nabble.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Archives-Salt: 3a0356a5-a2e3-443c-9570-9b506920a764 X-Archives-Hash: cd6115201507877297bc972aadb2d5d4 On 01/16/2014 08:07 PM, lovely2 wrote: > I doubt this is a memory problem. I've just had the same problem with > glibc-2.17 and python. I manually went back to glibc-2.16 and everything is > fine again. I then tried re-emerging all the python versions with glibc-2.16 > installed and then re-emerged glibc-2.17 and had the same problem. > > After running strace on the python2.7. My best guess is that it is a kernel > <> glibc-2.17 incompatiblity. The segfault happens near a mprotect > operation, very early on. > > vault ~ # strace python > -- snip -- > mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = > 0xb7462000 > set_thread_area({entry_number:-1 -> 6, base_addr:0xb74626c0, limit:1048575, > seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, > seg_not_present:0, useable:1}) = 0 > mprotect(0xb7658000, 8192, PROT_READ) = 0 > --- SIGSEGV (Segmentation fault) @ 0 (0) --- > +++ killed by SIGSEGV +++ > Segmentation fault > > vault ~ # uname -a > Linux vault 2.6.31-gentoo-r10 #1 SMP Sun Mar 7 14:35:15 EST 2010 i686 > Intel(R) Core(TM)2 Quad CPU Q8400 @ 2.66GHz GenuineIntel GNU/Linux > > I'm upgrading to the latest gentoo-sources. Only thing i'm worried about is > rebooting but all in the life of a gentoo user. That could very well be (kernel issue with glibc-2.17.) I just upgraded some 3 year old gentoo VMs and managed to get everything installed. The kernel was the last thing I did have to upgrade, but I was on gentoo-sources-2.6.32 and had no segfault problems. >From memory, I had to upgrade things in this order: -run emerge --sync -gcc (then switch to new version) -emerge libtool, binutils, linux-headers, glibc (glib as a dependency had to be masked to build, may have to solve some other blocks like a fallocate64 error, i think i had to use `ac_cv_func_fallocate=no emerge bintuils` so libtool would build?) -rebuild gcc (advise from the gcc package - rebuild after glibc update) -upgrade baselayout and openrc (inc. udev, module-init-tool->kmod, etc) -perl (then run perl-cleaner) -python (then remove all stale versions of 3.x and 2.x, switch active to 2.7) -python-updater -upgrade portage, portage-utils -unmask things I'd individually masked and try to solve blocks emerging world -eventually world would run, make sure everything built -run emerge-pvuDNe to make sure nothing was missed (something always is) then upgrade those packages -run emerge --depclean -run emerge @preserved-rebuild -run python-update & perl-cleaner -run revdep-rebuild -build & install new kernel (in my case 3.10.25) -reboot Damn, it works and it's up to date. Now I wish I could say that only took an hour, but on the first machine it took me almost 10 hours because I was almost always trying to work around blocks. The very last one I got down to 7 hours as I knew exactly what I had to do. The problem is it doesn't look like there's still an old 2.6 kernel in the tree you can upgrade to so it might be difficult: $ eshowkw gentoo-sources Keywords for sys-kernel/gentoo-sources: | | u | | a a a p s | n | | l m r h i m m p s p | u s | r | p d a m p a 6 i p c 3 a x | s l | e | h 6 r 6 p 6 8 p p 6 9 s r 8 | e o | p | a 4 m 4 a 4 k s c 4 0 h c 6 | d t | o --------------+-----------------------------+-------------+------- 3.0.101 | ~ ~ ~ o ~ ~ o o ~ ~ ~ ~ ~ ~ | o 3.0.101 | gentoo --------------+-----------------------------+-------------+------- 3.2.54 | ~ ~ ~ o ~ ~ o o ~ ~ ~ ~ ~ ~ | o 3.2.54 | gentoo --------------+-----------------------------+-------------+------- 3.4.76 | ~ ~ ~ o ~ ~ o o ~ ~ ~ ~ ~ ~ | o 3.4.76 | gentoo --------------+-----------------------------+-------------+------- 3.4.77 | ~ ~ ~ o ~ ~ o o ~ ~ ~ ~ ~ ~ | o 3.4.77 | gentoo --------------+-----------------------------+-------------+------- 3.4.9999 | o o o o o o o o o o o o o o | o 3.4.9999 | gentoo --------------+-----------------------------+-------------+------- 3.9.11-r1 | o ~ ~ o o ~ o o o o o o o ~ | o 3.9.11-r1 | gentoo --------------+-----------------------------+-------------+------- 3.10.7 | + + + o + + o ~ + + + + + + | o 3.10.7 | gentoo --------------+-----------------------------+-------------+------- 3.10.7-r1 | + + + o + + o ~ + + + + + + | o 3.10.7-r1 | gentoo --------------+-----------------------------+-------------+------- [I]3.10.17 | ~ + ~ o + ~ o ~ ~ ~ ~ ~ ~ + | o 3.10.17 | gentoo --------------+-----------------------------+-------------+------- 3.10.25 | ~ + + o + + o ~ + + ~ ~ ~ + | o 3.10.25 | gentoo --------------+-----------------------------+-------------+------- 3.10.26 | ~ ~ ~ o ~ ~ o ~ ~ ~ ~ ~ ~ ~ | o 3.10.26 | gentoo --------------+-----------------------------+-------------+------- 3.10.27 | ~ ~ ~ o ~ ~ o ~ ~ ~ ~ ~ ~ ~ | o 3.10.27 | gentoo --------------+-----------------------------+-------------+------- 3.10.9999 | o o o o o o o o o o o o o o | o 3.10.9999 | gentoo --------------+-----------------------------+-------------+------- 3.11.10 | ~ ~ ~ o ~ ~ o ~ ~ ~ ~ ~ ~ ~ | o 3.11.10 | gentoo --------------+-----------------------------+-------------+------- 3.11.9999 | o o o o o o o o o o o o o o | o 3.11.9999 | gentoo --------------+-----------------------------+-------------+------- 3.12.7 | ~ ~ ~ o ~ ~ o ~ ~ ~ ~ ~ ~ ~ | o 3.12.7 | gentoo --------------+-----------------------------+-------------+------- 3.12.8 | ~ ~ ~ o ~ ~ o ~ ~ ~ ~ ~ ~ ~ | o 3.12.8 | gentoo --------------+-----------------------------+-------------+------- 3.12.9999 | o o o o o o o o o o o o o o | o 3.12.9999 | gentoo Dan