On Wed, Jun 30, 2021 at 10:09 AM www <ouyangxua...@163.com> wrote:

> Dear all,
>
> systemd version: v234
> kernel version: 5.1.5
>
> My embedded system uses systemd. Occasionally kernel panic appears in this
> system. It is found that it is related to sd-sync in systemd. How to
> analyze this and why?
> What causes this problem? Or can you see that sd-sync has a problem
> processing that file or service?
> If you have any ideas or opinions, or need any specific information,
> please let me know.
>
> Thank you.
>
> [ 1664.582102] Unable to handle kernel paging request at virtual address
> 7f8bba1c
> [ 1664.589350] pgd = fb46e47e
> [ 1664.592062] [7f8bba1c] *pgd=00000000
> [ 1664.595666] Internal error: Oops: 80000005 [#1] ARM
> [ 1664.600558] CPU: 0 PID: 14730 Comm: (*sd-sync*) Not tainted
> 5.1.5-yocto-s-dirty-fd96c2b #1
>

When shutdown.target is invoked, systemd forks a 'sd-sync' background
process which does literally one thing: it issues a global sync() to begin
flushing all filesystems to disk. There is no specific file involved here,
sync() handles all mounted filesystems at once.

Check what happens if you run `/usr/sbin/sync` from shell, since it does
exactly the same thing. In general there should be nothing special about
systemd calling sync(), it's purely a kernel problem. The only difference
that I can think of is that systemd begins the sync() while all services
are shutting down and still actively writing to files...

-- 
Mantas Mikulėnas
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to