Bug 74280

Summary: shutdown freezes due to systemd-journald crash
Product: systemd Reporter: hp4everything
Component: generalAssignee: systemd-bugs
Status: RESOLVED FIXED QA Contact: systemd-bugs
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: ARM   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: strace
strace.tar.gz

Description hp4everything 2014-01-31 14:06:41 UTC
I'm trying to run pulseaudio as service on a headless Raspberry Pi platform with most recent packages:

ArchLinuxArm OS : Linux 3.10.28-1-ARCH
systemd 208-10 
pulseaudio 4.0-6

Starting and stopping pulseaudio via systemd regularly leads to system-freezes during shutdown caused by systemd-journald crashes ("out of memory" is the last console message).

I was able to simply reproduce this by issuing the simple command sequence:

pulseaudio --daemon
pulseaudio -k

In about every second case this leads to crash of the systemd-journald process with a subsequent restart. Probably because the restart isn't possible during shutdown the system freezes.

Systemd-developers should be able to handle any misbehaviour of daemons when shutting down daemons.


Console-listing:

~ >ps -aux | grep systemd-journald
root      1835  0.0  1.4  50616  6752 ?        Ss   18:05   0:00 /usr/lib/systemd/systemd-journald
hape      1986  0.0  0.2   4212   988 pts/0    S+   18:49   0:00 grep systemd-journald
~ >pulseaudio --start
~ >pulseaudio -k
~ >ps -aux | grep systemd-journald
root      1835  0.0 14.9 214152 70768 ?        Rs   18:05   0:02 /usr/lib/systemd/systemd-journald
hape      2008  0.0  0.2   4212   988 pts/0    S+   18:50   0:00 grep systemd-journald
~ >pulseaudio --start
~ >pulseaudio -k
~ >ps -aux | grep systemd-journald
root      2037 16.0  0.7  13852  3780 ?        Ds   18:50   0:00 /usr/lib/systemd/systemd-journald
hape      2041  0.0  0.2   4212   988 pts/0    S+   18:50   0:00 grep systemd-journald
~ >

As can be seen the systemd-journald has been restarted after the second sequence.
Comment 1 David Strauss 2014-02-04 22:32:35 UTC
Do you have any core dumps or stack traces?
Comment 2 hp4everything 2014-02-14 17:44:52 UTC
sorry for responding so late. no, up to now I don't have any trace files. I'm not an expert in doing that. If you can provide me some help on how to do that or how to find the dumps, I'll be glad to provide that information.

Since it is an embedded system (headless Raspberry Pi) and not a full blown desktop Linux, some tools might not be available.

BR
Hans-Peter
Comment 3 Lennart Poettering 2014-02-21 13:55:01 UTC
A good start would be to strace the journald process while this happens and check what the last syscalls are that it does.
Comment 4 Zbigniew Jedrzejewski-Szmek 2014-02-23 14:45:34 UTC
Yeah, strace would be nice. You can just do (as root): strace -p $(pidof systemd-journald), and then trigger the bug.
Comment 5 hp4everything 2014-02-26 14:45:10 UTC
Created attachment 94770 [details]
strace

strace for process systemd-journald when crashing after pulseaudio start/stop
Comment 6 hp4everything 2014-02-26 14:46:41 UTC
I've triggered the crash again and attached the strace output as compressed file.

BR
Hans-Peter
Comment 7 hp4everything 2014-02-26 14:51:43 UTC
Maybe I made a mistake when uploading the trace because klicking on it yields binary output. You can store it as strace.log.gz und uncompress it with 
tar -xvzf strace.log.gz.

Please let me know if I should upload it again as ASCII file or if you need more trace data.

BR
Hans-Peter
Comment 8 hp4everything 2014-03-01 17:02:04 UTC
Created attachment 94932 [details]
strace.tar.gz

once again with correct mime type
Comment 9 Lennart Poettering 2019-11-13 10:27:15 UTC
let's close this. I am pretty sure this has long been fixed. if not, please file a new bug on github.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.