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

Bug 383162

Summary: Better error recovery when there is bad user data
Product: [ECD] Orion Reporter: Ken Walker <ken_walker>
Component: ServerAssignee: Ken Walker <ken_walker>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: simon_kaegi
Version: 0.5   
Target Milestone: 3.0 M2   
Hardware: PC   
OS: Mac OS X   
Whiteboard:

Description Ken Walker CLA 2012-06-20 17:47:00 EDT
It seems that at least my username is not available on OrionHub since running out of disk space.

We need to figure out how to look at the user space on OrionHub to see what has been impacted.

I've asked the Webmaster @ eclipse for additional space.
Comment 1 John Arthorne CLA 2012-06-20 19:48:33 EDT
I can't find any particular user with excessive disk use. It does indeed just seem like a large number of users, each with a couple of git clones for example.

admin@orionhub:~/current/eclipse/serverworkspace> du -h |sort -n -r |head -n 20

1020K   ./yW/yW/sy/gameoflife-web/tools/jmeter/docs/api/org/apache/jmeter/protocol/java
1020K   ./xz/xz/sg/HQ-ContactSync
1020K   ./T/T/Gn/mcs/class/Managed.Windows.Forms/resources
1020K   ./RW/RW/So/.git
1020K   ./ri/J6/plugins/org.python.pydev/src_completions/org/python/pydev
1020K   ./Rf/Rf
1020K   ./qC/qC/o7/wro4j-core/src/main/java
1020K   ./ou/ou/oL/hudson-core/src/main/resources/hudson/security
1020K   ./DT/DT
1020K   ./1K/1K/up/gameoflife-web/tools/jmeter/docs/api/org/apache/jmeter/protocol/java
1016K   ./XF/XF/y7/testing/src/org
1016K   ./XF/XF/y5/testing/src/org
1016K   ./sp/sp/vG
Comment 2 John Arthorne CLA 2012-06-22 10:51:45 EDT
I believe I tracked down the side-effects problem.

I can see from the error log where it fails (see stack below). The data format is of the form /users/<login>/login=\t,<some encrypted value>

Notably, the \t and , characters must be present because they are data separators. Through regular expressions I found a single entry in the user list with bad format:

 /users/mail@joshuazeltman.com/login=

I deleted this one user (sorry Joshua) and now things are working again.


!ENTRY org.eclipse.orion.server.user.securestorage 4 4 2012-06-21 10:08:48.790
!MESSAGE Can not get user: Ken_Walker@ca.ibm.com
!STACK 0
org.eclipse.equinox.security.storage.StorageException: Invalid data format.
        at java.lang.Throwable.<init>(Throwable.java:67)
        at org.eclipse.equinox.security.storage.StorageException.<init>(StorageException.java:66)
        at org.eclipse.equinox.internal.security.storage.CryptoData.<init>(CryptoData.java:47)
        at org.eclipse.equinox.internal.security.storage.SecurePreferences.get(SecurePreferences.java:254)
        at org.eclipse.equinox.internal.security.storage.SecurePreferencesWrapper.get(SecurePreferencesWrapper.java:106)
        at org.eclipse.orion.internal.server.user.securestorage.SecureStorageCredentialsService.findNodeByLoginIgnoreCase(SecureStorageCredentialsService.java:317)
        at org.eclipse.orion.internal.server.user.securestorage.SecureStorageCredentialsService.getUser(SecureStorageCredentialsService.java:226)
Comment 3 Ken Walker CLA 2012-06-22 10:54:48 EDT
Awesome, thanks John!!!  My account can now log in.
Comment 4 John Arthorne CLA 2012-06-22 11:12:21 EDT
The reason a single bad entry is problematic is that SecureStorageCredentialsService.findNodeByLoginIgnoreCase iterates over all logins until it find the matching user. This code should protect against corruption and keep searching.
Comment 5 Ken Walker CLA 2013-01-23 10:07:48 EST
Haven't looked at this yet
Comment 6 Ken Walker CLA 2013-06-11 16:53:51 EDT
Closing since John is working on new metadata API and fixing error recovery in older API is unlikely