On Jul 19, 2005 at 12:44, Dmitry Semyonov <dsemyonov(a)dins.ru> wrote:
On Mon, 18 Jul 2005, Michael Ulitskiy wrote:
and now ser doesn't start. Actually
"log_stderror=no" is the setting
that causes problem. If it's set to "yes", ser starts fine even in forked
mode.
Also I narrowed down the problem to postgres module. If I remove it
from ser.cfg then ser starts as it should.
See,
http://lists.iptel.org/pipermail/serdev/2005-July/005148.html
I guess postgres could be multi-threaded.
Guys, isn't it time to make (as described in the referenced message)
SER more friendly to multi-threaded third-party libraries?
-D_REENTRANT might adversely affect performance (thread safe means
locking which is slow).
So far only postgres, cpl-c and pa link (indirectly) to libpthread.
The problem seem to appear only for logging to syslog and only on some
specific linux distributions (I was not able to reproduce it on
debian64 for example).
The proper fix would be to use -DREENTRANT only for the code that really
needs it (e.g only the postgres module or only the dprint.h/syslog
part). Unfortunately since I cannot reproduce the problem, I cannot test
a potential fix.
Andrei