Bug 574913 - [content assist] Umbrella bug for content assist errors in Java editor
Summary: [content assist] Umbrella bug for content assist errors in Java editor
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.20   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 4.21 M3   Edit
Assignee: Stephan Herrmann CLA
QA Contact:
URL:
Whiteboard:
Keywords: regression
: 573853 (view as bug list)
Depends on: 574215 574267 574338 574704 574803 574823 574882 574902 574912 574978 574979 574982 575032 575377 575397
Blocks:
  Show dependency tree
 
Reported: 2021-07-19 10:07 EDT by Andrey Loskutov CLA
Modified: 2021-12-01 04:55 EST (History)
13 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Loskutov CLA 2021-07-19 10:07:54 EDT
This is an umbrella bug to track content assist regressions in 4.20+.

Right now we have few of them, unfortunately, and it is hard to get an overview which is closed which is not.
Comment 1 Andrey Loskutov CLA 2021-07-19 10:32:38 EDT
Stephan, Gayan: since you were discussing / fixing similar issues before, I wonder if we should co-ordinate efforts in this area for 4.21.

Stephan, I saw you wrote this guide: https://wiki.eclipse.org/JDT_Core_Programmer_Guide/Completion

It would be nice if you could check if any of referenced opened bugs have similar root cause or just manifestation of the same problem and may be give some general guidance where to start first, additionally to the guide above.

Right now I see bug 574912 as a highest priority because it causes more damage as others (amok running async code completion threads are created again and again, they never end and "eat" CPU cores one by one up to full system slowdown). Worst thing is that they do this not as jobs, so user can't even realize that or cancel them without terminating Eclipse.

I would really appreciate if you could look at this bug first.

For the rest: Gayan, now we've hopefully fixed the meta-index: would you be able to look into any of the referenced issues this bug depends on?

We (Advantest) are interested in a reliable content assist in 4.21, because we will use that in our next product release. Right now we are fully busy with our internal work, but I hope we could check the remaining issues towards M3 timeframe.
Comment 2 Stephan Herrmann CLA 2021-07-19 16:52:22 EDT
(In reply to Andrey Loskutov from comment #1)
> Stephan, Gayan: since you were discussing / fixing similar issues before, I
> wonder if we should co-ordinate efforts in this area for 4.21.
> 
> Stephan, I saw you wrote this guide:
> https://wiki.eclipse.org/JDT_Core_Programmer_Guide/Completion
> 
> It would be nice if you could check if any of referenced opened bugs have
> similar root cause or just manifestation of the same problem and may be give
> some general guidance where to start first, additionally to the guide above.

It's hard to give a guide for fixing an unknown set of bugs :) - but I'm glad you saw the wiki page. I would be most happy if people ask new questions about this. In my solitude I'm running out of ideas what might be worth describing :)

The previous regressions after bug 539685 surfaced in quite different ways. The common aspect can only be described negatively: since that change some of the heuristics below CompletionParser.updateRecoveryState() are no longer triggered (at the fake EOF), and have to be replaced with new heuristics, partly in the parser, partly in the engine.

ATM I can only highlight the first item in "Breakpoints and expectations": In order to coordinate efforts, it would be great to have a first round of documenting in each bug what is the recovered AST as seen in CompletionParser.endParse() (non-diet invocation) or in CompletionEngine after parseBlockStatements(). This would give hints about which side could handle the case: parser or engine. I hope most of the fixes to be straight forward after quickly weighing the options.

Obviously, every (failing) junit submitted to gerrit helps, too.
 
> Right now I see bug 574912 as a highest priority because it causes more
> damage as others (amok running async code completion threads are created
> again and again, they never end and "eat" CPU cores one by one up to full
> system slowdown). Worst thing is that they do this not as jobs, so user
> can't even realize that or cancel them without terminating Eclipse.

There are two parts to it: (1) infinite processing in the parser is the same kind of failure that was fixed in bug 539685. This could be the hardest nut to crack in the bunch. I'm not sure I have the energy to crack it but I'll give it a shot ...

(2) I am not the right person to ask about the circumstances of async code completion. Neither was I a fan of it, nor do I have insights into the mechanisms / concurrency design (if there is any).
 
> I would really appreciate if you could look at this bug first.

look: promised. resolve: can't promise


PS: you might have seen that I added a [content assist] prefix to several recent bug summaries - my way of keeping them together on my radar :)
Comment 3 Stephan Herrmann CLA 2021-07-31 13:42:29 EDT
Andrey:

