I think Solzhenitsyn was right, Stalin thought Hitler was his "friend," as much as criminals like this can be friends, "honor among thieves" and all that. They had a mutual admiration society going for a while in the 1930s; I have no doubt Stalin suspected Hitler would "betray" him eventually (Stalin suspected all his "friends" of betrayal), but he thought it would come in 1942 and not in 1941.
It is very hard to understand Stalin's obstinacy in disregarding his own intelligence services and military reports from the front, as well as at least one warning from Churchill (I believe) that Nazi Germany was about to invade the Soviet Union in June 1941. Hard to understand, unless there was some element of personal psychology involved, as there so often was with Stalin (and with Hitler, for that matter).
It's hard to know for certain if Stalin actually did fall apart psychologically, in the aftermath of Operation Barbarossa, as Khrushchev describes in his memoirs. Khrushchev, like most great storytellers (I've been surrounded by them my whole life, so I know whereof I speak) tend to embellish the truth a great deal, to the extent that sooner or later the storyteller can no longer tell the difference between fact and fiction. Probably most of history is written this way, however, so I shouldn't be so picky.