receivers: journald/service: directory: /var/log/journal units: - foo priority: info storage: file_storage start_at: beginning journald/kernel: directory: /var/log/journal matches: - _TRANSPORT: kernel grep: '(?i)(out of memory|killed process|memory cgroup out of memory|segfault at|traps: invalid opcode|general protection)' priority: debug start_at: beginning
receivers: journald/service: directory: /var/log/journal units: - foo priority: info storage: file_storage start_at: beginning journald/kernel: directory: /var/log/journal matches: - _TRANSPORT: kernel grep: '(?i)(out of memory|killed process|memory cgroup out of memory|segfault at|traps: invalid opcode|general protection)' priority: debug start_at: beginning
receivers: journald/service: directory: /var/log/journal units: - foo priority: info storage: file_storage start_at: beginning journald/kernel: directory: /var/log/journal matches: - _TRANSPORT: kernel grep: '(?i)(out of memory|killed process|memory cgroup out of memory|segfault at|traps: invalid opcode|general protection)' priority: debug start_at: beginning
bash-5.3# systemctl status otelcol
● otelcol.service - Executes open telemetry collector to send logs. Loaded: loaded (/x86_64-bottlerocket-linux-gnu/sys-root/usr/lib/systemd/system/otelcol.service; static) Active: active (running) since Sat 2026-03-07 00:07:51 UTC; 3 days ago Main PID: 2341 (otelcol) Tasks: 12 (limit: 9256) Memory: 25.5M CPU: 24min 5.574s CGroup: /system.slice/otelcol.service ├─2341 /usr/sbin/otelcol ├─2348 journalctl --utc --output=json --follow --no-tail --unit foo --priority info --directory /var/log/journal --after-cursor xxxxx └─2349 journalctl --utc --output=json --follow --no-tail --priority debug --directory /var/log/journal _TRANSPORT=kernel --grep=xxxx
bash-5.3# systemctl status otelcol
● otelcol.service - Executes open telemetry collector to send logs. Loaded: loaded (/x86_64-bottlerocket-linux-gnu/sys-root/usr/lib/systemd/system/otelcol.service; static) Active: active (running) since Sat 2026-03-07 00:07:51 UTC; 3 days ago Main PID: 2341 (otelcol) Tasks: 12 (limit: 9256) Memory: 25.5M CPU: 24min 5.574s CGroup: /system.slice/otelcol.service ├─2341 /usr/sbin/otelcol ├─2348 journalctl --utc --output=json --follow --no-tail --unit foo --priority info --directory /var/log/journal --after-cursor xxxxx └─2349 journalctl --utc --output=json --follow --no-tail --priority debug --directory /var/log/journal _TRANSPORT=kernel --grep=xxxx
bash-5.3# systemctl status otelcol
● otelcol.service - Executes open telemetry collector to send logs. Loaded: loaded (/x86_64-bottlerocket-linux-gnu/sys-root/usr/lib/systemd/system/otelcol.service; static) Active: active (running) since Sat 2026-03-07 00:07:51 UTC; 3 days ago Main PID: 2341 (otelcol) Tasks: 12 (limit: 9256) Memory: 25.5M CPU: 24min 5.574s CGroup: /system.slice/otelcol.service ├─2341 /usr/sbin/otelcol ├─2348 journalctl --utc --output=json --follow --no-tail --unit foo --priority info --directory /var/log/journal --after-cursor xxxxx └─2349 journalctl --utc --output=json --follow --no-tail --priority debug --directory /var/log/journal _TRANSPORT=kernel --grep=xxxx
[Unit]
Description=Demo Scenario - OOM Kill
After=network.target [Service]
Type=simple
MemoryMax=32M
# tail /dev/zero reads zeros endlessly into memory — hits the limit in seconds
ExecStart=/bin/bash -c 'echo "Eating memory..."; tail /dev/zero'
Restart=no [Install]
WantedBy=multi-user.target
[Unit]
Description=Demo Scenario - OOM Kill
After=network.target [Service]
Type=simple
MemoryMax=32M
# tail /dev/zero reads zeros endlessly into memory — hits the limit in seconds
ExecStart=/bin/bash -c 'echo "Eating memory..."; tail /dev/zero'
Restart=no [Install]
WantedBy=multi-user.target
[Unit]
Description=Demo Scenario - OOM Kill
After=network.target [Service]
Type=simple
MemoryMax=32M
# tail /dev/zero reads zeros endlessly into memory — hits the limit in seconds
ExecStart=/bin/bash -c 'echo "Eating memory..."; tail /dev/zero'
Restart=no [Install]
WantedBy=multi-user.target
package main /*
// Dereference NULL in C — bypasses Go's runtime signal handler,
// so the CPU fault reaches the kernel and appears in journalctl -k:
// "segfault at 0 ip ... error 4 in segfault[...]"
#include <stdlib.h>
void trigger_segfault() { volatile int *p = NULL; *p = 1;
}
*/
import "C" func main() { C.trigger_segfault()
}
package main /*
// Dereference NULL in C — bypasses Go's runtime signal handler,
// so the CPU fault reaches the kernel and appears in journalctl -k:
// "segfault at 0 ip ... error 4 in segfault[...]"
#include <stdlib.h>
void trigger_segfault() { volatile int *p = NULL; *p = 1;
}
*/
import "C" func main() { C.trigger_segfault()
}
package main /*
// Dereference NULL in C — bypasses Go's runtime signal handler,
// so the CPU fault reaches the kernel and appears in journalctl -k:
// "segfault at 0 ip ... error 4 in segfault[...]"
#include <stdlib.h>
void trigger_segfault() { volatile int *p = NULL; *p = 1;
}
*/
import "C" func main() { C.trigger_segfault()
}
import ctypes
print("Triggering segfault via null pointer dereference...")
ctypes.string_at(0)
import ctypes
print("Triggering segfault via null pointer dereference...")
ctypes.string_at(0)
import ctypes
print("Triggering segfault via null pointer dereference...")
ctypes.string_at(0)
package main /*
// Execute UD2 in C — bypasses Go's runtime signal handler,
// so the CPU trap reaches the kernel and appears in journalctl -k:
// "traps: sigill[PID] trap invalid opcode ..."
void trigger_sigill() { __asm__("ud2");
}
*/
import "C" func main() { C.trigger_sigill()
}
package main /*
// Execute UD2 in C — bypasses Go's runtime signal handler,
// so the CPU trap reaches the kernel and appears in journalctl -k:
// "traps: sigill[PID] trap invalid opcode ..."
void trigger_sigill() { __asm__("ud2");
}
*/
import "C" func main() { C.trigger_sigill()
}
package main /*
// Execute UD2 in C — bypasses Go's runtime signal handler,
// so the CPU trap reaches the kernel and appears in journalctl -k:
// "traps: sigill[PID] trap invalid opcode ..."
void trigger_sigill() { __asm__("ud2");
}
*/
import "C" func main() { C.trigger_sigill()
}
import ctypes, mmap
print("Executing UD2 (undefined instruction) to trigger SIGILL...")
buf = mmap.mmap(-1, mmap.PAGESIZE, prot=mmap.PROT_READ|mmap.PROT_WRITE|mmap.PROT_EXEC)
buf.write(b'\x0f\x0b') # UD2 opcode
ftype = ctypes.CFUNCTYPE(None)
fptr = ctypes.cast((ctypes.c_char * 2).from_buffer(buf), ctypes.c_void_p)
ftype(fptr.value)()
import ctypes, mmap
print("Executing UD2 (undefined instruction) to trigger SIGILL...")
buf = mmap.mmap(-1, mmap.PAGESIZE, prot=mmap.PROT_READ|mmap.PROT_WRITE|mmap.PROT_EXEC)
buf.write(b'\x0f\x0b') # UD2 opcode
ftype = ctypes.CFUNCTYPE(None)
fptr = ctypes.cast((ctypes.c_char * 2).from_buffer(buf), ctypes.c_void_p)
ftype(fptr.value)()
import ctypes, mmap
print("Executing UD2 (undefined instruction) to trigger SIGILL...")
buf = mmap.mmap(-1, mmap.PAGESIZE, prot=mmap.PROT_READ|mmap.PROT_WRITE|mmap.PROT_EXEC)
buf.write(b'\x0f\x0b') # UD2 opcode
ftype = ctypes.CFUNCTYPE(None)
fptr = ctypes.cast((ctypes.c_char * 2).from_buffer(buf), ctypes.c_void_p)
ftype(fptr.value)()