-
Notifications
You must be signed in to change notification settings - Fork 547
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
Error message is bad if permissions are wrong in /tmp
#14346
Comments
It actually seems to fail because of incorrect file-system permissions: ["Unix.Unix_error","Permission denied","mkdir","((dirname /tmp/coda_cache_dir/e26e2349-685a-309c-2479-81dc5157aa2f) (perm 0o777))"] |
Still, if it throws an unhandled exception like this, doesn't that mean it's a bug? Is it a case that needs to be handled? |
At least not in functional way I'd say. Maybe better error message. In this case application throws to notify you that something went wrong and this something is not under the app's control, like any other applications, that rely on file system to operate correctly, will do. |
Yes, I guess it might make sense to handle it and write a more accurate error message. By the way, if you don't handle this, the "issue" will continue to be opened by people related to this. Because the error message will continue to contain this message; "The Mina Protocol developers would like to know why!" |
/tmp
Preliminary Checks
Description
I encountered an error that I think may be related to the MINA_TIME_OFFSET environment variable. I am sharing the detailed log of the error below.
Started Mina Daemon Service.
Oct 15 15:01:48 mna-1 mina[7178]: {"timestamp":"2023-10-15 15:01:48.756643Z","level":"Info","source":{"module":"Mina_cli_entrypoint","location":"File "src/app/cli/src/cli_entrypoint/mina_cli_entrypoint.ml", line 559, characters 8-19"},"message":"Mina daemon is booting up; built with commit $commit on branch $branch","metadata":{"branch":"rampup","commit":"55b78189c46e1811b8bdb78864cfa95409aeb96a","commit_date":"2023-10-11T18:26:29+02:00","marlin_commit":"fd7c19d4c5dbb6826d1d5ce6bc24796a44087f70"}}
Oct 15 15:01:48 mna-1 mina[7178]: {"timestamp":"2023-10-15 15:01:48.758277Z","level":"Info","source":{"module":"Mina_lib__Conf_dir","location":"File "src/lib/mina_lib/conf_dir.ml", line 21, characters 10-21"},"message":"Created daemon lockfile $lockfile","metadata":{"lockfile":"/home/kadiralan/.mina-config/.mina-lock"}}
Oct 15 15:01:48 mna-1 mina[7178]: {"timestamp":"2023-10-15 15:01:48.758588Z","level":"Info","source":{"module":"Exit_handlers","location":"File "src/lib/exit_handlers/exit_handlers.ml", line 28, characters 2-13"},"message":"Registering async shutdown handler: $description","metadata":{"description":"Remove daemon lockfile"}}
Oct 15 15:01:48 mna-1 mina[7178]: {"timestamp":"2023-10-15 15:01:48.758816Z","level":"Info","source":{"module":"Mina_cli_entrypoint","location":"File "src/app/cli/src/cli_entrypoint/mina_cli_entrypoint.ml", line 567, characters 10-21"},"message":"Daemon will expire at $exp","metadata":{"exp":"2024-12-10 14:00:00-07:00"}}
Oct 15 15:01:48 mna-1 mina[7178]: {"timestamp":"2023-10-15 15:01:48.759081Z","level":"Info","source":{"module":"Mina_cli_entrypoint","location":"File "src/app/cli/src/cli_entrypoint/mina_cli_entrypoint.ml", line 580, characters 8-19"},"message":"Booting may take several seconds, please wait","metadata":{}}
Oct 15 15:01:48 mna-1 mina[7178]: Using libp2p keypair private-key password from environment variable MINA_LIBP2P_PASS
Oct 15 15:01:49 mna-1 mina[7178]: {"timestamp":"2023-10-15 15:01:49.282466Z","level":"Info","source":{"module":"Mina_cli_entrypoint","location":"File "src/app/cli/src/cli_entrypoint/mina_cli_entrypoint.ml", line 700, characters 12-23"},"message":"Reading configuration files $config_files","metadata":{"config_files":["/var/lib/coda/config_55b78189.json","/home/kadiralan/.mina-config/daemon.json"]}}
Oct 15 15:01:50 mna-1 mina[7178]: {"timestamp":"2023-10-15 15:01:50.323575Z","level":"Warn","source":{"module":"Mina_cli_entrypoint","location":"File "src/app/cli/src/cli_entrypoint/mina_cli_entrypoint.ml", line 721, characters 24-35"},"message":"Could not read configuration from $config_file","metadata":{"config_file":"/home/kadiralan/.mina-config/daemon.json","error":{"commit_id":"55b78189c46e1811b8bdb78864cfa95409aeb96a","exn_name":"Async_kernel__Monitor.Error_","exn":["monitor.ml.Error",["Unix.Unix_error","No such file or directory","open","((filename /home/kadiralan/.mina-config/daemon.json) (mode (O_RDONLY O_CLOEXEC)) (perm 0o0))"],["Raised at Base__Result.ok_exn in file "src/result.ml", line 201, characters 17-26","Called from Async_kernel__Deferred1.M.map.(fun) in file "src/deferred1.ml", line 17, characters 40-45","Called from Async_kernel__Job_queue.run_job in file "src/job_queue.ml" (inlined), line 128, characters 2-5","Called from Async_kernel__Job_queue.run_jobs in file "src/job_queue.ml", line 169, characters 6-47","Caught by monitor try_with_or_error at file "src/lib/genesis_ledger_helper/genesis_ledger_helper.ml", line 815, characters 34-34"]]}}}
Oct 15 15:01:50 mna-1 mina[7178]: {"timestamp":"2023-10-15 15:01:50.678761Z","level":"Info","source":{"module":"Genesis_ledger_helper","location":"File "src/lib/genesis_ledger_helper/genesis_ledger_helper.ml", line 840, characters 2-13"},"message":"Initializing with runtime configuration. Ledger name: $name","metadata":{"accounts_omitted":200000,"config":{"genesis":{"genesis_state_timestamp":"2023-10-17T16:01:01Z"},"ledger":{"name":"berkeley-ITN"}},"name":"berkeley-ITN"}}
Oct 15 15:01:50 mna-1 mina[7178]: {"timestamp":"2023-10-15 15:01:50.678896Z","level":"Info","source":{"module":"Genesis_ledger_helper","location":"File "src/lib/genesis_ledger_helper/genesis_ledger_helper.ml", line 868, characters 8-19"},"message":"Using the compiled constraint constants","metadata":{}}
Oct 15 15:01:51 mna-1 mina[7178]: {"timestamp":"2023-10-15 15:01:51.570670Z","level":"Fatal","source":{"module":"Mina_cli_entrypoint","location":"File "src/app/cli/src/cli_entrypoint/mina_cli_entrypoint.ml", line 760, characters 16-28"},"message":"Failed initializing with configuration $config: $error","metadata":{"accounts_omitted":200000,"config":{"genesis":{"genesis_state_timestamp":"2023-10-17T16:01:01Z"},"ledger":{"name":"berkeley-ITN"}},"error":{"commit_id":"55b78189c46e1811b8bdb78864cfa95409aeb96a","exn_name":"Async_kernel__Monitor.Error_","exn":["monitor.ml.Error",["Unix.Unix_error","Permission denied","mkdir","((dirname /tmp/coda_cache_dir/e26e2349-685a-309c-2479-81dc5157aa2f) (perm 0o777))"],["Raised at Core__Core_unix.improve in file "src/core_unix.ml", line 46, characters 4-43","Called from Core__Core_unix.mkdir_p.mkdir_idempotent in file "src/core_unix.ml", line 1481, characters 10-25","Called from Core__Core_unix.mkdir_p in file "src/core_unix.ml", line 1487, characters 8-34","Called from Merkle_ledger__Database.Make.create in file "src/lib/merkle_ledger/database.ml", line 84, characters 4-26","Called from Mina_ledger__Ledger.Ledger_inner.create in file "src/lib/mina_ledger/ledger.ml" (inlined), line 189, characters 16-53","Called from Genesis_ledger.Make.t in file "src/lib/genesis_ledger/genesis_ledger.ml", line 124, characters 16-39","Called from CamlinternalLazy.force_lazy_block in file "camlinternalLazy.ml", line 31, characters 17-27","Re-raised at CamlinternalLazy.force_lazy_block in file "camlinternalLazy.ml", line 36, characters 4-11","Called from Base__Lazy.map in file "src/lazy.ml", line 17, characters 23-32","Called from CamlinternalLazy.force_lazy_block in file "camlinternalLazy.ml", line 31, characters 17-27","Re-raised at CamlinternalLazy.force_lazy_block in file "camlinternalLazy.ml", line 36, characters 4-11","Called from Genesis_ledger_helper.Ledger.load.(fun) in file "src/lib/genesis_ledger_helper/genesis_ledger_helper.ml", line 384, characters 29-72","Called from Async_kernel__Deferred0.bind.(fun) in file "src/deferred0.ml", line 54, characters 64-69","Called from Async_kernel__Job_queue.run_job in file "src/job_queue.ml" (inlined), line 128, characters 2-5","Called from Async_kernel__Job_queue.run_jobs in file "src/job_queue.ml", line 169, characters 6-47","Caught by monitor try_with_join_or_error at file "src/lib/genesis_ledger_helper/genesis_ledger_helper.ml", line 320, characters 41-41"]]}}}
Oct 15 15:01:51 mna-1 mina[7178]: {"timestamp":"2023-10-15 15:01:51.570868Z","level":"Info","source":{"module":"Node_error_service","location":"File "src/lib/node_error_service/node_error_service.ml", line 111, characters 10-21"},"message":"Could not send error report: mina instance has not been created yet.","metadata":{}}
Oct 15 15:01:51 mna-1 mina[7178]: {"timestamp":"2023-10-15 15:01:51.570979Z","level":"Fatal","source":{"module":"Init__Mina_run","location":"File "src/app/cli/src/init/mina_run.ml", line 670, characters 2-26"},"message":"Unhandled top-level exception: $exn\nGenerating crash report","metadata":{"exn":{"commit_id":"55b78189c46e1811b8bdb78864cfa95409aeb96a","sexp":["monitor.ml.Error",["Unix.Unix_error","Permission denied","mkdir","((dirname /tmp/coda_cache_dir/e26e2349-685a-309c-2479-81dc5157aa2f) (perm 0o777))"],["Raised at Core__Core_unix.improve in file "src/core_unix.ml", line 46, characters 4-43","Called from Core__Core_unix.mkdir_p.mkdir_idempotent in file "src/core_unix.ml", line 1481, characters 10-25","Called from Core__Core_unix.mkdir_p in file "src/core_unix.ml", line 1487, characters 8-34","Called from Merkle_ledger__Database.Make.create in file "src/lib/merkle_ledger/database.ml", line 84, characters 4-26","Called from Mina_ledger__Ledger.Ledger_inner.create in file "src/lib/mina_ledger/ledger.ml" (inlined), line 189, characters 16-53","Called from Genesis_ledger.Make.t in file "src/lib/genesis_ledger/genesis_ledger.ml", line 124, characters 16-39","Called from CamlinternalLazy.force_lazy_block in file "camlinternalLazy.ml", line 31, characters 17-27","Re-raised at CamlinternalLazy.force_lazy_block in file "camlinternalLazy.ml", line 36, characters 4-11","Called from Base__Lazy.map in file "src/lazy.ml", line 17, characters 23-32","Called from CamlinternalLazy.force_lazy_block in file "camlinternalLazy.ml", line 31, characters 17-27","Re-raised at CamlinternalLazy.force_lazy_block in file "camlinternalLazy.ml", line 36, characters 4-11","Called from Genesis_ledger_helper.Ledger.load.(fun) in file "src/lib/genesis_ledger_helper/genesis_ledger_helper.ml", line 384, characters 29-72","Called from Async_kernel__Deferred0.bind.(fun) in file "src/deferred0.ml", line 54, characters 64-69","Called from Async_kernel__Job_queue.run_job in file "src/job_queue.ml" (inlined), line 128, characters 2-5","Called from Async_kernel__Job_queue.run_jobs in file "src/job_queue.ml", line 169, characters 6-47","Caught by monitor try_with_join_or_error at file "src/lib/genesis_ledger_helper/genesis_ledger_helper.ml", line 320, characters 41-41"]],"backtrace":["Raised at Base__Error.raise in file "src/error.ml" (inlined), line 8, characters 14-30","Called from Mina_cli_entrypoint.setup_daemon.(fun).mina_initialization_deferred.(fun) in file "src/app/cli/src/cli_entrypoint/mina_cli_entrypoint.ml", line 767, characters 16-31","Called from Async_kernel__Deferred1.M.map.(fun) in file "src/deferred1.ml", line 17, characters 40-45","Called from Async_kernel__Job_queue.run_job in file "src/job_queue.ml" (inlined), line 128, characters 2-5","Called from Async_kernel__Job_queue.run_jobs in file "src/job_queue.ml", line 169, characters 6-47"]}}}
Oct 15 15:01:51 mna-1 mina[7178]: {"timestamp":"2023-10-15 15:01:51.573741Z","level":"Warn","source":{"module":"Init__Mina_run","location":"File "src/app/cli/src/init/mina_run.ml", line 103, characters 6-17"},"message":"Shutdown before Coda instance was created, not saving a visualization","metadata":{"coda_run":"Logging state before program ends"}}
Oct 15 15:01:51 mna-1 mina[7178]: Environment variable MINA_TIME_OFFSET not found, using default of 0
Oct 15 15:01:51 mna-1 mina[7178]: ☠ Mina Daemon crashed.
Oct 15 15:01:51 mna-1 mina[7178]: The Mina Protocol developers would like to know why!
Oct 15 15:01:51 mna-1 mina[7178]: Please:
Oct 15 15:01:51 mna-1 mina[7178]: Open an issue:
Oct 15 15:01:51 mna-1 mina[7178]: https://github.com/MinaProtocol/mina/issues/new
Oct 15 15:01:51 mna-1 mina[7178]: Briefly describe what you were doing and attach the crash report /home/kadiralan/.mina-config/coda_crash_report_2023-10-15_15-01-51.573381.tar.gz
Oct 15 15:01:51 mna-1 mina[7178]:
Oct 15 15:01:51 mna-1 systemd[1606]: mina.service: Main process exited, code=exited, status=1/FAILURE
Oct 15 15:01:51 mna-1 systemd[1606]: mina.service: Failed with result 'exit-code'.
Steps to Reproduce
1 - Create a new user
2- try to run node for block production role under this user
3 - observe the following error
Expected Result
The following error should not be encountered and the node should run successfully
Actual Result
Below error occurs
: Environment variable MINA_TIME_OFFSET not found, using default of 0
Oct 15 15:01:51 mna-1 mina[7178]: ☠ Mina Daemon crashed.
How frequently do you see this issue?
Rarely
What is the impact of this issue on your ability to run a node?
High
Status
Additional information
No response
The text was updated successfully, but these errors were encountered: