Q:

When does a torsor of the generic fiber extend?

Let $(S,\eta,s)=\mathrm{Spec}(R)$ be the spectrum of a DVR.
Let $f\colon P\to S$ be an abelian scheme. Taking restriction gives an injection from the group of $P$-torsors to the group of $P_\eta$-torsors: $$\rho\colon\mathrm{H}^1(S,P)\to\mathrm{H}^1(\eta,P_\eta).$$ 
How can we discribe the cokernel of $\rho$?
[Here is my attempt: Let $j\colon \eta\to S$ be the open immersion. We have an isomorphism $$P\to j_*j^*P=j_*P_\eta.$$ Here we identify the $S$-scheme $P$ with its sheaf of etale sections. This is an isomorphism: note that $P$ is proper, so rational sections in $P$ extends. We have the spectral sequence $$\mathrm{H}^p(S,R^qj_*P_\eta)\Rightarrow\mathrm{H}^{p+q}(\eta,P_\eta).$$The low degree terms reads:
$$0\to\mathrm{H}^1(S,P)\to\mathrm{H}^1(\eta, P_\eta)\to \mathrm{H}^0(S,R^1j_*P_\eta)\to \mathrm{H}^2(S,P)\to\mathrm{H}^2(\eta, P_\eta)$$
The sheaf $R^1j_*P_\eta$ is supported on $s$, I am not sure how to interpret $\mathrm{H}^0(S,R^1j_*P_\eta)$? ]

A:

Here's a suggestion (not a full answer): take a geometric point $\bar{s} \rightarrow s$ above $s$. Then the stalk $\left(R^1 j_* P_{\eta}\right)_{\bar{s}}$ is computed as the Galois cohomology $H^1(K^{sh},P_{\eta})$ where $K^{sh}$ is the fraction field of the strict henselization of $R$. This follows from the discussion here, and the fact that the local ring $\mathcal{O}_{S,s}$ is isomorphic to $R$. 
The absolute Galois group of $K^{sh}$ is isomorphic to the inertia subgroup of the absolute Galois group of $K$, and since $P_{\eta} \rightarrow \eta$ extends to a smooth scheme over $S$, general base change theorems tell you that this implies that inertia acts trivially. This allows you to describe the group $H^0(S,R^1j_*P_{\eta})$ more explicitly. 

