Commit 03e5172
proc: skip shared/deleted exec mappings in principal_binary
principal_binary picked the first executable mapping with a non-`[`
path, which under Swoole is its executable shared-memory pool — an
`r-xs` region backed by `/dev/zero (deleted)` mapped below the php
text segment. attach() then tried to open that path as an on-disk ELF
and failed ("opening /dev/zero (deleted): No such file or directory"),
so every worker attach aborted with 0 samples.
Require a private (`p`) file-backed mapping and exclude `/dev/*` and
`(deleted)` paths so resolution lands on the real php ELF. Covers the
`/memfd:… (deleted)` JIT-pool variant too. Regression test added from
an observed Swoole 8.5 NTS maps layout.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 4858a14 commit 03e5172
1 file changed
Lines changed: 29 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
59 | 64 | | |
60 | | - | |
61 | | - | |
62 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
63 | 72 | | |
64 | 73 | | |
65 | 74 | | |
| |||
109 | 118 | | |
110 | 119 | | |
111 | 120 | | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
112 | 138 | | |
113 | 139 | | |
114 | 140 | | |
| |||
0 commit comments