Commit baec46d
authored
Daemon state transitions to "Building" via OperationGuard *before*
the per-project lock is taken. Without per-phase tracing, an
indefinite stall on the lock looks identical to an indefinite stall
inside the build itself — both surface to the user as
"State: building" forever, with zero log lines telling them which
phase is stuck.
Emit a tracing::info before lock.lock().await, a tracing::warn at 10s
if the lock is still being awaited, and a tracing::info on acquire
with the actual wait time. With #348 now flushing daemon tracing to
daemon.log, future hangs will localize within ~10s instead of being
invisible.
The 10s warn-threshold is well above normal lock contention (which
should be sub-millisecond when no other build is running) but below
the human-perceptible "is it hung?" window. After the warn fires
the code continues to await the lock — this is observability, not a
timeout, since silently dropping the lock and racing the holder
would corrupt build outputs.
Refs #346
1 parent f735366 commit baec46d
1 file changed
Lines changed: 37 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
146 | 157 | | |
147 | 158 | | |
148 | | - | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
149 | 180 | | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
150 | 186 | | |
151 | 187 | | |
152 | 188 | | |
| |||
0 commit comments