ChainMovers / suibase

Sui development environment and cookbook.
https://suibase.io
Apache License 2.0
35 stars 6 forks source link

[bug] `localnet start` failing #69

Closed FrankC01 closed 11 months ago

FrankC01 commented 1 year ago

I have a sui repo setup where I pull down the latest (git pull) I then build (cargo build --locked --bin sui --bin sui-faucet) Then localnet start - Which works fine

I do this for testing delta's from the last build in pysui development.

I then do localnet stop

To test a branch in the repo I then do git checkout <BRANCH_NAME> Do the build (works OK)

However; if doing locanet start again I received this today:

localnet start
Starting localnet process
..............................(may take some time on slower system)........................
Sui process not responding. Try again? (may be the host is too slow?).
fastfrank@~/suibase/workdirs/mnet/sui $ localnet status
localnet DOWN
---
localnet process : DEAD
faucet process   : DEAD
---
client version: sui 1.5.0-62d796190f
asui selection: [ localnet ]
set-sui-repo  : /Users/fastfrank/suibase/workdirs/mnet/sui
fastfrank@~/suibase/workdirs/mnet/sui $ localnet start
Starting localnet process
./Users/fastfrank/suibase/scripts/common/__globals.sh: line 1114: 81473 Segmentation fault: 11  "$SUI_BIN_DIR/sui" start --network.config "$NETWORK_CONFIG" >&"$CONFIG_DATA_DIR/sui-process.log"
...........^C

I killed it. I think this may be the daemon not acting nice.

mario4tier commented 1 year ago

I could not reproduce (tried a few variations with latest suibase and devnet branch).

One thing to try:

After you do your own manual rebuild of the binaries do a "localnet regen" to wipe out the existing database.

What we want to see here is that "Clearing existing localnet data":

~/my_repos/sui/target$ localnet regen
Clearing existing localnet data
Skipping git clone/fetch/pull because set-sui-repo is set.
...

When everything is already built and the database already exists a "localnet start/stop" just do one thing... it starts/stops the sui process. It does not do that "clearing" step.

May be right now you have on your setup a mix of incompatible DB and binary?

mario4tier commented 1 year ago

The sui process is segfaulting after ~1 second of being started (because there is only one "." displayed).

The Ctrl-C just kill the script loop waiting hopelessly to see if it will ever become alive.

May be there is a hint of the problem in: ~/suibase/workdirs/localnet/config/sui-process.log

FrankC01 commented 12 months ago

I have not been able to reproduce as I've been regen when I do a repo switch or updated pull from github on Sui.