What is the longest blockchain fork that has been orphaned to date? The orphaned blocks view from BlockChain.info shows a recent fork of the blockchain (starting with block 173,928) that went four blocks long before being orphaned.

Other than the controlled rewind following the Value Overflow bug in August 2010 in which 53 blocks were orphaned, is there a fork of blocks orphaned as long or longer than this one that occurred at 173,928?
Short answer: 4 [Prior to the March 12, 2013 fork]

The Value Overflow incident seems to be the longest ever blockchain split. The problem with blockchain forks is that once they are resolved the only trace they leave is a log entry.

To reconstruct the following I used the printblocktree output that theymos gave me in this question and the information from Blockchain.info.

As far as I can see from the printblocktree there have been 90 blockchain forks observed by theymos in the blockchainrange [90392-189512].
This dataset has the following forks:


1x block length 4 (starting from block 174161)
1x block length 3 (starting from block 174120)
4x block length 2 (starting from blocks 93669, 174233, 179217 and 179639)
87x block length 1 (starting from blocks 90392, 90676, 90858, 91405, 92094, 93047, 93088, 93619, 93642, 93669, 93670, 93671, 93855, 94671, 98529, 99365, 100740, 101902, 102674, 105401, 109912, 117103, 118553, 120406, 123583, 128501, 130077, 130200, 155180, 157929, 161673, 162257, 163959, 165439, 165519, 166890, 167283, 167620, 167742, 167863, 168920, 169517, 171064, 173494, 174102, 174104, 174121, 174174, 174182, 174185, 174187, 174232, 174242, 174291, 174307, 174313, 174330, 174343, 174414, 174452, 174531, 174593, 174605, 175998, 176210, 176478, 177854, 178119, 178293, 179791, 179890, 180143, 181230, 181591, 181618, 182210, 182321, 183193, 183405, 183500, 183519, 184932, 186561, 187866, 188347, 188682 and 189512)


Blockchain.info does have quite a few more orphans in their database, apparently because they connect to a lot more nodes, but their history does not go back as far as theymos' printblocktree.
The first blockchain fork that bitcoin.info observed was based on block 142257 since then we observed 540 forks:


2x block length 4 (starting from blocks 174161 and 173927)
4x block length 3 (starting from blocks 174120, 174056, 174050 and 173956)
14x block length 2 (starting from blocks 183873, 179639, 179217, 176924, 175847, 175226, 174233, 174093, 173988, 173985, 173691, 170059, 165518 and 155180)
520x block length 1 (far too many to put them here...)


The problem is quite evident: while both see forks, theymos' set has a smaller view of the network and misses or misinterprets forks (the one starting from 155180 is marked as a length 1 fork in the first results and as a length 2 in the second). We cannot be sure that blockchain.info catches all of the forks but we can be pretty certain that there was no fork longer than 4, as the fork would survive longer and would be seen by more nodes.