Bug 73131 - Access denied error in auto-refresh native
Summary: Access denied error in auto-refresh native
Status: REOPENED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Resources (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-Resources-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-02 04:16 EDT by Dani Megert CLA
Modified: 2020-06-19 04:56 EDT (History)
5 users (show)

See Also:


Attachments
Eclipse screen shoot (42.74 KB, image/png)
2019-11-22 03:59 EST, Gabriele Pezzini CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dani Megert CLA 2004-09-02 04:16:48 EDT
Found in .log (no other entries) while testing M200409010800. Happened in a test
workspace with auto-build on and auto-refresh off (yes off).

!ENTRY org.eclipse.core.resources 4 1 Sep 02, 2004 10:06:15.58
!MESSAGE Problems occurred refreshing resources
!SUBENTRY 1 org.eclipse.core.resources 4 1 Sep 02, 2004 10:06:15.58
!MESSAGE Problem occurred in auto-refresh native code: 5.

!ENTRY org.eclipse.core.resources 4 1 Sep 02, 2004 10:06:16.80
!MESSAGE Problems occurred refreshing resources
!SUBENTRY 1 org.eclipse.core.resources 4 1 Sep 02, 2004 10:06:16.80
!MESSAGE Problem occurred in auto-refresh native code: 5.

!ENTRY org.eclipse.core.resources 4 1 Sep 02, 2004 10:06:17.91
!MESSAGE Problems occurred refreshing resources
!SUBENTRY 1 org.eclipse.core.resources 4 1 Sep 02, 2004 10:06:17.91
!MESSAGE Problem occurred in auto-refresh native code: 5.

!ENTRY org.eclipse.core.resources 4 1 Sep 02, 2004 10:06:18.133
!MESSAGE Problems occurred refreshing resources
!SUBENTRY 1 org.eclipse.core.resources 4 1 Sep 02, 2004 10:06:18.133
!MESSAGE Problem occurred in auto-refresh native code: 5.

!ENTRY org.eclipse.core.resources 4 1 Sep 02, 2004 10:06:19.144
!MESSAGE Problems occurred refreshing resources
!SUBENTRY 1 org.eclipse.core.resources 4 1 Sep 02, 2004 10:06:19.144
!MESSAGE Problem occurred in auto-refresh native code: 5.

!ENTRY org.eclipse.core.resources 4 1 Sep 02, 2004 10:06:20.156
!MESSAGE Problems occurred refreshing resources
!SUBENTRY 1 org.eclipse.core.resources 4 1 Sep 02, 2004 10:06:20.156
!MESSAGE Problem occurred in auto-refresh native code: 5.

!ENTRY org.eclipse.core.resources 4 1 Sep 02, 2004 10:06:21.167
!MESSAGE Problems occurred refreshing resources
!SUBENTRY 1 org.eclipse.core.resources 4 1 Sep 02, 2004 10:06:21.167
!MESSAGE Problem occurred in auto-refresh native code: 5.

!ENTRY org.eclipse.core.resources 4 1 Sep 02, 2004 10:06:22.179
!MESSAGE Problems occurred refreshing resources
!SUBENTRY 1 org.eclipse.core.resources 4 1 Sep 02, 2004 10:06:22.179
!MESSAGE Problem occurred in auto-refresh native code: 5.

!ENTRY org.eclipse.core.resources 4 1 Sep 02, 2004 10:06:23.200
!MESSAGE Problems occurred refreshing resources
!SUBENTRY 1 org.eclipse.core.resources 4 1 Sep 02, 2004 10:06:23.200
!MESSAGE Problem occurred in auto-refresh native code: 5.

!ENTRY org.eclipse.core.resources 4 1 Sep 02, 2004 10:06:24.212
!MESSAGE Problems occurred refreshing resources
!SUBENTRY 1 org.eclipse.core.resources 4 1 Sep 02, 2004 10:06:24.212
!MESSAGE Problem occurred in auto-refresh native code: 5.
Comment 1 DJ Houghton CLA 2004-09-02 17:08:20 EDT
I think that a call to WaitForMultipleObjects is returning "Access is denied.".
Hmm...
Comment 2 Gunnar Wagenknecht CLA 2004-10-22 09:09:53 EDT
I saw this also on one of our users boxes. Auto-Build OFF but auto-refresh ON. 
The message is a little bit confusing because it doesn't explain very much.
It was logged multiple times and caused a log file size of more than 5MB. Note 
that Eclipse was very unresponsive while this message was logged 3 or 4 times 
EVERY second.
Comment 3 John Arthorne CLA 2005-07-05 16:48:58 EDT
We were never able to reproduce this.
Comment 4 Markus Keller CLA 2010-08-11 11:58:13 EDT
With I20100810-0800, I got 16 such entries in my dev workspace (at irregular intervals, about 5-20 seconds apart)

!ENTRY org.eclipse.core.resources 4 1 2010-08-11 14:40:30.538
!MESSAGE Problems occurred refreshing resources
!SUBENTRY 1 org.eclipse.core.resources 4 1 2010-08-11 14:40:30.553
!MESSAGE Problem occurred in auto-refresh native code: 5.

Auto-refresh is enabled (and has been like that for a long time).
Comment 5 Markus Keller CLA 2010-08-11 12:09:20 EDT
Could be the same reason as bug 57758. I was cleaning up an old temp directory at that time, and my workspace had linked resources that were invalid afterwards. If you can't / don't want to remove these messages, it would be helpful if they contained a file system and/or resource path.
Comment 6 Eclipse Webmaster CLA 2019-09-06 16:14:49 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.
Comment 7 Gabriele Pezzini CLA 2019-11-22 03:59:41 EST
Created attachment 280758 [details]
Eclipse screen shoot

Hi, 
I'm using Eclipse:
Version: 2019-03 (4.11.0)
Build id: 20190314-1200

And the error come random, very difficult to say to you the steps to reproduce because it seems really random.
When the error comes, then the messages in the eclipse error log view are displayed about every second.
I've the auto refresh option enabled.
The only workaround I've found is:
- close eclipse
- open eclipse and refresh manually all projects
- close eclipse and restart again
- then maybe the error comes after few hours of works or day of works. It's random.
And when comes, I have to close, refresh, close and open (as reported below)
Comment 8 Karsten Thoms CLA 2019-11-22 05:06:19 EST
Could you also add a stacktrace? This can be found in the details of log entries.
Comment 9 Thiago Berne CLA 2020-06-10 13:56:36 EDT
Same is happening with me.
Eclipse log is being flooded with messages like:

!ENTRY org.eclipse.core.resources 4 1 2020-06-10 14:48:36.741
!MESSAGE Problems occurred refreshing resources
!SUBENTRY 1 org.eclipse.core.resources 4 1 2020-06-10 14:48:36.741
!MESSAGE Problem occurred in auto-refresh native code: 5.
Comment 10 Gabriele Pezzini CLA 2020-06-19 03:10:38 EDT
Hi, unfortunately no exception is available.

Looking at the details of the message I see the message;

An exception stack trace is not available.
Comment 11 Karsten Thoms CLA 2020-06-19 04:56:11 EDT
This error is raised in
org.eclipse.core.internal.resources.refresh.win32.Win32Monitor.waitForNotification(long[])

The error code 5 is ERROR_ACCESS_DENIED
https://docs.microsoft.com/en-us/windows/win32/debug/system-error-codes--0-499-

It would make sense to add this error code to class Win32Natives.

The question is how to deal with it? The code already does not report a failure for the error code ERROR_INVALID_HANDLE. Should ERROR_ACCESS_DENIED be ignored also?

----------------------------------------------------------------------
		if (index == Win32Natives.WAIT_FAILED) {
			// we ran into a problem
			int error = Win32Natives.GetLastError();
			if (error != Win32Natives.ERROR_INVALID_HANDLE && error != Win32Natives.ERROR_SUCCESS) {
				addException(NLS.bind(Messages.WM_nativeErr, Integer.toString(error)));
				refreshResult.monitorFailed(this, null);
			}
			return;
		}
----------------------------------------------------------------------