Re: DTrace Error

From: Cy Schubert <Cy.Schubert_at_cschubert.com>
Date: Sat, 23 Jul 2022 18:55:33 UTC
In message <YtxAbplpPtLy2Ll1@nuc>, Mark Johnston writes:
> On Sat, Jul 23, 2022 at 07:14:44AM -0700, Cy Schubert wrote:
> > In message <20220723035223.57CDBD7@slippy.cwsent.com>, Cy Schubert writes:
> > > I'm not sure if this is because my obj tree needs a fresh rebuild and 
> > > reinstall or if this is a legitimate problem. Regardless of the dtrace 
> > > command entered, whether it be a fbt or sdt, the following error occurs:
> > >
> > > slippy# dtrace -n 'fbt::ieee80211_vap_setup:entry { printf("entering 
> > > ieee80211_vap_setup\n"); }'
> > > dtrace: invalid probe specifier fbt::ieee80211_vap_setup:entry { 
> > > printf("entering ieee80211_vap_setup\n"); }: "/usr/lib/dtrace/psinfo.d", 
> > > line 1: failed to copy type of 'pr_gid': Conflicting type is already defi
> ned
> > > slippy# 
> > >
> > > Old DTrace scripts I've used months or even years ago also fail with the 
> > > same error. It's not this one probe. All probes result in the pr_gid erro
> r.
> > >
> > > I'm currently rebuilding my "prod" tree from scratch with the hope that 
> > > it's simply something out of sync. But, should it not be, has anyone else
>  
> > > encountered this lately?
> > 
> > A full clean rebuild and installworld/kernel did not change the result. 
> > This is a new problem.
>
> I don't see any such problem on a system built from commit 151abc80cde,
> using GENERIC.  Are you using a custom kernel config?  Which kernel
> modules do you have loaded?

The kernel config is custom. Here is what is reported by the kernel through 
strings:

options	CONFIG_AUTOGENERATED
makeoptions	WITH_CTF=1
makeoptions	DEBUG=-g
options	BREAK_TO_DEBUGGER
options	SW_WATCHDOG
options	DIRECTIO
options	KDB_UNATTENDED
options	IICHID_SAMPLING
options	HID_DEBUG
options	EVDEV_SUPPORT
options	USB_DEBUG
options	ATH_ENABLE_11N
options	AH_AR5416_INTERRUPT_MITIGATION
options	IEEE80211_SUPPORT_MESH
options	IEEE80211_DEBUG
options	SC_PIXEL_MODE
options	PPS_SYNC
options	COMPAT_LINUXKPI
options	PCI_IOV
options	PCI_HP
options	IOMMU
options	EARLY_AP_STARTUP
options	SMP
options	NETGDB
options	NETDUMP
options	DEBUGNET
options	ZSTDIO
options	GZIO
options	EKCD
options	VERBOSE_SYSINIT=0
options	MALLOC_DEBUG_MAXZONES=8
options	QUEUE_MACRO_DEBUG_TRASH
options	DEADLKRES
options	GDB
options	FULL_BUF_TRACKING
options	DDB
options	BUF_TRACKING
options	KDB_TRACE
options	KDB
options	RCTL
options	RACCT_DEFAULT_TO_DISABLED
options	RACCT
options	INCLUDE_CONFIG_FILE
options	DDB_CTF
options	KDTRACE_HOOKS
options	KDTRACE_FRAME
options	MAC
options	CAPABILITIES
options	CAPABILITY_MODE
options	AUDIT
options	HWPMC_HOOKS
options	KBD_INSTALL_CDEV
options	PRINTF_BUFR_SIZE=128
options	_KPOSIX_PRIORITY_SCHEDULING
options	SYSVSEM
options	SYSVMSG
options	SYSVSHM
options	STACK
options	KTRACE
options	SCSI_DELAY=5000
options	COMPAT_FREEBSD13
options	COMPAT_FREEBSD12
options	COMPAT_FREEBSD11
options	COMPAT_FREEBSD10
options	COMPAT_FREEBSD9
options	COMPAT_FREEBSD7
options	COMPAT_FREEBSD6
options	COMPAT_FREEBSD5
options	COMPAT_FREEBSD4
options	COMPAT_FREEBSD32
options	EFIRT
options	GEOM_LABEL
options	GEOM_RAID
options	TMPFS
options	PSEUDOFS
options	PROCFS
options	CD9660
options	MSDOSFS
options	NFS_ROOT
options	NFSLOCKD
options	NFSD
options	NFSCL
options	MD_ROOT
options	QUOTA
options	UFS_GJOURNAL
options	UFS_DIRHASH
options	UFS_ACL
options	SOFTUPDATES
options	FFS
options	KERN_TLS
options	SCTP_SUPPORT
options	TCP_RFC7413
options	TCP_HHOOK
options	TCP_BLACKBOX
options	TCP_OFFLOAD
options	FIB_ALGO
options	ROUTE_MPATH
options	IPSEC_SUPPORT
options	INET6
options	INET
options	VIMAGE
options	PREEMPTION
options	NUMA
options	SCHED_ULE
options	NEW_PCIB
options	CC_NEWRENO
options	GEOM_PART_GPT
options	GEOM_PART_MBR
options	GEOM_PART_EBR
options	GEOM_PART_BSD
options	KDB_TRACE
device	isa
device	mem
device	io
device	uart_ns8250
device	acpi
device	pci
device	fdc
device	ahci
device	ata
device	siis
device	ahc
device	scbus
device	ch
device	da
device	sa
device	cd
device	pass
device	ses
device	atkbdc
device	atkbd
device	psm
device	vga
device	splash
device	sc
device	vt
device	vt_vga
device	vt_efifb
device	vt_vbefb
device	uart
device	puc
device	iflib
device	igc
device	axp
device	miibus
device	crypto
device	aesni
device	loop
device	padlock_rng
device	rdrand_rng
device	ether
device	md
device	firmware
device	xz
device	bpf
device	uhci
device	ohci
device	ehci
device	xhci
device	usb
device	ukbd
device	umass
device	virtio
device	virtio_pci
device	vtnet
device	virtio_blk
device	virtio_scsi
device	virtio_balloon
device	kvm_clock
device	xentimer
device	evdev
device	uinput
device	hid

