Psyco debugger compatibility issue (can't debug in eclipse)

Bug #541985 reported by Numérigraphe
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Invalid
Undecided
Unassigned

Bug Description

SUMMARY
Beginning with v5.0.7, debugging doesn't work in Eclipse when using Psyco, a python-code optimizer (http://psyco.sourceforge.net/).

WORKAROUND
Don't use psyco, it should work fine without it.

ORIGINAL BUG DESCRIPTION
Using server 5.0.6 I could enter debugging mode in eclipse. That fails in 5.0.7.

Eclipse says it uses the following commands:
"/usr/bin/python2.5 -u
/home/ls/Logiciels/eclipse/plugins/org.python.pydev.debug_1.5.5.2010030420/pysrc/pydevd.py
--vm_type python --client localhost --port 0 --file
/home/ls/Projets/OpenERP/server/5.0/bin/openerp-server.py

The PYTHONPATH that will be used is:

/home/ls/Logiciels/eclipse/plugins/org.python.pydev_1.5.5.2010030420/PySrc/pydev_sitecustomize:/usr/lib/python2.5:/usr/lib/python2.5/lib-dynload:/usr/lib/python2.5/lib-tk:/usr/lib/python2.5/plat-linux2:/usr/lib/python2.5/site-packages:/usr/lib/python2.5/site-packages/Cheetah-2.0.1-py2.5-linux-i686.egg:/usr/lib/python2.5/site-packages/CherryPy-2.3.0-py2.5.egg:/usr/lib/python2.5/site-packages/DecoratorTools-1.7-py2.5.egg:/usr/lib/python2.5/site-packages/FormEncode-1.0.1-py2.5.egg:/usr/lib/python2.5/site-packages/Numeric:/usr/lib/python2.5/site-packages/PIL:/usr/lib/python2.5/site-packages/Paste-1.7.1-py2.5.egg:/usr/lib/python2.5/site-packages/PasteDeploy-1.3.2-py2.5.egg:/usr/lib/python2.5/site-packages/PasteScript-1.6.3-py2.5.egg:/usr/lib/python2.5/site-packages/PyProtocols-1.0a0dev_r2302-py2.5-linux-i686.egg:/usr/lib/python2.5/site-packages/RuleDispatch-0.5a0.dev_r2306-py2.5-linux-i686.egg:/usr/lib/python2.5/site-packages/TurboCheetah-1.0-py2.5.egg:/usr/lib/python2.5/site-packages/TurboGears-1.0.8-py2.5.egg:/usr/lib/python2.5/site-packages/TurboKid-1.0.4-py2.5.egg:/usr/lib/python2.5/site-packages/eTiny-1.0.1.1-py2.5.egg:/usr/lib/python2.5/site-packages/gst-0.10:/usr/lib/python2.5/site-packages/gtk-2.0:/usr/lib/python2.5/site-packages/kid-0.9.6-py2.5.egg:/usr/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg:/usr/lib/python2.5/site-packages/simplejson-1.9.1-py2.5-linux-i686.egg:/usr/lib/python25.zip:/usr/local/lib/python2.5/site-packages
"

When the first client connects it fails and the server console shows:
pydev debugger: starting
[2010-03-19 16:44:18,423] DEBUG:psycopg2:installed. Logging using Python logging module
[2010-03-19 16:44:18,430] INFO:server:version - 5.0.7
[2010-03-19 16:44:18,431] INFO:server:addons_path - /home/ls/Projets/OpenERP/addons/fdl-dev
[2010-03-19 16:44:18,431] INFO:server:database hostname - localhost
[2010-03-19 16:44:18,432] INFO:server:database port - 5432
[2010-03-19 16:44:18,432] INFO:server:database user - ls
[2010-03-19 16:44:18,433] INFO:objects:initialising distributed objects services
[2010-03-19 16:44:18,827] INFO:web-services:starting XML-RPC services, port 8069
[2010-03-19 16:44:18,828] INFO:web-services:starting NET-RPC service, port 8070
[2010-03-19 16:44:18,829] INFO:web-services:the server is running, waiting for connections...
[2010-03-19 16:44:22,235] DEBUG:Connection:create cursor to "template1"
[2010-03-19 16:44:22,237] DEBUG:ConnectionPool:ConnectionPool(used=0/count=0/max=64)
[2010-03-19 16:44:22,238] DEBUG:ConnectionPool:Borrow connection to user=ls dbname=template1
[2010-03-19 16:44:22,239] DEBUG:ConnectionPool:ConnectionPool(used=0/count=0/max=64)
[2010-03-19 16:44:22,240] DEBUG:ConnectionPool:Create new connection
> /usr/lib/python2.5/inspect.py(834)getframeinfo()
-> raise TypeError('arg is not a frame or traceback object')
(Pdb)

Changed in openobject-server:
importance: Undecided → Low
milestone: none → 5.0.9
Changed in openobject-server:
milestone: 5.0.9 → 5.0.10
Revision history for this message
Maxime LUCE (maxime-luce) wrote :

Same thing !!

Revision history for this message
Numérigraphe (numerigraphe) wrote :

Maxime, if you wish you can click "this bug affects me" and/or subrscribe to this bug, so LP will email you when progress is made.

Changed in openobject-server:
status: New → Confirmed
Revision history for this message
Maxime LUCE (maxime-luce) wrote :

Nobody has a solution

Revision history for this message
Alberto Garcia (Factor Libre) (agarcia-flibre) wrote :

In 5.0.7 I can debug variables and values with breakpoints in webservices.py, but with version 5.0.9 I can't this.

Changed in openobject-server:
milestone: 5.0.10 → 5.0.11
Revision history for this message
SemKehl (eric-kehlhofer) wrote :

Same thing in 5.0.7 or 5.0.10

Changed in openobject-server:
milestone: 5.0.11 → 5.0.12
Revision history for this message
Gbillou (gbillou) wrote :

i had same pb, but after uninstalling psyco everything worked fine.
don't know how or why it "solved" the pb.

summary: - can't debug in eclipse using 5.0.7
+ Can't debug in eclipse since 5.0.7
Revision history for this message
Alberto Garcia (Factor Libre) (agarcia-flibre) wrote : Re: Can't debug in eclipse since 5.0.7

nothing new in 5.0.12

Revision history for this message
Borja López Soilán (NeoPolus) (borjals) wrote :

Debugging OpenERP in Eclipse works for me on 5.0.12 (python 2.6; Mint 9 / Ubuntu 10.04)

Revision history for this message
Borja López Soilán (NeoPolus) (borjals) wrote :

(Though I had to disable the signal processing on the bin/openerp-server.py using LST_SIGNALS = [] instead of LST_SIGNALS = ['SIGINT', 'SIGTERM'])

Revision history for this message
Quentin THEURET @Amaris (qtheuret) wrote :

Maybe it's a problem with python 2.6.5 ? https://bugs.launchpad.net/openobject-server/+bug/574874

Revision history for this message
Eric Caudal - www.elico-corp.com (elicoidal) wrote : Re: [Bug 541985] Re: Can't debug in eclipse since 5.0.7

The few tests I did on 6.0 show the same problem.

Eric

On mar., 2010-08-10 at 15:44 +0000, Borja López Soilán (Pexego) wrote:

> (Though I had to disable the signal processing on the bin/openerp-
> server.py using LST_SIGNALS = [] instead of LST_SIGNALS = ['SIGINT',
> 'SIGTERM'])
>

Revision history for this message
Numérigraphe (numerigraphe) wrote : Re: Can't debug in eclipse since 5.0.7

I agree with Gbillou, it works when I uninstall psyco.
It would be nice to have psyco compatibility because it's supposed to make the debugger faster.
I'm using OpenERP 5.0.11, psyco 1.6, and python 2.6.5 on Ubuntu Lucid 10.04.1LTS.

Lionel

summary: - Can't debug in eclipse since 5.0.7
+ Psyco debugger compatibility issue
summary: - Psyco debugger compatibility issue
+ Psyco debugger compatibility issue (cant' debug in eclipse)
summary: - Psyco debugger compatibility issue (cant' debug in eclipse)
+ Psyco debugger compatibility issue (can't debug in eclipse)
description: updated
Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

Hello,

I'm closing this bug as it is a limitation of Psyco, not a bug of OpenERP.
Pyco breaks the inspect module, because of the way it emulates frame objects.
This is mentioned in the Psyco known bugs, and will break various features of Eclipse's debugger and OpenERP itself.

- http://psyco.sourceforge.net/psycoguide/bugs.html
- http://code.activestate.com/lists/python-list/399157

Thanks all for investigating, this will be a great help for people having the same behavior.

I will manually convert create a question out of this bug (the conversion is currently broken in Launchpad) so it's easier to find ...

Changed in openobject-server:
importance: Low → Undecided
milestone: 5.0.12 → none
status: Confirmed → Invalid
Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.