Re: [Numpy-discussion] crash at prompt exit after running test

2010-03-11 Thread Charles R Harris
On Thu, Mar 11, 2010 at 3:57 PM, Johann Cohen-Tanugi wrote:

>  is your fix committed?
>
>
No. Pauli thinks the problem may lie elsewhere. I haven't had time to look
things over, but it is possible that the changes in the generated api
exposed a bug elsewhere.



Chuck
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] crash at prompt exit after running test

2010-03-11 Thread Johann Cohen-Tanugi

is your fix committed?


On 03/11/2010 09:47 PM, Bruce Southey wrote:

On 03/11/2010 02:01 PM, Johann Cohen-Tanugi wrote:
hi there, I am adding this to this thread and not to the trac, 
because I am not sure whether it adds noise or a piece of info. I 
just downloaded the scipy trunk and built it, and ran nosetests on 
it, which bombed instantly
So I tried to get into subdirs to check test scripts separately. 
and here is one :

[co...@jarrett tests]$ ~/.local/bin/ipython test_integrate.py
---
AssertionErrorTraceback (most recent call 
last)


/home/cohen/sources/python/scipy/scipy/integrate/tests/test_integrate.py 
in ()

208
209 if __name__ == "__main__":
--> 210 run_module_suite()
211
212

/home/cohen/.local/lib/python2.6/site-packages/numpy/testing/nosetester.pyc 
in run_module_suite(file_to_run)

 75 f = sys._getframe(1)
 76 file_to_run = f.f_locals.get('__file__', None)
---> 77 assert file_to_run is not None
 78
 79 import_nose().run(argv=['',file_to_run])

AssertionError:
python: Modules/gcmodule.c:277: visit_decref: Assertion 
`gc->gc.gc_refs != 0' failed.

Aborted (core dumped)
[co...@jarrett tests]$ pwd
/home/cohen/sources/python/scipy/scipy/integrate/tests

the bomb is the same, but the context seems different... I leave that 
to the experts :)

Johann


Yes,
I think it is the same issue as I do not have the problem after fixing 
the following file and rebuilding numpy and scipy:

numpy/core/code_generators/generate_ufunc_api.py

Bruce


--
This message has been scanned for viruses and
dangerous content by *MailScanner* , and is
believed to be clean.


___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
   
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] crash at prompt exit after running test

2010-03-11 Thread Bruce Southey

On 03/11/2010 02:01 PM, Johann Cohen-Tanugi wrote:
hi there, I am adding this to this thread and not to the trac, because 
I am not sure whether it adds noise or a piece of info. I just 
downloaded the scipy trunk and built it, and ran nosetests on it, 
which bombed instantly
So I tried to get into subdirs to check test scripts separately. 
and here is one :

[co...@jarrett tests]$ ~/.local/bin/ipython test_integrate.py
---
AssertionErrorTraceback (most recent call 
last)


/home/cohen/sources/python/scipy/scipy/integrate/tests/test_integrate.py 
in ()

208
209 if __name__ == "__main__":
--> 210 run_module_suite()
211
212

/home/cohen/.local/lib/python2.6/site-packages/numpy/testing/nosetester.pyc 
in run_module_suite(file_to_run)

 75 f = sys._getframe(1)
 76 file_to_run = f.f_locals.get('__file__', None)
---> 77 assert file_to_run is not None
 78
 79 import_nose().run(argv=['',file_to_run])

AssertionError:
python: Modules/gcmodule.c:277: visit_decref: Assertion 
`gc->gc.gc_refs != 0' failed.

Aborted (core dumped)
[co...@jarrett tests]$ pwd
/home/cohen/sources/python/scipy/scipy/integrate/tests

the bomb is the same, but the context seems different... I leave that 
to the experts :)

Johann


Yes,
I think it is the same issue as I do not have the problem after fixing 
the following file and rebuilding numpy and scipy:

numpy/core/code_generators/generate_ufunc_api.py

Bruce

___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] crash at prompt exit after running test

2010-03-11 Thread Johann Cohen-Tanugi
hi there, I am adding this to this thread and not to the trac, because I 
am not sure whether it adds noise or a piece of info. I just downloaded 
the scipy trunk and built it, and ran nosetests on it, which bombed 
instantly
So I tried to get into subdirs to check test scripts separately. and 
here is one :

[co...@jarrett tests]$ ~/.local/bin/ipython test_integrate.py
---
AssertionErrorTraceback (most recent call last)

/home/cohen/sources/python/scipy/scipy/integrate/tests/test_integrate.py 
in ()

208
209 if __name__ == "__main__":
--> 210 run_module_suite()
211
212

/home/cohen/.local/lib/python2.6/site-packages/numpy/testing/nosetester.pyc 
in run_module_suite(file_to_run)

 75 f = sys._getframe(1)
 76 file_to_run = f.f_locals.get('__file__', None)
---> 77 assert file_to_run is not None
 78
 79 import_nose().run(argv=['',file_to_run])

