Skip to content

Log rotation inter-process lock failed, Issue occurs in JRuby 9.3.0.0 and Windows #67

Description

@JesseChavez

When Using JRuby 9.3.0.0 in Windows this error occurs.
Reproduction steps:

1) Test script:
`test_logger.rb

logger = Logger.new("D:/log.txt", 5, 1024)
  
150.times do |i|
  logger.info i
end

2) run script:
The easiest way to run JRuby in windows would be installing Java 11 and downloading jruby-complete-9.3.0.0.jar, then run:

D:\>java -jar jruby-complete-9.3.0.0.jar test_logger.rb

3) Console output:
log rotation inter-process lock failed. D:\log.txt -> D:\log.txt.0: The process cannot access the file because it is being used by another process.
log writing failed. closed stream
log shifting failed. closed stream
log writing failed. closed stream
log shifting failed. closed stream
...

4) Cause:
The issue occurs due JRuby returns java for RUBY_PLATFORM when loading the method lock_shift_log

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions