Deceptively simple mass-spring problem? This question is inspired by two other, similar, so far unanswered questions (posed by different OPs).

Mass $m_2$ sits on a incline with angle $\theta$ that provides just enough friction for it not to start sliding down. It is connected by a massless string $S$ and perfect spring (with Hookean spring constant $k$) to mass $m_1$. Pulley $P$ is frictionless and massless. At $t=0$ the spring is not extended at all. Then $m_1$ is released.
Question:
What is the minimum $m_1$ to cause movement of $m_2$ up the incline?
Attempt:
Ignore the spring.
Determine static coefficient $\mu$ first.
\begin{align}m_2g\sin \theta &=\mu m_2g\cos \theta\\ \implies \mu &=\tan \theta\end{align}
To overcome the $m_2g$ component parallel to the inclined and the friction:
\begin{align}m_1g &\gt\mu m_2g\cos \theta+m_2g\sin \theta\\ \implies m_1 &\gt 2m_2\sin \theta\end{align}
But apparently this overestimates $m_1$. It has to be taken into account that $m_1$ starts accelerating before $m_2$ starts moving, because of the spring.
But how? Like several other members I can't see how the work done on the spring affects the minimum $m_1$. Conservation of energy?
 A: Got it.
As $m_1$ drops, gravitational potential energy is converted to spring potential energy:
$$m_1gy=\frac12 k\ell^2$$
Where $y=\ell$ because the string doesn't stretch.
The maximum drop is:
$$y_\textrm{max}=\frac{2m_1g}{k}$$
Maximum tension in the spring then is:
$$T_\textrm{max}=ky_\textrm{max}=2m_1g$$
For $m_2$ to move:
\begin{align}2m_1g &\gt 2m_2g\sin\theta\\ \implies m_1 &\gt m_2\sin\theta\end{align}
If that condition isn't met, $m_2$ won't move and $m_1$ will start moving upwards again and enter an oscillatory motion.
A: If $m_1$ is too small. The mass fall down and bounces back up. The force on the masses is highest at the lowest point of the bounce. A mass that is just large enough will also bounce back but at the lowest point of the bounce the force will just be large enough to move $m_2$. So we have to find an expression for the force at the lowest point.
Using conservation of energy you can find how far the mass falls by equating the loss in gravitational energy with the gain in energy stored in the spring. From there I guess you should be able to figure it out
A: Let me try to do this without using any formulas. First consider what would happen if $m_2$ were glued to the incline. Then we would have a simple harmonic oscillator consisting of $m_1$ suspended from the spring $k$ (clearly it does not matter on which side of the pulley the spring is). In this situation the average tension force (over a full oscillation) of the spring must equal the weight of $m_1$, by conservation of momentum.
The initial position corresponds to the topmost position of the oscillation, and it is given that the spring has zero tension in this position. Then to get the predicted average over an oscillation, the tension must be twice the weight of $m_1$ halfway the oscillation, when $m_2$ is at its lowest position.
Since this is the largest tension that occurs during the cycle, the situation where $m_2$ is not glued to the surface will change as soon as this maximal tension is sufficient to make it start to slide upward. It follows that your original static computation overestimates the required mass of $m_1$ by a factor$~2$.
A: You have derived an equation which predicts the minimum force $F_{\text{min}}$ required to get the block $m_2$ moving up the slope.
$$F_{\text{min}} = \mu m_2g\cos \theta+m_2g\sin \theta$$
Until the tension in the string is equal to that value of force the block $m_2$ will not move so the spring mass $m_1$ system can be thought of a a standard spring-mass system with block $m_2$ being the rigid support.  
The static equilibrium position of the spring-mass $m_1$ system is when $m_1 g - k l =0$ where $k$ is the spring constant and $l$ is the static extension of the spring.
When mass $m_1$ is released the magnitude of the force at both ends of the spring increases as the spring stretches.
However the mass $m_1$ overshoots the static extension position and continues on downwards until the extension of the spring is a maximum, $= 2l$, and hence the force on each end of the spring is $2k_l = 2 m_1g$ where the mass $m_1$ stops.
This is the maximum force exerted by the spring on block $m_2$ via the string and is your required $F_{\text{min}}$.
A: You can certainly do it by conservation of energy, but I doubt that will give you the intuitive feel that you are looking for.
So, instead, let's walk through the sequence of event when you let go of the hanging mass ($m_1$).


*

