[systemd-devel] Assertion failed in systemd v16

Alexander E. Patrakov patrakov at gmail.com
Mon Jan 10 04:30:50 PST 2011


I wrote:
> Here is what happened when I tried to reload lighttpd while looking 
> with strace whan systemd is doing:
>
> [ 3639.047649] systemd[1]: Assertion 's->control_command_id == 
> SERVICE_EXEC_START' failed at src/service.c:2184, function 
> service_run_next_main(). Aborting.
> [ 3639.052182] systemd[1]: Caught <ABRT>, dumped core as pid 6045.
> [ 3639.052376] systemd[1]: Freezing execution.
>
> I could not reproduce the bug without stracing systemd:
>
> strace -ff -e process -p 1

Now I can reproduce it more reliably without strace. Here is the 
slightly modified service file:

[Unit]
Description=Lighttpd Web Server
After=network.target

[Service]
Type=forking

PIDFile=/var/run/lighttpd.pid

#ExecStartPre=/usr/sbin/lighttpd -t -f /etc/lighttpd/lighttpd.conf
ExecStart=/usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf

ExecStop=/bin/kill -INT $MAINPID

#ExecReload=/usr/sbin/lighttpd -t -f /etc/lighttpd/lighttpd.conf
ExecReload=/bin/kill -INT $MAINPID
ExecReload=/bin/sleep 1
ExecReload=/usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf

StandardOutput=syslog
StandardError=syslog

[Install]
WantedBy=multi-user.target
WantedBy=http-daemon.target

To reproduce, I just have to do some attempts of "start, stop, start 
again, reload" actions, with 30-second pauses between them. Reproduction 
is not 100% reliable.

Here is the output of "systemctl status lighttpd.service" just before 
issuing the "reload" command that triggered the assertion:

home ~ # systemctl status lighttpd.service
lighttpd.service - Lighttpd Web Server
       Loaded: loaded (/etc/systemd/system/lighttpd.service)
       Active: active (running) since Mon, 10 Jan 2011 17:18:44 +0500; 
1s ago
      Process: 2382 (/bin/kill -INT $MAINPID, code=exited, status=1/FAILURE)
      Process: 2390 (/usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf, 
code=exited, status=0/SUCCESS)
     Main PID: 2393 (lighttpd)
       CGroup: name=systemd:/system/lighttpd.service
           └ 2393 /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf

Here is the backtrace, according to my core file:

#0  0x00007fe1316b7acb in raise () from /lib/libpthread.so.0
#1  0x0000000000408f6b in crash (sig=6) at src/main.c:118
#2 <signal handler called>
#3  0x00007fe130923b25 in raise () from /lib/libc.so.6
#4  0x00007fe130925330 in abort () from /lib/libc.so.6
#5  0x0000000000456ff7 in log_assert (file=0x473cb3 "src/service.c", 
line=2184, func=<value optimized out>,
     format=<value optimized out>) at src/log.c:492
#6  0x00000000004206f0 in service_run_next_main (u=0x2721990, pid=2393, 
code=1, status=0) at src/service.c:2184
#7  service_sigchld_event (u=0x2721990, pid=2393, code=1, status=0) at 
src/service.c:2525
#8  0x000000000040c1af in manager_dispatch_sigchld (m=0x25bb1c0) at 
src/manager.c:2011
#9  0x00000000004117e3 in manager_process_signal_fd (m=0x25bb1c0) at 
src/manager.c:2186
#10 process_event (m=0x25bb1c0) at src/manager.c:2211
#11 manager_loop (m=0x25bb1c0) at src/manager.c:2345
#12 0x000000000040a1e5 in main (argc=<value optimized out>, argv=<value 
optimized out>) at src/main.c:1166

-- 
Alexander E. Patrakov


More information about the systemd-devel mailing list