Bug 548541 - Did not encounter the UI thread in stack traces.
Summary: Did not encounter the UI thread in stack traces.
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.13   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: 4.17 RC1   Edit
Assignee: Julian Honnen CLA
QA Contact:
URL:
Whiteboard:
Keywords: regression
Depends on:
Blocks: 563540 563542
  Show dependency tree
 
Reported: 2019-06-22 05:48 EDT by Ed Willink CLA
Modified: 2020-08-21 05:31 EDT (History)
6 users (show)

See Also:
Lars.Vogel: pmc_approved+


Attachments
Log File (645.51 KB, text/plain)
2020-02-17 13:36 EST, Ed Willink CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Willink CLA 2019-06-22 05:48:32 EDT
After checking out a GIT commit I get three copies of:

org.eclipse.ui.monitoring
Did not encounter the UI thread in stack traces.
An exception stack trace is not available.

a) why spurious message
b) why no UI thread - clearly there is a UI thread
c) why no stack trace
Comment 1 Stephan Herrmann CLA 2019-08-29 13:03:18 EDT
I see this causing Plug-in tests to fail for no good reason.

Please, there must be a way to disable this?
Comment 2 Andrey Loskutov CLA 2019-08-29 13:08:17 EDT
(In reply to Stephan Herrmann from comment #1)
> I see this causing Plug-in tests to fail for no good reason.
> 
> Please, there must be a way to disable this?

Lars, wasn't this error reporting disabled now for tests?

Stephan: on which tests do you see this?
Comment 3 Lars Vogel CLA 2019-08-29 13:10:20 EDT
(In reply to Andrey Loskutov from comment #2)
> (In reply to Stephan Herrmann from comment #1)

> Lars, wasn't this error reporting disabled now for tests?

No, we fixed the one tests which we saw failing due to that setting.

> Stephan: on which tests do you see this?

Yes, please post reference.
Comment 4 Lars Vogel CLA 2019-08-29 13:25:02 EDT
Stephan, if you see this during debugging, please update your SDK, latest build turns freeze monitor off during debugging.
Comment 5 Stephan Herrmann CLA 2019-08-29 13:25:23 EDT
(In reply to Lars Vogel from comment #3)
> (In reply to Andrey Loskutov from comment #2)
> > (In reply to Stephan Herrmann from comment #1)
> 
> > Lars, wasn't this error reporting disabled now for tests?
> 
> No, we fixed the one tests which we saw failing due to that setting.
> 
> > Stephan: on which tests do you see this?
> 
> Yes, please post reference.

https://hudson.eclipse.org/objectteams/job/buildAndTest/458/testReport/org.eclipse.objectteams.otdt.ui.tests.callinmarker/CallinMarkerTests/testMarkers_NonJavaPrj1/

not sure what you're looking for.

Maybe the interesting part is this:
  org.eclipse.test.UITestApplication.run(UITestApplication.java:48)
?

The test runs fine locally. On jenkins it alternates between pass / fail due to ui "freeze" / "Did not encounter ..."

If ui monitoring is active during tests without me asking for it I need at least an option to disable / configure for particular tests (testing functionality that is known to be slow on an overloaded build server).
Comment 6 Stephan Herrmann CLA 2019-08-29 13:27:04 EDT
(In reply to Lars Vogel from comment #4)
> Stephan, if you see this during debugging, please update your SDK, latest
> build turns freeze monitor off during debugging.

No, this was not a debug session.

In the above situation SDK was 4.13 M3.
Comment 7 Lars Vogel CLA 2019-08-29 14:02:07 EDT
Stephan, you could set osgi.dev to disable that. https://help.eclipse.org/oxygen/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fmisc%2Fruntime-options.html Or you could set the preference to false for the run. If you want to do that I can look it the preference key tomorrow. 

In platform we updated our one test which fails to check the log for the correct entry instead of any, maybe that is also an option for you.
Comment 8 Stephan Herrmann CLA 2019-08-29 14:43:52 EDT
(In reply to Lars Vogel from comment #7)
> Stephan, you could set osgi.dev to disable that.
> https://help.eclipse.org/oxygen/index.jsp?topic=%2Forg.eclipse.platform.doc.
> isv%2Freference%2Fmisc%2Fruntime-options.html

what other effects does this have?

> Or you could set the
> preference to false for the run. If you want to do that I can look it the
> preference key tomorrow. 

I prefer that, TIA

> In platform we updated our one test which fails to check the log for the
> correct entry instead of any, maybe that is also an option for you.

I prefer to test that nothing unexpected appears in the log.
Comment 9 Lars Vogel CLA 2019-08-29 15:39:21 EDT
(In reply to Stephan Herrmann from comment #8) 
> what other effects does this have?
Depends on your code.

> I prefer that, TIA

Preference is: org.eclipse.ui.monitoring/monitoring_enabled=false
Comment 10 Ed Willink CLA 2019-10-25 17:09:01 EDT
(In reply to Lars Vogel from comment #9)
> Preference is: org.eclipse.ui.monitoring/monitoring_enabled=false

Why is a preference needed for normal (non-debug) operation? My error log is cluttered with bursts (typically of 3) Did not encounter the UI thread in stack traces messages.

And

(In reply to Ed Willink from comment #0)
> a) why spurious message
> b) why no UI thread - clearly there is a UI thread
> c) why no stack trace
Comment 11 Ed Willink CLA 2020-02-17 13:36:59 EST
Created attachment 281841 [details]
Log File

Still there in 2019-12. Seems to occur as part of a long UI freeze report. See 2020-02-17 18:26:13 events in attached log file.

If it really is reasonable for there to be no stack trace? The sole purpose of this error log would appear to be to confuse and annoy users. The message contains no information of any value; barely enough to even raise a Bugzilla.

As a minimum after failing to find the UI thread, it should report the current thread.
Comment 12 Lars Vogel CLA 2020-02-17 14:01:00 EST
I agree that these "empty" freeze reports are distracting and useless. Gerrit patches are welcome.
Comment 13 Julian Honnen CLA 2020-08-20 09:55:34 EDT
This is a regression from bug-less foreach loop refactoring
https://git.eclipse.org/r/c/platform/eclipse.platform.ui/+/141624/4/bundles/org.eclipse.ui.monitoring/src/org/eclipse/ui/internal/monitoring/EventLoopMonitorThread.java#662

The during reordering of the main thread, its sample is dropped ...
Comment 14 Eclipse Genie CLA 2020-08-20 10:02:27 EDT
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.ui/+/168020
Comment 15 Julian Honnen CLA 2020-08-20 10:04:24 EDT
Lars, please review for RC1
Comment 17 Lars Vogel CLA 2020-08-21 05:31:53 EDT
Thanks, Julian!