We started seeing frequent systemd crashes when ssh connections are closed. We were able to get a stack trace and the signal number which is SIGSEGV. Stack trace is telling me some kind of memory problem in systemd. Systemd version 210. ssh.service [Unit] Description=Per-Connection SSH Daemon IgnoreOnIsolate=yes After=sshdgenkeys.service [Service] ExecStart=-/usr/sbin/sshd -i StandardInput=socket KillMode=process Stack trace: #0 0x77f5daf8 in pause () from target/mipsisa32r2el-axis-linux-gnu/lib/libpthread.so.0 #1 0x0049a480 in freeze () at /home/antonn/axis/P3367_new/unpacked/apps/systemd-IR210-2/systemd/src/shared/util.c:3440 #2 0x0046fc30 in crash.1636 (sig=<optimized out>) at /home/antonn/axis/P3367_new/unpacked/apps/systemd-IR210-2/systemd/src/core/main.c:207 #3 <signal handler called> #4 0x0046ad98 in unit_unwatch_pid (u=0xd44700, pid=21222) at /home/antonn/axis/P3367_new/unpacked/apps/systemd-IR210-2/systemd/src/core/unit.c:1734 #5 0x004472c4 in invoke_sigchld_event.2765 (m=<optimized out>, u=0xd44700, si=0x7f9da448) at /home/antonn/axis/P3367_new/unpacked/apps/systemd-IR210-2/systemd/src/core/manager.c:1429 #6 0x0047265c in manager_dispatch_sigchld.2770 (m=m@entry=0xcbe230) at /home/antonn/axis/P3367_new/unpacked/apps/systemd-IR210-2/systemd/src/core/manager.c:1477 #7 0x0045990c in manager_dispatch_signal_fd.part.32 (userdata=<optimized out>) at /home/antonn/axis/P3367_new/unpacked/apps/systemd-IR210-2/systemd/src/core/manager.c:1723 #8 manager_dispatch_signal_fd.2718 (source=<optimized out>, fd=<optimized out>, revents=<optimized out>, userdata=0xcbe230) at /home/antonn/axis/P3367_new/unpacked/apps/systemd-IR210-2/systemd/src/core/manager.c:1508 #9 0x0046eb04 in source_dispatch (s=0xcbe770) at /home/antonn/axis/P3367_new/unpacked/apps/systemd-IR210-2/systemd/src/libsystemd/sd-event/sd-event.c:1861 #10 0x0046f494 in sd_event_run (e=0xcbe4d8, timeout=<optimized out>) at /home/antonn/axis/P3367_new/unpacked/apps/systemd-IR210-2/systemd/src/libsystemd/sd-event/sd-event.c:2117 #11 0x00407fb4 in manager_loop (m=0xcbe230) at /home/antonn/axis/P3367_new/unpacked/apps/systemd-IR210-2/systemd/src/core/manager.c:1844 #12 main (argc=1, argv=0x7f9dab74) at /home/antonn/axis/P3367_new/unpacked/apps/systemd-IR210-2/systemd/src/core/main.c:1704 Please close the bug if this has been fixed in new version of systemds. Umut
There have been some changes. 210 is really old, so I would be great if you could test with something more recent.
I will monitor a newer version of systemd but the crash happens very rarely. AFAIK, it happens in function unit_unwatch_pid() where we only mess with hashmap. I feel like there might be memory corruption somewhere there.
Looking at the logs again, this is probably fixed by http://cgit.freedesktop.org/systemd/systemd/commit/?id=bd44e61b04.
Let's assume that this is fixed by Lennart's commit.
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.