[systemd-devel] [systemd]: sd-sync lead to kernel panic
Mantas Mikulėnas
grawity at gmail.com
Wed Jun 30 08:40:40 UTC 2021
On Wed, Jun 30, 2021 at 10:09 AM www <ouyangxuan10 at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20210630/eba77e16/attachment.htm>
More information about the systemd-devel
mailing list