Is an eth transaction guaranteed to be processed at some time? In other words: Can a transaction be pending indefinitely or will it eventually be canceled, forgotten, or confirmed (by the network?!?)?
When you broadcast a transaction, it is added to to a client's transaction pool (parity calls it transaction queue). This transaction pool is of finite size and once it reaches full capacity, nodes discard transactions according to a fairly complex set of rule including gas price, transaction age etc. In geth, you can configure these rules when starting the client:
TRANSACTION POOL OPTIONS: --txpool.nolocals Disables price exemptions for locally submitted transactions --txpool.journal value Disk journal for local transaction to survive node restarts (default: "transactions.rlp") --txpool.rejournal value Time interval to regenerate the local transaction journal (default: 1h0m0s) --txpool.pricelimit value Minimum gas price limit to enforce for acceptance into the pool (default: 1) --txpool.pricebump value Price bump percentage to replace an already existing transaction (default: 10) --txpool.accountslots value Minimum number of executable transaction slots guaranteed per account (default: 16) --txpool.globalslots value Maximum number of executable transaction slots for all accounts (default: 4096) --txpool.accountqueue value Maximum number of non-executable transaction slots permitted per account (default: 64) --txpool.globalqueue value Maximum number of non-executable transaction slots for all accounts (default: 1024) --txpool.lifetime value Maximum amount of time non-executable transaction are queued (default: 3h0m0s)
e.g. when your transaction's gas price is too low, it will eventually be discarded and if that happens in all nodes, before a successful miner has included it in a block, your transaction is gone (and you can resend with same nonce). It's also possible that your transaction is discarded from node A's transaction pool, but node B still has it and 'recirculates' it to A after it's discarded it. Each node can have different rules of how they discard transactions when the transaction pool reaches max capacity