I came up with the following problem myself.
Prove or disprove:
Let $f_n$ be a sequence of real-valued continuous periodic functions defined on $\mathbb{R}$. Suppose that there exists a $M$ such that for each $n$, there exists a period $T_n$ of $f_n$ and $T_n<M$. If $f_n$ converges poinwise to $f$, then $f$ is periodic. If it is not true, then does the conclusion hold if the convergence is uniform?
If the existence of such an $M$ is not required, then we have the following counterexample
$f_n(x)= \begin{cases} x\text{$\ \ \ $if $0\leq x\leq n$,}\\ 2n-x\text{$\ \ \ $if $n< x< 2n$,}\\ f_n(x-2nm)\text{$\ \ \ $ where $m$ is the integer satisfying $m\leq \frac{x}{2n}< m+1$ otherwise.} \end{cases}$
Then each $f_n$ has a period $2n$ and $f_n$ converges to $|x|$ which is not periodic.
If the $f_n$'s are not required to be continuous, then we have the following counterexample
Let $\{p_n\}$ be a strictly increasing sequence of primes. Define $f_n$ as follows
$f_n(x)= \begin{cases} 1 \text{$\ \ \ $ if $x=\frac{m}{\sqrt{p_n}}$ for some $m\in\mathbb{Z}$,}\\ 0 \text{$\ \ \ $ otherwise.} \end{cases}$
Then each $f_n$ has period $\frac{1}{\sqrt{p_n}}<1$ and $f_n$ converges to $f$ defined by $f(0)=1$ and $f(x)=0$ for $x\neq0$, which is not periodic.
Now, when both of the conditions are required, I can't prove or come up with a counterexample.