AssertionError:
python: Modules/gcmodule.c:277: visit_decref: Assertion `gc->gc.gc_refs 
!= 0' failed.

Aborted (core dumped)
[co...@jarrett tests]$ pwd
/home/cohen/sources/python/scipy/scipy/integrate/tests

the bomb is the same, but the context seems different... I leave that to 
the experts :)

Johann

On 03/10/2010 06:06 PM, Charles R Harris wrote:



On Wed, Mar 10, 2010 at 10:39 AM, Bruce Southey > wrote:


On 03/10/2010 08:59 AM, Pauli Virtanen wrote:
> Wed, 10 Mar 2010 15:40:04 +0100, Johann Cohen-Tanugi wrote:
>
>> Pauli, isn't it hopeless to follow the execution of the source
code when
>> the crash actually occurs when I exit, and not when I execute.
I would
>> have to understand enough of this umath_tests.c.src to spot a
refcount
>> error or things like that
>>
> Yeah, it's not easy, and requires knowing how to track this type of
> errors. I didn't actually mean that you should try do it, just
posed it
> as a general challenge to all interested parties :)
>
> On a more serious note, maybe there's a compilation flag or
something in
> Python that warns when refcounts go negative (or something).
>
> Cheers,
> Pauli
>
> ___
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org 
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
Hi,
I think I managed to find this. I reverted back my svn versions ($svn
update -r 8262) and cleaned both the build and installation
directories.

It occurred with changeset 8262 (earlier changesets appear okay but
later ones do not)
http://projects.scipy.org/numpy/changeset/8262

Specifically in the file:
numpy/core/code_generators/generate_ufunc_api.py

There is an extra call to that should have been deleted on line 54(?).
Py_DECREF(numpy);

Attached a patch to ticket 1425
http://projects.scipy.org/numpy/ticket/1425


Look like my bad. I'm out of town at the moment so someone else needs 
to apply the patch. That whole bit of code could probably use a 
daylight audit.


Chuck


--
This message has been scanned for viruses and
dangerous content by *MailScanner* , and is
believed to be clean.


___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
   
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] crash at prompt exit after running test

2010-03-10 Thread Charles R Harris
On Wed, Mar 10, 2010 at 10:39 AM, Bruce Southey  wrote:

> On 03/10/2010 08:59 AM, Pauli Virtanen wrote:
> > Wed, 10 Mar 2010 15:40:04 +0100, Johann Cohen-Tanugi wrote:
> >
> >> Pauli, isn't it hopeless to follow the execution of the source code when
> >> the crash actually occurs when I exit, and not when I execute. I would
> >> have to understand enough of this umath_tests.c.src to spot a refcount
> >> error or things like that
> >>
> > Yeah, it's not easy, and requires knowing how to track this type of
> > errors. I didn't actually mean that you should try do it, just posed it
> > as a general challenge to all interested parties :)
> >
> > On a more serious note, maybe there's a compilation flag or something in
> > Python that warns when refcounts go negative (or something).
> >
> > Cheers,
> > Pauli
> >
> > ___
> > NumPy-Discussion mailing list
> > NumPy-Discussion@scipy.org
> > http://mail.scipy.org/mailman/listinfo/numpy-discussion
> >
> Hi,
> I think I managed to find this. I reverted back my svn versions ($svn
> update -r 8262) and cleaned both the build and installation directories.
>
> It occurred with changeset 8262 (earlier changesets appear okay but
> later ones do not)
> http://projects.scipy.org/numpy/changeset/8262
>
> Specifically in the file:
> numpy/core/code_generators/generate_ufunc_api.py
>
> There is an extra call to that should have been deleted on line 54(?).
> Py_DECREF(numpy);
>
> Attached a patch to ticket 1425
> http://projects.scipy.org/numpy/ticket/1425
>
>
Look like my bad. I'm out of town at the moment so someone else needs to
apply the patch. That whole bit of code could probably use a daylight audit.

Chuck
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] crash at prompt exit after running test

2010-03-10 Thread Bruce Southey
On 03/10/2010 08:59 AM, Pauli Virtanen wrote:
> Wed, 10 Mar 2010 15:40:04 +0100, Johann Cohen-Tanugi wrote:
>
>> Pauli, isn't it hopeless to follow the execution of the source code when
>> the crash actually occurs when I exit, and not when I execute. I would
>> have to understand enough of this umath_tests.c.src to spot a refcount
>> error or things like that
>>  
> Yeah, it's not easy, and requires knowing how to track this type of
> errors. I didn't actually mean that you should try do it, just posed it
> as a general challenge to all interested parties :)
>
> On a more serious note, maybe there's a compilation flag or something in
> Python that warns when refcounts go negative (or something).
>
> Cheers,
> Pauli
>
> ___
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
Hi,
I think I managed to find this. I reverted back my svn versions ($svn 
update -r 8262) and cleaned both the build and installation directories.

It occurred with changeset 8262 (earlier changesets appear okay but 
later ones do not)
http://projects.scipy.org/numpy/changeset/8262

Specifically in the file:
numpy/core/code_generators/generate_ufunc_api.py

There is an extra call to that should have been deleted on line 54(?).
Py_DECREF(numpy);

Attached a patch to ticket 1425
http://projects.scipy.org/numpy/ticket/1425


Bruce
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] crash at prompt exit after running test

2010-03-10 Thread Bruce Southey
On 03/10/2010 08:40 AM, Johann Cohen-Tanugi wrote:
> Pauli, isn't it hopeless to follow the execution of the source code when
> the crash actually occurs when I exit, and not when I execute. I would
> have to understand enough of this umath_tests.c.src to spot a refcount
> error or things like that
>
> On 03/10/2010 03:11 PM, Pauli Virtanen wrote:
>
>> Wed, 10 Mar 2010 10:28:07 +0100, Johann Cohen-Tanugi wrote:
>>
>>
>>  
>>> On 03/10/2010 01:55 AM, Pauli Virtanen wrote:
>>>
>>>
> more fun :
> [co...@jarrett tests]$ pwd
> /home/cohen/sources/python/numpy/numpy/core/tests [co...@jarrett
> tests]$ python -c 'import test_ufunc' python: Modules/gcmodule.c:277:
> visit_decref: Assertion `gc->gc.gc_refs != 0' failed.
> Aborted (core dumped)
>
>
>
 What happens if you only import the umath_tests module (or something,
 it's a .so under numpy.core)?


  
>>> [co...@jarrett core]$ export
>>> PYTHONPATH=/home/cohen/.local/lib/python2.6/site-packages/numpy/core:
>>>
>>>
>> $PYTHONPATH
>>
>>  
>>> [co...@jarrett core]$ python
>>> Python 2.6.2 (r262:71600, Jan 25 2010, 18:46:45) [GCC 4.4.2 20091222
>>> (Red Hat 4.4.2-20)] on linux2 Type "help", "copyright", "credits" or
>>> "license" for more information.
>>>>>>   import umath_tests
>>>>>>
>>> python: Modules/gcmodule.c:277: visit_decref: Assertion `gc->gc.gc_refs
>>> != 0' failed.
>>> Aborted (core dumped)
>>>
>>> so this import also trigger the crash at exit...
>>>
>>>
>> Then it is clear that the umath_tests module does something that is not
>> permitted. It's possible that there is a some sort of a refcount error
>> somewhere in the generalized ufuncs mechanisms -- that part of Numpy is
>> not heavily used.
>>
>> Bug spotting challenge: Start from umath_tests.c.src:initumath_tests,
>> follow the execution, and spot the bug (if any).
>>
>>  Pauli
>>
>> PS. it might be a good idea to file a bug ticket now
>>
>> ___
>> NumPy-Discussion mailing list
>> NumPy-Discussion@scipy.org
>> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>>
>>
>>  
> ___
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
Hi,
I can say that I have the same problem with Fedora 11 and Python 2.6 
(both Fedora version and Unladen Swallow versions) with numpy 
2.0.0.dev8272. However, I first noticed it with scipy but I see it with 
numpy.

It does not appear to be with Python 2.5 with an svn version and I did 
not see it with numpy 1.3 or the removed numpy 1.4.

Bruce

___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] crash at prompt exit after running test

2010-03-10 Thread Pauli Virtanen
Wed, 10 Mar 2010 15:40:04 +0100, Johann Cohen-Tanugi wrote:
> Pauli, isn't it hopeless to follow the execution of the source code when
> the crash actually occurs when I exit, and not when I execute. I would
> have to understand enough of this umath_tests.c.src to spot a refcount
> error or things like that

Yeah, it's not easy, and requires knowing how to track this type of 
errors. I didn't actually mean that you should try do it, just posed it 
as a general challenge to all interested parties :)

On a more serious note, maybe there's a compilation flag or something in 
Python that warns when refcounts go negative (or something).

Cheers,
Pauli

___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] crash at prompt exit after running test

2010-03-10 Thread Johann Cohen-Tanugi
Pauli, isn't it hopeless to follow the execution of the source code when 
the crash actually occurs when I exit, and not when I execute. I would 
have to understand enough of this umath_tests.c.src to spot a refcount 
error or things like that

On 03/10/2010 03:11 PM, Pauli Virtanen wrote:
> Wed, 10 Mar 2010 10:28:07 +0100, Johann Cohen-Tanugi wrote:
>
>
>> On 03/10/2010 01:55 AM, Pauli Virtanen wrote:
>>  
 more fun :
 [co...@jarrett tests]$ pwd
 /home/cohen/sources/python/numpy/numpy/core/tests [co...@jarrett
 tests]$ python -c 'import test_ufunc' python: Modules/gcmodule.c:277:
 visit_decref: Assertion `gc->gc.gc_refs != 0' failed.
 Aborted (core dumped)

  
>>> What happens if you only import the umath_tests module (or something,
>>> it's a .so under numpy.core)?
>>>
>>>
>> [co...@jarrett core]$ export
>> PYTHONPATH=/home/cohen/.local/lib/python2.6/site-packages/numpy/core:
>>  
> $PYTHONPATH
>
>> [co...@jarrett core]$ python
>> Python 2.6.2 (r262:71600, Jan 25 2010, 18:46:45) [GCC 4.4.2 20091222
>> (Red Hat 4.4.2-20)] on linux2 Type "help", "copyright", "credits" or
>> "license" for more information.
>>   >>>  import umath_tests
>>   >>>
>> python: Modules/gcmodule.c:277: visit_decref: Assertion `gc->gc.gc_refs
>> != 0' failed.
>> Aborted (core dumped)
>>
>> so this import also trigger the crash at exit...
>>  
> Then it is clear that the umath_tests module does something that is not
> permitted. It's possible that there is a some sort of a refcount error
> somewhere in the generalized ufuncs mechanisms -- that part of Numpy is
> not heavily used.
>
> Bug spotting challenge: Start from umath_tests.c.src:initumath_tests,
> follow the execution, and spot the bug (if any).
>
>   Pauli
>
> PS. it might be a good idea to file a bug ticket now
>
> ___
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
>
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] crash at prompt exit after running test

2010-03-10 Thread Johann Cohen-Tanugi
http://projects.scipy.org/numpy/ticket/1425 for the bug trac

well, I do feel challenged now... ;)
J

On 03/10/2010 03:11 PM, Pauli Virtanen wrote:
> Wed, 10 Mar 2010 10:28:07 +0100, Johann Cohen-Tanugi wrote:
>
>
>> On 03/10/2010 01:55 AM, Pauli Virtanen wrote:
>>  
 more fun :
 [co...@jarrett tests]$ pwd
 /home/cohen/sources/python/numpy/numpy/core/tests [co...@jarrett
 tests]$ python -c 'import test_ufunc' python: Modules/gcmodule.c:277:
 visit_decref: Assertion `gc->gc.gc_refs != 0' failed.
 Aborted (core dumped)

  
>>> What happens if you only import the umath_tests module (or something,
>>> it's a .so under numpy.core)?
>>>
>>>
>> [co...@jarrett core]$ export
>> PYTHONPATH=/home/cohen/.local/lib/python2.6/site-packages/numpy/core:
>>  
> $PYTHONPATH
>
>> [co...@jarrett core]$ python
>> Python 2.6.2 (r262:71600, Jan 25 2010, 18:46:45) [GCC 4.4.2 20091222
>> (Red Hat 4.4.2-20)] on linux2 Type "help", "copyright", "credits" or
>> "license" for more information.
>>   >>>  import umath_tests
>>   >>>
>> python: Modules/gcmodule.c:277: visit_decref: Assertion `gc->gc.gc_refs
>> != 0' failed.
>> Aborted (core dumped)
>>
>> so this import also trigger the crash at exit...
>>  
> Then it is clear that the umath_tests module does something that is not
> permitted. It's possible that there is a some sort of a refcount error
> somewhere in the generalized ufuncs mechanisms -- that part of Numpy is
> not heavily used.
>
> Bug spotting challenge: Start from umath_tests.c.src:initumath_tests,
> follow the execution, and spot the bug (if any).
>
>   Pauli
>
> PS. it might be a good idea to file a bug ticket now
>
> ___
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
>
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] crash at prompt exit after running test

2010-03-10 Thread Pauli Virtanen
Wed, 10 Mar 2010 10:28:07 +0100, Johann Cohen-Tanugi wrote:

> On 03/10/2010 01:55 AM, Pauli Virtanen wrote:
>>> more fun :
>>> [co...@jarrett tests]$ pwd
>>> /home/cohen/sources/python/numpy/numpy/core/tests [co...@jarrett
>>> tests]$ python -c 'import test_ufunc' python: Modules/gcmodule.c:277:
>>> visit_decref: Assertion `gc->gc.gc_refs != 0' failed.
>>> Aborted (core dumped)
>>>  
>> What happens if you only import the umath_tests module (or something,
>> it's a .so under numpy.core)?
>>
> [co...@jarrett core]$ export
> PYTHONPATH=/home/cohen/.local/lib/python2.6/site-packages/numpy/core:
$PYTHONPATH
> [co...@jarrett core]$ python
> Python 2.6.2 (r262:71600, Jan 25 2010, 18:46:45) [GCC 4.4.2 20091222
> (Red Hat 4.4.2-20)] on linux2 Type "help", "copyright", "credits" or
> "license" for more information.
>  >>> import umath_tests
>  >>>
> python: Modules/gcmodule.c:277: visit_decref: Assertion `gc->gc.gc_refs
> != 0' failed.
> Aborted (core dumped)
> 
> so this import also trigger the crash at exit...

Then it is clear that the umath_tests module does something that is not 
permitted. It's possible that there is a some sort of a refcount error 
somewhere in the generalized ufuncs mechanisms -- that part of Numpy is 
not heavily used.

Bug spotting challenge: Start from umath_tests.c.src:initumath_tests, 
follow the execution, and spot the bug (if any).

Pauli

PS. it might be a good idea to file a bug ticket now

___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] crash at prompt exit after running test

2010-03-10 Thread Johann Cohen-Tanugi


On 03/10/2010 01:55 AM, Pauli Virtanen wrote:
>> more fun :
>> [co...@jarrett tests]$ pwd
>> /home/cohen/sources/python/numpy/numpy/core/tests
>> [co...@jarrett tests]$ python -c 'import test_ufunc'
>> python: Modules/gcmodule.c:277: visit_decref: Assertion `gc->gc.gc_refs
>> != 0' failed.
>> Aborted (core dumped)
>>  
> What happens if you only import the umath_tests module (or something, it's a 
> .so under numpy.core)?
>
[co...@jarrett core]$ export 
PYTHONPATH=/home/cohen/.local/lib/python2.6/site-packages/numpy/core:$PYTHONPATH
[co...@jarrett core]$ python
Python 2.6.2 (r262:71600, Jan 25 2010, 18:46:45)
[GCC 4.4.2 20091222 (Red Hat 4.4.2-20)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
 >>> import umath_tests
 >>>
python: Modules/gcmodule.c:277: visit_decref: Assertion `gc->gc.gc_refs 
!= 0' failed.
Aborted (core dumped)

so this import also trigger the crash at exit...

> Just importing test_ufunc.py probably doesn't run a lot of extension code. 
> Since you don't get crashes only by importing numpy, I really don't see many 
> alternatives any more...
>
> Thanks,
> Pauli
>
> ___
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
>
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] crash at prompt exit after running test

2010-03-10 Thread Johann Cohen-Tanugi

Ubuntu has a much shorter cycle of updates than Fedora, indeed.

On 03/10/2010 06:27 AM, Charles R Harris wrote:



On Tue, Mar 9, 2010 at 5:52 PM, Johann Cohen-Tanugi 
mailto:co...@lpta.in2p3.fr>> wrote:


more fun :
[co...@jarrett tests]$ pwd
/home/cohen/sources/python/numpy/numpy/core/tests
[co...@jarrett tests]$ python -c 'import test_ufunc'

python: Modules/gcmodule.c:277: visit_decref: Assertion
`gc->gc.gc_refs != 0' failed.
Aborted (core dumped)

and in the debugger:
(gdb) run
Starting program: /usr/bin/python
warning: .dynamic section for "/lib/libpthread.so.0" is not at the
expected address

warning: difference appears to be caused by prelink, adjusting
expectations
warning: .dynamic section for "/lib/libdl.so.2" is not at the
expected address

warning: difference appears to be caused by prelink, adjusting
expectations
warning: .dynamic section for "/lib/libc.so.6" is not at the
expected address

warning: difference appears to be caused by prelink, adjusting
expectations
[Thread debugging using libthread_db enabled]

Python 2.6.2 (r262:71600, Jan 25 2010, 18:46:45)
[GCC 4.4.2 20091222 (Red Hat 4.4.2-20)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import test_ufunc

>>>
>>>
python: Modules/gcmodule.c:277: visit_decref: Assertion
`gc->gc.gc_refs != 0' failed.

Program received signal SIGABRT, Aborted.
0x00aab416 in __kernel_vsyscall ()
Missing separate debuginfos, use: debuginfo-install
atlas-3.8.3-12.fc12.i686 libgcc-4.4.3-4.fc12.i686
libgfortran-4.4.3-4.fc12.i686
(gdb) bt
#0  0x00aab416 in __kernel_vsyscall ()
#1  0x00159a91 in raise (sig=6) at
../nptl/sysdeps/unix/sysv/linux/raise.c:64
#2  0x0015b35a in abort () at abort.c:92
#3  0x00152be8 in __assert_fail (assertion=,
file=, line=,
function=) at assert.c:81
#4  0x0050931e in visit_decref (op=,
data=) at Modules/gcmodule.c:277
#5  0x0047c8c2 in dict_traverse (op=,
visit=, arg=) at
Objects/dictobject.c:2003
#6  0x00509af3 in subtract_refs (generation=)
at Modules/gcmodule.c:296

#7  collect (generation=) at
Modules/gcmodule.c:817
#8  0x0050a640 in PyGC_Collect () at Modules/gcmodule.c:1292
#9  0x004fb0f0 in Py_Finalize () at Python/pythonrun.c:424
#10 0x0050868f in Py_Main (argc=, argv=) at Modules/main.c:625
#11 0x080485c8 in main (argc=, argv=) at Modules/python.c:23

which looks identical to the bt I sent to Robert earlier on.

HTH,
Johann


On 03/10/2010 12:43 AM, Johann Cohen-Tanugi wrote:



On 03/10/2010 12:33 AM, Johann Cohen-Tanugi wrote:



On 03/10/2010 12:07 AM, Pauli Virtanen wrote:

ti, 2010-03-09 kello 21:14 +0100, Johann Cohen-Tanugi kirjoitti:
   

thinking about it, this morning there was a fedora update to python, so
I am using 2.6.2-4.fc12.
Looks like the problem is in python itself, hence this piece of info.
 

That the problem would be in Python is not so clear to me. Can you try
running it with the previous Python shipped by Fedora? Do you see the
problem then? What's the previous version, btw?
   

2.6.2-1 IIRC. I would have to check, and I am not sure how to
either query this information or step back one update up with yum :(

Memory errors are somewhat difficult to debug. Can you try running only
a certain subset of the tests, first

nosetests numpy.core
   

crash

Be sure to set Pythonpath so that you get the correct Numpy version. If
it segfaults, proceed to (under numpy/core/tests)

nosetests test_multiarray.py
nosetests test_multiarray.py:TestNewBufferProtocol
   

neither crash, so the problem is not there

I followed your lead and tried each script and ended up with :
[co...@jarrett tests]$ nosetests test_ufunc.py
.
--
Ran 13 tests in 1.146s

OK
python: Modules/gcmodule.c:277: visit_decref: Assertion
`gc->gc.gc_refs != 0' failed.
Aborted (core dumped)

so test_ufunc.py seems to be at stake


Since the crash occurs in cyclic garbage collection, I'm doubting a bit
the numpy/core/src/multiarray/numpymemoryview.c implementation, since
that's the only part in Numpy that supports that.

Alternatively, just replace numpymemoryview.c with the attached one
which has cyclic GC stripped, and see if you still get the crash.

Cheers,
Pauli


   



___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org  
http://mail.scipy.org/mailman/listinfo/numpy-discussion
   


-- 
This message has been scanned for viruses and

dangerous content by *MailScanner*


Re: [Numpy-discussion] crash at prompt exit after running test

2010-03-09 Thread Charles R Harris
On Tue, Mar 9, 2010 at 5:52 PM, Johann Cohen-Tanugi wrote:

>  more fun :
> [co...@jarrett tests]$ pwd
> /home/cohen/sources/python/numpy/numpy/core/tests
> [co...@jarrett tests]$ python -c 'import test_ufunc'
>
> python: Modules/gcmodule.c:277: visit_decref: Assertion `gc->gc.gc_refs !=
> 0' failed.
> Aborted (core dumped)
>
> and in the debugger:
> (gdb) run
> Starting program: /usr/bin/python
> warning: .dynamic section for "/lib/libpthread.so.0" is not at the expected
> address
>
> warning: difference appears to be caused by prelink, adjusting expectations
> warning: .dynamic section for "/lib/libdl.so.2" is not at the expected
> address
>
> warning: difference appears to be caused by prelink, adjusting expectations
> warning: .dynamic section for "/lib/libc.so.6" is not at the expected
> address
>
> warning: difference appears to be caused by prelink, adjusting expectations
> [Thread debugging using libthread_db enabled]
>
> Python 2.6.2 (r262:71600, Jan 25 2010, 18:46:45)
> [GCC 4.4.2 20091222 (Red Hat 4.4.2-20)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import test_ufunc
>
> >>>
> >>>
> python: Modules/gcmodule.c:277: visit_decref: Assertion `gc->gc.gc_refs !=
> 0' failed.
>
> Program received signal SIGABRT, Aborted.
> 0x00aab416 in __kernel_vsyscall ()
> Missing separate debuginfos, use: debuginfo-install
> atlas-3.8.3-12.fc12.i686 libgcc-4.4.3-4.fc12.i686
> libgfortran-4.4.3-4.fc12.i686
> (gdb) bt
> #0  0x00aab416 in __kernel_vsyscall ()
> #1  0x00159a91 in raise (sig=6) at
> ../nptl/sysdeps/unix/sysv/linux/raise.c:64
> #2  0x0015b35a in abort () at abort.c:92
> #3  0x00152be8 in __assert_fail (assertion=,
> file=, line=, function= optimized out>) at assert.c:81
> #4  0x0050931e in visit_decref (op=, data= optimized out>) at Modules/gcmodule.c:277
> #5  0x0047c8c2 in dict_traverse (op=, visit= optimized out>, arg=) at Objects/dictobject.c:2003
> #6  0x00509af3 in subtract_refs (generation=) at
> Modules/gcmodule.c:296
>
> #7  collect (generation=) at Modules/gcmodule.c:817
> #8  0x0050a640 in PyGC_Collect () at Modules/gcmodule.c:1292
> #9  0x004fb0f0 in Py_Finalize () at Python/pythonrun.c:424
> #10 0x0050868f in Py_Main (argc=, argv= optimized out>) at Modules/main.c:625
> #11 0x080485c8 in main (argc=, argv= out>) at Modules/python.c:23
>
> which looks identical to the bt I sent to Robert earlier on.
>
> HTH,
> Johann
>
>
> On 03/10/2010 12:43 AM, Johann Cohen-Tanugi wrote:
>
>
>
> On 03/10/2010 12:33 AM, Johann Cohen-Tanugi wrote:
>
>
>
> On 03/10/2010 12:07 AM, Pauli Virtanen wrote:
>
> ti, 2010-03-09 kello 21:14 +0100, Johann Cohen-Tanugi kirjoitti:
>
>
>  thinking about it, this morning there was a fedora update to python, so
> I am using 2.6.2-4.fc12.
> Looks like the problem is in python itself, hence this piece of info.
>
>
>  That the problem would be in Python is not so clear to me. Can you try
> running it with the previous Python shipped by Fedora? Do you see the
> problem then? What's the previous version, btw?
>
>
>  2.6.2-1 IIRC. I would have to check, and I am not sure how to either query
> this information or step back one update up with yum :(
>
> Memory errors are somewhat difficult to debug. Can you try running only
> a certain subset of the tests, first
>
>   nosetests numpy.core
>
>
>  crash
>
> Be sure to set Pythonpath so that you get the correct Numpy version. If
> it segfaults, proceed to (under numpy/core/tests)
>
>   nosetests test_multiarray.py
>   nosetests test_multiarray.py:TestNewBufferProtocol
>
>
>  neither crash, so the problem is not there
>
> I followed your lead and tried each script and ended up with :
> [co...@jarrett tests]$ nosetests test_ufunc.py
> .
> --
> Ran 13 tests in 1.146s
>
> OK
> python: Modules/gcmodule.c:277: visit_decref: Assertion `gc->gc.gc_refs !=
> 0' failed.
> Aborted (core dumped)
>
> so test_ufunc.py seems to be at stake
>
>  Since the crash occurs in cyclic garbage collection, I'm doubting a bit
> the numpy/core/src/multiarray/numpymemoryview.c implementation, since
> that's the only part in Numpy that supports that.
>
> Alternatively, just replace numpymemoryview.c with the attached one
> which has cyclic GC stripped, and see if you still get the crash.
>
> Cheers,
> Pauli
>
>
>
>
>
> ___
> NumPy-Discussion mailing 
> listnumpy-discuss...@scipy.orghttp://mail.scipy.org/mailman/listinfo/numpy-discussion
>
>
> --
> This message has been scanned for viruses and
> dangerous content by *MailScanner* , and is
> believed to be clean.
>
>
> ___
> NumPy-Discussion mailing 
> listnumpy-discuss...@scipy.orghttp://mail.scipy.org/mailman/listinfo/numpy-discussion
>
>
>
Python 2.6.2 is rather old by now, the bugfix releases are up to 2.6.4. I
don't know that that is related, but I haven't

Re: [Numpy-discussion] crash at prompt exit after running test

2010-03-09 Thread Pauli Virtanen
> more fun :
> [co...@jarrett tests]$ pwd
> /home/cohen/sources/python/numpy/numpy/core/tests
> [co...@jarrett tests]$ python -c 'import test_ufunc'
> python: Modules/gcmodule.c:277: visit_decref: Assertion `gc->gc.gc_refs
> != 0' failed.
> Aborted (core dumped)

What happens if you only import the umath_tests module (or something, it's a 
.so under numpy.core)?

Just importing test_ufunc.py probably doesn't run a lot of extension code. 
Since you don't get crashes only by importing numpy, I really don't see many 
alternatives any more...

Thanks,
Pauli

___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] crash at prompt exit after running test

2010-03-09 Thread Johann Cohen-Tanugi

more fun :
[co...@jarrett tests]$ pwd
/home/cohen/sources/python/numpy/numpy/core/tests
[co...@jarrett tests]$ python -c 'import test_ufunc'
python: Modules/gcmodule.c:277: visit_decref: Assertion `gc->gc.gc_refs 
!= 0' failed.

Aborted (core dumped)

and in the debugger:
(gdb) run
Starting program: /usr/bin/python
warning: .dynamic section for "/lib/libpthread.so.0" is not at the 
expected address

warning: difference appears to be caused by prelink, adjusting expectations
warning: .dynamic section for "/lib/libdl.so.2" is not at the expected 
address

warning: difference appears to be caused by prelink, adjusting expectations
warning: .dynamic section for "/lib/libc.so.6" is not at the expected 
address

warning: difference appears to be caused by prelink, adjusting expectations
[Thread debugging using libthread_db enabled]
Python 2.6.2 (r262:71600, Jan 25 2010, 18:46:45)
[GCC 4.4.2 20091222 (Red Hat 4.4.2-20)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import test_ufunc
>>>
>>>
python: Modules/gcmodule.c:277: visit_decref: Assertion `gc->gc.gc_refs 
!= 0' failed.


Program received signal SIGABRT, Aborted.
0x00aab416 in __kernel_vsyscall ()
Missing separate debuginfos, use: debuginfo-install 
atlas-3.8.3-12.fc12.i686 libgcc-4.4.3-4.fc12.i686 
libgfortran-4.4.3-4.fc12.i686

(gdb) bt
#0  0x00aab416 in __kernel_vsyscall ()
#1  0x00159a91 in raise (sig=6) at 
../nptl/sysdeps/unix/sysv/linux/raise.c:64

#2  0x0015b35a in abort () at abort.c:92
#3  0x00152be8 in __assert_fail (assertion=, 
file=, line=, function=optimized out>) at assert.c:81
#4  0x0050931e in visit_decref (op=, data=optimized out>) at Modules/gcmodule.c:277
#5  0x0047c8c2 in dict_traverse (op=, visit=optimized out>, arg=) at Objects/dictobject.c:2003
#6  0x00509af3 in subtract_refs (generation=) at 
Modules/gcmodule.c:296

#7  collect (generation=) at Modules/gcmodule.c:817
#8  0x0050a640 in PyGC_Collect () at Modules/gcmodule.c:1292
#9  0x004fb0f0 in Py_Finalize () at Python/pythonrun.c:424
#10 0x0050868f in Py_Main (argc=, argv=optimized out>) at Modules/main.c:625
#11 0x080485c8 in main (argc=, argv=optimized out>) at Modules/python.c:23


which looks identical to the bt I sent to Robert earlier on.

HTH,
Johann

On 03/10/2010 12:43 AM, Johann Cohen-Tanugi wrote:



On 03/10/2010 12:33 AM, Johann Cohen-Tanugi wrote:



On 03/10/2010 12:07 AM, Pauli Virtanen wrote:

ti, 2010-03-09 kello 21:14 +0100, Johann Cohen-Tanugi kirjoitti:
   

thinking about it, this morning there was a fedora update to python, so
I am using 2.6.2-4.fc12.
Looks like the problem is in python itself, hence this piece of info.
 

That the problem would be in Python is not so clear to me. Can you try
running it with the previous Python shipped by Fedora? Do you see the
problem then? What's the previous version, btw?
   
2.6.2-1 IIRC. I would have to check, and I am not sure how to either 
query this information or step back one update up with yum :(

Memory errors are somewhat difficult to debug. Can you try running only
a certain subset of the tests, first

nosetests numpy.core
   

crash

Be sure to set Pythonpath so that you get the correct Numpy version. If
it segfaults, proceed to (under numpy/core/tests)

nosetests test_multiarray.py
nosetests test_multiarray.py:TestNewBufferProtocol
   

neither crash, so the problem is not there

I followed your lead and tried each script and ended up with :
[co...@jarrett tests]$ nosetests test_ufunc.py
.
--
Ran 13 tests in 1.146s

OK
python: Modules/gcmodule.c:277: visit_decref: Assertion 
`gc->gc.gc_refs != 0' failed.

Aborted (core dumped)

so test_ufunc.py seems to be at stake


Since the crash occurs in cyclic garbage collection, I'm doubting a bit
the numpy/core/src/multiarray/numpymemoryview.c implementation, since
that's the only part in Numpy that supports that.

Alternatively, just replace numpymemoryview.c with the attached one
which has cyclic GC stripped, and see if you still get the crash.

Cheers,
Pauli


   



___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
   


--
This message has been scanned for viruses and
dangerous content by *MailScanner* , 
and is

believed to be clean.


___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
   


--
This message has been scanned for viruses and
dangerous content by *MailScanner* , and is
believed to be clean. 
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] crash at prompt exit after running test

2010-03-09 Thread Johann Cohen-Tanugi



On 03/10/2010 12:33 AM, Johann Cohen-Tanugi wrote:



On 03/10/2010 12:07 AM, Pauli Virtanen wrote:

ti, 2010-03-09 kello 21:14 +0100, Johann Cohen-Tanugi kirjoitti:
   

thinking about it, this morning there was a fedora update to python, so
I am using 2.6.2-4.fc12.
Looks like the problem is in python itself, hence this piece of info.
 

That the problem would be in Python is not so clear to me. Can you try
running it with the previous Python shipped by Fedora? Do you see the
problem then? What's the previous version, btw?
   
2.6.2-1 IIRC. I would have to check, and I am not sure how to either 
query this information or step back one update up with yum :(

Memory errors are somewhat difficult to debug. Can you try running only
a certain subset of the tests, first

nosetests numpy.core
   

crash

Be sure to set Pythonpath so that you get the correct Numpy version. If
it segfaults, proceed to (under numpy/core/tests)

nosetests test_multiarray.py
nosetests test_multiarray.py:TestNewBufferProtocol
   

neither crash, so the problem is not there

I followed your lead and tried each script and ended up with :
[co...@jarrett tests]$ nosetests test_ufunc.py
.
--
Ran 13 tests in 1.146s

OK
python: Modules/gcmodule.c:277: visit_decref: Assertion `gc->gc.gc_refs 
!= 0' failed.

Aborted (core dumped)

so test_ufunc.py seems to be at stake


Since the crash occurs in cyclic garbage collection, I'm doubting a bit
the numpy/core/src/multiarray/numpymemoryview.c implementation, since
that's the only part in Numpy that supports that.

Alternatively, just replace numpymemoryview.c with the attached one
which has cyclic GC stripped, and see if you still get the crash.

Cheers,
Pauli


   



___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
   


--
This message has been scanned for viruses and
dangerous content by *MailScanner* , and is
believed to be clean.


___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
   
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] crash at prompt exit after running test

2010-03-09 Thread Johann Cohen-Tanugi



On 03/10/2010 12:07 AM, Pauli Virtanen wrote:

ti, 2010-03-09 kello 21:14 +0100, Johann Cohen-Tanugi kirjoitti:
   

thinking about it, this morning there was a fedora update to python, so
I am using 2.6.2-4.fc12.
Looks like the problem is in python itself, hence this piece of info.
 

That the problem would be in Python is not so clear to me. Can you try
running it with the previous Python shipped by Fedora? Do you see the
problem then? What's the previous version, btw?
   
2.6.2-1 IIRC. I would have to check, and I am not sure how to either 
query this information or step back one update up with yum :(

Memory errors are somewhat difficult to debug. Can you try running only
a certain subset of the tests, first

nosetests numpy.core
   

crash

Be sure to set Pythonpath so that you get the correct Numpy version. If
it segfaults, proceed to (under numpy/core/tests)

nosetests test_multiarray.py
nosetests test_multiarray.py:TestNewBufferProtocol
   

neither crash, so the problem is not there

Since the crash occurs in cyclic garbage collection, I'm doubting a bit
the numpy/core/src/multiarray/numpymemoryview.c implementation, since
that's the only part in Numpy that supports that.

Alternatively, just replace numpymemoryview.c with the attached one
which has cyclic GC stripped, and see if you still get the crash.

Cheers,
Pauli


   



___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
   
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] crash at prompt exit after running test

2010-03-09 Thread Pauli Virtanen
ti, 2010-03-09 kello 21:14 +0100, Johann Cohen-Tanugi kirjoitti:
> thinking about it, this morning there was a fedora update to python, so 
> I am using 2.6.2-4.fc12.
> Looks like the problem is in python itself, hence this piece of info.

That the problem would be in Python is not so clear to me. Can you try
running it with the previous Python shipped by Fedora? Do you see the
problem then? What's the previous version, btw?

Memory errors are somewhat difficult to debug. Can you try running only
a certain subset of the tests, first

nosetests numpy.core

Be sure to set Pythonpath so that you get the correct Numpy version. If
it segfaults, proceed to (under numpy/core/tests)

nosetests test_multiarray.py
nosetests test_multiarray.py:TestNewBufferProtocol

Since the crash occurs in cyclic garbage collection, I'm doubting a bit
the numpy/core/src/multiarray/numpymemoryview.c implementation, since
that's the only part in Numpy that supports that.

Alternatively, just replace numpymemoryview.c with the attached one
which has cyclic GC stripped, and see if you still get the crash.

Cheers,
Pauli

/*
 * Simple PyMemoryView'ish object for Python 2.6 compatibility.
 *
 * On Python >= 2.7, we can use the actual PyMemoryView objects.
 *
 * Some code copied from the CPython implementation.
 */

#define PY_SSIZE_T_CLEAN
#include 
#include "structmember.h"

#define _MULTIARRAYMODULE
#define NPY_NO_PREFIX
#include "numpy/arrayobject.h"
#include "numpy/arrayscalars.h"

#include "npy_config.h"
#include "npy_3kcompat.h"

#include "numpymemoryview.h"


#if (PY_VERSION_HEX >= 0x0206) && (PY_VERSION_HEX < 0x0207)

/*
 * Memory allocation
 */

static void
memorysimpleview_dealloc(PyMemorySimpleViewObject *self)
{
Py_CLEAR(self->base);
if (self->view.obj != NULL) {
PyBuffer_Release(&self->view);
self->view.obj = NULL;
}
}

static PyObject *
memorysimpleview_new(PyTypeObject *subtype, PyObject *args, PyObject *kwds)
{
PyObject *obj;
static char *kwlist[] = {"object", 0};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O:memorysimpleview", kwlist,
 &obj)) {
return NULL;
}
return PyMemorySimpleView_FromObject(obj);
}


/*
 * Buffer interface
 */

static int
memorysimpleview_getbuffer(PyMemorySimpleViewObject *self,
   Py_buffer *view, int flags)
{
return PyObject_GetBuffer(self->base, view, flags);
}

static void
memorysimpleview_releasebuffer(PyMemorySimpleViewObject *self,
   Py_buffer *view)
{
PyBuffer_Release(view);
}

static PyBufferProcs memorysimpleview_as_buffer = {
(readbufferproc)0,   /*bf_getreadbuffer*/
(writebufferproc)0, /*bf_getwritebuffer*/
(segcountproc)0,/*bf_getsegcount*/
(charbufferproc)0,   /*bf_getcharbuffer*/
(getbufferproc)memorysimpleview_getbuffer, /* bf_getbuffer */
(releasebufferproc)memorysimpleview_releasebuffer, /* bf_releasebuffer */
};


/*
 * Getters
 */

static PyObject *
_IntTupleFromSsizet(int len, Py_ssize_t *vals)
{
int i;
PyObject *o;
PyObject *intTuple;

if (vals == NULL) {
Py_INCREF(Py_None);
return Py_None;
}
intTuple = PyTuple_New(len);
if (!intTuple) return NULL;
for(i=0; iview.format);
}

static PyObject *
memorysimpleview_itemsize_get(PyMemorySimpleViewObject *self)
{
return PyLong_FromSsize_t(self->view.itemsize);
}

static PyObject *
memorysimpleview_shape_get(PyMemorySimpleViewObject *self)
{
return _IntTupleFromSsizet(self->view.ndim, self->view.shape);
}

static PyObject *
memorysimpleview_strides_get(PyMemorySimpleViewObject *self)
{
return _IntTupleFromSsizet(self->view.ndim, self->view.strides);
}

static PyObject *
memorysimpleview_suboffsets_get(PyMemorySimpleViewObject *self)
{
return _IntTupleFromSsizet(self->view.ndim, self->view.suboffsets);
}

static PyObject *
memorysimpleview_readonly_get(PyMemorySimpleViewObject *self)
{
return PyBool_FromLong(self->view.readonly);
}

static PyObject *
memorysimpleview_ndim_get(PyMemorySimpleViewObject *self)
{
return PyLong_FromLong(self->view.ndim);
}


static PyGetSetDef memorysimpleview_getsets[] =
{
{"format", (getter)memorysimpleview_format_get, NULL, NULL, NULL},
{"itemsize", (getter)memorysimpleview_itemsize_get, NULL, NULL, NULL},
{"shape", (getter)memorysimpleview_shape_get, NULL, NULL, NULL},
{"strides", (getter)memorysimpleview_strides_get, NULL, NULL, NULL},
{"suboffsets", (getter)memorysimpleview_suboffsets_get, NULL, NULL, NULL},
{"readonly", (getter)memorysimpleview_readonly_get, NULL, NULL, NULL},
{"ndim", (getter)memorysimpleview_ndim_get, NULL, NULL, NULL},
{NULL, NULL, NULL, NULL}
};

NPY_NO_EXPORT PyTypeObject PyMemorySimpleView_Type = {
#if defined(NPY_PY3K)
PyVarObject_HEAD_INIT(NULL, 0)
#else
PyObject_HEAD_INIT(NULL)
0,  /* ob_size */

Re: [Numpy-discussion] crash at prompt exit after running test

2010-03-09 Thread Johann Cohen-Tanugi
thinking about it, this morning there was a fedora update to python, so 
I am using 2.6.2-4.fc12.
Looks like the problem is in python itself, hence this piece of info.
HTH,
Johann


On 03/09/2010 09:07 PM, Johann Cohen-Tanugi wrote:
> thanks Robert, here it is :
>
>   >>>  exit()
> python: Modules/gcmodule.c:277: visit_decref: Assertion `gc->gc.gc_refs
> != 0' failed.
>
> Program received signal SIGABRT, Aborted.
> 0x004a1416 in __kernel_vsyscall ()
> Missing separate debuginfos, use: debuginfo-install
> atlas-3.8.3-12.fc12.i686 compat-libf2c-34-3.4.6-18.i686
> keyutils-libs-1.2-6.fc12.i686 krb5-libs-1.7.1-2.fc12.i686
> libcom_err-1.41.9-7.fc12.i686 libgcc-4.4.3-4.fc12.i686
> libgfortran-4.4.3-4.fc12.i686 libselinux-2.0.90-5.fc12.i686
> (gdb) bt
> #0  0x004a1416 in __kernel_vsyscall ()
> #1  0x00609a91 in raise (sig=6) at
> ../nptl/sysdeps/unix/sysv/linux/raise.c:64
> #2  0x0060b35a in abort () at abort.c:92
> #3  0x00602be8 in __assert_fail (assertion=,
> file=, line=, function= optimized out>)
>   at assert.c:81
> #4  0x0032e31e in visit_decref (op=, data= optimized out>) at Modules/gcmodule.c:277
> #5  0x002a18c2 in dict_traverse (op=, visit= optimized out>, arg=) at Objects/dictobject.c:2003
> #6  0x0032eaf3 in subtract_refs (generation=) at
> Modules/gcmodule.c:296
> #7  collect (generation=) at Modules/gcmodule.c:817
> #8  0x0032f640 in PyGC_Collect () at Modules/gcmodule.c:1292
> #9  0x003200f0 in Py_Finalize () at Python/pythonrun.c:424
> #10 0x00320218 in Py_Exit (sts=) at
> Python/pythonrun.c:1714
> #11 0x00320367 in handle_system_exit () at Python/pythonrun.c:1116
> #12 0x0032057d in PyErr_PrintEx (set_sys_last_vars= out>) at Python/pythonrun.c:1126
> #13 0x0032079f in PyErr_Print () at Python/pythonrun.c:1035
> #14 0x00320f9a in PyRun_InteractiveOneFlags (fp=,
> filename=, flags=) at
> Python/pythonrun.c:843
> #15 0x00321093 in PyRun_InteractiveLoopFlags (fp=,
> filename=, flags=0xbfffefec) at Python/pythonrun.c:760
> #16 0x003211df in PyRun_AnyFileExFlags (fp=,
> filename=0x365add "", closeit=, flags= optimized out>)
>   at Python/pythonrun.c:729
> #17 0x0032dc85 in Py_Main (argc=, argv= optimized out>) at Modules/main.c:599
> #18 0x080485c8 in main (argc=, argv= optimized out>) at Modules/python.c:23
>
>
> I also saw things like:
> warning: .dynamic section for "/lib/libcom_err.so.2" is not at the
> expected address
> warning: difference appears to be caused by prelink, adjusting expectations
> warning: .dynamic section for "/lib/libkeyutils.so.1" is not at the
> expected address
> warning: difference appears to be caused by prelink, adjusting expectations
>
> Johann
>
> On 03/09/2010 08:56 PM, Robert Kern wrote:
>
>> On Tue, Mar 9, 2010 at 13:50, Johann Cohen-Tanugi   
>> wrote:
>>
>>  
>>> I have tried to localize the core dump in vain any idea where I should
>>> look for it?
>>> I did not manage to catch it with pdb :
>>>
>>>
>> Not pdb, gdb.
>>
>> $ gdb python
>> ...
>> (gdb) run
>> Starting program ...
>> ... # Possibly another (gdb) prompt:
>> (gdb) continue  #<- Type this.
>> Python 2.6.2 ...
>>
>>
>>  
> import numpy  #<- Type this and do whatever else is necessary to 
> reproduce the crash.
>
>
>> ...
>> (gdb) bt  #<- Type this.
>>  #<- Copy-paste these results here.
>>
>>
>>  
> ___
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
>
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] crash at prompt exit after running test

2010-03-09 Thread Johann Cohen-Tanugi
thanks Robert, here it is :

 >>> exit()
python: Modules/gcmodule.c:277: visit_decref: Assertion `gc->gc.gc_refs 
!= 0' failed.

Program received signal SIGABRT, Aborted.
0x004a1416 in __kernel_vsyscall ()
Missing separate debuginfos, use: debuginfo-install 
atlas-3.8.3-12.fc12.i686 compat-libf2c-34-3.4.6-18.i686 
keyutils-libs-1.2-6.fc12.i686 krb5-libs-1.7.1-2.fc12.i686 
libcom_err-1.41.9-7.fc12.i686 libgcc-4.4.3-4.fc12.i686 
libgfortran-4.4.3-4.fc12.i686 libselinux-2.0.90-5.fc12.i686
(gdb) bt
#0  0x004a1416 in __kernel_vsyscall ()
#1  0x00609a91 in raise (sig=6) at 
../nptl/sysdeps/unix/sysv/linux/raise.c:64
#2  0x0060b35a in abort () at abort.c:92
#3  0x00602be8 in __assert_fail (assertion=, 
file=, line=, function=)
 at assert.c:81
#4  0x0032e31e in visit_decref (op=, data=) at Modules/gcmodule.c:277
#5  0x002a18c2 in dict_traverse (op=, visit=, arg=) at Objects/dictobject.c:2003
#6  0x0032eaf3 in subtract_refs (generation=) at 
Modules/gcmodule.c:296
#7  collect (generation=) at Modules/gcmodule.c:817
#8  0x0032f640 in PyGC_Collect () at Modules/gcmodule.c:1292
#9  0x003200f0 in Py_Finalize () at Python/pythonrun.c:424
#10 0x00320218 in Py_Exit (sts=) at 
Python/pythonrun.c:1714
#11 0x00320367 in handle_system_exit () at Python/pythonrun.c:1116
#12 0x0032057d in PyErr_PrintEx (set_sys_last_vars=) at Python/pythonrun.c:1126
#13 0x0032079f in PyErr_Print () at Python/pythonrun.c:1035
#14 0x00320f9a in PyRun_InteractiveOneFlags (fp=, 
filename=, flags=) at 
Python/pythonrun.c:843
#15 0x00321093 in PyRun_InteractiveLoopFlags (fp=, 
filename=, flags=0xbfffefec) at Python/pythonrun.c:760
#16 0x003211df in PyRun_AnyFileExFlags (fp=, 
filename=0x365add "", closeit=, flags=)
 at Python/pythonrun.c:729
