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

Bug 194367

Summary: Improve error handling and recovery from InternalError during externalization
Product: z_Archived Reporter: Joost Kraaijeveld <J.Kraaijeveld>
Component: MylynAssignee: Robert Elves <robert.elves>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: 3.0   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Eclipse configuration none

Description Joost Kraaijeveld CLA 2007-06-26 01:28:29 EDT
1. Install eclipse with the plugins as in the attachment
2. Start working 
3. After a while the exceptions below come one by one and they make it quit impossible to keep working with Eclipse.

I noticed in the .mylin directory "0" (NULL) sized zip files (see also the last remark after the "ls"):

panoramix:~/eclipsetest/eclipse-SDK-I20070625-1500/workspace/.metadata/.mylyn$ ls -al *
-rw-r--r-- 1 jkr jkr  0 Jun 26 07:16 repositories.xml.zip
-rw-r--r-- 1 jkr jkr  0 Jun 26 06:09 repositories.xml.zip-save
-rw-r--r-- 1 jkr jkr  0 Jun 26 06:34 tasklist.xml-failed-07-06-26-50.zip
-rw-r--r-- 1 jkr jkr  0 Jun 26 07:13 tasklist.xml.zip

backup:
total 8
drwxr-xr-x 2 jkr jkr   37 Jun 26 06:35 .
drwxr-xr-x 5 jkr jkr 4096 Jun 26 06:34 ..
-rw-r--r-- 1 jkr jkr  739 Jun 26 06:35 mylardata-2007-06-26.zip

contexts:
total 4
drwxr-xr-x 2 jkr jkr    6 Jun 26 06:08 .
drwxr-xr-x 5 jkr jkr 4096 Jun 26 06:34 ..

offline:
total 64
drwxr-xr-x 3 jkr jkr    50 Jun 26 06:41 .
drwxr-xr-x 5 jkr jkr  4096 Jun 26 06:34 ..
drwxr-xr-x 2 jkr jkr 32768 Jun 26 07:02 https%3A%2F%2Fbugs.eclipse.org%2Fbugs 

[*** This directory is full of zip files with the offline files it could not save ***]




From the Error log:

!SESSION 2007-06-26 07:08:31.762 -----------------------------------------------
eclipse.buildId=I20070625-1500
java.version=1.5.0_11
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Command-line arguments:  -os linux -ws gtk -arch x86_64


!ENTRY org.eclipse.mylyn 4 0 2007-06-26 07:13:52.812
!MESSAGE could not save repositories

!STACK 0
java.lang.InternalError
	at java.util.zip.Deflater.init(Native Method)
	at java.util.zip.Deflater.<init>(Deflater.java:117)
	at java.util.zip.ZipOutputStream.<init>(ZipOutputStream.java:61)
	at org.eclipse.mylyn.internal.tasks.core.TaskRepositoriesExternalizer.writeRepositoriesToXML(TaskRepositoriesExternalizer.java:53)
	at org.eclipse.mylyn.tasks.core.TaskRepositoryManager.saveRepositories(TaskRepositoryManager.java:357)
	at org.eclipse.mylyn.tasks.core.TaskRepositoryManager.setSynchronizationTime(TaskRepositoryManager.java:339)
	at org.eclipse.mylyn.tasks.ui.SynchronizeQueryJob.run(SynchronizeQueryJob.java:143)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

!ENTRY org.eclipse.core.jobs 4 2 2007-06-26 07:13:55.772
!MESSAGE An internal error occurred during: "Task List Saver".
!STACK 0
java.lang.InternalError
	at java.util.zip.Deflater.init(Native Method)
	at java.util.zip.Deflater.<init>(Deflater.java:117)
	at java.util.zip.ZipOutputStream.<init>(ZipOutputStream.java:61)
	at org.eclipse.mylyn.internal.tasks.ui.util.TaskListWriter.writeDOMtoFile(TaskListWriter.java:200)
	at org.eclipse.mylyn.internal.tasks.ui.util.TaskListWriter.writeTaskList(TaskListWriter.java:168)
	at org.eclipse.mylyn.internal.tasks.ui.util.TaskListSaveManager.internalSaveTaskList(TaskListSaveManager.java:129)
	at org.eclipse.mylyn.internal.tasks.ui.util.TaskListSaveManager.access$0(TaskListSaveManager.java:127)
	at org.eclipse.mylyn.internal.tasks.ui.util.TaskListSaveManager$TaskListSaverJob.run(TaskListSaveManager.java:275)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

!ENTRY org.eclipse.mylyn 4 0 2007-06-26 07:14:44.545
!MESSAGE Error saving offline cache

!STACK 0
java.lang.InternalError
	at java.util.zip.Deflater.init(Native Method)
	at java.util.zip.Deflater.<init>(Deflater.java:117)
	at java.util.zip.ZipOutputStream.<init>(ZipOutputStream.java:61)
	at org.eclipse.mylyn.internal.tasks.ui.OfflineFileStorage.put(OfflineFileStorage.java:256)
	at org.eclipse.mylyn.internal.tasks.ui.OfflineCachingStorage.persistToStorage(OfflineCachingStorage.java:199)
	at org.eclipse.mylyn.internal.tasks.ui.OfflineCachingStorage.access$0(OfflineCachingStorage.java:194)
	at org.eclipse.mylyn.internal.tasks.ui.OfflineCachingStorage$CacheFlushJob.run(OfflineCachingStorage.java:224)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

!ENTRY org.eclipse.mylyn 4 0 2007-06-26 07:15:44.578
!MESSAGE Error saving offline cache

