Univention Bugzilla – Bug 47495
Improve error message when listener/cache/mdb/maxsize is too large for 32bit system
Last modified: 2019-06-25 13:27:14 CEST
08.08.18 09:38:31.737 LISTENER ( INFO ) : cache_init: using default mapsize: 1992294400 [...] 08.08.18 09:52:51.314 LISTENER ( INFO ) : dntree_lookup_id4ldapdn: found id=307151 08.08.18 09:52:51.314 LISTENER ( INFO ) : dntree_lookup_id4ldapdn: found id=307152 08.08.18 09:52:51.314 LISTENER ( ERROR ) : cache_update_entry: storing entry in database failed: cn=USERNAME,cn=unique-usernames,cn=ucsschool,cn=univention,dc=school,dc=customer,dc=intra 08.08.18 09:52:51.314 LISTENER ( ERROR ) : cache.c:469:cache_update_entry_in_transaction mdb_put: failed: MDB_MAP_FULL: Environment mapsize limit reached (-30792) 08.08.18 09:52:51.314 LISTENER ( WARN ) : received signal 6 ucr set listener/cache/mdb/maxsize='2192294400' service univention-directory-listener restart Now, the listener does not start: 08.08.18 10:06:26.876 LISTENER ( ERROR ) : cache_init: Error parsing value of UCR variable listener/cache/mdb/maxsize as number: Numerical result out of range The affected system is a UCS 4.2-4 32bit slave system. mapsize = strtol(mapsize_str, &endptr, 10); if ((errno == ERANGE && (mapsize == LONG_MAX || mapsize == LONG_MIN)) || (errno != 0 && mapsize == 0)) { univention_debug(UV_DEBUG_LISTENER, UV_DEBUG_ERROR, "cache_init: Error parsing value of UCR variable %s as number: %s", ucr_var_mapsize, strerror(errno)); strtol ==> 32bit signed integer ==> 2147483648 mapsize ist unsigned: size_t mapsize; Maybe we should use "strtoul"? 2192294400 is only slightly larger than the default of 1992294400. So on a 32bit system, this UCR variable is nearly useless.
(In reply to Sönke Schwardt-Krummrich from comment #0) > ucr set listener/cache/mdb/maxsize='2192294400' > service univention-directory-listener restart > > Now, the listener does not start: > 08.08.18 10:06:26.876 LISTENER ( ERROR ) : cache_init: Error parsing > value of UCR variable listener/cache/mdb/maxsize as number: Numerical result > out of range ... > 2192294400 is only slightly larger than the default of 1992294400. So on a > 32bit system, this UCR variable is nearly useless. For 32 bit systems the given default value is already the maximum value; determined by experiments (Bug #33993 comment 3) # ucr info listener/cache/mdb/maxsize listener/cache/mdb/maxsize: <empty> The maximum size of the cache database in bytes. On 64 bit systems the default is 2 GiB. On 32 bit systems the default is 1.9 GiB. CANNOT-FIX: the DB is memory-mapped *completely* into user space and the 32-bit user space cannot guarantee that such a linear space is available as additional space is needed for the executable and its libraries. Switch to 64 bit if you need a bigger DB.
Created attachment 10079 [details] improve_log_message_on_32bit.patch We should improve the error message here, see attached patch proposal.
This patch should be considered when addressing Bug 49709. *** This bug has been marked as a duplicate of bug 49709 ***