-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FIX: Open File leak #647
FIX: Open File leak #647
Conversation
…havior after 1.13
…process, otherwise logging outputs get closed before final job report is logged
Fising issue where context cancel caused child output writers to close before process was finished
I've checked and the pbs unit test is also happening to master. Something has changed to the docker build within the past 8 months and now the script submitted to the pbs queue in the docker container doesn't has permission to use docker (but if you exec into the container it can). This comes back as an execution error in the unit test. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comments
cmd/server/run.go
Outdated
@@ -47,7 +47,7 @@ type Server struct { | |||
// Database represents the base funnel database interface | |||
type Database interface { | |||
tes.ReadOnlyServer | |||
events.Writer | |||
//events.Writer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why commented? Remove, or add comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed.
compute/hpc_backend.go
Outdated
@@ -55,6 +55,10 @@ func (b *HPCBackend) WriteEvent(ctx context.Context, ev *events.Event) error { | |||
return nil | |||
} | |||
|
|||
func (b *HPCBackend) Close() { | |||
//TODO: Close things here? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If really a TODO, add test ... If a NOOP, add comment to say so
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed comment
database/dynamodb/new.go
Outdated
@@ -47,3 +47,7 @@ func NewDynamoDB(conf config.DynamoDB) (*DynamoDB, error) { | |||
func (db *DynamoDB) Init() error { | |||
return db.createTables() | |||
} | |||
|
|||
func (db *DynamoDB) Close() { | |||
//db.client.Close() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why commented?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was there from dev, when assumed there was a dynamo close method. There doesn't appear to be one, so the comment has been removed.
Under some deployments (local backend, but possibly others) GRPC event writers weren't closed, and so the system leaked open file handles, until it ran out under the
ulimit -n
constraint. This PR addsClose
methods to several interfaces so that network connections and open files are closed.