On Tue, 4 Oct 2005 11:22:24 -0500, Michael Ekstrand <[EMAIL PROTECTED]> wrote: >On Tuesday 04 October 2005 11:13, Maksim Kasimov wrote: >> my programm sometime gives "Segmentation fault" message (no matter >> how long the programm had run (1 day or 2 weeks). And there is >> nothing in log-files that can points the problem. My question is how >> it possible to find out where is the problem in the code? Thanks for >> any help. > >What extension modules are you using? > >I've never seen "stock" Python (stable release w/ only included modules) >segfault, but did see a segfault with an extension module I was using >the other week (lxml IIRC, but I'm not sure). >
[EMAIL PROTECTED]:~$ python Python 2.4.2c1 (#2, Sep 24 2005, 00:48:19) [GCC 4.0.2 20050808 (prerelease) (Ubuntu 4.0.1-4ubuntu8)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys.setrecursionlimit(1e9) __main__:1: DeprecationWarning: integer argument expected, got float >>> (lambda f: f(f))(lambda f: f(f)) Segmentation fault [EMAIL PROTECTED]:~$ python Python 2.4.2c1 (#2, Sep 24 2005, 00:48:19) [GCC 4.0.2 20050808 (prerelease) (Ubuntu 4.0.1-4ubuntu8)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> class foo(type): ... def mro(self): ... return [float] ... >>> class bar: ... __metaclass__ = foo ... Segmentation fault [EMAIL PROTECTED]:~$ python Python 2.4.2c1 (#2, Sep 24 2005, 00:48:19) [GCC 4.0.2 20050808 (prerelease) (Ubuntu 4.0.1-4ubuntu8)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import dl >>> dl.open('libc.so.6').call('memcpy', 0, 0, 1024) Segmentation fault [EMAIL PROTECTED]:~$ Though to be honest, even I consider the 3rd example a bit of a cheat ;) Jp -- http://mail.python.org/mailman/listinfo/python-list