Hello!
I'm using slapd (version 2.2.6) with a custom backend. I've tried to implement a feature to change the trace level triggered by some events. I used the following piece of code to do this (found it originally in log.c):
slap_debug = newTraceLevel; lutil_set_debug_level( "slapd", slap_debug ); ber_set_option(NULL, LBER_OPT_DEBUG_LEVEL, &slap_debug); ldap_set_option(NULL, LDAP_OPT_DEBUG_LEVEL, &slap_debug); ldif_debug = slap_debug;
Although it works at the first glance, i get strange segfaults later on mostly from `backend.c'. For example in: int backend_check_referrals( Operation *op, SlapReply *rs ) when checking on `op->o_bd->be_chk_referrals' or int backend_connection_destroy( Connection *conn ) when checking on `backends[i].be_connection_destroy'
The code to change trace level is called from the backend when an operation is started. Does anybody know the appropriate way of change tracing programatically? Thanks for the help in advance.
Regards, David
___________________________________________________________ "Diszlexiás-e a gyerekem?" - 25 kérdéses gyorsteszt (hálás lesz utána, akármi is az eredmény!) http://ad.adverticum.net/b/cl,1,6022,133103,204265/click.prm
Lukacs David wrote:
Hello!
I'm using slapd (version 2.2.6) with a custom backend. I've tried to implement a feature to change the trace level triggered by some events. I used the following piece of code to do this (found it originally in log.c):
2.2.6 is so old, it's probable that you're just running into bugs in the actual Debug logging statements (e.g. trying to print through NULL pointers, etc.). The current stable release is 2.3.32.
I suggest upgrading to the latest 2.2 release at least (2.2.30). If you can adapt your code to 2.3 you should do that instead. In the meantime, use a malloc debugger like Electric Fence, it may help you isolate the source of the problem.
Thanks for the quick answer; unfortunatelly i have to stick to this version - i've inherited the code (and the environment).
What do you think about the code excerpt? Am i tuning the logging facility the right way? I was afraid that this is a concurrency issue or something like this, but i'll dive into the code if you say it's more likely a bug.
Regards, David
Howard Chu hyc@symas.com írta:
Lukacs David wrote:
Hello!
I'm using slapd (version 2.2.6) with a custom backend. I've tried to implement a feature to change the trace level triggered by some events. I used the following piece of code to do this (found it originally in log.c):
2.2.6 is so old, it's probable that you're just running into bugs in the actual Debug logging statements (e.g. trying to print through NULL
pointers,
etc.). The current stable release is 2.3.32.
I suggest upgrading to the latest 2.2 release at least (2.2.30). If you
can
adapt your code to 2.3 you should do that instead. In the meantime,
use a
malloc debugger like Electric Fence, it may help you isolate the
source of
the problem.
-- -- Howard Chu Chief Architect, Symas Corp. http://www.symas.com Director, Highland Sun http://highlandsun.com/hyc OpenLDAP Core Team http://www.openldap.org/project/
___________________________________________________________ "Diszlexiás-e a gyerekem?" - 25 kérdéses gyorsteszt (hálás lesz utána, akármi is az eredmény!) http://ad.adverticum.net/b/cl,1,6022,133103,204265/click.prm
--On Tuesday, January 23, 2007 9:06 AM +0100 Lukacs David lukacsd@freemail.hu wrote:
Thanks for the quick answer; unfortunatelly i have to stick to this version - i've inherited the code (and the environment).
What do you think about the code excerpt? Am i tuning the logging facility the right way? I was afraid that this is a concurrency issue or something like this, but i'll dive into the code if you say it's more likely a bug.
There should be no problem in moving between minor patch releases (2.2.6 to 2.2.30). I think you seriously fail to understand the world of hurt you are asking for by using 2.2.6, I highly suggest reading the change log for 2.2, and realizing that 2.2.6 was one of, if not the, first releases of 2.2, after which many, many issues, some including some serious security bugs, were fixed.
--Quanah
-- Quanah Gibson-Mount Principal Software Developer ITS/Shared Application Services Stanford University GnuPG Public Key: http://www.stanford.edu/~quanah/pgp.html
I'm convinced:) Thanks David
Quanah Gibson-Mount quanah@stanford.edu írta:
--On Tuesday, January 23, 2007 9:06 AM +0100 Lukacs David lukacsd@freemail.hu wrote:
Thanks for the quick answer; unfortunatelly i have to stick to this version - i've inherited the code (and the environment).
What do you think about the code excerpt? Am i tuning the logging facility the right way? I was afraid that this is a concurrency issue or something like this, but i'll dive into the code if you say it's more likely a bug.
There should be no problem in moving between minor patch releases
(2.2.6 to
2.2.30). I think you seriously fail to understand the world of hurt you are asking for by using 2.2.6, I highly suggest reading the change log
for
2.2, and realizing that 2.2.6 was one of, if not the, first releases of 2.2, after which many, many issues, some including some serious
security
bugs, were fixed.
--Quanah
-- Quanah Gibson-Mount Principal Software Developer ITS/Shared Application Services Stanford University GnuPG Public Key: http://www.stanford.edu/~quanah/pgp.html
_____________________________________________________________ Felejtsd el hol a bankfiókod! [origo] klikkbank http://cthandler.adverticum.net/?cturl=http%3A%2F%2Fwww.klikkbank.hu%2Findex...
openldap-software@openldap.org