Skip to content

Commit f101ab5

Browse files
Merge pull request moby#5666 from tonistiigi/marshal-history-record-fix
llbsolver: take copy of history record to avoid marshal race
2 parents 78bcf8d + fafab60 commit f101ab5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

solver/llbsolver/history.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -680,6 +680,8 @@ func (h *HistoryQueue) Update(ctx context.Context, e *controlapi.BuildHistoryEve
680680
h.mu.Lock()
681681
defer h.mu.Unlock()
682682

683+
e = e.CloneVT()
684+
683685
if e.Type == controlapi.BuildHistoryEventType_STARTED {
684686
h.active[e.Record.Ref] = e.Record
685687
h.ps.Send(e)

0 commit comments

Comments
 (0)