On Tue, Sep 26, 2017 at 02:00:40PM +0100, Howard Chu wrote:
> Nothing in this patch says "rotate" anywhere. Please add some more
> descriptive comments describing the purpose of each new macro.
A version with the circular queue description extended to cover the
rotation macros is available here:
ftp://ftp.openldap.org/incoming/Ondrej-Kuznik-20170926-LDAP_CIRCLEQ.patch
--=20
Ond=C5=99ej Kuzn=C3=ADk
Senior Software Engineer
Symas Corporation http://www.symas.com
Packaged, certified, and supported LDAP solutions powered by OpenLDAP
hyc(a)symas.com wrote:
> ondra(a)mistotebe.net wrote:
>>> IMO using recursive mutexes means your code is broken. We introduced these for
>>> accesslog.c but in fact we could avoid them at zero cost. Also I don't see the
>>> relevance of libevent to this discussion. We use our own event mechanism and
>>> it is more efficient than libevent.
>>
>> libevent is a dependency for the load balancer that I intend to propose
>> for integration into the project after all the relevant dependencies
>> have come in.
>>
>> There is a new version of this patch that provides an implementation on
>> each platform or defers to the existing one (as per each platform's
>> documentation). Untested except on POSIX and most of them seem pretty
>> arcane anyway.
>>
>> ftp://ftp.openldap.org/incoming/Ondrej-Kuznik-20170918-ITS8638-libldap_r-re…
>>
> It looks like glibc still doesn't define PTHREAD_MUTEX_RECURSIVE by default,
> it requires compiling with either -D_GNU_SOURCE or -D_XOPEN_SOURCE. The
> feature itself appears to be part of UNIX98. It's likely that all pthread
> implementations available today support it, but it still seems a bit iffy.
>
OK, I see that current glibc defaults to _POSIX_C_SOURCE=200809 which includes
__XOPEN_2K8. All of this came later than our rmutex.c which was written in
2006, so that explains where the need arose from. We should be safe pushing
this in, go ahead.
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/
ondra(a)openldap.org wrote:
> Full_Name: Ondrej Kuznik
> Version: master
> OS:
> URL: ftp://ftp.openldap.org/incoming/Ondrej-Kuznik-20170913-LDAP_CIRCLEQ.patch
> Submission from: (NULL) (82.10.24.68)
>
>
> The CIRCLEQ macros are incomplete and not very useful on their
> own, but when providing a few more that allow rotating it, they
> are. Patch to that effect is attached.
>
> They could probably be made a bit more efficient as well, though.
Nothing in this patch says "rotate" anywhere. Please add some more descriptive
comments describing the purpose of each new macro.
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/
ondra(a)mistotebe.net wrote:
>> IMO using recursive mutexes means your code is broken. We introduced these for
>> accesslog.c but in fact we could avoid them at zero cost. Also I don't see the
>> relevance of libevent to this discussion. We use our own event mechanism and
>> it is more efficient than libevent.
>
> libevent is a dependency for the load balancer that I intend to propose
> for integration into the project after all the relevant dependencies
> have come in.
>
> There is a new version of this patch that provides an implementation on
> each platform or defers to the existing one (as per each platform's
> documentation). Untested except on POSIX and most of them seem pretty
> arcane anyway.
>
> ftp://ftp.openldap.org/incoming/Ondrej-Kuznik-20170918-ITS8638-libldap_r-re…
>
It looks like glibc still doesn't define PTHREAD_MUTEX_RECURSIVE by default,
it requires compiling with either -D_GNU_SOURCE or -D_XOPEN_SOURCE. The
feature itself appears to be part of UNIX98. It's likely that all pthread
implementations available today support it, but it still seems a bit iffy.
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/
--001a1141d7e85161e00559cd9fbe
Content-Type: text/plain; charset="UTF-8"
On Fri, Sep 22, 2017 at 8:05 AM, Quanah Gibson-Mount <quanah(a)symas.com>
wrote:
> --On Wednesday, September 20, 2017 4:06 AM +0000 djkurtz(a)google.com wrote:
>
> Out of curiosity, what OS were you compiling on that didn't have
>>> /dev/urandom available?
>>>
>>
>> This occurs when cross compiling. See:
>> https://github.com/openldap/openldap/blob/master/configure.in#L2197
>>
>
> Perfect, tyvm! Patch seems like it should be fairly straight forward. If
> I send you one, would you be able to test it?
Yes, I'll try to find time to test it. Thanks for looking into this!
In fact, I think I already have one:
https://chromium-review.googlesource.com/#/c/563276/4/net-nds/openldap/file…
>
>
> --Quanah
>
>
>
>
> --
>
> Quanah Gibson-Mount
> Product Architect
> Symas Corporation
> Packaged, certified, and supported LDAP solutions powered by OpenLDAP:
> <http://www.symas.com>
>
>
--
Daniel Kurtz | Software Engineer | djkurtz(a)google.com | 650.204.0722
<(650)%20204-0722>
--001a1141d7e85161e00559cd9fbe
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><br><div class=3D"gmail_extra"><br><div class=3D"gmail_quo=
te">On Fri, Sep 22, 2017 at 8:05 AM, Quanah Gibson-Mount <span dir=3D"ltr">=
<<a href=3D"mailto:quanah@symas.com" target=3D"_blank">quanah(a)symas.com<=
/a>></span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:=
0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">=
<span>--On Wednesday, September 20, 2017 4:06 AM +0000 <a href=3D"mailto:dj=
kurtz(a)google.com" target=3D"_blank">djkurtz(a)google.com</a> wrote:<br>
<br>
</span><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;=
border-left:1px solid rgb(204,204,204);padding-left:1ex"><span><blockquote =
class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px sol=
id rgb(204,204,204);padding-left:1ex">
Out of curiosity, what OS were you compiling on that didn't have<br>
/dev/urandom available?<br>
</blockquote>
<br></span><span>
This occurs when cross compiling.=C2=A0 See:<br>
<a href=3D"https://github.com/openldap/openldap/blob/master/configure.in#L2=
197" rel=3D"noreferrer" target=3D"_blank">https://github.com/openldap/op<wb=
r>enldap/blob/master/configure.i<wbr>n#L2197</a><br>
</span></blockquote>
<br>
Perfect, tyvm!=C2=A0 Patch seems like it should be fairly straight forward.=
=C2=A0 If I send you one, would you be able to test it?</blockquote><div><b=
r></div><div>Yes, I'll try to find time to test it.=C2=A0 Thanks for lo=
oking into this!</div><div>In fact, I think I already have one:</div><div><=
a href=3D"https://chromium-review.googlesource.com/#/c/563276/4/net-nds/ope=
nldap/files/openldap-2.4.45-no-EGD.patch">https://chromium-review.googlesou=rce.com/#/c/563276/4/net-nds/openldap/files/openldap-2.4.45-no-EGD.patch</a=
><br></div><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"marg=
in:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1e=
x"><span class=3D"gmail-m_-7533148463480577044HOEnZb"><font color=3D"#88888=
8"><br>
<br>
--Quanah</font></span><div class=3D"gmail-m_-7533148463480577044HOEnZb"><di=
v class=3D"gmail-m_-7533148463480577044h5"><br>
<br>
<br>
<br>
--<br>
<br>
Quanah Gibson-Mount<br>
Product Architect<br>
Symas Corporation<br>
Packaged, certified, and supported LDAP solutions powered by OpenLDAP:<br>
<<a href=3D"http://www.symas.com" rel=3D"noreferrer" target=3D"_blank">h=
ttp://www.symas.com</a>><br>
<br>
</div></div></blockquote></div><br><br clear=3D"all"><div><br></div>-- <br>=
<div class=3D"gmail-m_-7533148463480577044gmail_signature"><span style=3D"f=
ont-family:"Times New Roman";font-size:medium"><div style=3D"line=
-height:1.5em;padding-top:10px;margin-top:10px;color:rgb(85,85,85);font-fam=
ily:sans-serif;font-size:small"><span style=3D"border-width:2px 0px 0px;bor=
der-style:solid;border-color:rgb(213,15,37);padding-top:2px;margin-top:2px"=
>Daniel Kurtz=C2=A0|</span><span style=3D"border-width:2px 0px 0px;border-s=
tyle:solid;border-color:rgb(51,105,232);padding-top:2px;margin-top:2px">=C2=
=A0Software Engineer=C2=A0|</span><span style=3D"border-width:2px 0px 0px;b=
order-style:solid;border-color:rgb(0,153,57);padding-top:2px;margin-top:2px=
">=C2=A0<a href=3D"mailto:djkurtz@google.com" target=3D"_blank">djkurtz@goo=
gle.com</a>=C2=A0<wbr>|</span><span style=3D"border-width:2px 0px 0px;borde=
r-style:solid;border-color:rgb(238,178,17);padding-top:2px;margin-top:2px">=
=C2=A0<a href=3D"tel:(650)%20204-0722" value=3D"+16502040722" target=3D"_bl=
ank">650.204.0722</a></span></div></span></div>
</div></div>
--001a1141d7e85161e00559cd9fbe--
--On Monday, March 06, 2017 6:21 PM +0000 lorban(a)bitronix.be wrote:
> Full_Name: Ludovic Orban
> Version:
> OS: OmniOS r151020
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (2a02:a03f:1cdc:c300:384b:af79:f57c:b134)
Thanks for the report! I was able to reproduce this issue under Solaris as
well.
My proprosed fix is in:
<https://github.com/quanah/openldap-scratch/tree/its8612>
Regards,
Quanah
--
Quanah Gibson-Mount
Product Architect
Symas Corporation
Packaged, certified, and supported LDAP solutions powered by OpenLDAP:
<http://www.symas.com>
--On Wednesday, September 20, 2017 4:06 AM +0000 djkurtz(a)google.com wrote:
>> Out of curiosity, what OS were you compiling on that didn't have
>> /dev/urandom available?
>
> This occurs when cross compiling. See:
> https://github.com/openldap/openldap/blob/master/configure.in#L2197
Perfect, tyvm! Patch seems like it should be fairly straight forward. If
I send you one, would you be able to test it?
--Quanah
--
Quanah Gibson-Mount
Product Architect
Symas Corporation
Packaged, certified, and supported LDAP solutions powered by OpenLDAP:
<http://www.symas.com>