paritytech / parity-db

Experimental blockchain database
Apache License 2.0
263 stars 59 forks source link

IO Error: Access is denied. (os error 5) during Substrate block import (Windows) #231

Closed nazar-pc closed 8 months ago

nazar-pc commented 8 months ago

Sort of a follow-up to https://github.com/paritytech/parity-db/issues/226.

Fresh node starts fine, but after importing some blocks throws that error:

2023-10-25T11:46:42.756325Z  INFO tokio-runtime-worker substrate: [Consensus] ÔÜÖ´©Å  Syncing  6.9 bps, target=#17704 (12 peers), best: #6529 (0x2862ÔǪf0c3), finalized #0 (0xc9faÔǪcade), Ô¼ç 286.3kiB/s Ô¼å 0.4kiB/s    
2023-10-25T11:46:47.769238Z  INFO tokio-runtime-worker substrate: [Consensus] ÔÜÖ´©Å  Syncing  4.5 bps, target=#17705 (12 peers), best: #6552 (0xeb37ÔǪ63c7), finalized #0 (0xc9faÔǪcade), Ô¼ç 14.2kiB/s Ô¼å 0.1kiB/s    
2023-10-25T11:46:52.770222Z  INFO tokio-runtime-worker substrate: [Consensus] ÔÜÖ´©Å  Syncing  5.6 bps, target=#17706 (12 peers), best: #6580 (0x4e6aÔǪ9e8d), finalized #0 (0xc9faÔǪcade), Ô¼ç 19.1kiB/s Ô¼å 0    
2023-10-25T11:46:55.505833Z  WARN ThreadId(11) parity-db: Background worker error: IO Error: Access is denied. (os error 5)    
2023-10-25T11:46:56.009979Z  WARN tokio-runtime-worker sc_service::client::client: [Consensus] Block import error: Database error: Background worker error: IO Error: Access is denied. (os error 5)    
2023-10-25T11:46:57.240229Z  WARN tokio-runtime-worker sync: [Consensus] ­ƒÆö Error importing block 0x03ee50de6315c399325e9740e26d82097662b086bf923b3f96f2264ee2b6fbf6: consensus error: Import failed: Database error: Background worker error: IO Error: Access is denied. (os error 5)    
2023-10-25T11:46:57.246174Z  WARN tokio-runtime-worker sync: [Consensus] ­ƒÆö Error importing block 0x2a4d0b780c76374e13c68de04ad111e2ee5576b0b0ff53dbecfe934ff69f4716: block has an unknown parent    

My intuition is that parity-db is doing some operation as the database gets bigger, so it doesn't happen at the start, but rather a bit later.

This is using parity-db 0.4.12.

nazar-pc commented 8 months ago

@arkpar will you have time to look at this in the near future?

arkpar commented 8 months ago

Can't reproduce it with the DB stress tool on windows.

I assume by node you mean subspace-node? How exactly do I trigger this? --dev produces no blocks and --chain=gemini-3f panics with "not implemented". How many blocks are imported before this happens? Also, how much RAM does this machine have?

nazar-pc commented 8 months ago

--chain devnet is what we use on main, we're preparing for next Gemini 3 version right now. 6603 were imported, I will ask about RAM, but it was not running out of memory.

arkpar commented 8 months ago

Can't reproduce. Synced 24k blocks with no issues. Are you sure this is with parity-db 0.4.12? subspace master still uses 0.4.11 https://github.com/subspace/subspace/blob/main/Cargo.lock#L7619

nazar-pc commented 8 months ago

Hm... my apologies! I have no idea how it happened that main is using 0.4.11, will upgrade to 0.4.12 now and test again.

nazar-pc commented 8 months ago

False report, closing