Re: pytest segfault, not with -v

2021-12-19 Thread Dieter Maurer
Marco Sulla wrote at 2021-12-18 21:01 +0100: >Emh, maybe I was not clear. I created a C extension and it segfaults. >So I created that script to see where it segfaults. But the script >does not segfault. My doubt is: is that because I'm using eval and >exec in the script? The segfault in your C ex

Re: pytest segfault, not with -v

2021-12-18 Thread Barry
> On 18 Dec 2021, at 20:05, Marco Sulla wrote: > > Emh, maybe I was not clear. I created a C extension and it segfaults. > So I created that script to see where it segfaults. But the script > does not segfault. My doubt is: is that because I'm using eval and > exec in the script? You may stru

Re: pytest segfault, not with -v

2021-12-18 Thread Marco Sulla
Emh, maybe I was not clear. I created a C extension and it segfaults. So I created that script to see where it segfaults. But the script does not segfault. My doubt is: is that because I'm using eval and exec in the script? On Sat, 18 Dec 2021 at 18:33, Dieter Maurer wrote: > > Marco Sulla wrote

Re: pytest segfault, not with -v

2021-12-18 Thread Dieter Maurer
Marco Sulla wrote at 2021-12-18 14:10 +0100: >Ok, I created the script: > >https://github.com/Marco-Sulla/python-frozendict/blob/master/test/debug.py > >The problem is it does _not_ crash, while a get a segfault using >pytest with python 3.9 on MacOS 10.15 > >Maybe it's because I'm using eval / exe

Re: pytest segfault, not with -v

2021-12-18 Thread Marco Sulla
Ok, I created the script: https://github.com/Marco-Sulla/python-frozendict/blob/master/test/debug.py The problem is it does _not_ crash, while a get a segfault using pytest with python 3.9 on MacOS 10.15 Maybe it's because I'm using eval / exec in the script? On Sat, 20 Nov 2021 at 18:40, Marco

Re: pytest segfault, not with -v

2021-11-21 Thread Barry
I would run the whole set of tests under gdb and wait for the segv to happen. You may find that an isolated test will pass. Sometimes it is a sequence of test and lead to the segv. Barry > On 19 Nov 2021, at 23:48, Marco Sulla wrote: > > On Fri, 19 Nov 2021 at 20:38, MRAB wrote: >> >>> On 20

Re: pytest segfault, not with -v

2021-11-20 Thread Dieter Maurer
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

Re: pytest segfault, not with -v

2021-11-20 Thread Dan Stromberg
On Sat, Nov 20, 2021 at 10:59 AM Dan Stromberg wrote: > > > On Sat, Nov 20, 2021 at 10:09 AM Marco Sulla > 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 Pyth

Re: pytest segfault, not with -v

2021-11-20 Thread Dan Stromberg
On Sat, Nov 20, 2021 at 10:09 AM Marco Sulla 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)? >

Re: pytest segfault, not with -v

2021-11-20 Thread Marco Sulla
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)? On Sat, 20 Nov 2021 at 19:00, MRAB wrote: > > On 2021-11-20 1

Re: pytest segfault, not with -v

2021-11-20 Thread MRAB
On 2021-11-20 17:40, Marco Sulla wrote: Indeed I have introduced a command line parameter in my bench.py script that simply specifies the number of times the benchmarks are performed. This way I have a sort of segfault checker. But I don't bench any part of the library. I suppose I have to creat

Re: pytest segfault, not with -v

2021-11-20 Thread Marco Sulla
Indeed I have introduced a command line parameter in my bench.py script that simply specifies the number of times the benchmarks are performed. This way I have a sort of segfault checker. But I don't bench any part of the library. I suppose I have to create a separate script that does a simple loo

Re: pytest segfault, not with -v

2021-11-20 Thread Dan Stromberg
On Fri, Nov 19, 2021 at 9:49 AM Marco Sulla wrote: > I have a battery of tests done with pytest. My tests break with a > segfault if I run them normally. If I run them using pytest -v, the > segfault does not happen. > > What could cause this quantical phenomenon? > Pure python code shouldn't do

Re: pytest segfault, not with -v

2021-11-19 Thread MRAB
On 2021-11-19 23:44, Marco Sulla wrote: On Fri, 19 Nov 2021 at 20:38, MRAB wrote: On 2021-11-19 17:48, Marco Sulla wrote: > I have a battery of tests done with pytest. My tests break with a > segfault if I run them normally. If I run them using pytest -v, the > segfault does not happen. > > Wh

Re: pytest segfault, not with -v

2021-11-19 Thread Marco Sulla
On Fri, 19 Nov 2021 at 20:38, MRAB wrote: > > On 2021-11-19 17:48, Marco Sulla wrote: > > I have a battery of tests done with pytest. My tests break with a > > segfault if I run them normally. If I run them using pytest -v, the > > segfault does not happen. > > > > What could cause this quantical

Re: pytest segfault, not with -v

2021-11-19 Thread MRAB
On 2021-11-19 17:48, Marco Sulla wrote: I have a battery of tests done with pytest. My tests break with a segfault if I run them normally. If I run them using pytest -v, the segfault does not happen. What could cause this quantical phenomenon? Are you testing an extension that you're compiling?

pytest segfault, not with -v

2021-11-19 Thread Marco Sulla
I have a battery of tests done with pytest. My tests break with a segfault if I run them normally. If I run them using pytest -v, the segfault does not happen. What could cause this quantical phenomenon? -- https://mail.python.org/mailman/listinfo/python-list