{"action":"created","issue":{"url":"https://api.github.com/repos/grosser/parallel_tests/issues/440","labels_url":"https://api.github.com/repos/grosser/parallel_tests/issues/440/labels{/name}","comments_url":"https://api.github.com/repos/grosser/parallel_tests/issues/440/comments","events_url":"https://api.github.com/repos/grosser/parallel_tests/issues/440/events","html_url":"https://github.com/grosser/parallel_tests/issues/440","id":106877603,"number":440,"title":"Sporadic Errno::EACCES related errors with runtime logger + rspec tags","user":{"login":"aschlei","id":14320686,"avatar_url":"https://avatars.githubusercontent.com/u/14320686?v=3","gravatar_id":"","url":"https://api.github.com/users/aschlei","html_url":"https://github.com/aschlei","followers_url":"https://api.github.com/users/aschlei/followers","following_url":"https://api.github.com/users/aschlei/following{/other_user}","gists_url":"https://api.github.com/users/aschlei/gists{/gist_id}","starred_url":"https://api.github.com/users/aschlei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aschlei/subscriptions","organizations_url":"https://api.github.com/users/aschlei/orgs","repos_url":"https://api.github.com/users/aschlei/repos","events_url":"https://api.github.com/users/aschlei/events{/privacy}","received_events_url":"https://api.github.com/users/aschlei/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-09-16T22:37:28Z","updated_at":"2015-09-17T14:57:42Z","closed_at":null,"body":"Running into a sporadic issue when specifying tags for rspec and using the runtime logger.  This may just be when some specs don't have any examples to run because they don't match the specified tag.\r\n\r\nTo demonstrate, I created four simple spec files like the following (but updating the numbers in each spec: describe \"second\" ... it \"test2\", :test2 do ... , etc.)\r\n```rb\r\ndescribe \"first\" do\r\n  it \"test1\", :test1 do\r\n    sleep(1)\r\n    expect(true).to be(true)\r\n  end\r\nend\r\n```\r\nCreated a .rspec with the following:\r\n```\r\n--color\r\n--format p\r\n--format ParallelTests::RSpec::RuntimeLogger --out runtime.log\r\n--tag test1\r\n```\r\nSo in this case only one example in the first spec matches the tag.\r\n\r\nThen I run `parallel_rspec --runtime-log runtime.log spec`\r\n\r\nSometimes it runs all the specs with no error.  Other times I get a couple different Errno::EACCES errors.  Either:\r\n```\r\nC:/Ruby22/lib/ruby/gems/2.2.0/gems/parallel_tests-1.7.0/lib/parallel_tests/rspec/logger_base.rb:47:in `flock': Permission denied (Errno::EACCES)\r\n        from C:/Ruby22/lib/ruby/gems/2.2.0/gems/parallel_tests-1.7.0/lib/parallel_tests/rspec/logger_base.rb:47:in `lock_output'\r\n        from C:/Ruby22/lib/ruby/gems/2.2.0/gems/parallel_tests-1.7.0/lib/parallel_tests/rspec/runtime_logger.rb:51:in `start_dump'\r\n        ...\r\n```\r\nor\r\n```\r\nC:/Ruby22/lib/ruby/gems/2.2.0/gems/parallel_tests-1.7.0/lib/parallel_tests/rspec/logger_base.rb:38:in `close': Permission denied @ fptr_finalize - runtime.log (Errno::EACCES)\r\n        from C:/Ruby22/lib/ruby/gems/2.2.0/gems/parallel_tests-1.7.0/lib/parallel_tests/rspec/logger_base.rb:38:in `close'\r\n        ...\r\n```\r\nBut the errors are very sporadic.  Sometimes they happen right away, other times I might have to run parallel_rspec 20 or more times before I get an error.  Deleting the runtime.log file may help reproduce the issue if it hasn't occurred in some time."},"comment":{"url":"https://api.github.com/repos/grosser/parallel_tests/issues/comments/141113391","html_url":"https://github.com/grosser/parallel_tests/issues/440#issuecomment-141113391","issue_url":"https://api.github.com/repos/grosser/parallel_tests/issues/440","id":141113391,"user":{"login":"aschlei","id":14320686,"avatar_url":"https://avatars.githubusercontent.com/u/14320686?v=3","gravatar_id":"","url":"https://api.github.com/users/aschlei","html_url":"https://github.com/aschlei","followers_url":"https://api.github.com/users/aschlei/followers","following_url":"https://api.github.com/users/aschlei/following{/other_user}","gists_url":"https://api.github.com/users/aschlei/gists{/gist_id}","starred_url":"https://api.github.com/users/aschlei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aschlei/subscriptions","organizations_url":"https://api.github.com/users/aschlei/orgs","repos_url":"https://api.github.com/users/aschlei/repos","events_url":"https://api.github.com/users/aschlei/events{/privacy}","received_events_url":"https://api.github.com/users/aschlei/received_events","type":"User","site_admin":false},"created_at":"2015-09-17T14:57:42Z","updated_at":"2015-09-17T14:57:42Z","body":"Creating the file ahead of time didn't seem to help, even with full permissions.  But yeah, our CI environment is Linux, so for Windows my workaround is just to not use the runtime logger there."}}