https://bugs.openldap.org/show_bug.cgi?id=10023
Issue ID: 10023
Summary: Asynchronous connects are broken
Product: OpenLDAP
Version: 2.5.14
Hardware: All
OS: All
Status: UNCONFIRMED
Keywords: needs_review
Severity: normal
Priority: ---
Component: libraries
Assignee: bugs(a)openldap.org
Reporter: ipuleston(a)sonicwall.com
Target Milestone: ---
We have a port of OpenLDAP client running in an embedded system, which is using
asynchronous connects to the LDAP server. We have been using OpenLDAP 2.4.40
for a long time, and I just upgraded it to use 2.5.14 (as the current LTS
release). After doing this, async connects to the LDAP server no longer work.
You can see this in the following debug output:
A successful async connect with 2.4.40:
ldap_send_initial_request
ldap_new_connection 1 1 0
ldap_int_open_connection
ldap_connect_to_host: TCP Ian-DC1.sd80.com:389
ldap_pvt_gethostbyname_a: host=Ian-DC1.sd80.com, r=0
ldap_new_socket: 251
ldap_prepare_socket: 251
ldap_connect_to_host: Trying 192.168.168.3:389
ldap_pvt_connect: fd: 251 tm: 10 async: -1
ldap_ndelay_on: 251
attempting to connect:
connect errno: 115
ldap_int_poll: fd: -1 tm: 0
A failed async connect with 2.5.14:
ldap_send_initial_request
ldap_new_connection 1 1 0
ldap_int_open_connection
ldap_connect_to_host: TCP Ian-DC1.sd80.com:389
ldap_pvt_gethostbyname_a: host=Ian-DC1.sd80.com, r=0
ldap_new_socket: 247
ldap_prepare_socket: 247
ldap_connect_to_host: Trying 10.21.61.3:389
ldap_pvt_connect: fd: 247 tm: 10 async: -1
ldap_ndelay_on: 247
attempting to connect:
connect errno: 115
ldap_open_defconn: successful
ldap_send_server_request
Sending Bind Request, len=0x6ca10c1f
ldap_write: want=63 error=Resource temporarily unavailable
Note that in both cases the connect attempt returns errno 115, EINPROGRESS,
meaning that it has not completed. But after that:
● 2.4.40 calls ldap_int_poll (via ldap_send_initial_request ->
ldap_int_check_async_open) to begin the wait for async completion.
● 2.5.14 instead reports a successful connect, and tries to send the bind which
fails since thre socket is not yet connected.
I tracked the problem down to a change made for ITS #8022 "an async connect may
still succeed immediately" in this commit:
https://git.openldap.org/openldap/openldap/-/commit/ae6347bac12bbf843678a83…
That change in ldap_new_connection makes it set lconn_status for an async
connect to LDAP_CONNST_CONNECTED rather than LDAP_CONNST_CONNECTING if
ldap_int_open_connection returns 0. The problem is that
ldap_int_open_connection returns 0 after getting the EINPROGRESS.
ldap_connect_to_host returns -2 for the latter, but ldap_int_open_connection
doesn't check for that, returning 0 for any return code other than -1.
I think that the bug is actually in ldap_int_open_connection rather than in the
above commit. It should probably return -2 when ldap_connect_to_host returns
that.
--
You are receiving this mail because:
You are on the CC list for the issue.
https://bugs.openldap.org/show_bug.cgi?id=10011
Issue ID: 10011
Summary: Incompatibilities with stricter C99 compilers
Product: OpenLDAP
Version: 2.6.4
Hardware: All
OS: All
Status: UNCONFIRMED
Keywords: needs_review
Severity: normal
Priority: ---
Component: build
Assignee: bugs(a)openldap.org
Reporter: sam(a)gentoo.org
Target Milestone: ---
Newer C compilers (>= Clang 16 and likely >= GCC 14) reject some constructs
removed in C99 like implicit function declarations and implicit ints. Some
compilers are also starting to reject obsolete K&R prototypes which were
removed in C23.
I've filed an MR at
https://git.openldap.org/openldap/openldap/-/merge_requests/605 to address the
issues in configure as well as a small number of issues in the codebase itself.
For more information, see LWN.net [0] or LLVM's Discourse [1], the Gentoo wiki
[2],
or the (new) c-std-porting mailing list [3].
[0] https://lwn.net/Articles/913505/
[1]
https://discourse.llvm.org/t/configure-script-breakage-with-the-new-werror-…
[2] https://wiki.gentoo.org/wiki/Modern_C_porting
[3] hosted at lists.linux.dev.
--
You are receiving this mail because:
You are on the CC list for the issue.
https://bugs.openldap.org/show_bug.cgi?id=9736
Issue ID: 9736
Summary: pwrite bug in OSX breaking LMDB promise about the
maximum value size
Product: LMDB
Version: unspecified
Hardware: All
OS: Mac OS
Status: UNCONFIRMED
Keywords: needs_review
Severity: normal
Priority: ---
Component: liblmdb
Assignee: bugs(a)openldap.org
Reporter: renault.cle(a)gmail.com
Target Milestone: ---
Hi,
I was working with LMDB and found an issue when trying to write a value of
approximately 3.3GiB in the database, I dive into the LMDB source code of the
mdb_put method using the lldb debugger and found out that it was not related to
an issue in LMDB itself but rather a bug in the pwrite function of the Mac OS
libc implementation.
The pwrite function is given four parameters, the file descriptor, the buffer,
the count of bytes to write from the buffer and, the offset of where to write
it in the file. On Mac OS the count of bytes is a size_t that must be a 64bits
unsigned integer but when you call pwrite with a number bigger or equal to 2^31
it returns an error 22 (invalid argument). LMDB was returning a 22 error from
the mdb_put call and not an EINVAL because the error was cause by an internal
issue and not something catchable by LMDB.
I am not sure about what we can do, can we implement this single pwrite [1] as
multiple pwrite with counts smaller than 2^31 in a loop, just for Mac OS? Like
for Windows where we do specific things for this operating system too?
I also found this issue on the RocksDB repository [2] about a similar problem
they have with pwrite and write on Mac OS it seems. I understand that this is
not a real promise that LMDB is specifying but rather an "in theory" rule [3].
Thank you for your time,
kero
[1]:
https://github.com/LMDB/lmdb/blob/01b1b7dc204abdf3849536979205dc9e3a0e3ece/…
[2]: https://github.com/facebook/rocksdb/issues/5169
[3]: http://www.lmdb.tech/doc/group__mdb.html#structMDB__val
--
You are receiving this mail because:
You are on the CC list for the issue.
https://bugs.openldap.org/show_bug.cgi?id=10021
Issue ID: 10021
Summary: Cannot insert data into wiredtiger backend
Product: OpenLDAP
Version: 2.6.4
Hardware: x86_64
OS: Linux
Status: UNCONFIRMED
Keywords: needs_review
Severity: normal
Priority: ---
Component: backends
Assignee: bugs(a)openldap.org
Reporter: jailbird(a)fdf.net
Target Milestone: ---
I have a test system running OpenLDAP 2.6.4 linked against WiredTiger 11.1.0
running on a RHEL9.1-based system. Running kernel is 6.1.16, filesystem is XFS.
back_wt.la was added to cn=module and a simple olcDatabase=wt was created like:
dn: olcDatabase=wt
objectClass: olcDatabaseConfig
objectClass: olcWtConfig
olcDatabase: wt
olcDbDirectory: /var/lib/ldap
olcSuffix: dc=fdf,dc=net
olcLimits: {0}dn.base="cn=root,dc=fdf,dc=net" time.soft=unlimited time.hard=u
nlimited size.soft=unlimited size.hard=unlimited
olcRootDN: cn=root,dc=fdf,dc=net
olcWtConfig: create
olcDbIndex: objectClass,uid,gidNumber,uidNumber pres,eq
olcDbIndex: ou,cn,mail pres,eq,sub
structuralObjectClass: olcWtConfig
I start slapd and it creates the database files correctly. I then go and try to
create the container with a simple .ldif and ldapadd:
dn: dc=fdf,dc=net
objectClass: dcObject
objectClass: organization
o: FDF
dc: fdf
That generates:
[1677801597:758327][83158:0x55b4158fb640], file:dn2id.wt, WT_CURSOR.insert:
[WT_VERB_DEFAULT][ERROR]: __wt_txn_id_check, 1339: write operations are not
supported in read-committed or read-uncommitted transactions.: Operation not
supported
Mar 2 15:59:57 slapd[83158]: wt_dn2id_add: insert failed: Operation not
supported (95)
That comes from WiredTiger @
https://github.com/wiredtiger/wiredtiger/blob/5a032be765b1ebd9bb789e837cd00…
but I don't seem to understand why it's happening on a simple add? Am I missing
something obvious?
--
You are receiving this mail because:
You are on the CC list for the issue.
https://bugs.openldap.org/show_bug.cgi?id=9436
Issue ID: 9436
Summary: OpenSSL 3.0: libldap uses depreciated functions
Product: OpenLDAP
Version: 2.5
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: ---
Component: libraries
Assignee: bugs(a)openldap.org
Reporter: quanah(a)openldap.org
Target Milestone: ---
OpenLDAP master fails to build against OpenSSL 3.0 alpha when "no-deprecated"
is specified.
Currently hitting these errors:
./.libs/libldap.so: undefined reference to `SSL_get_peer_certificate'
./.libs/libldap.so: undefined reference to `PEM_read_bio_DHparams'
./.libs/libldap.so: undefined reference to `ERR_get_error_line'
./.libs/libldap.so: undefined reference to `DH_free'
./.libs/libldap.so: undefined reference to `SSL_CTX_set_tmp_dh'
Notes:
SSL_get_peer_certificate is SSL_get1_peer_certificate in 3.0.0
SSL_CTX_set_tmp_dh should be replaced as follows:
# define SSL_CTX_set_tmp_dh(ctx,dh) \
SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TMP_DH,0,(char *)(dh))
Have to dig deeper for:
PEM_read_bio_DHparams
ERR_get_error_line
DH_free
--
You are receiving this mail because:
You are on the CC list for the issue.
https://bugs.openldap.org/show_bug.cgi?id=9832
Issue ID: 9832
Summary: back-monitor crash when sizelimit in operation
Product: OpenLDAP
Version: unspecified
Hardware: All
OS: All
Status: UNCONFIRMED
Keywords: needs_review
Severity: normal
Priority: ---
Component: backends
Assignee: bugs(a)openldap.org
Reporter: ondra(a)mistotebe.net
Target Milestone: ---
If a back-monitor search gets a failure in send_search_entry(), e.g. due to
sizelimit being reached, a pending server pause, etc., it will try to call
monitor_cache_release( mi, e ) where e == NULL instead of the correct entry to
release.
--
You are receiving this mail because:
You are on the CC list for the issue.
https://bugs.openldap.org/show_bug.cgi?id=10034
Issue ID: 10034
Summary: Assertion 'i < NUMKEYS(mp)' failed in
mdb_page_search_root()"
Product: LMDB
Version: 0.9.23
Hardware: Other
OS: Linux
Status: UNCONFIRMED
Keywords: needs_review
Severity: normal
Priority: ---
Component: liblmdb
Assignee: bugs(a)openldap.org
Reporter: 763280032(a)qq.com
Target Milestone: ---
We found that when lmdb is opened after OS startup and data is written to it,
lmdb will trigger abort probabilistically(Restart the OS 600 times will trigger
once);
We want to know what situation triggers this issue(Assertion 'i < NUMKEYS(mp)'
failed in mdb_page_search_root()); we want to know if there is a problem with
our usage;
Please Help Us
(gdb) x/8s 0x8baee988
0x8baee988: "8\373Բ\b\371Բmdb.c:5542: Assertion 'i < NUMKEYS(mp)' failed in
mdb_page_search_root()"
--
You are receiving this mail because:
You are on the CC list for the issue.
https://bugs.openldap.org/show_bug.cgi?id=9460
Issue ID: 9460
Summary: Drop support for OpenSSL older than 1.1.1
Product: OpenLDAP
Version: 2.5
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: ---
Component: libraries
Assignee: bugs(a)openldap.org
Reporter: quanah(a)openldap.org
Target Milestone: ---
OpenSSL no longer supports the 1.0.2 series and specifically notes it should
not be used:
"All older versions (including 1.1.0, 1.0.2, 1.0.0 and 0.9.8) are now out of
support and should not be used."
Currently configure checks for 1.0.2 or higher.
OpenSSL 1.1.1 is supported through 11 Sep 2023.
--
You are receiving this mail because:
You are on the CC list for the issue.
https://bugs.openldap.org/show_bug.cgi?id=8977
Ondřej Kuzník <ondra(a)mistotebe.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://bugs.openldap.org/s
| |how_bug.cgi?id=10031
--
You are receiving this mail because:
You are on the CC list for the issue.
https://bugs.openldap.org/show_bug.cgi?id=10027
Issue ID: 10027
Summary: MDB_TXN_FULL on large write transactions
Product: LMDB
Version: unspecified
Hardware: All
OS: Linux
Status: UNCONFIRMED
Keywords: needs_review
Severity: normal
Priority: ---
Component: liblmdb
Assignee: bugs(a)openldap.org
Reporter: renault.cle(a)gmail.com
Target Milestone: ---
Hello,
Our users ([1], [2]) encountered MDB_TXN_FULL errors when our Meilisearch
engine processed a large write transaction. We did read the documentation about
this error in the codebase of LMDB:
Spill pages from the dirty list back to disk.
This is intended to prevent running into #MDB_TXN_FULL situations,
but note that they may still occur in a few cases:
1) our estimate of the txn size could be too small. Currently this
seems unlikely, except with a large number of #MDB_MULTIPLE items.
2) child txns may run out of space if their parents dirtied a
lot of pages and never spilled them. TODO: we probably should do
a preemptive spill during #mdb_txn_begin() of a child txn, if
the parent's dirty_room is below a given threshold.
Otherwise, if not using nested txns, it is expected that apps will
not run into #MDB_TXN_FULL any more. The pages are flushed to disk
the same way as for a txn commit, e.g. their P_DIRTY flag is cleared.
If the txn never references them again, they can be left alone.
If the txn only reads them, they can be used without any fuss.
If the txn writes them again, they can be dirtied immediately without
going thru all of the work of #mdb_page_touch(). Such references are
handled by #mdb_page_unspill().
However, It looks like we are not in those scenarios, we are not using
MDB_DUPFIXED, and we are not using sub-transactions. We don't use the MDB_VL32
flag either, so this is not related to [3].
Thank you for your time,
Have a nice day 💡
[1]: https://github.com/meilisearch/meilisearch/issues/3603
[2]: https://github.com/meilisearch/meilisearch/issues/3349
[3]: https://bugs.openldap.org/show_bug.cgi?id=8813
--
You are receiving this mail because:
You are on the CC list for the issue.