tilt-dev / tilt-dev/tilt

cpu spinning on trustd checks

Open
#5,409 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Go
Stars
10.1k
Forks
413
Avg merge
1d 10h
Merged PRs (30d)
6

Description

A tilt user reports:

They have an extension that polls tilt get to see when the tilt apiserver is up.

On one user's macOS machine, trustd starts using up all their CPU.

Here's a sampling of the macOS system logs:

default 09:49:45.875287-0800    trustd  cert[0]: TemporalValidity =(leaf)[]> 0
default 09:49:45.876019-0800    trustd  cert[0]: TemporalValidity =(path)[]> 0
default 09:49:45.876303-0800    tilt    Trust evaluate failure: [leaf TemporalValidity]
error   09:49:45.885401-0800    securityd   cannot open file at line 44595 of [02c344acea]
error   09:49:45.885426-0800    securityd   os_unix.c:44595: (2) open(/var/db/DetachedSignatures) - No such file or directory
default 09:49:45.887062-0800    tilt    UNIX error exception: 17
default 09:49:45.894392-0800    tilt    UNIX error exception: 17
default 09:49:45.900341-0800    tilt    UNIX error exception: 17
default 09:49:45.911442-0800    trustd  Leaf has invalid basic constraints
default 09:49:45.916512-0800    tilt    Received configuration update from daemon (initial)
default 09:49:45.926698-0800    trustd  cert[0]: TemporalValidity =(leaf)[]> 0
default 09:49:45.927376-0800    trustd  cert[0]: TemporalValidity =(path)[]> 0

It's not totally clear to me why this would happen. Most mysterious to me: if there's no tilt apiserver up, then I wouldn't even expect a TCP connection at all. So not sure where trustd would be kicking in...

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reported tilt get polling behavior and the macOS trustd logs. Determine why trust evaluation is triggered when no Tilt apiserver is available and reproduce the CPU-spinning condition. Done means identifying the cause and fixing or documenting the behavior, with a regression test if the relevant path can be isolated.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.