Kernel modules are:

slippy# kldstat
Id Refs Address                Size Name
 1  185 0xffffffff80200000  10290a8 kernel
 2    1 0xffffffff8122a000     36c0 coretemp.ko
 3    1 0xffffffff8122e000    12e88 cpufreq.ko
 4    1 0xffffffff81241000     6320 ichsmb.ko
 5    3 0xffffffff81248000     3c60 smbus.ko
 6    7 0xffffffff8124d000    a35e0 wlan.ko
 7    1 0xffffffff812f1000     e6f8 if_tuntap.ko
 8    1 0xffffffff81300000    a8968 iwn6000g2bfw.ko
 9    1 0xffffffff813a9000     34a0 dtraceall.ko
10    2 0xffffffff813ad000     4190 profile.ko
11   10 0xffffffff813b2000     aab0 opensolaris.ko
12   10 0xffffffff813bd000    56800 dtrace.ko
13    2 0xffffffff81414000    190a0 systrace_freebsd32.ko
14    2 0xffffffff8142e000    191c0 systrace.ko
15    2 0xffffffff81448000     3e48 sdt.ko
16    2 0xffffffff8144c000    5fcf8 fasttrap.ko
17    2 0xffffffff814ac000     5da8 fbt.ko
18    2 0xffffffff814b2000     6298 dtnfscl.ko
19    2 0xffffffff814b9000     3500 dtmalloc.ko
20    1 0xffffffff814bd000    1fe30 if_iwn.ko
21    1 0xffffffff814dd000     3da0 smb.ko
22    1 0xffffffff814e1000    20ce8 if_bge.ko
23    1 0xffffffff81502000     3418 wlan_wep.ko
24    1 0xffffffff81506000   5f0588 zfs.ko
25    2 0xffffffff81af7000     4268 iic.ko
26    1 0xffffffff81afc000     7750 sem.ko
27    1 0xffffffff81b04000     37b0 wlan_amrr.ko
28    1 0xffffffff81b08000    fb1f0 ipl.ko
29    1 0xffffffff81c04000     66a0 sdhci_pci.ko
30    3 0xffffffff81c0b000     f920 mmc.ko
31    2 0xffffffff81c1b000     fa50 sdhci.ko
32    1 0xffffffff81c2b000    164b8 if_lagg.ko
33    2 0xffffffff81c42000     3580 if_infiniband.ko
34    1 0xffffffff81c46000     7e08 ums.ko
35    1 0xffffffff81c4e000     9bb0 mmcsd.ko
36    2 0xffffffff81c58000     3520 geom_flashmap.ko
38    1 0xffffffff81c70000     9ec0 kbdmux.ko
39    1 0xffffffff81c7a000     4948 wlan_tkip.ko
40    1 0xffffffff81c7f000     86f8 wlan_ccmp.ko
41    1 0xffffffff81c88000     3440 wlan_rssadapt.ko
42    1 0xffffffff81c8c000    4a260 snd_hda.ko
43    2 0xffffffff81cd7000    7e360 sound.ko
44    1 0xffffffff82318000     9ed8 tmpfs.ko
45    1 0xffffffff82322000     3540 fdescfs.ko
46    1 0xffffffff82326000     4710 nullfs.ko
47    1 0xffffffff8232b000     3370 acpi_wmi.ko
48    1 0xffffffff8232f000     2220 cpuctl.ko
49    1 0xffffffff82332000     7638 if_bridge.ko
50    1 0xffffffff8233a000     60d8 bridgestp.ko
51    1 0xffffffff82341000     3340 uhid.ko
52    1 0xffffffff82345000     3380 usbhid.ko
53    1 0xffffffff82349000     31f0 hidbus.ko
54    1 0xffffffff8234d000     3320 wmt.ko
55    1 0xffffffff82351000     9810 unionfs.ko
56    1 0xffffffff8235b000     2a20 mac_ntpd.ko
57    1 0xffffffff8235e000     20f0 blank_saver.ko
58    1 0xffffffff82361000   183870 i915kms.ko
59    1 0xffffffff824e5000    73bd8 drm.ko
60    2 0xffffffff82559000     30fc linuxkpi_gplv2.ko
61    3 0xffffffff8255d000     72e0 dmabuf.ko
62    1 0xffffffff82565000     c730 agp.ko
slippy# 

