What is wrong in this counter-example? In reading my textbook, the author give a lemma as follows:
Let $X\subset \mathbb{R}^{n}$ be an open set, and let $u\in \mathcal{E}'(X)$ have order $N$. Then $\langle u,\phi \rangle=0$ for all $\phi$ such that $$\partial^{\alpha}\phi(x)=0$$ when $x\in supp(u)$ and $|\alpha|\le N$. 
The author gives a counter-example stating that it is generally wrong to apply this to the case $K=supp(u)$ and assert that if a sequence of functions $\phi_{k}$ converges uniformly to 0 on $supp(u)$, and all its derivatives do so as well, then $\langle u,\phi_{k}\rangle \rightarrow 0$ as $k\rightarrow \infty$. The counter-example is as follows:
Let $X=\mathbb{R}$, $$\langle u,\phi \rangle=\lim_{m\rightarrow \infty}\left(\sum^{m}_{k=1}\phi\left(\frac{1}{k}\right)-m\phi(0)-\phi'(0)\log(m)\right)$$ Then $supp (u)$ is $$\left\{0,1,\frac{1}{2},\frac{1}{3}..\right\}$$ We can construct $\phi_{k}\in C^{\infty}_{c}(\mathbb{R})$ such that $\phi_{k}=k^{-\frac{1}{2}}$ for $x\ge \frac{1}{k}$ and $\phi_{k}=0$ for $x\le \frac{1}{k+1}$. Then we have $\phi_{k}$ converge to $0$ uniformly as $k\rightarrow \infty$, and all their derivatives vanish on $supp (u)$. However we have 
$$\langle u,\phi_{k}\rangle=kk^{-\frac{1}{2}}=k^{\frac{1}{2}}\rightarrow \infty$$ as $k\rightarrow \infty$. 
My question is - is $u$ in here of finite order? If not why the lemma failed? I feel confused because the author claimed when the boundary of $supp u$ is nice enough then the above claim makes sense, but it feels (nice enough or not) is not related as it is not used at all in the proof of the lemma.  
 A: $\def\<#1>{\left<#1\right>}\def\abs#1{\left|#1\right|}\def\norm#1{\left\|#1\right\|}$
So we have estimating the order of $u$:
\begin{align*}
  \abs{\<u, \phi>} &= \abs{\lim_{m\to\infty} \sum_{k=1}^m \phi(1/k) - m\phi(0) - \log m\cdot \phi'(0)}\\
   &= \lim_{m\to \infty} \abs{\sum_{k=1}^m \bigl(\phi(1/k) - \phi(0)\bigr) - \log m\cdot \phi'(0) }\\
   &= \lim_{m\to \infty} \abs{\sum_{k=1}^m \frac 1k \phi'(\xi_k) - \log m \cdot \phi'(0)}\\
   &= \lim_{m \to \infty} \abs{\sum_{k=1}^m \frac 1k\bigl(\phi'(\xi_k) - \phi'(0)\bigr) + \left(\sum_{k=1}^m \frac 1k - \log m\right)\phi'(0) }\\
   &= \lim_{m \to \infty} \abs{\sum_{k=1}^m \frac{\xi_k}k \phi''(\eta_k) 
             + \left(\sum_{k=1}^m \frac 1k - \log m\right)\phi'(0) }\\
   &\le \lim_{m\to \infty} \sum_{k=1}^m \abs{\frac{\xi_k}k} \cdot \norm{\phi''}_\infty + \lim_{m\to \infty} \abs{\sum_{k=1}^m \frac 1k - \log m}\cdot \norm{\phi'}_\infty\\
   &\le \sum_{m=1}^\infty \frac 1{k^2} \cdot \norm{\phi''} + \gamma \cdot \norm{\phi'}_\infty
\end{align*}
So $u$ is of order at most 2.
A: You quote Theorem 3.2.2. of Friedlander, Introduction to the Theory of Distributions [F].
You quote the example from p. 38 in [F].
You seem to suppose that this example is a counter-example to (some variant of) Theorem
3.2.2.
However, this is not what is actually stated in [F]. Reading carefully, one sees that rather, the example is a counterexample to a certain (incorrect, after all) variant of Definition 3.1.1: The example shows that in Definition 3.1.1 and equation (3.1.1) therein, one cannot replace the compact set $K$ by the particular (compact) set support of $u$.
Unfortunately, there is a misprint on p. 38 of [F]: Instead of the relevant
equation number (3.1.1), the wrong number (3.2.1) is given (even twice). Note that in equation (3.2.1), neither a compact set $K$ nor the support of $u$ do occur, hence (3.2.1) does not make sense at all in this context. It is but a typo.
Answers to your two questions in particular:


*

*Is u in here of finite order?
Answer: Yes, since it has compact support (contained in the interval [0,1]), due to the remark and the corollary following Theorem 3.2.1 in [F]. Unfortunately, [F] does not state the simple and important fact that distributions having compact support are of finite order as an explicit theorem.

*If not why the lemma failed?
Now pointless by the answer to 1. By the way, why lemma? Item 3.2.2 is a theorem in [F]. Possibly the (wrong) equation number (3.2.1) has been misinterpreted by you as referring to Lemma 3.2.1. In Lemma 3.2.1 and its proof, however, no compact set $K$ occurs, so any reference to this lemma would be meaningless at this point anyway.
