TITLE: How bad can the second derivative of a convex function be?
QUESTION [17 upvotes]: One can easily construct an example of a measurable function $f:(a,b)\to \mathbb{R}$ which satisfies the following property:
$$\label{p}\tag{P}
f\notin L^1(I),\ \mbox{for each interval}\ I\subset (a,b).
$$ 
We know that a convex function $g:(a,b)\to \mathbb{R}$ is locally Lipschitz and its second derivative $g''$ exists a.e. $x\in (a,b)$. 

Can we find a increasing convex function $g$, such that $g''$ satisfies the property \ref{p}?

If the answer is negative 

What can we say about the set of intervals $I$ for which $g''\notin L^1(I)$?

Remark: I've asked a similar question on Math.stack with no answer.

REPLY [16 votes]: The second derivative of a convex function, in the distributional sense, is a non-negative bounded measure. And conversely. If this measure $\mu$ contains a sum $\sum_na_n\delta_{x=x_n}$, where $(x_n)_n$ is dense and $a_n>0$, $\sum_na_n<\infty$, then $\mu|_I\not\in L^1(I)$ for every non-void open interval $I$. The corresponding $g$ is an example for the first question.
On the other hand $g''$ can be decomposed uniquely into a singular part $\mu_s$ and a part $\mu_a<\!<{\cal Leb}$. Because $\mu_s,\mu_a$ are non-negative, we have
$$\int_c^dd\mu_a\le|g''|<\infty,$$
at least if $a<c<d<b$.
Therefore $\mu_a\in L^1(I)$ for every $I\subset\!\subset(a,b)$.