--000325575576f2e15a04bc2a31c8 Content-Type: text/plain; charset=ISO-8859-1
hmmm... I have to say I can replay it every time. just set the following two lines in the beginning of the slapd.conf, index_substr_if_maxlen 100 index_substr_if_minlen 5 slapd starts without a warning and can serve requests. T On Mon, Mar 26, 2012 at 2:43 AM, Howard Chu <[email protected]> wrote: > [email protected] wrote: > >> Full_Name: Tianyin Xu >> Version: 2.4.30 >> OS: Ubuntu Linux 10.04 >> URL: ftp://ftp.openldap.org/**incoming/<ftp://ftp.openldap.org/incoming/> >> Submission from: (NULL) (128.54.167.68) >> >> >> 1. Symptom: >> >> In the main configuration file of OpenLDAP (slapd.conf), set the following >> configuration: >> >> index_substr_if_minlen 100 >> index_substr_if_maxlen 5 >> >> Then, everything is fine. The system behaves as expectation. However, if >> reverse >> the order of the two configuration line as follows: >> >> index_substr_if_maxlen 5 >> index_substr_if_minlen 100 >> >> Then, the system refused to start, with the following misleading message: >> >> Mar 25 21:29:18 tianyin-desktop slapd[12700]: >> /home/tianyin/openldap-2.4.30/**etc/openldap/slapd.conf: line 1: >> <index_substr_if_minlen> invalid value (5) >> > > Unable to reproduce this symptom. In both cases I get > > testrun/slapd.1.conf: line 31: <index_substr_if_minlen> invalid value (100) > > Closing this ITS. > > >> ------------------------------**--------------------------- >> >> 2. Root cause in terms of code snippet >> >> (1) servers/slapd/slap.h >> >> #define SLAP_INDEX_SUBSTR_IF_MINLEN_**DEFAULT 2 >> #define SLAP_INDEX_SUBSTR_IF_MAXLEN_**DEFAULT 4 >> >> (2) servers/slapd/schema_init.c >> >> unsigned int index_substr_if_minlen = SLAP_INDEX_SUBSTR_IF_MINLEN_** >> DEFAULT; >> unsigned int index_substr_if_maxlen = SLAP_INDEX_SUBSTR_IF_MAXLEN_** >> DEFAULT; >> >> (3) servers/slapd/bconfig.c >> >> case CFG_SSTR_IF_MAX: >> if (c->value_uint< index_substr_if_minlen) { >> snprintf(c->cr_msg, sizeof(c->cr_msg), "<%s> invalid value", >> c->argv[0]); >> Debug(LDAP_DEBUG_ANY, "%s: %s (%d)\n", c->log, c->cr_msg, >> c->value_int); >> return(1); >> } >> index_substr_if_maxlen = c->value_uint; >> break; >> >> case CFG_SSTR_IF_MIN: >> if (c->value_uint> index_substr_if_maxlen) { >> snprintf(c->cr_msg, sizeof( c->cr_msg ), "<%s> invalid value", >> c->argv[0]); >> Debug(LDAP_DEBUG_ANY, "%s: %s (%d)\n", c->log, c->cr_msg, >> c->value_int >> ); >> return(1); >> } >> index_substr_if_minlen = c->value_uint; >> break; >> >> (4) backtrace >> >> #0 config_generic (c=0x915760) at bconfig.c:1996 >> #1 0x0000000000433a00 in config_set_vals (Conf=0x8146c0, c=0x915760) at >> config.c:345 >> #2 0x0000000000433f5f in config_add_vals (Conf=0x8146c0, c=0x915760) at >> config.c:418 >> #3 0x00000000004351b3 in read_config_file (fname=0x5a0a98 >> "/home/tianyin/openldap-2.4.**30/etc/openldap/slapd.conf", depth=0, >> cf=0x0, >> cft=0x8140c0) at config.c:783 >> #4 0x000000000042846b in read_config (fname=0x0, dir=0x0) at >> bconfig.c:4213 >> #5 0x000000000041c217 in main (argc=1, argv=0x7fffffffe2f8) at main.c:792 >> >> ------------------------------**--------------------------- >> >> It's quite clear that the order matters, and this should be a bug related >> to >> configuration. >> >> Thanks, >> Tianyin >> >> >> > > -- > -- Howard Chu > CTO, Symas Corp. http://www.symas.com > Director, Highland Sun http://highlandsun.com/hyc/ > Chief Architect, OpenLDAP > http://www.openldap.org/**project/<http://www.openldap.org/project/> > -- Tianyin XU, http://cseweb.ucsd.edu/~tixu/ --000325575576f2e15a04bc2a31c8 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable hmmm... I have to say I can replay it every time.<div><br></div><div>just s= et the following two lines in the beginning of the slapd.conf,</div><div><b= r></div><div><div>index_substr_if_maxlen 100</div><div>index_substr_if_minl= en 5</div> <div><br></div><div>slapd starts without a warning and can serve requests.<= /div><div><br></div><div>T</div> <div><br></div><br><div class=3D"gmail_quote">On Mon, Mar 26, 2012 at 2:43 = AM, Howard Chu <span dir=3D"ltr"><<a href=3D"mailto:[email protected]" targe= t=3D"_blank">[email protected]</a>></span> wrote:<br><blockquote class=3D"gm= ail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-le= ft:1ex"> <div><a href=3D"mailto:[email protected]" target=3D"_blank">[email protected]= </a> wrote:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex"> Full_Name: Tianyin Xu<br> Version: 2.4.30<br> OS: Ubuntu Linux 10.04<br> URL: <a href=3D"ftp://ftp.openldap.org/incoming/" target=3D"_blank">ftp://f= tp.openldap.org/<u></u>incoming/</a><br> Submission from: (NULL) (128.54.167.68)<br> <br> <br> 1. Symptom:<br> <br> In the main configuration file of OpenLDAP (slapd.conf), set the following<= br> configuration:<br> <br> index_substr_if_minlen 100<br> index_substr_if_maxlen 5<br> <br> Then, everything is fine. The system behaves as expectation. However, if re= verse<br> the order of the two configuration line as follows:<br> <br> index_substr_if_maxlen 5<br> index_substr_if_minlen 100<br> <br> Then, the system refused to start, with the following misleading message:<b= r> <br> Mar 25 21:29:18 tianyin-desktop slapd[12700]:<br> /home/tianyin/openldap-2.4.30/<u></u>etc/openldap/slapd.conf: line 1:<br> <index_substr_if_minlen> =A0invalid value (5)<br> </blockquote> <br></div> Unable to reproduce this symptom. In both cases I get<br> <br> testrun/slapd.1.conf: line 31: <index_substr_if_minlen> invalid value= (100)<br> <br> Closing this ITS.<div><div><br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex"> <br> ------------------------------<u></u>---------------------------<br> <br> 2. Root cause in terms of code snippet<br> <br> (1) servers/slapd/slap.h<br> <br> #define SLAP_INDEX_SUBSTR_IF_MINLEN_<u></u>DEFAULT =A0 =A0 2<br> #define SLAP_INDEX_SUBSTR_IF_MAXLEN_<u></u>DEFAULT =A0 =A0 4<br> <br> (2) servers/slapd/schema_init.c<br> <br> unsigned int index_substr_if_minlen =3D SLAP_INDEX_SUBSTR_IF_MINLEN_<u></u>= DEFAULT;<br> unsigned int index_substr_if_maxlen =3D SLAP_INDEX_SUBSTR_IF_MAXLEN_<u></u>= DEFAULT;<br> <br> (3) servers/slapd/bconfig.c<br> <br> case CFG_SSTR_IF_MAX:<br> =A0 =A0 if (c->value_uint< =A0index_substr_if_minlen) {<br> =A0 =A0 =A0 =A0 snprintf(c->cr_msg, sizeof(c->cr_msg), "<%s&= gt; =A0invalid value",<br> c->argv[0]);<br> =A0 =A0 =A0 =A0 Debug(LDAP_DEBUG_ANY, "%s: %s (%d)\n", c->log= , c->cr_msg,<br> c->value_int);<br> =A0 =A0 =A0 =A0 return(1);<br> =A0 =A0 }<br> =A0 =A0 index_substr_if_maxlen =3D c->value_uint;<br> =A0 =A0 break;<br> <br> case CFG_SSTR_IF_MIN:<br> =A0 =A0 if (c->value_uint> =A0index_substr_if_maxlen) {<br> =A0 =A0 =A0 =A0 snprintf(c->cr_msg, sizeof( c->cr_msg ), "<%= s> =A0invalid value",<br> c->argv[0]);<br> =A0 =A0 =A0 =A0 Debug(LDAP_DEBUG_ANY, "%s: %s (%d)\n", c->log= , c->cr_msg, c->value_int<br> );<br> =A0 =A0 =A0 =A0 return(1);<br> =A0 =A0 }<br> =A0 =A0 index_substr_if_minlen =3D c->value_uint;<br> =A0 =A0 break;<br> <br> (4) backtrace<br> <br> #0 =A0config_generic (c=3D0x915760) at bconfig.c:1996<br> #1 =A00x0000000000433a00 in config_set_vals (Conf=3D0x8146c0, c=3D0x915760)= at<br> config.c:345<br> #2 =A00x0000000000433f5f in config_add_vals (Conf=3D0x8146c0, c=3D0x915760)= at<br> config.c:418<br> #3 =A00x00000000004351b3 in read_config_file (fname=3D0x5a0a98<br> "/home/tianyin/openldap-2.4.<u></u>30/etc/openldap/slapd.conf", d= epth=3D0, cf=3D0x0,<br> cft=3D0x8140c0) at config.c:783<br> #4 =A00x000000000042846b in read_config (fname=3D0x0, dir=3D0x0) at bconfig= .c:4213<br> #5 =A00x000000000041c217 in main (argc=3D1, argv=3D0x7fffffffe2f8) at main.= c:792<br> <br> ------------------------------<u></u>---------------------------<br> <br> It's quite clear that the order matters, and this should be a bug relat= ed to<br> configuration.<br> <br> Thanks,<br> Tianyin<br> <br> <br> </blockquote> <br> <br></div></div><span><font color=3D"#888888"> -- <br> =A0-- Howard Chu<br> =A0CTO, Symas Corp. =A0 =A0 =A0 =A0 =A0 <a href=3D"http://www.symas.com" t= arget=3D"_blank">http://www.symas.com</a><br> =A0Director, Highland Sun =A0 =A0 <a href=3D"http://highlandsun.com/hyc/" = target=3D"_blank">http://highlandsun.com/hyc/</a><br> =A0Chief Architect, OpenLDAP =A0<a href=3D"http://www.openldap.org/project= /" target=3D"_blank">http://www.openldap.org/<u></u>project/</a><br> </font></span></blockquote></div><br><br clear=3D"all"><div><br></div>-- <b= r><span style=3D"text-indent:0px;letter-spacing:normal;font-variant:normal;= text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:no= rmal;border-collapse:separate;text-transform:none;font-size:medium;white-sp= ace:normal;font-family:'Times New Roman';word-spacing:0px"><span st= yle=3D"color:rgb(102,102,102);font-family:arial;font-size:small">Tianyin XU= ,<br> <a href=3D"http://cseweb.ucsd.edu/%7Etixu/" target=3D"_blank">http://cseweb= .ucsd.edu/~tixu/</a></span></span><br> </div> --000325575576f2e15a04bc2a31c8--
