Issue 101280 - Report creation with ODBC source hangs application
Summary: Report creation with ODBC source hangs application
Status: UNCONFIRMED
Alias: None
Product: Base
Classification: Application
Component: ReportBuilder (show other issues)
Version: OOo 3.0.1
Hardware: All Windows Vista
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords: needmoreinfo, oooqa
Depends on:
Blocks:
 
Reported: 2009-04-22 16:32 UTC by miketdavis
Modified: 2013-02-02 02:55 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description miketdavis 2009-04-22 16:32:01 UTC
I am connecting to a local database through ODBC and trying to create a report
from that source. The database has ~35,000 records, 95 columns. Only 4 columns
are to be included in the report, of data type decimal.

The report creation wizard works perfectly until the final step. After clicking
"Finish" with "Create report now" radio button selected, it begins importing
data. However, after waiting for several hours, the report was still not yet
completed. The anticipated report size is about 500 pages, so I expected some delay.

However, after clicking "Stop" to interrupt the data import, the application
hangs and never returns to user control. Restarting the server for the data
source has no effect.
Comment 1 ludob 2009-06-18 14:06:14 UTC
Looks like OOO is reading here also the whole table just to get the key values
as reported in issue 102625. When you look at the memory usage you will probably
see that OOO is eating up al your memory.
Comment 2 Mechtilde 2009-06-23 15:30:02 UTC
can you please test it with OpenOffice.org 3.1 and SRB 1.1?
Comment 3 ludob 2009-06-24 10:14:42 UTC
The select * from table is also in OOO310m11 and not related to SRB. When
accessing data from a table, view table or report or...,  the select * is
executed.   
Comment 4 Mechtilde 2009-06-24 10:21:27 UTC
and what do you expect?
Comment 5 ludob 2009-06-24 12:37:31 UTC
In issue 102625 I explained in detail that in order to get the key values from
the table, OOO executes a "select * from table". It then gets the fields needed
by a "select fields from table where id=?" for every row needed. So, not only is
OOO getting every record twice from the db but also ,if for example you need
only 4 decimal columns out of 95 columns, ooo still retrieves all the columns in
the first query wasting sometimes an enormuous amount of memory.
My suggested fix was to do a "select id from table" followed by the "select
fields from table where id=?" queries to retrieve individual rows.
Comment 6 miketdavis 2009-07-01 05:02:16 UTC
If ludob's comments are correct, that easily explains why the report creation
was taking so long. The table itself is about 400 MB but the data selected in
the report should be about 1 MB. While the way it currently retrieves data is
certainly inefficient, I am not sure that is a bug-just the wrong way about things.

The bug I was reporting was the fact that clicking "Stop" does not interrupt the
report creation.
Comment 7 ludob 2009-07-01 10:13:46 UTC
I have no intention to hijack this bug. "Stop" should return to user control.

When your PC has been churning 5 hours on a 400 MB table I guess you run out of
physical memory and start swapping. Even if OOO sends an SQLCancel to the driver
while doing the select * from table, which I couldn't verify, and the driver
does cancel the operation correctly, I would expect that cleaning up the
resultset in the driver and OOO would take also a lot of time because of
swapping and cause a long delay to regain user control. Shouldn't take hours
though. 
Could you check memory usage before and after stop? After you push stop, is OOO
consuming CPU or is it idling?

Some ODBC drivers are reported to have problems with SQLCancel not doing
anything.(mysql 3.51, oracle 9.2.0.7.0 with oracle server on NT, DB2 client 7.?,
...). This would also cause ooo to hang around not releasing user control.
What driver are you using?

Issue 66846 reports OOO crashing on out of memory conditions opening large
tables. JDBC apparently reports an out of heap memory condition. Not sure what
your odbc driver is doing: stop and report or just sit there.

If getting 1MB of data out of a 400MB database isn't possible because of "just
the wrong way about things", I for sure call that a bug. Even a show stopper.
I'm considering raising priority on issue 102625....

Comment 8 miketdavis 2009-07-01 23:33:37 UTC
I have psqlODBC 8.03.04 installed. After clicking "Stop", memory consumption
continues to rise(slowly) and CPU load is 50%. I have a dual core processor, so
it's maxing out one core.

Oddly enough, memory consumption rises very slowly. About 4-8KB per second. 
Comment 9 Mechtilde 2010-04-03 14:18:16 UTC
which database backend do you use with ODBC?

do you also try to get the results with another frontend?

Is it an intranet or an internet connection?
Comment 10 Rob Weir 2013-02-02 02:55:50 UTC
This Issue requires more information ('needmoreinfo'), but has not been updated
within the last year. Please provide feedback as requested and re-test with the the latest version of OpenOffice - the problem(s) may already be addressed. 

You can download Apache OpenOffice 3.4.1 from http://www.openoffice.org/download

Please report back the outcome of your testing, so this Issue may be closed or
progressed as necessary - otherwise the issue may be Resolved as Invalid in the
future.