>
> It might be useful to see a ctfdump -S of your kernel, to confirm that
> you're using CTFv3.


I'm not sure what "unexpected kind" means.

slippy# ctfdump -S /boot/kernel/kernel 
  [1] unexpected kind -- 1

- CTF Statistics -----------------------------------------------------------
--

  total number of data objects        = 23503

  total number of functions           = 1
  total number of function arguments  = 2
  maximum argument list length        = 2
  average argument list length        = 2.00

  total number of types               = 17657
  total number of integers            = 54
  total number of floats              = 0
  total number of pointers            = 5156
  total number of arrays              = 1394
  total number of func types          = 1477
  total number of structs             = 5486
  total number of unions              = 287
  total number of enums               = 401
  total number of forward tags        = 37
  total number of typedefs            = 2745
  total number of volatile types      = 35
  total number of const types         = 437
  total number of restrict types      = 6
  total number of unknowns (holes)    = 142

  total number of struct members      = 35339
  maximum number of struct members    = 251
  total size of all structs           = 5057035
  maximum size of a struct            = 1593440
  average number of struct members    = 6.44
  average size of a struct            = 921.81

  total number of union members       = 1002
  maximum number of union members     = 37
  total size of all unions            = 30852
  maximum size of a union             = 4101
  average number of union members     = 3.49
  average size of a union             = 107.50

  total number of enum members        = 4088
  maximum number of enum members      = 1273
  average number of enum members      = 10.19

  total number of unique strings      = 32427
  bytes of string data                = 434638
  maximum string length               = 69
  average string length               = 13.40

slippy# 


-- 
Cheers,
Cy Schubert <Cy.Schubert@cschubert.com>
FreeBSD UNIX:  <cy@FreeBSD.org>   Web:  http://www.FreeBSD.org
NTP:           <cy@nwtime.org>    Web:  https://nwtime.org

			e**(i*pi)+1=0