You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This spec frequently fails, occasionally even during CI. This is also true for downstream application's custom storage adapters since this is a shared spec.
Currently the check uses lsof +D to list all open files within the application directory. Issues with this include:
lsof is an additional system level dependency
If a storage adapter stashes files in a location outside the application dir tree (e.g. /tmp) then those would be missed.
Other (even non-ruby) processes are included in the open file list.
lsof itself notes that the +D mode is inefficient and resource hungry.
Potential actions:
Filter open_files to those with a PID that matches Process.pid
Use a more specific path
Include additional paths like /tmp
Remove the spec or make it a warning?
The text was updated successfully, but these errors were encountered:
I've thought about this one a lot too, since it fails for me locally basically always. We were just leaking SO MANY handles before this test, so I'm scared to remove it.
Yeah, I think it's a valuable test to have.
I've been pondering how it would fail in a CI situation where there shouldn't be other processes. Maybe if there is an open file that is missing a corresponding close then if garbage collection doesn't trigger during the spec it would show as a spec failure? We could explicitly garbage collect in open_files I guess? Or maybe we want to be identifying these problems better if that is really what's happening.
valkyrie/lib/valkyrie/specs/shared_specs/storage_adapter.rb
Lines 55 to 72 in 814494d
This spec frequently fails, occasionally even during CI. This is also true for downstream application's custom storage adapters since this is a shared spec.
Currently the check uses
lsof +D
to list all open files within the application directory. Issues with this include:lsof
is an additional system level dependencylsof
itself notes that the+D
mode is inefficient and resource hungry.Potential actions:
open_files
to those with a PID that matchesProcess.pid
The text was updated successfully, but these errors were encountered: