oracle/graal · error · IllegalArgumentException

Invalid transport {value}. Espresso only supports dt_socket

Error message

Invalid transport {value}. Espresso only supports dt_socket currently.

What it means

The JDWP converter only accepts transport=dt_socket; Espresso's JDWP implementation has no shared-memory (dt_shmem) or other transport, so any other transport value is rejected immediately.

Source

Thrown at espresso/src/com.oracle.truffle.espresso/src/com/oracle/truffle/espresso/EspressoOptions.java:447

                            }
                            String portStr = value.substring(colonIndex + 1);
                            long realValue;
                            try {
                                realValue = Long.valueOf(portStr);
                                if (realValue < 0 || realValue > 65535) {
                                    throw new IllegalArgumentException("Invalid JDWP option, address: " + value + ". Must be in the 0 - 65535 range.");
                                }
                            } catch (NumberFormatException ex) {
                                throw new IllegalArgumentException("Invalid JDWP option, address: " + value + ". Port is not a number. Must be a number in the 0 - 65535 range.");
                            }
                            inputPort = (int) realValue;
                        }
                        host = inputHost;
                        port = inputPort;
                        break;
                    case "transport":
                        if (!"dt_socket".equals(value)) {
                            throw new IllegalArgumentException("Invalid transport " + value + ". Espresso only supports dt_socket currently.");
                        }
                        transport = value;
                        break;
                    case "server":
                        server = yesOrNo(key, value);
                        break;
                    case "suspend":
                        suspend = yesOrNo(key, value);
                        break;
                    case "includevirtualthreads":
                        boolean includevirtualthreads = yesOrNo(key, value);
                        if (includevirtualthreads) {
                            throw new IllegalArgumentException("Invalid includevirtualthreads setting " + value + ". Espresso only supports n currently.");
                        }
                        break;
                    default:
                        throw new IllegalArgumentException("Invalid JDWP option: " + key + ". Supported options: 'transport', 'address', 'server', 'suspend', and 'includevirtualthreads=n'.");
                }

View on GitHub (pinned to a66e9ccd1d)

Solutions

  1. Always specify transport=dt_socket (lowercase, exact).
  2. Remove the transport key only if your GraalVM version defaults it; otherwise keep it explicit.
  3. Do not forward native-agentlib strings containing dt_shmem to Espresso.

Example fix

# before
--java.JDWPOptions=transport=dt_shmem,server=y

# after
--java.JDWPOptions=transport=dt_socket,server=y,address=:8000
Defensive patterns

Strategy: validation

Validate before calling

if (!"dt_socket".equals(transport)) throw new ConfigException("Only transport=dt_socket is supported");

Type guard

static boolean dtSocketOnly(String t) { return "dt_socket".equals(t); }

Prevention

When it happens

Trigger: --java.JDWPOptions=transport=dt_shmem,... or transport=dt_socket2, or omitting/misspelling 'dt_socket' (the comparison is exact and case-sensitive).

Common situations: Reusing Windows-oriented HotSpot JDWP examples that use dt_shmem; typos; assuming case-insensitivity after other JDWP keys accepted mixed case.

Related errors


AI-assisted analysis of oracle/graal@a66e9ccd1d (2026-08-14). Data as JSON: /api/errors/a75d19899d3afdd8. Report an issue: GitHub.