The session state is considered "Pending" when FA2 has seen a logon and a trading message from one party, but not from the other.
For the session state to move from Pending to Up, FA2 needs to see a logon from each side with no logout in between.
When FA2 is restarted it is likely to read the files one at a time, so that the messages are not seen in their correct sequence.
After reading the first file (it doesn't matter much which this is, because they have almost the same sequence of messages), the session state is Pending, because FA2 has seen a logon and a trading message from one party, but not from the other. As it reads the second file, when it sees the logout (35=5), this effectively cancels the pending logon from the first party and from then on it sees a logon and a trading message only from the second party, so the state is still Pending.
The INVMGR is also expected to have a logon entry:
If this is not detected, then the status will be Pending.