[mod_python] ModPython, Psycopg postgresql gives segmentation fault

Martin Slouf mar at centrum.cz
Tue Nov 30 06:06:09 EST 2004


fisrt of all, sorry, not sure this is the right thread, by mistake i pressed
Ctrl-D in mutt more than once :) and the net archives are somewhat unreachable.

i guess johan was sending me an email where he complained about segfaults when
he tried to store db connection object in session.

im afraid mod_python is using cpickle, not pickle, to store session objects and
though much faster, the db connection object cannot be saved in session --
anyway, i just simulated a sample page trying to store the db connection in
session and the errors i received where not segfaults, but some cpikle

try to store the db connection in global variable.


On Tue, Nov 30, 2004 at 11:15:09AM +0100, Rune Hansen wrote:
> On 29. nov 2004, at 21.56, java_dev wrote:
> >
> >If someone can give me a pointer how to prevent the Session from 
> >creating segmentation Faults please let me know. And if there is 
> >another way for preventing the authenicationhandler from being called 
> >all the time please let me know
> >
> >Thanks
> >
> >Johan
> >
> As for the session segfault. Just remembered  had this problem on 
> Fedora Core1 with python 2.3.3. On this machine a python interpreter in 
> mod_python could not make use of the anydbm(dbhash) module. If the db 
> type was given to : Session.DbmSession(req, dbm=gdmb) the segfault 
> disappeared, but then register_cleanup would fail. I "solved" it by 
> compiling python 2.3.4 on that machine.
> regards
> /rune
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python

More information about the Mod_python mailing list