#17 0x0032dc85 in Py_Main (argc=, argv=) at Modules/main.c:599
#18 0x080485c8 in main (argc=, argv=) at Modules/python.c:23


I also saw things like:
warning: .dynamic section for "/lib/libcom_err.so.2" is not at the 
expected address
warning: difference appears to be caused by prelink, adjusting expectations
warning: .dynamic section for "/lib/libkeyutils.so.1" is not at the 
expected address
warning: difference appears to be caused by prelink, adjusting expectations

Johann

On 03/09/2010 08:56 PM, Robert Kern wrote:
> On Tue, Mar 9, 2010 at 13:50, Johann Cohen-Tanugi  wrote:
>
>> I have tried to localize the core dump in vain any idea where I should
>> look for it?
>> I did not manage to catch it with pdb :
>>  
> Not pdb, gdb.
>
> $ gdb python
> ...
> (gdb) run
> Starting program ...
> ... # Possibly another (gdb) prompt:
> (gdb) continue  #<- Type this.
> Python 2.6.2 ...
>
>
 import numpy  #<- Type this and do whatever else is necessary to reproduce 
 the crash.
  
> ...
> (gdb) bt  #<- Type this.
>  #<- Copy-paste these results here.
>
>
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion



Re: [Numpy-discussion] crash at prompt exit after running test

