xref: /freebsd/tools/test/stress2/misc/truss3.sh (revision 44d4804d1945435745518cd09eb8ae6ab22ecef4)
1#!/bin/sh
2
3# Regression test from:
4# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=249257
5# by Edward Tomasz Napierala <trasz@freebsd.org>
6
7# panic: pgrp 2191 0xfffff8000585c900 pg_jobc 1 cnt 2
8# cpuid = 10
9# time = 1599941578
10# KDB: stack backtrace:
11# db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe0101b378f0
12# vpanic() at vpanic+0x182/frame 0xfffffe0101b37940
13# panic() at panic+0x43/frame 0xfffffe0101b379a0
14# check_pgrp_jobc() at check_pgrp_jobc+0x124/frame 0xfffffe0101b379e0
15# doenterpgrp() at doenterpgrp+0xc6/frame 0xfffffe0101b37a30
16# enterpgrp() at enterpgrp+0x39e/frame 0xfffffe0101b37a80
17# sys_setpgid() at sys_setpgid+0x219/frame 0xfffffe0101b37ad0
18# amd64_syscall() at amd64_syscall+0x159/frame 0xfffffe0101b37bf0
19# fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe0101b37bf0
20# --- syscall (82, FreeBSD ELF64, sys_setpgid), rip = 0x8003745ba, rsp = 0x7fffffffe638, rbp = 0x7fffffffe670 ---
21# KDB: enter: panic
22# [ thread pid 2191 tid 100251 ]
23# Stopped at      kdb_enter+0x37: movq    $0,0x10b29f6(%rip)
24# db> x/s version
25# version: FreeBSD 13.0-CURRENT #0 r365671: Sat Sep 12 22:01:12 CEST 2020
26# pho@t1.osted.lan:/usr/src/sys/amd64/compile/PHO\012
27# db>
28
29# Fixed by r365814
30
31# Needs a controlling terminal for job control to be active
32[ -t 1 ] || { echo "Not a tty"; exit 0; }
33
34set -i
35echo id | truss -o /dev/null -f /bin/sh -i
36exit 0
37