Bug 330554 - Use virtual table/tree for File search
Summary: Use virtual table/tree for File search
Status: ASSIGNED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Search (show other bugs)
Version: 3.5.2   Edit
Hardware: All All
: P5 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform-Search-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-18 06:50 EST by Stefan Wöhrer CLA
Modified: 2019-09-06 15:33 EDT (History)
3 users (show)

See Also:


Attachments
A threaddump while eclipse is "frozen" (24.45 KB, application/octet-stream)
2010-11-18 09:28 EST, Stefan Wöhrer CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Wöhrer CLA 2010-11-18 06:50:55 EST
Build Identifier: M20100211-1343

When running a file search on a frequent word, backgrounding the progress window, expanding all elements and then stoping the search in progress eclipse freezes and then crashes with the following error message.

user@horst:~$ /path/eclipse --sync
2010-11-18 12:35:45.793::INFO:  Logging to STDERR via org.mortbay.log.StdErrLog
The program 'Eclipse' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadAlloc (insufficient resources for operation)'.
  (Details: serial 498163 error_code 11 request_code 53 minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

I'm not quite sure what "not enough ressources means" in this case, htop never peaks out and 4g ram should suffice.

Reproducible: Always

Steps to Reproduce:
1. Enter Java perspective
2. open file search
3. enter a keyword that occures often (10k+)
4. filename pattern set to: *.*
5. other options standard (whole workspace, NO case sensitivity NO regex, NOT consider derived ressources)
6. start file search
7. background the search "Run in Background" Button
8. Expand all (the "+" button in the "Search" view)
9. Stop search while still in progres (red square button in "Search" view
freezes up to about 10 seconds, then crashes completely (shuts down and all recently made changes are gone)
Comment 1 Remy Suen CLA 2010-11-18 07:10:15 EST
(In reply to comment #0)
> 9. Stop search while still in progres (red square button in "Search" view
> freezes up to about 10 seconds, then crashes completely (shuts down and all
> recently made changes are gone)

Please get a thread dump while Eclipse is stuck for those ten seconds.
http://wiki.eclipse.org/index.php/How_to_report_a_deadlock
Comment 2 Stefan Wöhrer CLA 2010-11-18 09:28:51 EST
Created attachment 183381 [details]
A threaddump while eclipse is "frozen"

if i try creating a heapdump with the option "Enable heapdump on OOME" this bug does not occur :(
Comment 3 Remy Suen CLA 2010-11-18 09:34:41 EST
Does the problem occur with 3.6.1?
http://download.eclipse.org/eclipse/downloads/drops/R-3.6.1-201009090800/index.php
Comment 4 John Arthorne CLA 2010-11-22 09:36:11 EST
It sounds like file search could use a configurable limit on search results (stop after first 1000 results, or something like that).
Comment 5 Dani Megert CLA 2010-11-22 09:59:28 EST
We use a l(In reply to comment #4)
> It sounds like file search could use a configurable limit on search results
> (stop after first 1000 results, or something like that).
Search can handle tons of results (I just tried with over 200'000) but if the user then really asks to expand all the elements then of course this uses quite some memory. In my case it took less than a minute and all elements were created without a crash with only 500MB of memory. We could investigate to switch to virtual tree/table but given that even the 200'000 case works with all elements expanded doesn't seem to justify the effort.

Moving to SWT to investigate why it crashes.
Comment 6 Dani Megert CLA 2010-11-22 09:59:45 EST
Bug 266296 reports a similar issue.
Comment 7 Felipe Heidrich CLA 2010-11-22 11:13:16 EST
In the case eclipse was frozen the thread was busy creating/rendering items.
The case where it crashed, it was becase it was out of memory* (application had already created too many widgets).

The only solution I see here to use VIRTUAL.


* 'BadAlloc (insufficient resources for operation)' is not necessarily RAM memory that run out, it could be too many windows, colormaps, graphics contexts, or whatever x resource.
Comment 8 Felipe Heidrich CLA 2010-11-22 11:16:06 EST
Move back if you find the crash was not caused by creating too many resource.
But note that we can not do anything for out of memory (or insufficient resources) type of errors.
Comment 9 Eclipse Webmaster CLA 2019-09-06 15:33:16 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.