Re: openldap port mdb support
On 2017/08/05 21:39, Paul B. Henson wrote: > I took a look at the patch in head; you should assign the failure code to rc > before calling Debug, as it refers to rc... Thanks, fixed. On 2017/08/05 21:40, Paul B. Henson wrote: > On Sat, Aug 05, 2017 at 12:35:24AM +, Stuart Henderson wrote: > > > The ports@ list is a better venue for ports-related queries, > > please see this: https://marc.info/?l=openbsd-ports=150157643516239=2 > > Ah, ok, thanks for the pointer. > > > This is not preventing programs from running. > > Hmm, I could've sworn I got that message and then slapd failed to start. > Dunno, maybe I got confused. Once I'm done working with openldap mdb I'll > start over from scratch and try again and see what happens. > > Thanks for the info... There have been other problems which occurred at the same time as the icu warnings resumed (triggered by the switch to clang for base and all but a very small number of ports) - if you run into it again, if there's any debug information or backtrace available, that would be interesting.
Re: openldap port mdb support
On Mon, Jul 10, 2017 at 07:34:11AM +, Stuart Henderson wrote: > Feel free to try it, I believe the required patch to force MDB_WRITEMAP > is still in there..but I don't think there were any major changes upstream > since the last attempt so I wouldn't hold out too much hope for it working > straight off. Hmm, as you said, trying to use mdb resulted in crashes. My initial debugging led to the cause of this as a NULL mdb environment, and ironically the root cause of that turned out to be the OpenBSD specific MDB_WRITEMAP patch 8-/. if ( !(flags & MDB_WRITEMAP) ) { Debug( LDAP_DEBUG_ANY, LDAP_XSTRING(mdb_db_open) ": database \"%s\" does not have writemap. " "This is required on systems without unified buffer cache.\n", be->be_suffix[0].bv_val, rc, 0 ); goto fail; } There are two problems with it; first, it accesses the local flags variable before it is initialized to mdb->mi_dbenv_flags shortly thereafter, so the value checked is random and the if block nondeterministically triggers, and second, it doesn't assign a failure value to rc before it jumps to fail, so the function returns successfully but with a closed be, and the code keeps going but later segfaults because of the NULL mdb environment. I updated the patch and moved the check to be after the flags initialization: flags = mdb->mi_dbenv_flags; and added an assignment to rc on failure: rc = MDB_INCOMPATIBLE; I then tweaked the mdb test suite to always enable MDB_WRITEMAP, and so far it's been running for 20 minutes with no errors, crashes, or failures. Right now it's compiled "-O0 -ggdb", if everything keeps looking good, I'll recompile it normally and do more testing.
Re: openldap port mdb support
On 2017-07-10, Paul B. Hensonwrote: > mdb has been disabled in the openldap port since it looks like > 2015/02/16, I was wondering if anyone has tried it since then to see if > maybe the issues with it have been resolved? The other backends are > deprecated upstream, it would be nice to get mdb working under openbsd. > > I'm going to try enabling it and running through the tests and see how > things turn out but I was just curious if anyone else had worked with it > in the past couple of years. > > Thanks... > > Feel free to try it, I believe the required patch to force MDB_WRITEMAP is still in there..but I don't think there were any major changes upstream since the last attempt so I wouldn't hold out too much hope for it working straight off. (Without MDB_WRITEMAP, mdb assumes mmap and file access can be intermixed without syncs, which isn't the case on OpenBSD).
openldap port mdb support
mdb has been disabled in the openldap port since it looks like 2015/02/16, I was wondering if anyone has tried it since then to see if maybe the issues with it have been resolved? The other backends are deprecated upstream, it would be nice to get mdb working under openbsd. I'm going to try enabling it and running through the tests and see how things turn out but I was just curious if anyone else had worked with it in the past couple of years. Thanks...