Skip to content

Possible copy_file_range issue with OpenZFS 2.2.3 and Kernel 6.8-rc5 #15930

Closed
@satmandu

Description

@satmandu

System information

Type Version/Name
Distribution Name Ubuntu
Distribution Version Mantic/23.10
Kernel Version 6.8.0-rc5
Architecture x86_64
OpenZFS Version 2.2.3

Describe the problem you're observing

I'm getting a copy_file_range error when copying text files, but not binary files using a ruby command which uses copy_file_range.

I've opened an issue ruby/fileutils#118 , but this might be a zfs issue, as kernel changes ought not to affect userspace.

Describe how to reproduce the problem

This occurs in a docker container. Example container inside which I can reproduce this error, running on an x86_64 host on a 6.8-rc5 kernel and OpenZFS 2.2.3:

docker run --platform linux/amd64 --rm --net=host  -v $(pwd):/output -h $(hostname)-x86_64 -it satmandu/crewbuild:nocturne-x86_64.m90

Example commands inside that container that cause the issue:

chronos@mbp113-x86_64 /usr/local/lib/crew/packages $ cd /tmp
chronos@mbp113-x86_64 /tmp $ echo 'test' > test
chronos@mbp113-x86_64 /tmp $ irb
irb(main):001> require 'fileutils'
=> false
irb(main):002> FileUtils.install 'test', 'dira/'
/usr/local/lib64/ruby/gems/3.3.0/gems/fileutils-1.7.2/lib/fileutils.rb:2280:in `copy_stream': Operation not supported - copy_file_range (Errno::ENOTSUP)
        from /usr/local/lib64/ruby/gems/3.3.0/gems/fileutils-1.7.2/lib/fileutils.rb:2280:in `block (2 levels) in copy_file'
        from /usr/local/lib64/ruby/gems/3.3.0/gems/fileutils-1.7.2/lib/fileutils.rb:2279:in `open'
        from /usr/local/lib64/ruby/gems/3.3.0/gems/fileutils-1.7.2/lib/fileutils.rb:2279:in `block in copy_file'
        from /usr/local/lib64/ruby/gems/3.3.0/gems/fileutils-1.7.2/lib/fileutils.rb:2278:in `open'
        from /usr/local/lib64/ruby/gems/3.3.0/gems/fileutils-1.7.2/lib/fileutils.rb:2278:in `copy_file'
        from /usr/local/lib64/ruby/gems/3.3.0/gems/fileutils-1.7.2/lib/fileutils.rb:1078:in `copy_file'                 [
        from /usr/local/lib64/ruby/gems/3.3.0/gems/fileutils-1.7.2/lib/fileutils.rb:1629:in `block in install'
        from /usr/local/lib64/ruby/gems/3.3.0/gems/fileutils-1.7.2/lib/fileutils.rb:2469:in `block in fu_each_src_dest'
        from /usr/local/lib64/ruby/gems/3.3.0/gems/fileutils-1.7.2/lib/fileutils.rb:2485:in `fu_each_src_dest0'
        from /usr/local/lib64/ruby/gems/3.3.0/gems/fileutils-1.7.2/lib/fileutils.rb:2467:in `fu_each_src_dest'
        from /usr/local/lib64/ruby/gems/3.3.0/gems/fileutils-1.7.2/lib/fileutils.rb:1623:in `install'
        from (irb):2:in `<main>'
        from <internal:kernel>:187:in `loop'
        from /usr/local/lib64/ruby/gems/3.3.0/gems/irb-1.11.0/exe/irb:9:in `<top (required)>'
        from /usr/local/bin/irb:25:in `load'
        from /usr/local/bin/irb:25:in `<main>'
irb(main):003>  

This problem goes away if I boot into Kernel 6.7.5

Include any warning/errors/backtraces from the system logs

There are no other logs that show this issue... it doesn't occur if I copy a non-text-file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: DefectIncorrect behavior (e.g. crash, hang)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions