Summary: | Userland dtrace in ports / compiling with poudriere | ||||||
---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Matthew Seaman <matthew> | ||||
Component: | Ports Framework | Assignee: | Matthew Seaman <matthew> | ||||
Status: | New --- | ||||||
Severity: | Affects Some People | CC: | ports-bugs | ||||
Priority: | --- | ||||||
Version: | Latest | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
See Also: |
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=215028 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=224271 |
||||||
Attachments: |
|
Description
Matthew Seaman
![]() ![]() Fixing permissions. Choosing group 141 as the next available gid from /usr/ports/GIDs, create a dtrace group and add the userids used by dtrace-able programs to it. I shall use postgresql96 as the example: ``` # pw group add -n dtrace -g 141 -M postgres # cat /etc/devfs.rules [userdtrace=10] add path dtrace/helper mode 0660 group dtrace # sysrc devfs_system_ruleset="userdtrace" ``` Will result in ownership/permissions like so (may need a reboot): ``` # ls -la /dev/dtrace/ total 1 dr-xr-xr-x 2 root wheel 512 Jun 3 11:42 ./ dr-xr-xr-x 13 root wheel 512 Jun 3 11:42 ../ crw------- 1 root wheel 0x9 Jun 3 11:42 dtmalloc crw------- 1 root wheel 0x4 Jun 3 11:42 dtrace crw------- 1 root wheel 0x7 Jun 3 11:42 fasttrap crw------- 1 root wheel 0x8 Jun 3 11:42 fbt crw-rw---- 1 root dtrace 0x5 Jun 3 11:42 helper crw------- 1 root wheel 0x6 Jun 3 11:42 profile ``` Resulting in: ``` # dtrace -l -m postgres | head -10 ID PROVIDER MODULE FUNCTION NAME 69078 postgresql79451 postgres CheckPointBuffers buffer-checkpoint-done 69079 postgresql79451 postgres CheckPointBuffers buffer-checkpoint-start 69080 postgresql79451 postgres CheckPointBuffers buffer-checkpoint-sync-start 69081 postgresql79451 postgres FlushBuffer buffer-flush-done 69082 postgresql79451 postgres FlushBuffer buffer-flush-start 69083 postgresql79451 postgres ReadBuffer_common buffer-read-done 69084 postgresql79451 postgres ReadBuffer_common buffer-read-start 69085 postgresql79451 postgres CheckPointBuffers buffer-sync-done 69086 postgresql79451 postgres CheckPointBuffers buffer-sync-start ``` Fixing permissions. Choosing group 141 as the next available gid from /usr/ports/GIDs, create a dtrace group and add the userids used by dtrace-able programs to it. I shall use postgresql96 as the example: ``` # pw group add -n dtrace -g 141 -M postgres # cat /etc/devfs.rules [userdtrace=10] add path dtrace/helper mode 0660 group dtrace # sysrc devfs_system_ruleset="userdtrace" ``` Will result in ownership/permissions like so (may need a reboot): ``` # ls -la /dev/dtrace/ total 1 dr-xr-xr-x 2 root wheel 512 Jun 3 11:42 ./ dr-xr-xr-x 13 root wheel 512 Jun 3 11:42 ../ crw------- 1 root wheel 0x9 Jun 3 11:42 dtmalloc crw------- 1 root wheel 0x4 Jun 3 11:42 dtrace crw------- 1 root wheel 0x7 Jun 3 11:42 fasttrap crw------- 1 root wheel 0x8 Jun 3 11:42 fbt crw-rw---- 1 root dtrace 0x5 Jun 3 11:42 helper crw------- 1 root wheel 0x6 Jun 3 11:42 profile ``` Resulting in: ``` # dtrace -l -m postgres | head -10 ID PROVIDER MODULE FUNCTION NAME 69078 postgresql79451 postgres CheckPointBuffers buffer-checkpoint-done 69079 postgresql79451 postgres CheckPointBuffers buffer-checkpoint-start 69080 postgresql79451 postgres CheckPointBuffers buffer-checkpoint-sync-start 69081 postgresql79451 postgres FlushBuffer buffer-flush-done 69082 postgresql79451 postgres FlushBuffer buffer-flush-start 69083 postgresql79451 postgres ReadBuffer_common buffer-read-done 69084 postgresql79451 postgres ReadBuffer_common buffer-read-start 69085 postgresql79451 postgres CheckPointBuffers buffer-sync-done 69086 postgresql79451 postgres CheckPointBuffers buffer-sync-start ``` Created attachment 183624 [details]
postgresql9{2,6}-server patches
These patches allow poudriere to build postgresql+dtrace probes
for amd64 11.0 and 10.3 on an amd64 11.0 host with dtraceall kmod
loaded.
Fails when trying to build i386 binaries.
Same result when building without and dtrace kernel modules loaded. -lelf isn't necessary after base r278934 -xnolibs isn't necessary after base r283025 |