Index: src/main/java/org/apache/jackrabbit/core/data/FileDataStore.java
===================================================================
--- src/main/java/org/apache/jackrabbit/core/data/FileDataStore.java	(revision 964106)
+++ src/main/java/org/apache/jackrabbit/core/data/FileDataStore.java	(working copy)
@@ -140,7 +140,7 @@
     /**
      * {@inheritDoc}
      */
-    public DataRecord getRecordIfStored(DataIdentifier identifier) {
+    public DataRecord getRecordIfStored(DataIdentifier identifier) throws DataStoreException {
         File file = getFile(identifier);
         synchronized (this) {
             if (!file.exists()) {
@@ -148,7 +148,10 @@
             }
             if (minModifiedDate != 0 && file.canWrite()) {
                 if (file.lastModified() < minModifiedDate) {
-                    file.setLastModified(System.currentTimeMillis() + ACCESS_TIME_RESOLUTION);
+                	// The current GC approach depends on this call succeeding 
+                    if (!file.setLastModified(System.currentTimeMillis() + ACCESS_TIME_RESOLUTION)) {
+                        throw new DataStoreException("Failed to update record modified date: " + identifier);
+                    }
                 }
             }
             usesIdentifier(identifier);
@@ -229,7 +232,12 @@
                 } else {
                     long now = System.currentTimeMillis();
                     if (file.lastModified() < now) {
-                        file.setLastModified(now);
+                    	// The current GC approach depends on this call succeeding (for writable files) 
+                        if (!file.setLastModified(now + ACCESS_TIME_RESOLUTION)) {
+                        	if (file.canWrite()) {
+                        		throw new DataStoreException("Failed to update record modified date: " + identifier);
+                    		}
+                        }
                     }
                 }
                 // Sanity checks on the record file. These should never fail,
Index: src/main/java/org/apache/jackrabbit/core/data/GarbageCollector.java
===================================================================
--- src/main/java/org/apache/jackrabbit/core/data/GarbageCollector.java	(revision 964106)
+++ src/main/java/org/apache/jackrabbit/core/data/GarbageCollector.java	(working copy)
@@ -290,9 +290,9 @@
                             rememberNode(n.getPath());
                         }
                         if (p.isMultiple()) {
-                            p.getLengths();
+                            checkLengths(p.getLengths());
                         } else {
-                            p.getLength();
+                        	checkLengths(p.getLength());
                         }
                     }
                 } catch (InvalidItemStateException e) {
@@ -347,6 +347,15 @@
          */
     }
 
+    private void checkLengths(long... lengths) throws RepositoryException 
+    {
+    	for (long length : lengths) {
+    		if (length == -1) {
+                throw new RepositoryException("mark failed to access a property");
+    		}
+    	}
+    }
+
     public void close() {
         if (!closed.getAndSet(true)) {
             try {
