Skip to content

Errored subgraphs sometimes resume correctly after restart #3236

@aasseman

Description

@aasseman

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
Graph-node v0.25.0.

Some subgraph's indexing would hang up, declaring a deterministic error. But after one (or more) restarts of the graph-node, would resume with seemingly no issues. Observed on QmTBxvMF6YnbT1eYeRx9XQpH4WvxTV53vdptCCZFiZSprg (Enzyme) and Qmf5XXWA8zhHbdvWqtPcR3jFkmb5FLR4MAefEYx8E3pHfr (Graph network).

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
Index QmTBxvMF6YnbT1eYeRx9XQpH4WvxTV53vdptCCZFiZSprg or Qmf5XXWA8zhHbdvWqtPcR3jFkmb5FLR4MAefEYx8E3pHfr.

What is the expected behavior?
The error should really be deterministic. Here it seems that due to unknown factors, a subgraph can be stuck, then unstuck.

Logs for QmTBxvMF6YnbT1eYeRx9XQpH4WvxTV53vdptCCZFiZSprg:

Feb 08 03:02:22.060 DEBG Trying again after eth_call RPC call failed (attempt #1) with result Err(Web3Error(Transport("Error(IncompleteMessage)"))), block_hash: 0xc3b82bc6897a2f490c757dec90fa5ac07043b64e7e442822f8427b240ba8641e, block_number: 14162904, sgd: 10, subgraph_id: QmTBxvMF6YnbT1eYeRx9XQpH4WvxTV53vdptCCZFiZSprg, component: SubgraphInstanceManager 
Feb 09 08:02:03.161 ERRO Handler skipped due to execution failure, error: Critical error logged in mapping wasm backtrace: 0: 0x22bc - <unknown>!src/utils/logCritical/logCritical 1: 0x238b - <unknown>!src/entities/Release/createRelease 2: 0x2787 - <unknown>!src/entities/Release/ensureRelease 3: 0x2aeb - <unknown>!src/mappings/Dispatcher/handleCurrentFundDeployerSet , handler: handleCurrentFundDeployerSet, block_hash: 0x2d759b06d445f158b8b44d8f12d7803a2a3b3653e47f651cbbcbf60ab6e81a02, block_number: 14170674, sgd: 10, subgraph_id: QmTBxvMF6YnbT1eYeRx9XQpH4WvxTV53vdptCCZFiZSprg, component: SubgraphInstanceManager 
Feb 09 08:02:03.197 ERRO Subgraph error 1/1, code: SubgraphSyncingFailure, error: Critical error logged in mapping wasm backtrace: 0: 0x22bc - <unknown>!src/utils/logCritical/logCritical 1: 0x238b - <unknown>!src/entities/Release/createRelease 2: 0x2787 - <unknown>!src/entities/Release/ensureRelease 3: 0x2aeb - <unknown>!src/mappings/Dispatcher/handleCurrentFundDeployerSet in handler `handleCurrentFundDeployerSet` at block #14170674 (2d759b06d445f158b8b44d8f12d7803a2a3b3653e47f651cbbcbf60ab6e81a02), block_hash: 0x2d759b06d445f158b8b44d8f12d7803a2a3b3653e47f651cbbcbf60ab6e81a02, block_number: 14170674, sgd: 10, subgraph_id: QmTBxvMF6YnbT1eYeRx9XQpH4WvxTV53vdptCCZFiZSprg, component: SubgraphInstanceManager 
Feb 09 08:02:03.356 ERRO Subgraph instance failed to run: Critical error logged in mapping wasm backtrace: 0: 0x22bc - <unknown>!src/utils/logCritical/logCritical 1: 0x238b - <unknown>!src/entities/Release/createRelease 2: 0x2787 - <unknown>!src/entities/Release/ensureRelease 3: 0x2aeb - <unknown>!src/mappings/Dispatcher/handleCurrentFundDeployerSet in handler `handleCurrentFundDeployerSet` at block #14170674 (2d759b06d445f158b8b44d8f12d7803a2a3b3653e47f651cbbcbf60ab6e81a02), code: SubgraphSyncingFailure, sgd: 10, subgraph_id: QmTBxvMF6YnbT1eYeRx9XQpH4WvxTV53vdptCCZFiZSprg, component: SubgraphInstanceManager 
... index-node restart ...
Feb 09 19:06:55.128 INFO Reverting errored block, to_block_hash: 0x6427d445b10086a920ab36ff061e032dfbec9bc1fc83a77bd570bca5172f6026, to_block_number: 14170673, from_block_hash: 0x2d759b06d445f158b8b44d8f12d7803a2a3b3653e47f651cbbcbf60ab6e81a02, from_block_number: 14170674, subgraph_id: QmTBxvMF6YnbT1eYeRx9XQpH4WvxTV53vdptCCZFiZSprg, shard: primary, component: Store 
...
Feb 09 19:07:56.034 DEBG Requesting 0 block(s), sgd: 10, subgraph_id: QmTBxvMF6YnbT1eYeRx9XQpH4WvxTV53vdptCCZFiZSprg, component: BlockStream 
Feb 09 19:07:56.035 DEBG Processing 6 triggers, sgd: 10, subgraph_id: QmTBxvMF6YnbT1eYeRx9XQpH4WvxTV53vdptCCZFiZSprg, component: BlockStream 
Feb 09 19:07:56.038 DEBG 1 candidate trigger in this block, block_hash: 0x44142e5015a24d401615c1f75a523b97d4aa574828965ff5972511968cd9c8b5, block_number: 14170703, sgd: 10, subgraph_id: QmTBxvMF6YnbT1eYeRx9XQpH4WvxTV53vdptCCZFiZSprg, component: SubgraphInstanceManager 
Feb 09 19:07:56.091 INFO Done processing trigger, data_source: ChainlinkAggregatorDataSource, handler: handleAnswerUpdated, total_ms: 51, address: 0x37bc…a9e6, signature: AnswerUpdated(indexed int256,indexed uint256,uint256), block_hash: 0x44142e5015a24d401615c1f75a523b97d4aa574828965ff5972511968cd9c8b5, block_number: 14170703, sgd: 10, subgraph_id: QmTBxvMF6YnbT1eYeRx9XQpH4WvxTV53vdptCCZFiZSprg, component: SubgraphInstanceManager 
Feb 09 19:07:56.094 INFO Applying 6 entity operation(s), block_hash: 0x44142e5015a24d401615c1f75a523b97d4aa574828965ff5972511968cd9c8b5, block_number: 14170703, sgd: 10, subgraph_id: QmTBxvMF6YnbT1eYeRx9XQpH4WvxTV53vdptCCZFiZSprg, component: SubgraphInstanceManager 
Feb 09 19:07:56.418 DEBG 2 candidate triggers in this block, block_hash: 0x98a0a6323fe06e5486235853de27b8a10c0c5953e75bdb0a46d520a5174e66b0, block_number: 14170715, sgd: 10, subgraph_id: QmTBxvMF6YnbT1eYeRx9XQpH4WvxTV53vdptCCZFiZSprg, component: SubgraphInstanceManager 
... Indexing all the way to chain head without errors ...

Logs for Qmf5XXWA8zhHbdvWqtPcR3jFkmb5FLR4MAefEYx8E3pHfr:

Feb 05 22:12:55.147 ERRO Subgraph error 1/1, code: SubgraphSyncingFailure, error: Mapping aborted at src/types/schema.ts, line 1757, column 4, with message: Cannot save SubgraphDeployment entity without an ID wasm backtrace: 0: 0x28f2 - <unknown>!src/types/schema/SubgraphDeployment#save 1: 0x29cb - <unknown>!src/mappings/gns/handleSubgraphMetadataUpdated in handler `handleSubgraphMetadataUpdated` at block #13842506 (24cce9d54fb7d9ab6c41d83773fe5fb16e674a4ad28a36ce42c171d6e8216592), block_hash: 0x24cce9d54fb7d9ab6c41d83773fe5fb16e674a4ad28a36ce42c171d6e8216592, block_number: 13842506, sgd: 8, subgraph_id: Qmf5XXWA8zhHbdvWqtPcR3jFkmb5FLR4MAefEYx8E3pHfr, component: SubgraphInstanceManager 
Feb 05 22:12:55.256 ERRO Subgraph instance failed to run: Mapping aborted at src/types/schema.ts, line 1757, column 4, with message: Cannot save SubgraphDeployment entity without an ID wasm backtrace: 0: 0x28f2 - <unknown>!src/types/schema/SubgraphDeployment#save 1: 0x29cb - <unknown>!src/mappings/gns/handleSubgraphMetadataUpdated in handler `handleSubgraphMetadataUpdated` at block #13842506 (24cce9d54fb7d9ab6c41d83773fe5fb16e674a4ad28a36ce42c171d6e8216592), code: SubgraphSyncingFailure, sgd: 8, subgraph_id: Qmf5XXWA8zhHbdvWqtPcR3jFkmb5FLR4MAefEYx8E3pHfr, component: SubgraphInstanceManager 
... restart index-node ...
Feb 09 19:06:52.054 INFO Reverting errored block, to_block_hash: 0x26a7dab59ab3ea10145c99c1af169c320310299a46d74f0cf81f74d9f8077217, to_block_number: 13842505, from_block_hash: 0x24cce9d54fb7d9ab6c41d83773fe5fb16e674a4ad28a36ce42c171d6e8216592, from_block_number: 13842506, subgraph_id: Qmf5XXWA8zhHbdvWqtPcR3jFkmb5FLR4MAefEYx8E3pHfr, shard: primary, component: Store 
... indexing all the way to chain head without errors ...

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions