Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 306449

Summary: warning logged during shutdown
Product: [Technology] EPP Reporter: Steffen Pingel <steffen.pingel>
Component: Usage Data CollectorAssignee: Wayne Beaton <wayne.beaton>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: david.samuelsson.se, david_williams, ericvn, jonah, mknauer
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Steffen Pingel CLA 2010-03-18 19:02:02 EDT
Steps:
1. Run M6 EPP Java package
2. Interact
3. Shutdown

The following warning is logged to the console:

Job found still running after platform shutdown.  Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.epp.usagedata.internal.gathering.services.UsageDataService$1
Comment 1 David Williams CLA 2010-09-15 23:28:30 EDT
Still present in Helios SR1. 

(I was going to report but see already has been, so just wanted to document "some of us users don't like these sorts of errors in log ... who knows what data is lost" :) 

But, not too concerned. Just hope its not ignored.
Comment 2 David Samuelsson CLA 2010-12-30 05:05:57 EST
Yes, seen this as well, i have an modified udc running internally.

A bit annoying when i am doing headless ui tests, i am not sure the tests went ok or not, not sure this is the culprint but something fails the tests and the only error i got is this one.

i experience the same as this: 

http://dev.eclipse.org/newslists/news.eclipse.platform/msg46377.html old one..not sure its the same, but when junit tests are run i see this error, but not during normal usage of the rcp application.
Comment 3 Wayne Beaton CLA 2011-01-03 13:47:09 EST
The UDC bundles do attempt the shut down the job. The problem occurs in the loop inside the "eventConsumer" job; it waits on the event queue for an event to arrive. Depending on the timing of the shutdown, we sometimes do not have any events in the queue and so the job sits and waits: the loop does not iterate and we do not get a chance to check to see if the cancel has been requested. So the job just sits there.

I've modified the "stop" code to interrupt the eventConsumerJob's thread. If the thread is waiting on the queue, this interruption wakes it up. I also added some code to handle the null return value that results from this interruption.

Ideally, this should make everything right. However, there is still a chance that the job won't complete in time (in the event, for example, that an consumer takes too long to process the last event that squeaks through). I've changed the code in UsageDataService#stopEventConsumerJob() to join the job after canceling it. This will prevent the shutdown sequence from continuing until the event consumer job has properly completed.

All tests pass. Initial testing on my workstation all positive. Committed in HEAD.
Comment 4 Jonah Graham CLA 2021-05-07 10:23:27 EDT
The Usage Data Collector was decommissioned a long time ago. Therefore any
remaining bugs are now being closed as WONTFIX. If this bug is still relevant,
please make a comment and we'll move it to the correct project/component for
further investigation.

This change was made as part of a bulk change.