23h: kernel-consumer hunt — no direct readers of FIR data outside 529fe0 (init-only xrefs); bp on loop end silent in render => duplicated chain instantiation suspected; active RIP sampler fnsample.py working (2.4k in-module samples, MSVC stackfill dominates steady state; core leads 52e1c0/534580 on param phase); yabridge stale socket dirs break respawn — documented
This commit is contained in:
+18
-16
@@ -52,27 +52,17 @@ def pt(req, pid, addr=0, data=0):
|
||||
|
||||
|
||||
def find_host():
|
||||
# fastest signal: any non-reaper child of a reaper process
|
||||
reapers = []
|
||||
for p in glob.glob('/proc/[0-9]*'):
|
||||
try:
|
||||
cmd = open(f'/proc/{p}/cmdline', 'rb').read()
|
||||
if b'reaper' in cmd and b'yabridge' not in cmd:
|
||||
reapers.append(int(os.path.basename(p)))
|
||||
except Exception:
|
||||
continue
|
||||
# proven maps-based finder (same as rendersnap.py)
|
||||
for p in glob.glob('/proc/[0-9]*'):
|
||||
pid = int(os.path.basename(p))
|
||||
try:
|
||||
st = open(f'/proc/{pid}/stat').read().split()
|
||||
ppid = int(st[3])
|
||||
cmd = open(f'/proc/{pid}/cmdline', 'rb').read().replace(b'\0', b' ').decode('utf8', 'replace')
|
||||
maps = open(f'/proc/{pid}/maps').read()
|
||||
except Exception:
|
||||
continue
|
||||
if ppid in reapers and pid not in reapers:
|
||||
if 'soothe2' in maps and 'reaper' not in cmd:
|
||||
return pid
|
||||
return None
|
||||
|
||||
|
||||
def drain_waits():
|
||||
out = []
|
||||
while True:
|
||||
@@ -95,6 +85,18 @@ def main():
|
||||
t0 = time.time()
|
||||
while time.time() - t0 < 30 and not host:
|
||||
host = find_host()
|
||||
if host is None and time.time() - t0 > 2:
|
||||
# fallback: maps-based
|
||||
for p in glob.glob('/proc/[0-9]*'):
|
||||
pid = int(os.path.basename(p))
|
||||
try:
|
||||
cmd = open(f'/proc/{pid}/cmdline', 'rb').read().replace(b'\0', b' ').decode('utf8', 'replace')
|
||||
maps = open(f'/proc/{pid}/maps').read()
|
||||
except Exception:
|
||||
continue
|
||||
if 'soothe2' in maps and 'reaper' not in cmd:
|
||||
host = pid
|
||||
break
|
||||
time.sleep(0.002)
|
||||
if not host:
|
||||
print('NO HOST')
|
||||
@@ -111,8 +113,8 @@ def main():
|
||||
pt(PTRACE_INTERRUPT, host)
|
||||
|
||||
# phase 2: pump events, seize newcomers until set stabilizes
|
||||
stable_until = time.time() + 2.5
|
||||
deadline = time.time() + 8.0
|
||||
stable_until = time.time() + float(os.environ.get('FN_STAB','0.05'))
|
||||
deadline = time.time() + 3.0
|
||||
while time.time() < deadline:
|
||||
for pid, st in drain_waits():
|
||||
pass # they stay stopped; we hold them
|
||||
|
||||
Reference in New Issue
Block a user