Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Sex is like air. It's only a big deal if you can't get any.


devel / comp.lang.python / Re: pytest segfault, not with -v

SubjectAuthor
o Re: pytest segfault, not with -vDan Stromberg

1
Re: pytest segfault, not with -v

<mailman.76.1637436139.19479.python-list@python.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=20520&group=comp.lang.python#20520

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!fu-berlin.de!uni-berlin.de!not-for-mail
From: drsalists@gmail.com (Dan Stromberg)
Newsgroups: comp.lang.python
Subject: Re: pytest segfault, not with -v
Date: Sat, 20 Nov 2021 11:22:06 -0800
Lines: 34
Message-ID: <mailman.76.1637436139.19479.python-list@python.org>
References: <CABbU2U_cTjL031iQ3S7BtAQM4Yc=rhRF6NzK=_C1kOoe+JwjPA@mail.gmail.com>
<255c2cb8-b5ea-6e32-d6eb-1765af3967d5@mrabarnett.plus.com>
<CABbU2U-cWQbJBog-k6vr9pMPpmoY+viHdc9s1DEaihSwaNcB5A@mail.gmail.com>
<e5d32ffa-eedd-715e-7306-e6c099258193@mrabarnett.plus.com>
<CABbU2U8z=r3vgukN==fT9dFJN0d1fTLboB8ek+jukG7ASYKzqg@mail.gmail.com>
<08f263b7-5e26-2dfb-4bf6-1f09470c28b0@mrabarnett.plus.com>
<CABbU2U_hj_OtW1u3Jk5-3c3kzYtU187RQjmX_-vbsf3kgmC10A@mail.gmail.com>
<CAGGBd_p2ozk5tV8AGS6XSA4Hy+D3iFcoXCwxksc6yCfqr8iqsA@mail.gmail.com>
<CAGGBd_paTU1hdnbEA6hwUhSNfAQVA8mp9iV4xjgymrM_78s2OA@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Trace: news.uni-berlin.de V5uaxNGHjgH1IVxDedFLRg2XR1HHnPPO59R6Tr1jvY4Q==
Return-Path: <drsalists@gmail.com>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=gmail.com header.i=@gmail.com header.b=Rg3ew/IB;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.012
X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'library.': 0.05;
'programmer': 0.07; 'cc:addr:python-list': 0.09; 'dan': 0.09;
'grep': 0.09; 'subject:not': 0.09; 'subject:pytest': 0.09;
'memory': 0.15; '(eg': 0.16; "(i'm": 0.16; '10:09': 0.16; 'bash':
0.16; 'cc:name:python list': 0.16; 'failed,': 0.16;
'from:addr:drsalists': 0.16; 'from:name:dan stromberg': 0.16;
'malloc': 0.16; 'subject: -': 0.16; 'usage,': 0.16; 'wrote:':
0.16; 'python': 0.16; 'cc:addr:python.org': 0.20; 'sat,': 0.22;
'cc:2**0': 0.25; 'again,': 0.26; "isn't": 0.27; 'error': 0.29;
'program,': 0.31; "doesn't": 0.32; 'message-id:@mail.gmail.com':
0.32; 'but': 0.32; 'there': 0.33; 'url:blog': 0.33; 'script':
0.33; 'header:In-Reply-To:1': 0.34; 'received:google.com': 0.34;
'from:addr:gmail.com': 0.35; 'necessarily': 0.37; "it's": 0.37;
'received:209.85': 0.37; 'way': 0.38; 'received:209': 0.39; 'use':
0.39; 'received:209.85.222': 0.39; 'above': 0.62; 'url:co': 0.63;
'once': 0.63; 'with:': 0.64; 'process.': 0.65; 'look': 0.65;
'lead': 0.67; '20,': 0.67; 'entire': 0.67; '2021': 0.71; 'head':
0.73; 'established': 0.80; 'url-ip:199/8': 0.84; 'decent': 0.84;
'sulla': 0.84
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
h=mime-version:references:in-reply-to:from:date:message-id:subject:to
:cc; bh=MKpVV818d6YXlQiQjWP3erbUWGiEn3U5/7UqZ/bEXqk=;
b=Rg3ew/IB3AZP3hrZmQ0BWTIR4WRzc4WB8Iou9oGElkusrTU2JwMfoIzZ/VeLpHdGwb
C8wljWdChT+TXUFpjjv4C+VLj/lLbumJ2pubQH3D178t9raUjzzL+e9aaYbAFVYhW7ed
cu0H8jccC3LG22crKJbQ2FLmWWhj/EzSSgBOPBG1j7807pHcmXOV/FVMcs1edGdsKUqu
WpHY32FHzUWXKGS+ZnwPeDaH+E8EL2KAyZ7JLVs2PgquHMrenD2XdYYqSaHJhigjw/WR
d1j5r64Yq/5Jda8fHoVErELpBGiUNkll7QinIc7+UaR1T0LO08vqT5Ctx9t1FqHdfEdP
WDfw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20210112;
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
:message-id:subject:to:cc;
bh=MKpVV818d6YXlQiQjWP3erbUWGiEn3U5/7UqZ/bEXqk=;
b=FZD4khURPWrLvFNDZCJq/vMX7O0ICwCX94iwOxHhj3hqtxQ8CcgAJyeVQCpCAx0iuJ
KpcXjLAp4d08BR37TKRnCmlCDt3XrvfpZmPTrNnDhZXCzWmCtkd1uKbGXZX/h5Ck4X3+
PxYCZamlPCsgI7nGWkBeZx6/JBXQLAX5XsMm6Wk9GYxYFoO8+KuuuWjT7QvycCr3Gu57
CgCxcgjkQOWmhYL/lNWGaRXviGK6cxmRRKsUXQFT0MhAQr5TncLMpfHDAcX1/FmxABTd
eqxaekSUfJq4HN/gXm4GiEI9hcYmJsbfMB2Mt7GCJ9e8EjiqAAHy9+wucYui8Py/bOUt
5p7A==
X-Gm-Message-State: AOAM532QeSKCs90sJgmnHVLAMvDclcA32vbscs623DkXmSmJt1Hw0d4h
ytmDj3CV3isUMCIzpBJr/MfZQDWVXuxY4w5Ng8+aGt6hQ/E=
X-Google-Smtp-Source: ABdhPJygT0hVfFlwc8K34KTPbooRw3RWJM+AgLqfr6OF8rzUUK6+zdGwJ6LN1CBwFQtbVxiUZGsNwz/6L77npTG6wLI=
X-Received: by 2002:a67:ec94:: with SMTP id h20mr107364455vsp.59.1637436137340;
Sat, 20 Nov 2021 11:22:17 -0800 (PST)
In-Reply-To: <CAGGBd_p2ozk5tV8AGS6XSA4Hy+D3iFcoXCwxksc6yCfqr8iqsA@mail.gmail.com>
X-Content-Filtered-By: Mailman/MimeDel 2.1.37
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.37
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://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: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <CAGGBd_paTU1hdnbEA6hwUhSNfAQVA8mp9iV4xjgymrM_78s2OA@mail.gmail.com>
X-Mailman-Original-References: <CABbU2U_cTjL031iQ3S7BtAQM4Yc=rhRF6NzK=_C1kOoe+JwjPA@mail.gmail.com>
<255c2cb8-b5ea-6e32-d6eb-1765af3967d5@mrabarnett.plus.com>
<CABbU2U-cWQbJBog-k6vr9pMPpmoY+viHdc9s1DEaihSwaNcB5A@mail.gmail.com>
<e5d32ffa-eedd-715e-7306-e6c099258193@mrabarnett.plus.com>
<CABbU2U8z=r3vgukN==fT9dFJN0d1fTLboB8ek+jukG7ASYKzqg@mail.gmail.com>
<08f263b7-5e26-2dfb-4bf6-1f09470c28b0@mrabarnett.plus.com>
<CABbU2U_hj_OtW1u3Jk5-3c3kzYtU187RQjmX_-vbsf3kgmC10A@mail.gmail.com>
<CAGGBd_p2ozk5tV8AGS6XSA4Hy+D3iFcoXCwxksc6yCfqr8iqsA@mail.gmail.com>
 by: Dan Stromberg - Sat, 20 Nov 2021 19:22 UTC

