Runaway cpu and temporary table problem when creating view in account_analytic_analysis
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
Fix Released
|
Undecided
|
Unassigned | |||
Therp Backports (Deprecated) | Status tracked in Addons-6.1 | |||||
Addons-6.1 |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
The view account_
When these tabels contain a high number of rows, the attempt to create the view will result in 100% cpu usage, and/or may crash.
We see this in the log:
Server Traceback (most recent call last):
File "/home/
result = openerp.
File "/home/
result = ExportService.
File "/home/
res = fn(db, uid, *params)
File "/home/
return self.execute(db, uid, obj, method, *args, **kw or {})
File "/home/
return f(self, dbname, *args, **kwargs)
File "/home/
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/home/
return fct_src(cr, uid, model, method, *args)
File "/home/
return getattr(object, method)(cr, uid, *args, **kw)
File "/home/
result = self._read_flat(cr, user, select, fields, context, load)
File "/home/
cr.
File "/home/
return f(self, *args, **kwargs)
File "/home/
res = self._obj.
OperationalError: could not write block 1059628 of temporary file: No space left on device
HINT: Perhaps out of disk space?
The problem view creation looks like this (in file account-
def init(self, cr):
The problem might be resolved by rewriting the view to prevent the cartesian product explosion.
The problematic code is present in 6.0, 6.1 and in trunk.
We will try to submit a fix.
Related branches
- OpenERP Core Team: Pending requested
-
Diff: 60 lines (+18/-33)1 file modifiedaccount_analytic_analysis/account_analytic_analysis.py (+18/-33)
- OpenERP Core Team: Pending requested
-
Diff: 61 lines (+18/-33)1 file modifiedaccount_analytic_analysis/account_analytic_analysis.py (+18/-33)
- Stefan Rijnhart (Opener): Pending requested
-
Diff: 64 lines (+19/-35)1 file modifiedaccount_analytic_analysis/account_analytic_analysis.py (+19/-35)
Changed in openobject-addons: | |
status: | New → Fix Released |
Changed in therp-backports: | |
status: | New → Fix Committed |
For the record, after the branch on lp:openobject-addons was merged, I merged it likewise on lp:therp-backports/6.1 (that is, while keeping the drop view statement). So there is no MP on the backports branch.