loskutov@xxx.xx 	2021-07-31 13:39:45 EDT 	Depends on 		405113
loskutov@xxx.xx 	2021-07-31 13:40:18 EDT 	Depends on 		443091

Shouldn't we distinguish regressions from feature requests?
Comment 4 Andrey Loskutov CLA 2021-07-31 13:46:50 EDT
(In reply to Stephan Herrmann from comment #3)
> Andrey:
> 
> loskutov@xxx.xx 	2021-07-31 13:39:45 EDT 	Depends on 		405113
> loskutov@xxx.xx 	2021-07-31 13:40:18 EDT 	Depends on 		443091
> 
> Shouldn't we distinguish regressions from feature requests?

Sure, remove those that are not regressions, I just assumed they were related to recent changes.
Comment 5 Stephan Herrmann CLA 2021-07-31 14:20:35 EDT
(In reply to Andrey Loskutov from comment #4)
> (In reply to Stephan Herrmann from comment #3)
> > Andrey:
> > 
> > loskutov@xxx.xx 	2021-07-31 13:39:45 EDT 	Depends on 		405113
> > loskutov@xxx.xx 	2021-07-31 13:40:18 EDT 	Depends on 		443091
> > 
> > Shouldn't we distinguish regressions from feature requests?
> 
> Sure, remove those that are not regressions, I just assumed they were
> related to recent changes.

Bugs from 2013/2014 are not caused by recent changes, severity "enhancement" gives a further cue :)
Comment 6 Stephan Herrmann CLA 2021-08-05 14:18:28 EDT
@Gayan, while I'm approaching parity (i.e., regressions from 4.20 resolved) I moved some related bugs to the "See also" section. 

I'm not planning to fixing them, too. Perhaps you may want to have a look. In particular bug 547474 looks worthwhile to me. I'm still available for questions / reviews.
Comment 7 Andrey Loskutov CLA 2021-08-09 07:57:02 EDT
*** Bug 573853 has been marked as a duplicate of this bug. ***
Comment 8 Stephan Herrmann CLA 2021-08-15 18:38:03 EDT
Andrey, I'm removing the last open dependency (bug 573152) - which is not a regression, just internal clean-up.

=> From my p.o.v. this umbrella bug can be closed now.
Comment 9 Andrey Loskutov CLA 2021-08-16 04:00:50 EDT
(In reply to Stephan Herrmann from comment #8)
> Andrey, I'm removing the last open dependency (bug 573152) - which is not a
> regression, just internal clean-up.
> 
> => From my p.o.v. this umbrella bug can be closed now.

Thank you Stephan, and also Gayan!
Comment 10 Manoj N Palat CLA 2021-08-19 02:41:10 EDT
Verified with Eclipse 4.21 M3 Version: 2021-09 (4.21) Build id: I20210818-1800
[based on comment 8]
Comment 11 Christoph Laeubrich CLA 2021-12-01 04:52:24 EST
I'd like to reopen as there are obviously open bugs related here.

Is there any kind of debug output one could activate?

I have (with 2021-09) still issues (see Bug 576976 for example) and even some where code completion completely is missing at all but no idea what exactly triggers this.
Comment 12 Christoph Laeubrich CLA 2021-12-01 04:55:44 EST
Okay it seems there is now https://bugs.eclipse.org/bugs/show_bug.cgi?id=575919 sorry for the noise :-(