Skip to content

Commit

Permalink
Merge pull request #5666 from tonistiigi/marshal-history-record-fix
Browse files Browse the repository at this point in the history
llbsolver: take copy of history record to avoid marshal race
  • Loading branch information
thompson-shaun authored Jan 16, 2025
2 parents 78bcf8d + fafab60 commit f101ab5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions solver/llbsolver/history.go
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,8 @@ func (h *HistoryQueue) Update(ctx context.Context, e *controlapi.BuildHistoryEve
h.mu.Lock()
defer h.mu.Unlock()

e = e.CloneVT()

if e.Type == controlapi.BuildHistoryEventType_STARTED {
h.active[e.Record.Ref] = e.Record
h.ps.Send(e)
Expand Down

0 comments on commit f101ab5

Please sign in to comment.