jenkinsci / jenkinsci/subversion-plugin

[JENKINS-61460] Subversion UpdateUpdater fails to update with corrupted WC database

Open
#1,530 0 comments 0 reactions 0 assignees View on GitHub
component:subversion-plugin imported-jira-issue priority:minor resolution:unresolved
Dominant language
Java
Stars
131
Forks
275
Avg merge
12h 4m
Merged PRs (30d)
6

Description

According to what I have read in the code UpdateUpdater should fallback to CheckoutUpdater in case of issues, which it does.

But in the first analysis it seems the code checking the state of the working copy locks the WC database in case of the new working copy format (.svn/wc.db)

A workaround is to use the CheckoutUpdater (verified)

The issue looks as follows (for full stack see attachment):

Also:   java.nio.file.FileSystemException: C:\Users\mwa\.jenkins\workspace\subversion\.svn\wc.db: The process cannot access the file because it is being used by another process.

at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
at sun.nio.fs.WindowsFileSystemProvider.implDelete(Unknown Source)
at sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(Unknown Source)
at java.nio.file.Files.deleteIfExists(Unknown Source)
at jenkins.util.io.PathRemover.removeOrMakeRemovableThenRemove(PathRemover.java:237)

This can be replicated with this short Jenkinsfile script

pipeline {

agent any
stages {
stage('Corrupt database') {
steps {
script {
def file = '.svn/wc.db'
if (!fileExists(file)) {
writeFile(file: file, text: "invalid")
}
}
}
}
stage('Checkout') {
steps {
checkout([
$class: 'SubversionSCM',
additionalCredentials: [],
excludedCommitMessages: '',
excludedRegions: '',
excludedRevprop: '',
excludedUsers: '',
filterChangelog: false,
ignoreDirPropChanges: false,
includedRegions: '',
locations: [[cancelProcessOnExternalsFail: true,
credentialsId: '',
depthOption: 'infinity',
ignoreExternalsOption: true,
local: '.',
remote: 'file:///x']],
quietOperation: true,
workspaceUpdater: [$class: 'UpdateUpdater']
])
}
}
}
}

---
Originally reported by advorsky73, imported from: Subversion UpdateUpdater fails to update with corrupted WC database


  • status: Open
  • priority: Minor
  • component(s): subversion-plugin
  • resolution: Unresolved
  • votes: 1
  • watchers: 2
  • imported: 20251212-090250

Raw content of original issue

According to what I have read in the code UpdateUpdater should fallback to CheckoutUpdater in case of issues, which it does.

But in the first analysis it seems the code checking the state of the working copy locks the WC database in case of the new working copy format (.svn/wc.db)

A workaround is to use the CheckoutUpdater (verified)

The issue looks as follows (for full stack see attachment):



Also:   java.nio.file.FileSystemException: C:\Users\mwa\.jenkins\workspace\subversion\.svn\wc.db: The process cannot access the file because it is being used by another process.

at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
at sun.nio.fs.WindowsFileSystemProvider.implDelete(Unknown Source)
at sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(Unknown Source)
at java.nio.file.Files.deleteIfExists(Unknown Source)
at jenkins.util.io.PathRemover.removeOrMakeRemovableThenRemove(PathRemover.java:237)


This can be replicated with this short Jenkinsfile script



pipeline {

agent any
stages {
stage('Corrupt database') {
steps {
script {
def file = '.svn/wc.db'
if (!fileExists(file)) {
writeFile(file: file, text: "invalid")
}
}
}
}
stage('Checkout') {
steps {
checkout([
$class: 'SubversionSCM',
additionalCredentials: [],
excludedCommitMessages: '',
excludedRegions: '',
excludedRevprop: '',
excludedUsers: '',
filterChangelog: false,
ignoreDirPropChanges: false,
includedRegions: '',
locations: [[cancelProcessOnExternalsFail: true,
credentialsId: '',
depthOption: 'infinity',
ignoreExternalsOption: true,
local: '.',
remote: 'file:///x']],
quietOperation: true,
workspaceUpdater: [$class: 'UpdateUpdater']
])
}
}
}
}

environment

```
java.version 1.8.0_231

Windows 10

Subversion Plug-in 2.13.1
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.