| Summary: | Upgrade Jetty to the latest version (because the current Jetty version used by Eclipse can consume 100% CPU) | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Fabio Zadrozny <fabiofz> | ||||||||
| Component: | IDE | Assignee: | Platform-UI-Inbox <Platform-UI-Inbox> | ||||||||
| Status: | CLOSED DUPLICATE | QA Contact: | |||||||||
| Severity: | normal | ||||||||||
| Priority: | P3 | CC: | daniel_megert, david_williams, Lars.Vogel, tjwatson, tom.schindl | ||||||||
| Version: | 4.4.1 | ||||||||||
| Target Milestone: | 4.5 M5 | ||||||||||
| Hardware: | PC | ||||||||||
| OS: | Windows 8 | ||||||||||
| See Also: | https://bugs.eclipse.org/bugs/show_bug.cgi?id=457607 | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
Created attachment 249877 [details]
Yourkit profile dump
Note: also reported this to the Jetty tracker to see if it's just a matter of upgrading the Eclipse version or not (https://bugs.eclipse.org/bugs/show_bug.cgi?id=457607) Could you attach a log file (<WORKSPACE>/.metadata/.log)? Created attachment 249975 [details]
.log
Hi Wojciech,
Thanks for responding.
There's nothing related to that on the error log (mostly things on PyDev which I'm developing which are not be serious).
I'm still attaching it as you requested, but there's really nothing to see -- as a note, I had to restart twice today because of it and not a single entry was added to the error log today (it happened by simply opening Eclipse and running a new Eclipse instance from it with the plugins I'm developing).
*** Bug 457607 has been marked as a duplicate of this bug. *** Ok, so, the bug is now for upgrading Jetty to the latest version as the current version seems to have an issue and it's currently unsupported. I just noted that the importance was changed to normal... Usually I'd say that entering a situation where you consume 100% cpu is a blocker no? For Luna, see bug 444392. For Mars, see bug 453910. i.e. we "can't" move up to 9.x in Platform for Luna, but plan to (or, have?) for Mars. But, Fabio, not sure of your "use case", but if you are really making a "server app" and "running on a server" you should be able to use what ever server you want. But, I am not sure of your use-case and if that makes sense for what you are doing. (In reply to David Williams from comment #8) > For Luna, see bug 444392. For Mars, see bug 453910. > > i.e. we "can't" move up to 9.x in Platform for Luna, but plan to (or, have?) > for Mars. > > But, Fabio, not sure of your "use case", but if you are really making a > "server app" and "running on a server" you should be able to use what ever > server you want. But, I am not sure of your use-case and if that makes sense > for what you are doing. Actually, I don't use jetty for anything (I'm just using the Eclipse SDK and Jetty is being started -- but I don't even know why it's being started, all I know is that it's consuming a lot of cpu... as I said, all I do is start the SDK, edit some java files and launch a new Eclipse runtime from the SDK and Jetty ends up in this state). As for not upgrading for Luna, I guess that's Ok, but if that could be added soon to a new Mars M.x, it'd be really nice! (In reply to Fabio Zadrozny from comment #9) > (In reply to David Williams from comment #8) > > For Luna, see bug 444392. For Mars, see bug 453910. > > > > i.e. we "can't" move up to 9.x in Platform for Luna, but plan to (or, have?) > > for Mars. > > > Actually, I don't use jetty for anything (I'm just using the Eclipse SDK and > Jetty is being started -- but I don't even know why it's being started ... Ok, fair enough. But, "the Eclipse SDK" only starts Jetty for "help". So, sounds like something else you have installed starts and uses it. PyDev? I'm thinking this bugzilla entry "belongs to them". But, don't believe they are an Eclipse Project, right? (There are other Eclipse Projects that do use and start it, such as BIRT, or WTP, if you are working on Reports, or "web apps" ... but, as far as I know, it's not really the Jetty version that's the problem, but one of the other components that use Jetty.) It would be helpful if you could follow the procedure in https://wiki.eclipse.org/How_to_report_a_deadlock to help narrow down the area of code that is involved in the "CPU consumption". Otherwise, there's not much for us to do. Thanks, I investigated here and as you said, it's indeed because of the help service... but not because of the help itself, but because of JDT which is starting it in the stack: Daemon Thread [Text Viewer Hover Presenter] (Suspended) JettyHelpServer$StartServerThread.<init>(JettyHelpServer, String) line: 55 JettyHelpServer.start(String) line: 110 WebappManager.start(String) line: 38 BaseHelpSystem.ensureWebappRunning() line: 182 BaseHelpSystem.resolve(String, boolean) line: 198 DefaultHelpUI.resolve(String, boolean) line: 361 WorkbenchHelpSystem.resolve(String, boolean) line: 938 JavaDocLocations.getBaseURL(IJavaElement, boolean) line: 634 JavadocHover.getHoverInfo(IJavaElement[], ITypeRoot, IRegion, JavadocBrowserInformationControlInput) line: 694 JavadocHover.internalGetHoverInfo(ITextViewer, IRegion) line: 607 JavadocHover.getHoverInfo2(ITextViewer, IRegion) line: 599 BestMatchHover.getHoverInfo2(ITextViewer, IRegion, boolean) line: 163 BestMatchHover.getHoverInfo2(ITextViewer, IRegion) line: 129 JavaEditorTextHoverProxy.getHoverInfo2(ITextViewer, IRegion) line: 85 TextViewerHoverManager$4.run() line: 166 Now, I don't think this is really an issue in JDT, but in Jetty which misbehaves later on -- you can see the exact place in the snapshot I posted before (https://bugs.eclipse.org/bugs/attachment.cgi?id=249876) -- personally, I think this is a bug in Jetty -- which is unsupported because it's such an old version -- which is why I believe updating it *should* fix it! Also, I think this should definitely have a higher priority -- I can't see how having a thread at 100% CPU which is only solved by a restart isn't critical! Ping? I investigated a bit more and it's really a bug in org.eclipse.jetty.io.nio.SelectorManager.SelectSet.doSelect() -- it's pause/sleep implementation is buggy when it has nothing to do -- and the new version has an implementation that's very different (so, I think it doesn't have that issue -- it should be mostly a matter of updating it). I guess we should consult with the jetty guys to understand what's going on Well, I done that: https://bugs.eclipse.org/bugs/show_bug.cgi?id=457607 and the answer was that the current version used by Eclipse reached its EOL and is unsupported for Eclipse. I could create a patch to fix the issue I'm seeing in the Jetty version used by Eclipse as I know where the bug is now -- the only thing is that it only happens after quite some time, probably due to the java jit bumping in and making things faster -- on what should be an idle loop. Still, creating a patch for this in the current version seems unwise as that's an old/unsupported version (and the patch would be on its core loop on some pretty contrived code). Dani / David, can we upgrade to Jetty 9? Jetty 8 is unsupported at this point. (In reply to Lars Vogel from comment #15) > Dani / David, can we upgrade to Jetty 9? Jetty 8 is unsupported at this > point. You mean for 4.4.2? Most likely no. We didn't get any similar bug so far and RC3 is tomorrow. (In reply to Dani Megert from comment #16) > (In reply to Lars Vogel from comment #15) > > Dani / David, can we upgrade to Jetty 9? Jetty 8 is unsupported at this > > point. > > You mean for 4.4.2? Most likely no. We didn't get any similar bug so far and > RC3 is tomorrow. What about 4.5? (In reply to Lars Vogel from comment #17) > (In reply to Dani Megert from comment #16) > > (In reply to Lars Vogel from comment #15) > > > Dani / David, can we upgrade to Jetty 9? Jetty 8 is unsupported at this > > > point. > > > > You mean for 4.4.2? Most likely no. We didn't get any similar bug so far and > > RC3 is tomorrow. > > What about 4.5? What about 4.5? We're on 9.2.5 since M4. (In reply to Dani Megert from comment #18) > What about 4.5? We're on 9.2.5 since M4. Ah sorry, my misunderstanding. Fabio, do you still see this issue on Eclipse 4.5 M5? (In reply to Lars Vogel from comment #19) > (In reply to Dani Megert from comment #18) > > What about 4.5? We're on 9.2.5 since M4. > > Ah sorry, my misunderstanding. > > Fabio, do you still see this issue on Eclipse 4.5 M5? See also bug 453910 for another planned upgrade. (In reply to Lars Vogel from comment #19) > (In reply to Dani Megert from comment #18) > > What about 4.5? We're on 9.2.5 since M4. > > Ah sorry, my misunderstanding. > > Fabio, do you still see this issue on Eclipse 4.5 M5? Thanks Lars/Dani (didn't know 4.5 had upgraded already). I'll upgrade to 4.5 M5 to check if it works there (probably should as I've taken a look at that part and it's totally reworked). I just noted that there'll be an M5a (https://dev.eclipse.org/mhonarc/lists/cross-project-issues-dev/msg08602.html), so, I'll wait for that to properly check on my side... in an unrelated question, are there delta packs for M5? I.e.: I could find a delta pack from the links at http://download.eclipse.org/eclipse/downloads/ up to Eclipse 4.5M3, but couldn't find a link for delta packs for 4.5M4 nor 4.5M5... Should I create a bug for that? (In reply to Fabio Zadrozny from comment #22) > ... are there delta packs for M5? > > I.e.: I could find a delta pack from the links at > http://download.eclipse.org/eclipse/downloads/ up to Eclipse 4.5M3, but > couldn't find a link for delta packs for 4.5M4 nor 4.5M5... Should I create > a bug for that? The delta pack has been deprecated for a while and planned to be be removed in Mars. Most discussion of it is in bug 419246. (In short, should not be needed any longer and anything "done with delta-pack" can be "done with p2 repository".) I will close this as "won't fix", to be concrete about it. But, will point out we did update the version to 8.1.16.v20140903 in 4.4.2 (over 8.1.14.xxxx in 4.4.1). I doubt this fixes the specific issue here (see bug list in bug 444392) but ... I have no first hand knowledge of it. The bug can be re-opened if others see it, or, especially, if seen to actually interfere with some other operation or Eclipse project. (I should note, though, even if re-opened, we'd look for a fix to come from the Jetty team ... we wouldn't patch their stuff). While it is unlikely to help this case, in this release, due to timing, another approach to problems such as this is to allow the ability for others to "swap in" (install) other (patched) versions of Jetty if they would like. I'm not sure what that would take (and definitely would not include a large change such as "installing Jetty 9") but, just in general, I am trying to give some constructive ways others could contribute. Last bit of advice, I hope comes across as constructive as I intend, is that 100% CPU usage -- all by itself -- is usually not considered "blocking" or even "critical" ... for the simple reason that some bad code "uses 100%" when nothing else is going on, and as soon as something else needs the CPU, the "bad code" stops what its doing. Not always .. but sometimes, is my point. So, more effective to demonstrate "the problem", rather than the measurement. Thanks for the report, and analyses, and suggestions. Closing it as "won't fix" is not to say it is not a problem ... just one that's hard for "us" to fix, given all the other constraints. Thanks again, I think fixed in Eclipse 4.5 is the correct resolution. See Comment 18 and Bug 452160. Or even better, mark as Dup of Bug 452160. *** This bug has been marked as a duplicate of bug 452160 *** |
Created attachment 249876 [details] Snapshot in yourkit This happens randomly on my machine (so, not every time I start Eclipse -- usually it happens after some time being up, potentially with some system hibernation or sleep in the middle -- I don't really know for sure as I just note it when my machine is turning the fans on because of this). It happened in 4.4.0 and 4.4.1 for me (I upgraded from 4.4.0 to 4.4.1 to see if it solved the issue but it didn't). I'm attaching a snapshot of the YourKit profiler showing the issue and a tracing dump (also for YourKit). The snapshots are for: Version: Luna Service Release 1 (4.4.1) Build id: 20140925-1800 OS is windows 8.