Jetson remote debugging: logs, crashes and kernel messages from a Jetson in the field
To debug a Jetson you can't touch, keep the journal on disk so journalctl -b -1 shows the boot that crashed, read its kernel log with journalctl -k for out-of-memory kills, nvmap allocation failures and RCU stalls, capture core dumps with systemd-coredump, and attach gdbserver or cuda-gdb over SSH; for a hard hang only the UART console sees the end, and kdump catches panics. PhysicalFleet sends each Jetson's kernel events, crash bundles with the app's last lines and core dump information, and a five-minute flight recording as they happen, shows why the module last reset, and opens a browser terminal for journalctl, coredumpctl and gdb from anywhere.
What you need
- A Jetson on JetPack 6.2.x (Jetson Linux 36, Ubuntu 22.04) or 7.2.x (Jetson Linux 39, Ubuntu 24.04), with sudo.
- Debug symbols for the program you debug: a build with
-g, kept on your laptop or the Jetson. - Physical access once, only if the unit hard-hangs: a USB cable or a 3.3 V USB-to-UART adapter for the serial console.
- A PhysicalFleet account for the fleet part, free for up to 3 machines.
Everyday log search across devices is in how to see logs from remote devices. This page is the Jetson part: why a unit crashed, rebooted or hung, and how to get the evidence back.
Why Jetson crashes are hard to debug remotely, and the ways to do it
Four things make a Jetson in the field different from a server. The CPU and GPU share one memory, so the model process is usually the one the kernel kills when memory runs out. GPU and camera buffers go through NVIDIA's nvmap allocator, which fails with its own messages long before free memory reaches zero. Power and heat problems throttle the module in hardware, and NVIDIA's documentation says the OS is not notified, so there is often no log line at all. And after a reset, whatever the journal held only in memory is gone.
| Method | Best for | Downsides on a Jetson |
|---|---|---|
SSH, then journalctl and dmesg | A unit you can reach right now | NAT and cellular block it, and after a reboot the evidence may be gone |
| Persistent journal and core dumps on the unit | Keeping evidence through crashes and reboots | You still have to reach the unit to read it, and both take eMMC space |
| gdbserver, VS Code Remote-SSH | A crash you can reproduce | Needs SSH reachability, and the editor server takes memory the GPU shares |
| cuda-gdb | CUDA kernel bugs | Debug builds with -G run slower; for a bench unit, not production |
| UART serial console | Hard hangs and boot failures | A cable and someone on site, or a logger fitted in the robot |
| kdump | Kernel panics | Reserves 2 GB of RAM in NVIDIA's setup, too much for most production units |
| An agent with a relay, which is how PhysicalFleet works | Evidence from every unit as it happens, plus a shell from anywhere | An account with the provider; it can't see what happens after the CPU stops |
Step 1: Keep the journal through reboots
journald writes to /run/log/journal (memory) or /var/log/journal (disk). On Ubuntu 22.04 and 24.04 the default is Storage=auto: persistent only if /var/log/journal exists. Many Ubuntu installs already have the directory because a package creates it, so check before you change anything:
ls -d /var/log/journal # present: kept on disk
journalctl --list-boots # one line after several reboots: it isn't
journalctl --disk-usageEven a persistent journal can lose the last minutes. journald syncs files to disk every SyncIntervalSec, 5 minutes by default, and immediately only after a message of priority crit, alert or emerg. A power cut or hard hang can take the warnings just before it. On a robot, trade a few more eMMC writes for evidence, and cap the size, since the defaults allow 10% of the filesystem (up to 4 GB):
sudo mkdir -p /etc/systemd/journald.conf.d
printf '[Journal]\nStorage=persistent\nSyncIntervalSec=30s\nSystemMaxUse=1G\n' | \
sudo tee /etc/systemd/journald.conf.d/50-field.conf
sudo systemctl restart systemd-journald
sudo journalctl --flush # move what is in memory to disk nowPut this file in your golden image so every unit ships with it; see Jetson fleet management.
Step 2: Read the boot that crashed
After an unexpected reboot, the current boot is clean and useless. The evidence is in the one before:
journalctl --list-boots # -1 is the boot before this one
journalctl -b -1 -e # jump to its end
journalctl -b -1 -p warning # warnings and worse
journalctl -b -1 -k # its kernel messages only
journalctl -b -1 -o short-monotonic -n 300 # seconds since boot, to line up with uptimeRead the end first. A clean reboot ends with services being stopped in order. A log that stops mid-stream, with no shutdown at all, means power loss, a hard hang or a hardware watchdog reset. If the last lines are an out-of-memory kill or an RCU stall, you have your lead. If they are ordinary info lines, suspect power: undervoltage throttling and supply drops leave nothing in the journal (Step 3).
If journalctl -b -1 answers that no persistent journal was found, Step 1 wasn't in place when it crashed. Fix it now so the next crash is caught.
Step 3: Recognize Jetson kernel and driver messages
These come up again and again in NVIDIA's forum threads about Jetson units. Search the previous boot for them with journalctl -b -1 -k | grep -E 'Out of memory|rcu_preempt|NvMap'; NvMap and nvbufsurface lines come from user space, so also check journalctl -b -1 | grep -E 'NvMap|nvbufsurface'.
| Message | What it means on a Jetson | What to check |
|---|---|---|
Out of memory: Killed process 218008 (python) total-vm:... | RAM is shared with the GPU, so model memory counts against the same pool. TensorRT engine builds peak far above inference | Memory use over time, engine builds at boot, the desktop running on a headless unit |
NvMapMemAllocInternalTagged: 1075072515 error 12 | NVIDIA's allocator for GPU and multimedia buffers couldn't get memory. NVIDIA staff point to resource limits or fragmentation | grep NvMap /proc/meminfo, how long the unit has run, allocation churn in your pipeline |
rcu: INFO: rcu_preempt detected stalls on CPUs/tasks: | A CPU stopped answering the kernel. Often the last line before a hang or watchdog reset | What ran on that CPU (the stall lists tasks), sustained GPU load, then the UART console for the end |
nvbufsurface: Failed to create EGLImage. | A DeepStream or multimedia pipeline couldn't get an EGL display: common over SSH with X forwarding, or with the wrong EGL library in a container | echo $DISPLAY; NVIDIA staff say DeepStream doesn't support X11 forwarding |
| Nothing, but the unit got slow | Hardware throttling for over-current or a supply drop, which the OS isn't told about | grep "" /sys/class/hwmon/hwmon*/oc*_event_cnt: counters that rise mean a weak supply or battery |
dmesg shows only the current boot's kernel ring buffer and usually needs sudo on Ubuntu; journalctl -k -b -1 is the way to read the kernel log of a boot that already ended.
Step 4: Capture core dumps
When a native process segfaults or aborts (a TensorRT plugin, a CUDA call on a bad pointer, a camera driver library), the kernel hands the core to whatever kernel.core_pattern names. Check what your image does today: cat /proc/sys/kernel/core_pattern. If it is a plain file name, cores land in the process's working directory or nowhere at all.
systemd-coredump makes this predictable. Installed, it sets core_pattern through its sysctl file, stores each core compressed under /var/lib/systemd/coredump, and logs a backtrace to the journal when it can:
sudo apt install systemd-coredump gdb
cat /proc/sys/kernel/core_pattern # should now name systemd-coredump (check after a reboot)
coredumpctl list # every captured crash
coredumpctl info -1 # signal, executable, unit, backtrace
sudo coredumpctl debug -1 # open the latest core in gdb
sudo coredumpctl dump -1 --output=core.bin # copy it off for your laptopCap it for eMMC. The defaults allow a 32 GB core on 64-bit systems and up to 10% of the disk in total, and a model process maps a lot of memory:
sudo mkdir -p /etc/systemd/coredump.conf.d
printf '[Coredump]\nProcessSizeMax=2G\nExternalSizeMax=2G\nMaxUse=4G\n' | \
sudo tee /etc/systemd/coredump.conf.d/50-jetson.confProcessSizeMax is the largest core systemd will analyze: above it, a core may still be stored, but you get no backtrace in the journal. ExternalSizeMax limits what is saved on disk, and MaxUse is the total. Size them to your process's resident memory and your disk, and test with a deliberate crash: sleep 30 & kill -SEGV $!, then coredumpctl info -1.
For Python apps, a crash inside a native library kills the interpreter with no Python traceback. Run them with python3 -X faulthandler (or PYTHONFAULTHANDLER=1 in the unit's environment) so the Python stack is printed to the journal next to the core. GPU-side core dumps are separate: NVIDIA's CUDA-GDB documentation says Jetson devices must explicitly enable debugging support to generate them.
Step 5: Debug a live process: gdb, gdbserver, VS Code and cuda-gdb
For a process that is stuck rather than dead, attach on the unit and dump every thread's stack. That alone answers most "the robot froze" reports:
sudo gdb -p "$(pidof my-inference)" -batch -ex 'thread apply all bt' > stacks.txtTo debug from your laptop with your sources, run gdbserver on the Jetson. gdbserver has no security of its own, so never leave it listening on the robot's network: run it over SSH's standard input, or bind it to localhost and tunnel the port:
# one command from the laptop: gdbserver runs on the Jetson, talking over SSH
gdb-multiarch ./my-inference -ex 'target remote | ssh -T robot@jetson gdbserver - ./my-inference'
# or attach to a running process through a tunnel (second command in another terminal)
ssh -L 2345:localhost:2345 robot@jetson 'sudo gdbserver --attach localhost:2345 $(pidof my-inference)'
gdb-multiarch ./my-inference -ex 'target remote localhost:2345'Ubuntu restricts attaching to a process you did not start, hence sudo. The binary on the Jetson can be stripped: gdb on the laptop does the symbol work, and set sysroot points it at copies of the Jetson's libraries.
VS Code Remote-SSH supports Ubuntu 20.04 and later on AArch64, so both JetPack 6 and JetPack 7 qualify. It installs a server on the Jetson that runs your extensions there, using memory the GPU shares: close the session when you're done on a unit that is running models.
cuda-gdb ships with the CUDA toolkit in /usr/local/cuda/bin. On Jetson, GPU debugging works only for users in the debug group, and device code needs -g -G, which turns off device-code optimization:
sudo usermod -a -G debug $USER # log out and in again
nvcc -g -G kernel.cu -o kernel
/usr/local/cuda/bin/cuda-gdb ./kernel
/usr/local/cuda/bin/cuda-gdbserver :1234 --attach <pid> # remote, client runs cuda-gdbKeep cuda-gdbserver on a bench unit or behind a localhost-only tunnel, like gdbserver.
Step 6: When it hangs: the serial console, kdump and NVIDIA's bug report
A hard hang stops the CPU before anything reaches disk or network. The only witness is the debug UART, where the kernel console runs (console=ttyTCU0,115200 in NVIDIA's kernel command line).
| Kit | Where the console is | On your laptop |
|---|---|---|
| AGX Orin developer kit | USB micro-B port; it exposes four serial ports (/dev/ttyACM0 to ttyACM3), and the console is UART3, the debug UART | sudo minicom -D /dev/ttyACM0 at 115200 |
| Orin Nano developer kit | Header J14: Jetson TXD (pin 3) to the adapter's RX, Jetson RXD (pin 4) to the adapter's TX and GND (pin 11) to GND, with a 3.3 V USB-to-UART adapter (NVIDIA's board automation page) | The adapter's port, for example /dev/ttyUSB0, at 115200 |
| Your own carrier | Wherever the carrier brings out the debug UART | Same settings |
For a fault that happens once a week in the field, leave a small logger on the UART that writes to a file, for example screen -L -Logfile uart.log /dev/ttyUSB0 115200 on a spare single-board computer. When the unit next hangs, the file holds the stall messages and whatever came after them.
kdump saves the kernel's memory after a panic. NVIDIA's Jetson Linux guide installs linux-crashdump, configures kexec-tools and kdump-tools, edits a copy of the device tree (it sets max-link-speed = <0x1> on PCIe controllers C1 to C10), and adds crashkernel=2G to /boot/extlinux/extlinux.conf; dumps land in /var/crash. Reserving 2 GB is a quarter of an 8 GB Orin Nano, so use it on a unit that reproduces the panic, not across the fleet.
For an NVIDIA forum post, the Developer Guide asks you to run NVIDIA's collector on the target and attach the .log it writes to the current directory. On a unit with a desktop session, the guide's sequence is:
export DISPLAY=:0
xhost +si:localuser:root
sudo ./nvidia-bug-report-tegra.shThe guide's procedure assumes a graphical session. On a headless unit I could not verify an alternative, so try it on a bench unit first. The guide does not say where the script is installed: check command -v nvidia-bug-report-tegra.sh or ls /usr/sbin/nvidia-bug-report*, and run it with the ./ form from the guide.
Step 7: Install PhysicalFleet: crash evidence leaves the Jetson as it happens
The steps above keep evidence on the unit; on a fleet the problem is reaching it. In PhysicalFleet, open Fleet, press Add machine and run the command on the Jetson's host OS, not in a container. From then on, with no setup:
| On the Jetson | What PhysicalFleet records |
|---|---|
| The kernel kills a process for memory | An event and an issue on the machine, a crash bundle for that process, and a flight recording |
| A service or container crashes, segfaults or crash-loops | A crash bundle: the app's last 300 log lines, its systemd status or container details (environment hidden), core dump information when coredumpctl is installed (Step 4), and a kernel and system snapshot, all masked on the unit |
| USB devices reset, filesystem errors, a critical temperature | Kernel events, searchable in Debugging › Logs › Events by kind |
| The module resets | Last reset in the NVIDIA section: power on, a reboot, a watchdog, a thermal shutdown or a voltage fault, with unexpected ones highlighted and written to the change timeline |
| Hardware throttling with no log line | Over-current events and power per rail in the machine's metrics |
| A package upgrade just before | The change timeline, and a diagnosis such as started 10 min after a change |
Flight recordings are why the minutes before a crash survive. The agent keeps the last five minutes on the unit: metrics every second, every log line (masked), events and a camera frame every two seconds. When a process crashes, is killed for memory or a service crash-loops, it waits 30 seconds for the aftermath and saves one recording, linked to the issue. Lines and recordings made while the unit is offline are kept on disk and sent when it is back.
Step 8: Investigate one crash, then open a terminal
- Start from the issue or a log line and press Investigate this moment. Debugging › Investigate › Timeline opens at that time: every metric on one synced cursor (memory, GPU temperature, power per rail), the window's events and logs, What changed before and the recordings.
- Open the evidence. The machine's Files tab holds its recordings and crash bundles, to replay on the Timeline or download. A recording is a standard MCAP file.
- One unit or many? In Debugging › Investigate › Parameters, Unexpected resets, JetPack version and NVIDIA library versions tell one bad power supply from a regression on every unit that took last week's update.
- Go to the shell. Press Terminal on the machine's page, or pick Terminal in Debugging › Remote, and run Steps 2 to 5 as if you were there.
journalctl -b -1 -k | tail -50
coredumpctl info -1
sudo coredumpctl debug -1
sudo gdb -p "$(pidof my-inference)" -batch -ex 'thread apply all bt'
grep NvMap /proc/meminfo
pf busy --reason 'debugging' --for 1h # updates and reboots wait until you clear itThe terminal runs over the Jetson's own outbound, encrypted connection on port 443, so it works behind NAT and cellular. Owners and admins open it, up to 4 per machine, each closing after 30 minutes idle, and every session is in Settings › Organization › Audit Log.
Two honest limits. Ports opens web pages in your browser (HTTP and WebSockets), so it can't carry a gdbserver connection or SSH for VS Code: run gdb in the terminal, or use SSH on the same network or a VPN for Remote-SSH. And nothing on the unit sees past a hard hang: PhysicalFleet has what was sent before it and Last reset after it; the UART console in Step 6 has the rest.
Doing this on many Jetsons
- Bake the evidence settings into the image: the journald and coredump drop-ins, systemd-coredump, gdb and
PYTHONFAULTHANDLER=1. You can't go back for the crash you missed. - Alert on the lines that matter. In Observability › Alerts › Rules, a rule with the condition is logged fires on text such as
rcu_preempt detected stallsorNvMapMemAlloc, a number of times in a window. Watch Unexpected resets in Debugging › Investigate › Parameters for resets you did not cause. - Run Python apps with
pf run: crashes and uncaught exceptions are reported, and memory and GPU memory growth checks forecast an out-of-memory kill. - Data on cellular. At the default level a unit sends info lines and up; Auto drops to warnings and up on a cellular modem. Kernel errors still arrive, and the terminal always works.
| Symptom | First command on the Jetson | In PhysicalFleet |
|---|---|---|
| A process vanished | coredumpctl list, journalctl -b -k | grep 'Out of memory' | The issue, its crash bundle on Files |
| The unit rebooted on its own | journalctl -b -1 -e | Last reset, and the Timeline before it |
| The unit is offline | Nothing: you can't reach it | What it sent until then; if the Jetson is up and reaches the internet, the Guardian reports on its page after 10 minutes |
| Slower, no errors | grep "" /sys/class/hwmon/hwmon*/oc*_event_cnt, sudo nvpmodel -q | Over-current events, Power mode, GPU clock |
| Camera pipeline errors only over SSH | echo $DISPLAY | Run it from the terminal, which has no X forwarding |
For temperatures, throttling and offline alerts, see Jetson remote monitoring; for hangs that need a reboot or recovery, Jetson remote reboot and recovery.
Common errors and fixes
Specifying boot ID or boot offset has no effect, no persistent journal was found.Why: The journal lives in memory only (Storage=auto with no /var/log/journal), so journalctl -b -1 has no earlier boot to read.
Fix: Set Storage=persistent in a journald drop-in (Step 1) and restart systemd-journald. The current crash is lost; the next one won't be.
Out of memory: Killed process 218008 (python) total-vm:87797408kB, anon-rss:0kB, file-rss:1177636kB, shmem-rss:0kB, UID:1000 pgtables:38348kB oom_score_adj:0Why: The kernel ran out of the RAM the CPU and GPU share and killed the largest process, here during an INT8 model conversion on an Orin.
Fix: Build engines once, not at every start, close the desktop on headless units, and watch memory with tegrastats. Swap does not help GPU allocations.
NvMapMemAllocInternalTagged: 1075072515 error 12Why: NVIDIA's nvmap allocator couldn't get memory for a GPU buffer. NVIDIA staff attribute it to resource limits or memory fragmentation.
Fix: Lower batch size or input resolution, convert the model to TensorRT for a smaller footprint, and check grep NvMap /proc/meminfo over time for growth.
rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:Why: A CPU stopped responding to the kernel. On an AGX Orin under sustained GPU load in NVIDIA's forum, it preceded a hard hang and a watchdog reset.
Fix: Capture the full stall over the UART console (Step 6), note which task held the CPU, and test on a newer software stack, as NVIDIA staff advised in that thread.
nvbufsurface: Failed to create EGLImage.Why: A DeepStream or multimedia element couldn't reach an EGL display, often because DISPLAY points at an SSH X forward, or a container loaded a non-NVIDIA EGL library.
Fix: Connect without -X, run unset DISPLAY, and replace the display sink with fakesink or an encoder, as NVIDIA staff suggest. In containers, make sure NVIDIA's EGL library is the one loaded.
- Journal persistent on every unit, with a size cap and a short sync interval
- systemd-coredump and gdb in the image, with core size limits for eMMC
- Python services run with PYTHONFAULTHANDLER=1, or under pf run
- Previous-boot kernel log read first after any unexpected reboot
- gdbserver and cuda-gdbserver only over SSH or bound to localhost
- A UART logger ready for units that hard-hang
- Alert rules for RCU stalls, nvmap failures and unexpected resets
PhysicalFleet gets the evidence off each Jetson before you need it. Kernel events such as out-of-memory kills and USB resets, crash bundles with the app's last lines, its service or container state and core dump information, and a five-minute flight recording around each incident leave the unit as they happen, or as soon as it is back online. After a reboot, Last reset says whether it was a watchdog, a thermal shutdown or a voltage fault, and the Timeline lines up metrics, logs, events and changes from the minutes before.
When the evidence points somewhere, the browser terminal opens a shell on the Jetson over its outbound connection, from anywhere, for journalctl, coredumpctl and gdb. Parameters across the fleet tells one bad unit from a regression on every unit that took the same update.
- Ubuntu 24.04: journald.conf(5) (Storage, SyncIntervalSec, size defaults)
- systemd: journalctl(1)
- Ubuntu 24.04: systemd-coredump(8), coredumpctl(1) and coredump.conf(5)
- GDB manual: Using the gdbserver program
- NVIDIA CUDA-GDB documentation
- NVIDIA Jetson Linux r39.2.2: Board Automation (UART access)
- NVIDIA Jetson Linux r39.2.2: Kernel Debugging Tools (kdump)
- NVIDIA Jetson Linux r39.2.2: How to Submit a Bug Report
Written for PhysicalFleet as of December 5, 2026.
How do I see logs from before a Jetson rebooted?
Run journalctl -b -1 for the previous boot and journalctl -b -1 -k for its kernel messages. It only works if the journal is persistent; otherwise those logs were in memory and are gone.
Is the journal persistent on JetPack?
Ubuntu 22.04 and 24.04 default to Storage=auto, which keeps the journal on disk only if /var/log/journal exists. Check your image with ls -d /var/log/journal and journalctl --list-boots, and set Storage=persistent if needed.
Why does my Jetson process get killed with no error?
Usually the kernel's out-of-memory killer: the CPU and GPU share RAM, so a model or a TensorRT engine build can use it all. journalctl -k shows an Out of memory: Killed process line with the process name.
How do I get core dumps on a Jetson?
Install systemd-coredump, which stores compressed cores under /var/lib/systemd/coredump. Read them with coredumpctl list, info and debug, and cap their size in coredump.conf for small eMMC storage.
Can I use VS Code to debug code on a Jetson Orin?
Yes. VS Code Remote-SSH supports Ubuntu 20.04 and later on AArch64, which covers JetPack 6 and 7. It needs SSH access to the Jetson and runs a server there that uses memory the GPU shares.
Where is the serial console on a Jetson Orin developer kit?
On the AGX Orin developer kit it is the USB micro-B port, which exposes four serial ports on your computer (/dev/ttyACM0 to /dev/ttyACM3); NVIDIA's example uses /dev/ttyACM0 for the console. On the Orin Nano developer kit, connect a 3.3 V USB-to-UART adapter to header J14, pins 3, 4 and 11. Use 115200 baud.
How do I debug CUDA code on a Jetson?
Use cuda-gdb from /usr/local/cuda/bin. Add your user to the debug group, which Jetson requires for GPU debugging, and compile with nvcc -g -G. cuda-gdbserver handles remote sessions.
- Raspberry Pi remotely
- Jetson Orin remote access
- Robot web UI remotely
- Robot camera remotely
- Update many devices
- Logs on remote devices
- ROS 2 remotely
- Offline alerts
- Jetson remote update
- Jetson remote desktop
- Jetson camera remotely
- Jetson remote monitoring
- Jetson fleet management
- Docker on many Jetsons
- TensorRT on many Jetsons
- Jetson reboot and recovery
- SO-101 remotely
- All how-to guides →
From the lab bench. To the entire fleet.
Connect your first machine in minutes, develop it in the lab and run your whole fleet in production from one place.
Free for up to 3 machines · Then pay as you go