[BusyBox] circular buffer syslogd
Michael Renzmann
renzmann at gmx.de
Tue Jan 2 18:41:31 UTC 2001
Hi everybody.
Some news from the "circular buffer syslogd" front.
1. Currently it is possible to start syslogd more than once. This may
cause some ugly problems when using the circular buffer patch from
Gennady. I will send a patch to the list tomorrow that adds generation
of a pid-file (just as the "normal" syslogd and kerneld do) and that
also prevents from running if there is a pidfile left in /var/run.
2. The problem I reported some days ago (more than one instance of
syslogd in the system I use it in) seems to be independant of 1. I
compiled busybox so that syslogd also includes klogd. If syslogd was
started more than once by normal scripts or by a user, there also would
be an according number of klogd's running. But there is just one klogd.
3. While running the system I found another hint to that "semop: blabla"
error message I also reported some days ago. It seems that it is based
on the "multiple instances" problem (see 2.). What I did:
a.
- run "./busybox syslogd -C -m 0" two times; syslogd and klogd both
appear twice with "ps ax"
- run "kill <pid of syslogd 1> <pid of klogd 1>"
- message "Exiting syslogd!" appears on console
- run "kill <pid of syslogd 2> <pid of klogd 2>"
- error messages appear:
syslogd: semop: blabla
klogd: semop: blabla (see other mail for exact error messages)
b.
- run "./busybox syslogd -C -m 0" three times; syslogd and klogd both
appear twice with "ps ax"
- run "kill <pid of syslogd 1> <pid of klogd 1>"
- message "Exiting syslogd!" appears on console
- run "kill <pid of syslogd 2> <pid of klogd 2>"
- error messages appear:
syslogd: semop: blabla
klogd: semop: blabla (see other mail for exact error messages)
- run "kill <pid of syslogd 3> <pid of klogd 3>"
- error messages appear again:
syslogd: semop: blabla
klogd: semop: blabla (see other mail for exact error messages)
Here and on the system that showed the problem for the first time (and
caused my reporting) the problem seems to be, that there is more than
one instance of syslogd running. The first one initialises the shared
memory, every following instance uses the shared mem that was
initialised by the first one (I assume this is handled by the IPC
functions of the system). The first instance that receives the term
signal seems to "deallocate" the shared memory. If another instance gets
shut down, the semop-function returns that there is no such shared
memory available.
Well, I have to admit that I don't know very much about shared memory,
nor about the way it is used within programs. But maybe the above
description carries us a bit more towards the real problem :)
Bye, Mike
More information about the busybox
mailing list