iotaledger / inx-indexer

Apache License 2.0
1 stars 6 forks source link

Indexer crash #179

Open shufps opened 7 months ago

shufps commented 7 months ago

Indexer with Postgres crashed with this log outputs:

inx-indexer        | 2024-02-01T18:49:39Z   INFO    Indexer Starting API server ... done 
inx-indexer        | 2024-02-01T18:49:39Z   INFO            Applying slot 1365 with 0 new and 0 consumed outputs took 6ms 
inx-indexer        | 2024-02-01T18:49:39Z   INFO            Applying slot 1366 with 0 new and 0 consumed outputs took 2ms 
inx-indexer        | 2024-02-01T18:49:39Z   INFO            Applying slot 1367 with 0 new and 0 consumed outputs took 2ms 
inx-indexer        | 2024-02-01T18:49:39Z   INFO            Applying slot 1368 with 0 new and 0 consumed outputs took 2ms 
inx-indexer        | 2024-02-01T18:49:39Z   INFO            Applying slot 1369 with 0 new and 0 consumed outputs took 6ms 
inx-indexer        | 2024-02-01T18:49:39Z   INFO            Applying slot 1370 with 0 new and 0 consumed outputs took 2ms 
inx-indexer        | 2024-02-01T18:49:39Z   INFO            Applying slot 1371 with 0 new and 0 consumed outputs took 2ms 
inx-indexer        | 2024-02-01T18:49:39Z   INFO            Applying slot 1372 with 0 new and 0 consumed outputs took 2ms 
inx-indexer        | 2024-02-01T18:49:39Z   INFO            Applying slot 1373 with 0 new and 0 consumed outputs took 2ms 
inx-indexer        | 2024-02-01T18:49:39Z   WARNING         /scratch/pkg/indexer/multiaddress.go:103 ERROR: column reference "ref_count" is ambiguous (SQLSTATE 42702)
inx-indexer        | [0.244ms] [rows:0] INSERT INTO "multiaddresses" ("address_id","data","ref_count","uncommitted_ref_count") VALUES ('<binary>','<binary>',1,0) ON CONFLICT ("address_id") DO UPDATE SET "ref_count"=ref_count + 1,"uncommitted_ref_count"=uncommitted_ref_count + 0 
inx-indexer        | 2024-02-01T18:49:39Z   ERROR           ListenToLedgerUpdates failed: ERROR: column reference "ref_count" is ambiguous (SQLSTATE 42702) 
inx-indexer        | 2024-02-01T18:49:39Z   INFO    Indexer Stopping LedgerUpdates ... done 
inx-indexer        | 2024-02-01T18:49:39Z   INFO    Indexer Stopped Indexer 
inx-indexer        | 2024-02-01T18:49:39Z   WARNING Shutdown    App self-shutdown: Listening to LedgerUpdates failed, error: ERROR: column reference "ref_count" is ambiguous (SQLSTATE 42702); waiting (max 300 seconds) to finish processing ... 
inx-indexer        | 2024-02-01T18:49:39Z   INFO    Indexer     Stopping API ... 
inx-indexer        | 2024-02-01T18:49:39Z   INFO    Indexer     Stopping API ... done 
inx-indexer        | 2024-02-01T18:49:39Z   INFO    Indexer     Stopping AcceptedTransactions ... done 
inx-indexer        | 2024-02-01T18:49:39Z   INFO    INX         Stopped NodeBridge 
inx-indexer        | 2024-02-01T18:49:39Z   INFO    App         Shutdown complete! 
Thoralf-M commented 7 months ago

This happened for a transaction with this basic output that contains a multi address

{
    "type": 0,
    "amount": "18000",
    "mana": "756070",
    "unlockConditions": [
        {
            "type": 0,
            "address": {
                "type": 40,
                "addresses": [
                    {
                        "address": {
                            "type": 0,
                            "pubKeyHash": "0xf5a6c13e578cdaacf83621be515389920adf88bd59ceee4a613564762bd3bf1c"
                        },
                        "weight": 1
                    },
                    {
                        "address": {
                            "type": 8,
                            "accountId": "0x3a1301c810a62a2d25498b3175bde43407b3b215b146f373a4b7c7d2ad1e6249"
                        },
                        "weight": 1
                    }
                ],
                "threshold": 1
            }
        }
    ]
}
shufps commented 7 months ago

seems not to happen with sqlite (sync with empty databases):

inx-indexer        | 2024-02-01T19:00:10Z   INFO            Applying slot 1370 with 0 new and 0 consumed outputs took 0s 
inx-indexer        | 2024-02-01T19:00:10Z   INFO            Applying slot 1371 with 0 new and 0 consumed outputs took 0s 
inx-indexer        | 2024-02-01T19:00:10Z   INFO            Applying slot 1372 with 0 new and 0 consumed outputs took 0s 
inx-indexer        | 2024-02-01T19:00:10Z   INFO            Applying slot 1373 with 0 new and 0 consumed outputs took 0s 
inx-indexer        | 2024-02-01T19:00:10Z   INFO            Applying slot 1374 with 0 new and 0 consumed outputs took 0s 
inx-indexer        | 2024-02-01T19:00:10Z   INFO            Applying slot 1375 with 0 new and 0 consumed outputs took 0s 
inx-indexer        | 2024-02-01T19:00:10Z   INFO            Applying slot 1376 with 0 new and 0 consumed outputs took 0s 
shufps commented 7 months ago

on a 2nd frish sync with postgres it also didn't happen :thinking: