[systemd-devel] FW: pthread_create() fails SysV in myDaemon on boot

Michael D. Berger m.d.berger at ieee.org
Fri Nov 4 06:40:38 PDT 2011


> -----Original Message-----
> From: Lennart Poettering [mailto:lennart at poettering.net] 
> Sent: Friday, November 04, 2011 08:14
> To: Michael D. Berger
> Cc: 'Kay Sievers'; systemd-devel at lists.freedesktop.org
> Subject: Re: [systemd-devel] FW: pthread_create() fails SysV 
> in myDaemon on boot
> 
> On Thu, 03.11.11 22:11, Michael D. Berger (m.d.berger at ieee.org) wrote:
> 
> > After googing around, here is my first attempt at
> > /etc/systemd/system/myDaemon.service:
> > 
> >    [Unit]
> >    Description=myDaemon
> >    After=syslog.target network.target
> > 
> >    [Service]
> >    ControlGroupAttribute=cpu.rt_runtime_us 500000
> >    ExecStart=/usr/sbin/myDaemon --daemon
> > 
> >    [Install]
> >    WantedBy=multi-user.target
> > 
> > I did a successful "systemctl enable myDaemon.service".
> > "systemctl start myDaemon.service" starts the program, but 
> as before, 
> > it fails "pthread_create(...)".  Of course, it also fails on boot.
> 
> Check syslog whether the cgroup attribute could properly be 
> written. And check whether 
> /sys/fs/cgroup/cpu/..../cpu.rt_runtime_us is properly set.
> 
> Lennart
> 
[...]

Here are cgroup messages.  myDaemon is not here.  Should it be?

# grep "Nov  4.*cgroup" messages
Nov  4 08:51:44 mbrc40 kernel: [    0.000000] Initializing cgroup subsys
cpuset
Nov  4 08:51:44 mbrc40 kernel: [    0.000000] Initializing cgroup subsys cpu
Nov  4 08:51:44 mbrc40 kernel: [    0.000000] allocated 33554432 bytes of
page_cgroup
Nov  4 08:51:44 mbrc40 kernel: [    0.000000] please try
'cgroup_disable=memory' option if you don't want memory cgroups
Nov  4 08:51:44 mbrc40 kernel: [    0.002354] Initializing cgroup subsys
cpuacct
Nov  4 08:51:44 mbrc40 kernel: [    0.002447] Initializing cgroup subsys
memory
Nov  4 08:51:44 mbrc40 kernel: [    0.002543] Initializing cgroup subsys
devices
Nov  4 08:51:44 mbrc40 kernel: [    0.002632] Initializing cgroup subsys
freezer
Nov  4 08:51:44 mbrc40 kernel: [    0.002720] Initializing cgroup subsys
net_cls
Nov  4 08:51:44 mbrc40 kernel: [    0.002808] Initializing cgroup subsys
blkio
Nov  4 08:51:44 mbrc40 kernel: [    0.002899] Initializing cgroup subsys
perf_event

Is this ok?  I note that there appears to be some recursive directory
nesting in this area.

# ll /sys/fs/cgroup/cpu/cpu.rt_runtime_us
-rw-r--r--. 1 root root 0 Nov  4 08:51 /sys/fs/cgroup/cpu/cpu.rt_runtime_us

[root at mbrc40 cpu]# ll /sys/fs/cgroup/cpu/system/cpu.rt_runtime_us
-rw-r--r--. 1 root root 0 Nov  4 08:51
/sys/fs/cgroup/cpu/system/cpu.rt_runtime_us

"mdmonitor.service" failed.  Is that important?
As fat as I know, I do not nead sendmail. Do I

# grep "Nov  4.*systemd" messages
Nov  4 08:51:45 mbrc40 systemd[1]: mdmonitor.service: control process
exited, code=exited status=1
Nov  4 08:51:45 mbrc40 systemd[1]: Unit mdmonitor.service entered failed
state.
Nov  4 08:51:45 mbrc40 systemd[1]: Startup finished in 1s 234ms 570us
(kernel) + 2s 647ms 798us (initrd) + 11s 298ms 681us (userspace) = 15s 181ms
49us.
Nov  4 08:51:52 mbrc40 systemd[1]: PID 1449 read from file
/var/run/sendmail.pid does not exist. Your service or init script might be
broken.
Nov  4 08:51:53 mbrc40 systemd[1]: PID 1527 read from file
/var/run/sendmail.pid does not exist. Your service or init script might be
broken.
Nov  4 08:51:57 mbrc40 systemd[1]: PID 1594 read from file
/var/run/sendmail.pid does not exist. Your service or init script might be
broken.
Nov  4 08:51:59 mbrc40 systemd[1]: PID 1681 read from file
/var/run/sendmail.pid does not exist. Your service or init script might be
broken.
Nov  4 08:52:41 mbrc40 dbus: [system] Activating via systemd: service
name='org.freedesktop.ConsoleKit' unit='console-kit-daemon.service'

Thanks for your help.
Mike.

--
Michael D. Berger
m.d.berger at ieee.org
http://www.rosemike.net/
   



More information about the systemd-devel mailing list