question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

New lockfile `/tmp/clvm_compile/p2_conditions.clvm.lock` prevents second harvester being started

See original GitHub issue

Would it be possible to add the node_id to the path to get uniqueness? https://github.com/Chia-Network/chia-blockchain/blob/093115311176e56388fb40334003a20e440da721/chia/wallet/puzzles/load_clvm.py#L72

I run two harvester instances on the same machine, both are connected to different farmers to simulate kind of H/A. With versions < 1.5.1, this was possible by just changing the port of the secondary harvester and farmers to let them connect.

Since 1.5.1 I cannot start a second harvester instance on the same machine and the reason is that both want to acquire the same lock file.

Traceback (most recent call last):
  File "/home/chia/chia-blockchain/venv/bin/chia", line 5, in <module>
    from chia.cmds.chia import main
  File "/home/chia/chia-blockchain/chia/cmds/chia.py", line 18, in <module>
    from chia.cmds.plotters import plotters_cmd
  File "/home/chia/chia-blockchain/chia/cmds/plotters.py", line 2, in <module>
    from chia.plotters.plotters import call_plotters
  File "/home/chia/chia-blockchain/chia/plotters/plotters.py", line 5, in <module>
    from chia.plotters.bladebit import get_bladebit_install_info, plot_bladebit
  File "/home/chia/chia-blockchain/chia/plotters/bladebit.py", line 10, in <module>
    from chia.plotting.create_plots import resolve_plot_keys
  File "/home/chia/chia-blockchain/chia/plotting/create_plots.py", line 10, in <module>
    from chia.daemon.keychain_proxy import KeychainProxy, connect_to_keychain_and_validate, wrap_local_keychain
  File "/home/chia/chia-blockchain/chia/daemon/keychain_proxy.py", line 8, in <module>
    from chia.cmds.init_funcs import check_keys
  File "/home/chia/chia-blockchain/chia/cmds/init_funcs.py", line 10, in <module>
    from chia.consensus.coinbase import create_puzzlehash_for_pk
  File "/home/chia/chia-blockchain/chia/consensus/coinbase.py", line 6, in <module>
    from chia.wallet.puzzles.p2_delegated_puzzle_or_hidden_puzzle import puzzle_for_pk
  File "/home/chia/chia-blockchain/chia/wallet/puzzles/p2_delegated_puzzle_or_hidden_puzzle.py", line 68, in <module>
    from .p2_conditions import puzzle_for_conditions
  File "/home/chia/chia-blockchain/chia/wallet/puzzles/p2_conditions.py", line 17, in <module>
    MOD = load_clvm("p2_conditions.clvm")
  File "/home/chia/chia-blockchain/chia/wallet/puzzles/load_clvm.py", line 105, in load_clvm
    return Program.from_bytes(bytes(load_serialized_clvm(clvm_filename, package_or_requirement=package_or_requirement)))
  File "/home/chia/chia-blockchain/chia/wallet/puzzles/load_clvm.py", line 91, in load_serialized_clvm
    compile_clvm(full_path, output, search_paths=[full_path.parent])
  File "/home/chia/chia-blockchain/chia/wallet/puzzles/load_clvm.py", line 71, in compile_clvm
    with Lockfile.create(pathlib.Path(tempfile.gettempdir()) / "clvm_compile" / full_path.name):
  File "/home/chia/chia-blockchain/chia/util/lock.py", line 29, in __enter__
    self.acquire(timeout=self.timeout, poll_interval=self.poll_interval)
  File "/home/chia/chia-blockchain/chia/util/lock.py", line 42, in acquire
    self._lock.acquire(timeout=timeout, poll_interval=poll_interval)
  File "/home/chia/chia-blockchain/venv/lib/python3.10/site-packages/filelock/_api.py", line 173, in acquire
    self._acquire()
  File "/home/chia/chia-blockchain/venv/lib/python3.10/site-packages/filelock/_unix.py", line 35, in _acquire
    fd = os.open(self._lock_file, open_mode)
PermissionError: [Errno 13] Permission denied: '/tmp/clvm_compile/p2_conditions.clvm.lock'

As workaround I hardcoded the path to /tmp/clvm_compile_1, but I think that could be solved better.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:15 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
neurosis69commented, Oct 28, 2022

I have cloned from main and it is working now! Thx for your support.

0reactions
altendkycommented, Oct 28, 2022

Thanks for the report and testing. :]

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found