Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #27909

Re: Segfault when setting an instance property on 2.7.3

Path csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <plr.vincent@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.018
X-Spam-Evidence '*H*': 0.96; '*S*': 0.00; 'cpython': 0.05; 'debug': 0.05; 'pypy': 0.07; 'received:localnet': 0.09; 'subject:setting': 0.09; 'buffers,': 0.16; 'gc.collect()': 0.16; 'subject:2.7.3': 0.16; 'subject:instance': 0.16; 'subject:when': 0.16; 'valgrind.': 0.16; 'else,': 0.17; 'memory': 0.18; 'trying': 0.21; 'ctypes': 0.22; 'references': 0.23; 'idea': 0.24; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'received:209.85.212': 0.28; 'maybe': 0.29; 'quickly': 0.32; 'turns': 0.33; 'problem': 0.33; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'received:209.85': 0.35; 'something': 0.35; 'message- id:@gmail.com': 0.36; 'why': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'leading': 0.61; 'further': 0.61; 'header:Message-Id:1': 0.62; 'more': 0.63; 'forced': 0.84; 'often,': 0.84; 'recycling': 0.84; 'samedi': 0.84; 'received:86': 0.93
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:user-agent:references:in-reply-to:mime-version :content-type:content-transfer-encoding:message-id; bh=Zi0/AeVlA/lQstxNG/YmeRPcQfqWCq0UaiO2Fn5soMM=; b=0/s8J8jUPi+G/Spl+bmUGG4AOVEAuPrvEBgvye//jEqJyGHTaDbUouvhdl4KYXtdpa DjmT3G+tMTS90K6J7jTH1c5A3r5QcrAu1Stle43tLTFlxL98U06xvkdjoPTcsX4E+cKA shhwuLiVPL3skOY68+nX2qpzxTnUuNvvyHa4UaUQtyv8TzX3Jz0quXgL+RsvmiXY8vaY iidTMIwowAvIwVaE1X836FK/kBCKSpTvgNFgSNfTYwHKcVDdwUlC5Qpj2IE8RTPm4lw1 xaEI5fW49bGBfrdWLwaucLqj9RW4n3Crwr/qO/m5SrLGzcKmv5AAL0r/RNqM1tpNzXvq SYag==
From Vincent Pelletier <plr.vincent@gmail.com>
To python-list@python.org
Subject Re: Segfault when setting an instance property on 2.7.3
Date Sun, 26 Aug 2012 09:43:15 +0200
User-Agent KMail/1.13.7 (Linux/3.4.2case; KDE/4.8.4; x86_64; ; )
References <201208251138.47725.plr.vincent@gmail.com>
In-Reply-To <201208251138.47725.plr.vincent@gmail.com>
MIME-Version 1.0
Content-Type Text/Plain; charset="utf-8"
Content-Transfer-Encoding quoted-printable
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.3832.1345967000.4697.python-list@python.org> (permalink)
Lines 20
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1345967000 news.xs4all.nl 6887 [2001:888:2000:d::a6]:48315
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:27909

Show key headers only | View raw


Le samedi 25 août 2012 11:38:47, Vincent Pelletier a écrit :
> Any idea of ways to debug this problem further ?

Trying with pypy ("just to see"), I got even more reproductible segfaults - 
even with valgrind.

Turns out, I was not keeping strong references to ctypes buffers, which get 
very quickly collected with pypy and memory reused for something else, leading 
to a quick crash.

Now, I don't get yet why cpython was not crashing more often, even if I forced 
gc.collect() . Less memory recycling maybe ?

Regards,
-- 
Vincent Pelletier

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Segfault when setting an instance property on 2.7.3 Vincent Pelletier <plr.vincent@gmail.com> - 2012-08-26 09:43 +0200

csiph-web