2010-03-09 Thread Robert Kern
On Tue, Mar 9, 2010 at 13:50, Johann Cohen-Tanugi  wrote:
> I have tried to localize the core dump in vain any idea where I should
> look for it?
> I did not manage to catch it with pdb :

Not pdb, gdb.

$ gdb python
...
(gdb) run
Starting program ...
... # Possibly another (gdb) prompt:
(gdb) continue  # <- Type this.
Python 2.6.2 ...

>>> import numpy  # <- Type this and do whatever else is necessary to reproduce 
>>> the crash.
...
(gdb) bt  # <- Type this.
 # <- Copy-paste these results here.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] crash at prompt exit after running test

2010-03-09 Thread Johann Cohen-Tanugi
I have tried to localize the core dump in vain any idea where I 
should look for it?
I did not manage to catch it with pdb :
[co...@jarrett ~]$ .local/bin/ipython
Python 2.6.2 (r262:71600, Jan 25 2010, 18:46:45)
Type "copyright", "credits" or "license" for more information.

IPython 0.11.alpha1.bzr.r1223 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help  -> Python's own help system.
object?   -> Details about 'object'. ?object also works, ?? prints more.

In [1]: import pdb

In [2]: pdb.set_trace()
--Call--
 > /home/cohen/sources/python/ipython/IPython/core/prompts.py(525)__call__()