!STACK 0
java.lang.InternalError
	at java.util.zip.Deflater.init(Native Method)
	at java.util.zip.Deflater.<init>(Deflater.java:117)
	at java.util.zip.ZipOutputStream.<init>(ZipOutputStream.java:61)
	at org.eclipse.mylyn.internal.tasks.ui.OfflineFileStorage.put(OfflineFileStorage.java:256)
	at org.eclipse.mylyn.internal.tasks.ui.OfflineCachingStorage.persistToStorage(OfflineCachingStorage.java:199)
	at org.eclipse.mylyn.internal.tasks.ui.OfflineCachingStorage.access$0(OfflineCachingStorage.java:194)
	at org.eclipse.mylyn.internal.tasks.ui.OfflineCachingStorage$CacheFlushJob.run(OfflineCachingStorage.java:224)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

!ENTRY org.eclipse.mylyn 4 0 2007-06-26 07:16:18.081
!MESSAGE could not save repositories

!STACK 0
java.lang.InternalError
	at java.util.zip.Deflater.init(Native Method)
	at java.util.zip.Deflater.<init>(Deflater.java:117)
	at java.util.zip.ZipOutputStream.<init>(ZipOutputStream.java:61)
	at org.eclipse.mylyn.internal.tasks.core.TaskRepositoriesExternalizer.writeRepositoriesToXML(TaskRepositoriesExternalizer.java:53)
	at org.eclipse.mylyn.tasks.core.TaskRepositoryManager.saveRepositories(TaskRepositoryManager.java:357)
	at org.eclipse.mylyn.tasks.core.TaskRepositoryManager.setSynchronizationTime(TaskRepositoryManager.java:339)
	at org.eclipse.mylyn.tasks.ui.SynchronizeQueryJob.run(SynchronizeQueryJob.java:143)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

!ENTRY org.eclipse.mylyn 4 0 2007-06-26 07:16:44.583
!MESSAGE Error saving offline cache

!STACK 0
java.lang.InternalError
	at java.util.zip.Deflater.init(Native Method)
	at java.util.zip.Deflater.<init>(Deflater.java:117)
	at java.util.zip.ZipOutputStream.<init>(ZipOutputStream.java:61)
	at org.eclipse.mylyn.internal.tasks.ui.OfflineFileStorage.put(OfflineFileStorage.java:256)
	at org.eclipse.mylyn.internal.tasks.ui.OfflineCachingStorage.persistToStorage(OfflineCachingStorage.java:199)
	at org.eclipse.mylyn.internal.tasks.ui.OfflineCachingStorage.access$0(OfflineCachingStorage.java:194)
	at org.eclipse.mylyn.internal.tasks.ui.OfflineCachingStorage$CacheFlushJob.run(OfflineCachingStorage.java:224)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Comment 1 Joost Kraaijeveld CLA 2007-06-26 01:30:39 EDT
Created attachment 72446 [details]
Eclipse configuration
Comment 2 Mik Kersten CLA 2007-06-26 10:17:55 EDT
Is there any reason why Mylyn is not able to write into that directory?  E.g. the files got created by a different user or with different permissions?

Rob: in the least we need better error handling of the case where the the files cannot be written.
Comment 3 Eugene Kuleshov CLA 2007-06-26 10:42:39 EDT
 (In reply to comment #2)
> Is there any reason why Mylyn is not able to write into that directory?  E.g.
> the files got created by a different user or with different permissions?
> 
> Rob: in the least we need better error handling of the case where the the files
> cannot be written.

We probably should add test if folder if writable and warn the user about that.
Comment 4 Joost Kraaijeveld CLA 2007-06-26 10:56:57 EDT
The directory itself is writable by the user and Eclipse is started by the same user: see also the output of ls -al * in my bug report.
Comment 5 Robert Elves CLA 2007-06-26 11:40:15 EDT
Joost, is there anything special/custom about the linux distro you are using? Are you missing some gzip libraries perhaps? I'm not certain but java likely uses them for zipping on the linux platform.

 (In reply to comment #2)
> Rob: in the least we need better error handling of the case where the the files
> cannot be written.
We can open a dialog reporting the failure to write.  We could also revert to not zipping. Of course we'd have to check for these on reading as well so will take some time.
Comment 6 Eugene Kuleshov CLA 2007-06-26 11:46:03 EDT
 (In reply to comment #5)
> I'm not certain but java likely uses them for zipping on the linux platform.

Unlikely, because same library is used to read jar archives.

BTW, it isn't gcj by any chance?
Comment 7 Joost Kraaijeveld CLA 2007-06-26 12:30:03 EDT
My distribution is Debian and my JDK is Sun's 1.5-11 for AMD64.

I am not missing gzip libraries. As you can see there from the "ls" output and my remark in the initial bug report there are actually zip files created.

I do have some light in my tunnel: after filing my bug report I decided to close down Eclipse, remove the complete .mylyn directory from the .metadata directory and restart Eclipse. I have not has the errors since.
Comment 8 Robert Elves CLA 2007-06-26 14:19:31 EDT
 (In reply to comment #7)
> I do have some light in my tunnel: after filing my bug report I decided to close
> down Eclipse, remove the complete .mylyn directory from the .metadata directory
> and restart Eclipse. I have not has the errors since.

Okay great, please keep us posted. 
Comment 9 Robert Elves CLA 2008-04-05 19:49:09 EDT
All externalization will be improved for 3.0. Tracking on bug#183683

*** This bug has been marked as a duplicate of bug 183683 ***