I have an unique problem which happens in the user's system which is not reproducible in any other system. System does not crash.
So this my thread model. I have a main SWT thread which triggers few daemon threads and of which a daemon thread (Thread-1), does some operations and then do some file operations like getting the file attribute view and check for a file attribute. Logs are only printing before the file operations are performed.
I took a thread dump but strangely the thread-1 daemon was not listed there, so only reason could be that this thread-1 was done ? But if it was done it should have printed the file operations related logs.
This is the code for file operation part which is a suspect
UserDefinedFileAttributeView fileAttributeView = Files.getFileAttributeView(fullPath, UserDefinedFileAttributeView.class);
List<String> userAttributes = fileAttributeView.list();
if (userAttributes.contains("id")) {
byte[] b = (byte[]) Files.getAttribute(fullPath, "id");
String objectId = new String(b, "UTF-8");
return objectId;
}
I have proper exception handling implemented such that any error in thread-1 would be printed. I am lost with ideas now. Is there anything which can be done ? Is there anyway the above file API calls can crash or gets blocked?
I know the scenario is bit hypothetical now rather than the code being shown, but I can't help much as the scenario is unique.