Skip to content

Workaround for 'could not acquire lock', see https://issues.apache.org/jira/browse/MNG-7868#8063

Merged
aaime merged 1 commit intogeoserver:mainfrom
aaime:failed_acquire_lock
Nov 28, 2024
Merged

Workaround for 'could not acquire lock', see https://issues.apache.org/jira/browse/MNG-7868#8063
aaime merged 1 commit intogeoserver:mainfrom
aaime:failed_acquire_lock

Conversation

@aaime
Copy link
Member

@aaime aaime commented Nov 26, 2024

MNG-7868 Powered by Pull Request Badge

We have a fair amount of builds randomly failing with "could not acquire lock" in Maven itself.
Tracked it back to this, looks like it might be a networking issue, it's not solved but they propose workarounds to make it less likely:

https://issues.apache.org/jira/browse/MNG-7868

Those extra settings have been added to the maven options in this PR.

Checklist

For core and extension modules:

  • New unit tests have been added covering the changes.
  • Documentation has been updated (if change is visible to end users).
  • The REST API docs have been updated (when changing configuration objects or the REST controllers).
  • There is an issue in the GeoServer Jira (except for changes that do not affect administrators or end users in any way).
  • Commit message(s) must be in the form [GEOS-XYZWV] Title of the Jira ticket.
  • Bug fixes and small new features are presented as a single commit.
  • Each commit has a single objective (if there are multiple commits, each has a separate JIRA ticket describing its goal).

Copy link
Member

@groldan groldan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the issue is related to mvn -T one option would be to run a go-offline phase first and then build with -o but that won't work unfortunately, or at least it didn't every time I've tried in the past. mvn dependency:go-offline won't actually pull everything it needs to build with -o. There is other plugin to "actually go offline" that I can't remember right now, but in any case I'd say lets try these maven params and see if we get less of these lock errors.

@aaime aaime merged commit 6564a9c into geoserver:main Nov 28, 2024
@aaime aaime deleted the failed_acquire_lock branch November 28, 2024 14:50
@aaime aaime added backport 2.25.x Instructs the bot to create a 2.25.x backport PR on merge backport 2.26.x Instructs the bot to create a 2.26.x backport PR on merge labels Dec 11, 2024
@geoserver-bot
Copy link
Collaborator

The backport to 2.26.x failed:

The process '/usr/bin/git' failed with exit code 1
stderr
To https://github.com/geoserver/geoserver.git
 ! [remote rejected]       backport-8063-to-2.26.x -> backport-8063-to-2.26.x (refusing to allow a Personal Access Token to create or update workflow `.github/workflows/assembly.yml` without `workflow` scope)
error: failed to push some refs to 'https://github.com/geoserver/geoserver.git'

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.26.x 2.26.x
# Navigate to the new working tree
cd .worktrees/backport-2.26.x
# Create a new branch
git switch --create backport-8063-to-2.26.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick 9e4bb4b6444ae11718427638149f32a1be3a4a0b
# Push it to GitHub
git push --set-upstream origin backport-8063-to-2.26.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.26.x

Then, create a pull request where the base branch is 2.26.x and the compare/head branch is backport-8063-to-2.26.x.

@geoserver-bot
Copy link
Collaborator

The backport to 2.25.x failed:

The process '/usr/bin/git' failed with exit code 1
stderr
To https://github.com/geoserver/geoserver.git
 ! [remote rejected]       backport-8063-to-2.25.x -> backport-8063-to-2.25.x (refusing to allow a Personal Access Token to create or update workflow `.github/workflows/assembly.yml` without `workflow` scope)
error: failed to push some refs to 'https://github.com/geoserver/geoserver.git'

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.25.x 2.25.x
# Navigate to the new working tree
cd .worktrees/backport-2.25.x
# Create a new branch
git switch --create backport-8063-to-2.25.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick 9e4bb4b6444ae11718427638149f32a1be3a4a0b
# Push it to GitHub
git push --set-upstream origin backport-8063-to-2.25.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.25.x

Then, create a pull request where the base branch is 2.25.x and the compare/head branch is backport-8063-to-2.25.x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport 2.25.x Instructs the bot to create a 2.25.x backport PR on merge backport 2.26.x Instructs the bot to create a 2.26.x backport PR on merge failed backport

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants