2026-07-07
The asker has compiled a Linux kernel with CONFIG_KGDB enabled, flashed it onto a VMware VM, and wired up a virtual serial port as a socket pipe at /tmp/kgdb-socket. When they attach GDB from the host and issue target remote, they get "Ignoring packet error, continuing..." plus a warning about an unrecognized "timeout" item. Classic KGDB-over-serial pain.
This question is interesting because the failure mode is generic — "packet error" — but the root cause is almost always one of several very specific mismatches between three moving parts: the kernel's KGDB serial driver, the VMware virtual serial device, and GDB's remote protocol expectations. Each layer has its own baud, framing, and buffering assumptions.
Likely culprits, in order of probability:
target remote /tmp/kgdb-socket only works if something is bridging that Unix socket to GDB's stdio. Most working setups use target remote | socat - UNIX-CONNECT:/tmp/kgdb-socket or configure the VM to use network serial (TCP) and then target remote host:port.kgdboc=ttyS0,115200 (or whatever matches VMware's assigned port). If the kernel is speaking 9600 and GDB assumes 115200, every packet looks corrupted.ttyS1, not ttyS0. Check dmesg | grep tty inside the guest.echo g > /proc/sysrq-trigger, adding kgdbwait to the boot cmdline, or triggering an Alt-SysRq-g..gdbinit setting set remotetimeout ... against a GDB that doesn't recognize the key — usually a very old or very new GDB. Try set remote timeout (with a space) or remove the line.Suggested approach: Start with the simplest topology — TCP serial in VMware pointing at telnet://localhost:8888, boot with console=ttyS0,115200 kgdboc=ttyS0,115200 kgdbwait, and connect via target remote localhost:8888. If that handshakes, layer in Unix sockets afterward. Also verify the kernel was built with CONFIG_KGDB_SERIAL_CONSOLE=y, not just CONFIG_KGDB=y.
Gotcha: VMware Workstation and ESXi handle serial pipes differently; the "yield CPU on poll" checkbox matters, and without it GDB packets get dropped under load. Also, if secure boot is on, kgdboc silently refuses to attach.