*The hanging mass ($m_1$) starts to fall; the spring begins to extend. It is now exerting a small force up-slope on $m_2$ and a small upward force on $m_1$, but the amount of force is less than either the weight of $m_1$ or the static friction on $m_2$. (Here I assume the pulley is light and low friction so the tensile forces are the same at both ends.) As a result, $m_1$ is picking up speed downward.

*As $m_1$ accelerates downward the spring stretches more and the two forces grow. We'll end this "stage" at the point where the force from the spring equals the weight of $m_1$. Keep in mind that $m_1$ has been accelerating downward until the end of this stage. I'll assume the force is still less than the static friction or the problem isn't interesting.

*The spring keeps stretching (and the tension keeps growing, so it now exceeds the weight of $m_1$) because $m_1$ is still moving down; however, $m_1$ now has a upward acceleration: it is slowing its downward rush.

*If the sliding block doesn't budge, then the maximum tensile force will occur when $m_1$ gets as far down as possible, which means when its speed drops to zero - simply because at that point it turns around and the spring starts getting less extended. This force has a very simple relationship to the weight of $m_1$. 
Can you see what that maximum force must be?
A: The key to this is the fact that the spring is at its rest length, and m1 is released.  The question is, what happens then?  Note: your answer will be different than it would be if the system was initially in equilibrium.  
A: Like you reasoned, the following is true about friction:
$$\mu_s=\tan\theta$$
I'd start with drawing a free body diagram of $m_1$ and coming up with the following equation, assuming that $m_2$ never moves:
$$m_1g - kx = m_1\frac{d^2x}{dt^2}$$
Then consider $m_2$ assuming it doesn't move:
$$kx=m_2g{\sin\theta} + \mu_sm_2g\cos\theta$$
Or, at maximum spring tension:
$$kx=2m_2g{\sin\theta}$$
But we can  remember that:
$$\frac{d^2x}{dt^2} = v\frac{dv}{dx}$$
We can substitute that back into the differential equation:
$$v\frac{dv}{dx} = g - \frac{k}{m_1}x$$
Then integrate:
$$\int v{dv} = \int gdx - \frac{k}{m_1}xdx$$
This yields:
$$\frac{v^2}{2} = gx - \frac{1}{2} \frac{k}{m_1}x^2$$
At maximum tension, $v$ equals $0$, which yields after substituting in the maximum tension $kx$:
$$m_1 = m_2{\sin\theta}$$
I ended up with the same solution as before, only this time, I integrated properly. It's funny how the incorrect procedure yielded the same result, but it's explained by the following fact:
$$\frac{d^2x}{dt^2} = v\frac{dv}{dx}$$
A: If we assume that M1 is small enough not to dislodge M2 we can handle it as a spring on rigid support as mentioned above.
If it is heavy enough to move the M2 then the system acts in two configurations:
1- $-\omega^2.M_1g<M_2.\mu.g. cos(\theta) $ note we still don't
consider the effect of inertia of M2.
$\omega = (k/M_1)^.5$  
2- when $-\omega^2.M_1g>M_2.\mu.g. cos(\theta) $     
$\mu m_2g\cos \theta+m_2g\sin \theta - M_1.g -K.X=0 $    
From here on we can use Duhamel integration to drive the equation which I am not going to do! because it takes time.
**Added a sketch **
Hopefully this crude sketch will clarify a bit. Please note the segments on the bottom graph indicating the movement of CG are not straight lines Also the movement of CG may be to reverse direction depending on friction and mass of M2.
A: This is not exactly the same as what anyone else has posted.  Similar, but simpler.
If $M_2$ were to remain stationary, then $M_1$ would bounce up and down, simple harmonic oscillation (so far, nothing others haven't said).  Simple harmonic oscillation means the position-vs-time chart for $M_1$ would be a sine wave, which means the acceleration upward at the bottom of the curve is the same magnitude as the acceleration downward at the top.
At $t=0$, the spring is not under tension, so there's only the force due to gravity.  Thus, the acceleration at this time is $g$.  At the bottom of the swing, the acceleration must be upward at $g$, so the force from the spring would have to be $2 M_1 g$ (gravity is still pulling down).
Thus, if $M_1$ were half the value you calculated, then at the bottom of the swing, it would pull exactly as hard as the answer you calculated with no spring.  Once $M_2$ has been dislodged, static friction would no longer apply, and the block could keep sliding.
