Skip to content

Scheduled backup crashes instance when game server is sleeping #1376

@FrozenSoda

Description

@FrozenSoda

Operating System

Ubuntu Server 22.04.5

AMP Version and Build Date

2.6.4.2 - 20251203.1

AMP Release Stream

Mainline

I confirm that

  • I have searched for an existing bug report for this issue.
  • I am using the latest available version of AMP.
  • my operating system is up-to-date.

Intended Action

Run the scheduled action "Shut the server down, take a backup, and start it up again" while the game server is sleeping (Minecraft Java Edition).

Expected Behaviour

That the scheduled action executes as described successfully.

Actual Behaviour

No backup is taken and the entire AMP instance for the game server crashes and stops. If you are currently inside the instance GUI in the browser, you won't see that it has stopped until clicking "Return to Instances".

The following appears in the game server AMP instance log:

[REDACTED] [System Error/77]      : Socket exception - Trivial error / user error. Will not be submitted.
[REDACTED] [System Error/77]      : [Error] --- Begin Exception Data ---
[Error] OS: Linux (x86_64/Docker)
[Error] Module: MinecraftModule, Version: AMP 2.6.4.2
[Error] Release spec: Mainline - built by CUBECODERS/buildbot on CCL-DEV
[Error] Instance ID: [REDACTED]
[Error] SocketException
[Error] [0] (SocketException) : Operation canceled
[Error]    at Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
   at Net.Sockets.TcpListener.EndAcceptCore[TResult](IAsyncResult asyncResult)
   at MinecraftModule.SleepServer.SleepServer.AcceptCallback(IAsyncResult ar)
[Error] --- End Exception Data ---

[REDACTED] [ErrorReporter Info/77] : ####################################
[REDACTED] [ErrorReporter Info/77] : #         Self Diagnostics         #
[REDACTED] [ErrorReporter Info/77] : ####################################
[REDACTED] [ErrorReporter Info/77] : Operation Aborted

Reproduction

  1. Create a Minecraft Java Edition server and browse the instance.
  2. Accept the EULA and let the game server start.
  3. Configure the backup settings so that the instance can backup to an S3 bucket (though I guess the bug can probably also be reproduced with local backup).
  4. Schedule the task "Shut the server down, take a backup, and start it up again" with the following options:
    RestartEvenIfNotRunning = false
    Local = false
    S3 = true
    Sticky = false
    DirtyOnly = false
    
  5. Wait until the game server sleeps.
  6. Trigger the scheduled task (by clicking the button with the "play" icon).
  7. Observe that no backup is being created.
  8. Click "Return to Instances".
  9. Observe that the instance has stopped.
  10. Observe that an error has appeared in the Minecraft instance log when you open the latest log file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions