Let $f: X\rightarrow S$ be a quasi-compact, quasi-separated, flat morphism of schemes, with $S$ locally Noetherian. Also, fix an integer $i\geq 1$.


**Question 1:** Does $H^i(X\_s,\mathcal{O}\_{X\_s})=0$, for all $s\in S$, imply that $R^if\_\ast\mathcal{O}\_X=0$?


The answer is *yes*, if $f$ is also assumed to be *proper* (flat base change+theorem of formal functions+easy direct proof for $S$ Artinian local). In general, I would expect that there are some simple counterexamples but, to my surprise, I didn't find anything in the literature - probably I simply looked in the wrong places! I should also add that I would be particularly interested in counterexamples in characteristic zero, i.e. where $f$ is a morphism of schemes over a field of characteristic zero.


Here is a variant of question 1:


**Question 2:** Assume in addition that $f$ has a section $e: S\rightarrow X$. What is the answer to question 1 then?


The "raison d'être" for asking question 2 in addition is that a colleague explained to me how, granting existence of a section, the assumptions above ensure that $H^0(X\_s,\mathcal{O}\_{X\_s})=\kappa(s)$, for all $s\in S$, implies that $f\_\ast\mathcal{O}\_X=\mathcal{O}\_S$. So, at least in this very special case, the fibres of $f$ "remember" what the global sections of $f$ are.



Does fibrewise vanishing of cohomology imply its vanishing (non-proper case)?
Here is one simple counterexample:


**Example.** Let $X = \mathbf A^2 \setminus 0$ and $S = \mathbf A^1$, where $f \colon X \to S$ is the first coordinate projection. The fibres are affine, so have no higher coherent cohomology.


But if $V \subseteq S$ is affine open containing $0$, then $f^{-1}(V)$ has an affine open cover by $U\_1 = V \times \mathbf G\_m$ and $U\_2 = (V \setminus 0) \times \mathbf A^1$. Then the function $\tfrac{1}{xy}$ on $U\_{12}$ is not a sum of functions on $U\_1$ and $U\_2$, so it gives a nonzero class in $(R^1f\_\* \mathcal O\_X)\_0$. $\square$


(Note that this map has many sections.)