-> def __call__(self,arg=None):
(Pdb) import numpy
(Pdb) numpy.test()

Ran 2892 tests in 35.888s

OK (KNOWNFAIL=4, SKIP=6)

(Pdb) exit()
ERROR: An unexpected error occurred while tokenizing input
The following traceback may be corrupted or invalid
The error message is: ('EOF in multi-line statement', (137, 0))

---
BdbQuit   Traceback (most recent call last)

/home/cohen/ in ()

/home/cohen/sources/python/ipython/IPython/core/prompts.pyc in 
__call__(self, arg)
 523 self.prompt_out.set_colors()
 524
--> 525 def __call__(self,arg=None):
 526 """Printing with history cache management.
 527

/usr/lib/python2.6/bdb.pyc in trace_dispatch(self, frame, event, arg)
  46 return self.dispatch_line(frame)
  47 if event == 'call':
---> 48 return self.dispatch_call(frame, arg)
  49 if event == 'return':
  50 return self.dispatch_return(frame, arg)

/usr/lib/python2.6/bdb.pyc in dispatch_call(self, frame, arg)
  76 return # None
  77 self.user_call(frame, arg)
---> 78 if self.quitting: raise BdbQuit
  79 return self.trace_dispatch
  80

BdbQuit:

In [3]:
Do you really want to exit ([y]/n)?
python: Modules/gcmodule.c:277: visit_decref: Assertion `gc->gc.gc_refs 
!= 0' failed.
Aborted (core dumped)


Note that I have several warnings during test():
Warning: divide by zero encountered in power
Warning: divide by zero encountered in power
Warning: divide by zero encountered in power
...Warning:
 
invalid value encountered in sqrt
..Warning: invalid value encountered in sqrt
etc
I dont think it is related though

Johann

On 03/09/2010 08:35 PM, Robert Kern wrote:
> On Tue, Mar 9, 2010 at 13:30, Johann Cohen-Tanugi  wrote:
>
>> hi there,
>> I just installed the current head of numpy and built it. trying
>> python and then import numpy, and then CTRL-D to exit, all goes well.
>> But doing the same with a numpy.test() before CTRL-D ends up in :
>> 
>> Ran 2892 tests in 35.814s
>>
>> OK (KNOWNFAIL=4, SKIP=6)
>> 
>>   >>>
>> python: Modules/gcmodule.c:277: visit_decref: Assertion `gc->gc.gc_refs
>> != 0' failed.
>> Aborted (core dumped)
>>
>> Does that ring a bell to any of you?
>>  
> Nope! Can you show us a gdb backtrace of the crash?
>
>
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] crash at prompt exit after running test

2010-03-09 Thread Robert Kern
On Tue, Mar 9, 2010 at 13:30, Johann Cohen-Tanugi  wrote:
> hi there,
> I just installed the current head of numpy and built it. trying
> python and then import numpy, and then CTRL-D to exit, all goes well.
> But doing the same with a numpy.test() before CTRL-D ends up in :
> 
> Ran 2892 tests in 35.814s
>
> OK (KNOWNFAIL=4, SKIP=6)
> 
>  >>>
> python: Modules/gcmodule.c:277: visit_decref: Assertion `gc->gc.gc_refs
> != 0' failed.
> Aborted (core dumped)
>
> Does that ring a bell to any of you?

Nope! Can you show us a gdb backtrace of the crash?

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion