Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

"And remember: Evil will always prevail, because Good is dumb." -- Spaceballs


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

SubjectAuthor
o Re: pytest segfault, not with -vDieter Maurer

1
Re: pytest segfault, not with -v

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

  copy mid

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

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: dieter@handshake.de (Dieter Maurer)
Newsgroups: comp.lang.python
Subject: Re: pytest segfault, not with -v
Date: Sun, 21 Nov 2021 07:14:13 +0100
Lines: 22
Message-ID: <mailman.96.1637477394.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>
<24985.58293.668991.392376@ixdm.fritz.box>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.uni-berlin.de /SSlgxjaXuauzL+cJ5qm7Q66CinU5cC6epbv8tDL8rmA==
Return-Path: <dieter@handshake.de>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=none reason="no signature";
dkim-adsp=none (unprotected policy); dkim-atps=neutral
X-Spam-Status: OK 0.000
X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; '(e.g.': 0.05; '3.6': 0.05;
'library.': 0.05; "python's": 0.05; '2.7': 0.09; 'allocation':
0.09; 'cc:addr:python-list': 0.09; 'prints': 0.09; 'skip:` 10':
0.09; 'subject:not': 0.09; 'subject:pytest': 0.09; 'ubuntu': 0.09;
'memory': 0.15; "(i'm": 0.16; '(unless': 0.16; 'bash': 0.16;
'bugs': 0.16; 'cases,': 0.16; 'cc:name:python list': 0.16;
'compiled': 0.16; 'subject: -': 0.16; 'usage,': 0.16; 'python':
0.16; 'cc:addr:python.org': 0.20; 'way.': 0.22; 'received:de':
0.23; 'cc:2**0': 0.25; 'behavior': 0.26; 'function': 0.27;
'program,': 0.31; 'but': 0.32; 'script': 0.33; 'able': 0.34;
'header:In-Reply-To:1': 0.34; 'runs': 0.35; 'change': 0.36;
'those': 0.36; "it's": 0.37; 'way': 0.38; 'use': 0.39; '(with':
0.39; 'wrote': 0.39; 'still': 0.40; 'your': 0.64; 'shows': 0.67;
'primary': 0.67; 'header:Received:6': 0.67; 'management': 0.68;
'free': 0.72; 'minor': 0.84; 'received:88': 0.84; 'sulla': 0.84
In-Reply-To: <CABbU2U_hj_OtW1u3Jk5-3c3kzYtU187RQjmX_-vbsf3kgmC10A@mail.gmail.com>
X-Mailer: VM 8.0.12-devo-585 under 21.4 (patch 24) "Standard C" XEmacs Lucid
(x86_64-linux-gnu)
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: <24985.58293.668991.392376@ixdm.fritz.box>
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>
 by: Dieter Maurer - Sun, 21 Nov 2021 06:14 UTC

Marco Sulla wrote at 2021-11-20 19:07 +0100:
>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)?

If Python was compiled appropriately (with "PYMALLOG_DEBUG"), `sys` contains
the function `_debugmallocstats` which prints details
about Python's memory allocation and free lists.

I was not able to compile Python 2.7 in this way. But the (system) Python 3.6
of Ubuntu was compiled appropriately.

Note that memory leaks usually do not cause segfaults (unless the application
runs out of memory due to the leak).

Your observation shows (apparently) non-deterministic behavior. In those cases,
minor differences (e.g. with/without "-v") can significantly change
the behavior (e.g. segfault or not). Memory management bugs (releasing memory
still in use) are a primary cause for this kind of behavior in Python
applications.


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

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor