Skip to content
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

Skaled reports false error while starting with full data_dir #2036

Open
OleksanderSalamatov opened this issue Nov 5, 2024 · 0 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@OleksanderSalamatov
Copy link

When skaled starts, it check if the data_dir is full or occupied by another process, it checks if free space on the data_dir is less then 1Kb, and if not, it prints that database is already opened.
The problem reproduces when free space on data_dir is more then 1Kb, but still not enough for skaled operation, after that skaled reporting that database is already opened, which is not true.

The probles is in this part of skaled

if ( fs::space( chainPath / fs::path( "blocks_and_extras" ) ).available < 1024 ) {
cwarn << "Not enough available space found on hard drive. Please free some up and then "
"re-run. Bailing.";
BOOST_THROW_EXCEPTION( NotEnoughAvailableSpace() );
} else {
cwarn << "Database " << ( chainPath / fs::path( "blocks_and_extras" ) ) << "or "
<< ( extrasPath / fs::path( "extras" ) )
<< "already open. You appear to have another instance of ethereum running. "
"Bailing.";
BOOST_THROW_EXCEPTION( DatabaseAlreadyOpen() );
}
}

Logs:

root@Regression-2:/mnt/schains-thirsty-miserable-hamal/28e07f34/blocks_and_extras/0.db# df -h | grep /mnt/schains-thirsty-miserable-hamal
/dev/mapper/schains-thirsty--miserable--hamal                 21G   21G  4.0K 100% /mnt/schains-thirsty-miserable-hamal


root@Regression-2:/mnt/schains-thirsty-miserable-hamal/28e07f34/blocks_and_extras/0.db# cat LOG
2024/11/05-13:51:07.087974 140656546023424 Recovering log #214
2024/11/05-13:51:07.094617 140656546023424 Level-0 table #240: started
2024/11/05-13:51:07.098773 140656546023424 Level-0 table #240: 0 bytes IO error: /data_dir/28e07f34/blocks_and_extras/0.db/000240.ldb: No space left on device
2024-11-05 13:51:07.084483   Setting ExitTimeReached = false
2024-11-05 13:51:07.084491   Skaled status: setExitState: ExitTimeReached to false
2024-11-05 13:51:07.084860   Time to (re)open LevelDB at /data_dir/28e07f34/blocks_and_extras/0.db
2024-11-05 13:51:07.099043   Database "/data_dir/28e07f34/blocks_and_extras"or "/data_dir/28e07f34/12041/extras"already open. You appear to have another instance of ethereum running. Bailing.
2024-11-05 13:51:07.099383   CRITICAL Error creating blockchain --- /home/s5/actions-runner-2/_work/skaled/skaled/libethereum/BlockChain.cpp(262): Throw in function void dev::eth::BlockChain::open(const boost::filesystem::path&, bool, dev::WithExisting)
Dynamic exception type: boost::exception_detail::clone_impl<dev::eth::DatabaseAlreadyOpen>
 --- 
2024-11-05 13:51:07.099418   
  /skaled/skaled : ()+0x725550 [0x560c2b82e550]
  /lib/x86_64-linux-gnu/libc.so.6 : __libc_start_main()+0xf3 [0x7fed27b7f083]
  /skaled/skaled : _start()+0x2e [0x560c2ba658ce]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

2 participants