Skip to content

CI: hardlink result unexpected in pysdk test. #5982

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

Open
zhoucheng361 opened this issue Apr 15, 2025 · 0 comments
Open

CI: hardlink result unexpected in pysdk test. #5982

zhoucheng361 opened this issue Apr 15, 2025 · 0 comments
Labels
area/ci Issues or PRs related to CI

Comments

@zhoucheng361
Copy link
Contributor

What happened:

https://github.com/juicedata/juicefs/actions/runs/14453598157/job/40531726551

Traceback (most recent call last):
  File "/home/runner/work/juicefs/juicefs/.github/scripts/hypo/fs.py", line 712, in <module>
    juicefs_machine.runTest()
  File "/usr/local/lib/python3.10/dist-packages/hypothesis/stateful.py", line 460, in runTest
    run_state_machine_as_test(cls, settings=self.settings)
  File "/usr/local/lib/python3.10/dist-packages/hypothesis/stateful.py", line 261, in run_state_machine_as_test
    state_machine_test(state_machine_factory)
  File "/usr/local/lib/python3.10/dist-packages/hypothesis/stateful.py", line 115, in run_state_machine
    @given(st.data())
  File "/usr/local/lib/python3.10/dist-packages/hypothesis/core.py", line 1839, in wrapped_test
    raise the_error_hypothesis_found
  File "/usr/local/lib/python3.10/dist-packages/hypothesis/core.py", line 1807, in wrapped_test
    state.run_engine()
  File "/usr/local/lib/python3.10/dist-packages/hypothesis/core.py", line 1435, in run_engine
    _raise_to_user(
  File "/usr/local/lib/python3.10/dist-packages/hypothesis/core.py", line 1474, in _raise_to_user
    raise the_error_hypothesis_found
  File "/usr/local/lib/python3.10/dist-packages/hypothesis/core.py", line 1351, in run_engine
    self.execute_once(
  File "/usr/local/lib/python3.10/dist-packages/hypothesis/core.py", line 1024, in execute_once
    result = self.test_runner(data, run)
  File "/usr/local/lib/python3.10/dist-packages/hypothesis/core.py", line 729, in default_executor
    return function(data)
  File "/usr/local/lib/python3.10/dist-packages/hypothesis/core.py", line 996, in run
    return test(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/hypothesis/stateful.py", line 115, in run_state_machine
    @given(st.data())
  File "/usr/local/lib/python3.10/dist-packages/hypothesis/core.py", line 894, in test
    return self.test(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/hypothesis/stateful.py", line 204, in run_state_machine
    result = rule.function(machine, **data)
  File "/home/runner/work/juicefs/juicefs/.github/scripts/hypo/fs.py", line 442, in hardlink
    src_file = Files.filter(lambda x: x != multiple()),
  File "/usr/local/lib/python3.10/dist-packages/hypothesis/stateful.py", line 892, in precondition_wrapper
    return f(*args, **kwargs)
  File "/home/runner/work/juicefs/juicefs/.github/scripts/hypo/fs.py", line 451, in hardlink
    assert self.equal(result1, result2), red(f'hardlink:\nresult1 is {result1}\nresult2 is {result2}')
AssertionError: hardlink:
result1 is NotADirectoryError:[Errno 20] Not a directory: '/tmp/fsrand/r/a' -> '/tmp/fsrand/a/a'
result2 is OSError:call jfs_link failed: [Errno 2] No such file or directory: ["b'/fsrand/r/a'", "b'/fsrand/a/a'"]
Falsifying example:
state = JuicefsMachine()
folders_0 = state.init_folders()
files_0 = state.create_file(content=b'gs', file_name='u', parent=folders_0, umask=18, user='root')
files_1 = state.create_file(content=b'', file_name='lltd', parent=folders_0, umask=18, user='root')
files_2 = state.create_file(content=b'', file_name='as', parent=folders_0, umask=18, user='root')
state.read(encoding='utf-8', errors='strict', file=files_2, length=0, mode='x', offset=0, user='root', whence=0)
files_3 = state.create_file(content=b'', file_name='o', parent=folders_0, umask=18, user='root')
files_4 = state.hardlink(link_file_name='ios', parent=folders_0, src_file=files_3, umask=18, user='root')
files_5 = state.hardlink(link_file_name='zbny', parent=folders_0, src_file=files_4, umask=18, user='root')
state.read(encoding='utf-8', errors='strict', file=files_5, length=0, mode='x', offset=0, user='root', whence=0)
files_6 = state.hardlink(link_file_name='if', parent=folders_0, src_file=files_5, umask=18, user='root')
folders_1 = state.mkdir(mode=0, parent=folders_0, subdir='r', umask=18, user='root')
files_7 = state.create_file(content=b'', file_name='espa', parent=folders_1, umask=18, user='root')
folders_2 = state.rename_dir(entry=folders_0, new_entry_name='a', parent=folders_1, umask=18, user='root')
files_8 = state.create_file(content=b'', file_name='jwef', parent=folders_0, umask=18, user='root')
files_9 = state.create_file(content=b'', file_name='a', parent=folders_1, umask=18, user='root')
state.read(encoding='utf-8', errors='strict', file=files_0, length=0, mode='x', offset=0, user='root', whence=0)
state.read(encoding='utf-8', errors='strict', file=files_0, length=0, mode='x', offset=0, user='root', whence=0)
folders_3 = state.rename_dir(entry=folders_1, new_entry_name='a', parent=folders_2, umask=18, user='root')
state.create_file(content=b'', file_name=folders_3, parent=folders_3, umask=18, user='root')
state.read(encoding='utf-8', errors='strict', file=files_9, length=0, mode='x', offset=0, user='root', whence=0)
state.read(encoding='utf-8', errors='strict', file=files_9, length=0, mode='x', offset=0, user='root', whence=0)
state.read(encoding='utf-8', errors='strict', file=files_9, length=0, mode='x', offset=0, user='root', whence=0)
state.read(encoding='utf-8', errors='strict', file=files_9, length=0, mode='x', offset=0, user='root', whence=0)
state.read(encoding='utf-8', errors='strict', file=files_9, length=0, mode='x', offset=0, user='root', whence=0)
state.create_file(content=b'', file_name=folders_3, parent=folders_3, umask=18, user='root')
files_10 = state.create_file(content=b'', file_name=folders_1, parent=folders_0, umask=18, user='root')
state.create_file(content=b'', file_name=folders_3, parent=folders_3, umask=18, user='root')
state.hardlink(link_file_name=folders_3, parent=folders_3, src_file=folders_1, umask=18, user='root')
state.hardlink(link_file_name=folders_3, parent=folders_3, src_file=files_9, umask=18, user='root')
state.teardown()

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?

Environment:

  • JuiceFS version (use juicefs --version) or Hadoop Java SDK version:
  • Cloud provider or hardware configuration running JuiceFS:
  • OS (e.g cat /etc/os-release):
  • Kernel (e.g. uname -a):
  • Object storage (cloud provider and region, or self maintained):
  • Metadata engine info (version, cloud provider managed or self maintained):
  • Network connectivity (JuiceFS to metadata engine, JuiceFS to object storage):
  • Others:
@zhoucheng361 zhoucheng361 added the kind/bug Something isn't working label Apr 15, 2025
@zhoucheng361 zhoucheng361 changed the title CI: hardlink result not expected in pysdk test. CI: hardlink result unexpected in pysdk test. Apr 15, 2025
@davies davies added area/ci Issues or PRs related to CI and removed kind/bug Something isn't working labels Apr 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ci Issues or PRs related to CI
Projects
None yet
Development

No branches or pull requests

2 participants