On Sat, Nov 20, 2021 at 10:59 AM Dan Stromberg <drsalists@gmail.com> wrote:

>
>
> On Sat, Nov 20, 2021 at 10:09 AM Marco Sulla <Marco.Sulla.Python@gmail.com>
> wrote:
>
>> I know how to check the refcounts, but I don't know how to check the
>> memory usage, since it's not a program, it's a simple library. Is
>> there not a way to check inside Python the memory usage? I have to use
>> a bash script (I'm on Linux)?
>>
>
> ps auxww
> ...can show you how much memory is in use for the entire process.
>
> It's commonly combined with grep, like:
> ps auxww | head -1
> ps auxww | grep my-program-name
>
> Have a look at the %MEM, VSZ and RSS columns.
>
> But being out of memory doesn't necessarily lead to a segfault - it can
> (EG if a malloc failed, and some C programmer neglected to do decent error
> checking), but an OOM kill is more likely.
>

The above can be used to detect a leak in the _process_.

Once it's been established (if it's established) that the process is
getting oversized, you can sometimes see where the memory is going with:
https://www.fugue.co/blog/diagnosing-and-fixing-memory-leaks-in-python.html

But again, a memory leak isn't necessarily going to lead to a segfault.


devel / comp.lang.python / Re: pytest segfault, not with -v

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor