apache/flink · error · IOException

Interrupted while acquiring lock

Error message

Interrupted while acquiring lock

What it means

Error "Interrupted while acquiring lock" thrown in apache/flink.

Source

Thrown at flink-filesystems/flink-s3-fs-native/src/main/java/org/apache/flink/fs/s3native/NativeS3InputStream.java:348

            long remaining = contentLength - nextReadPos;
            int toRead = (int) Math.min(len, remaining);
            int bytesRead = bufferedStream.read(b, off, toRead);
            if (bytesRead > 0) {
                nextReadPos += bytesRead;
                streamPos += bytesRead;
            }
            return bytesRead;
        } finally {
            lock.unlock();
        }
    }

    private void lock() throws IOException {
        try {
            lock.lockInterruptibly();
        } catch (InterruptedException e) {
            Thread.currentThread().interrupt();
            throw new IOException("Interrupted while acquiring lock", e);
        }
    }

    @Override
    public void close() throws IOException {
        lock.lock();
        try {
            if (closed) {
                return;
            }

            closed = true;

            IOException exception = releaseStreams();

            LOG.debug(
                    "Closed S3 input stream - bucket: {}, key: {}, final position: {}/{}",
                    bucketName,

View on GitHub (pinned to 2f3c205e92)

Solutions

  1. Address the cause reported by the error message: Interrupted while acquiring lock
  2. Verify the inputs, configuration values, and classpath/dependency setup related to this operation, then retry.

Example fix

Correct the condition described ("Interrupted while acquiring lock") and rerun the job or command.

When it happens

Trigger: Triggered at runtime when the operation fails because: Interrupted while acquiring lock.

Common situations: Commonly caused by misconfiguration, missing dependencies or files, unsupported types or operations, or invalid user input leading to: Interrupted while acquiring lock.


AI-assisted analysis of apache/flink@2f3c205e92 (2026-08-14). Data as JSON: /api/errors/0769769b321d56f3. Report an issue: GitHub.