New issue
Advanced search Search tips

Issue 892271 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Oct 4
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Spacey fails on large CLs with "too many open files"

Project Member Reported by vadimsh@chromium.org, Oct 4

Issue description

This CL: https://chromium-review.googlesource.com/c/infra/luci/luci-go/+/1262196
Failure: https://chromium-swarm.appspot.com/task?id=405928be9b5e9410&refresh=10&show_raw=1

2018/10/04 18:29:55 Failed to open file: open tumble/fire_tasks.go: too many open files, path: tumble/fire_tasks.go

Looks like spacey doesn't close files until the very end: https://cs.chromium.org/chromium/infra/go/src/infra/tricium/functions/spacey/spacey.go?l=58

'defer's there, added in the loop, execute only when 'main' exits, not when a single loop iteration finishes.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Oct 4

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/infra/+/cccaf2a5ea58ebd10c0cb8a629e1d861217cfcca

commit cccaf2a5ea58ebd10c0cb8a629e1d861217cfcca
Author: Quinten Yearsley <qyearsley@chromium.org>
Date: Thu Oct 04 23:10:25 2018

[tricium spacey] Close each file after processing

As pointed out by Vadim:
> 'defer's there, added in the loop, execute only when 'main' exits,
> not when a single loop iteration finishes.

There were two ways I could see to change it: put the
individual file opening/closing code into its own function,
or change the closing to not be deferred. The latter was a
smaller change.

Bug:  892271 
Change-Id: Idebd7eae5b357ee13eba3e9d0c3b7e94064edf78
Reviewed-on: https://chromium-review.googlesource.com/c/1262922
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>
Commit-Queue: Quinten Yearsley <qyearsley@chromium.org>
Cr-Commit-Position: refs/heads/master@{#18071}
[modify] https://crrev.com/cccaf2a5ea58ebd10c0cb8a629e1d861217cfcca/go/src/infra/tricium/functions/spacey/spacey.go

Owner: qyears...@chromium.org
Status: Fixed (was: Untriaged)
Thanks for the report, new version now deployed

Sign in to add a comment