Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 310041 Details for
Bug 442170
"DB_BUFFER_SMALL: User memory too small for return value" error when importing LDIF with replication active
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
diffs
diffs.bug442170 (text/plain), 3.55 KB, created by
Rich Megginson
on 2008-06-23 16:39:18 UTC
(
hide
)
Description:
diffs
Filename:
MIME Type:
Creator:
Rich Megginson
Created:
2008-06-23 16:39:18 UTC
Size:
3.55 KB
patch
obsolete
>Index: bug442170/ldap/servers/plugins/replication/cl5_clcache.c >=================================================================== >RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/cl5_clcache.c,v >retrieving revision 1.7 >diff -u -8 -r1.7 cl5_clcache.c >--- bug442170/ldap/servers/plugins/replication/cl5_clcache.c 10 Nov 2006 23:45:17 -0000 1.7 >+++ bug442170/ldap/servers/plugins/replication/cl5_clcache.c 23 Jun 2008 16:38:18 -0000 >@@ -40,16 +40,25 @@ > #endif > > > #include "errno.h" /* ENOMEM, EVAL used by Berkeley DB */ > #include "db.h" /* Berkeley DB */ > #include "cl5.h" /* changelog5Config */ > #include "cl5_clcache.h" > >+/* newer bdb uses DB_BUFFER_SMALL instead of ENOMEM as the >+ error return if the given buffer in which to load a >+ key or value is too small - if it is not defined, define >+ it here to ENOMEM >+*/ >+#ifndef DB_BUFFER_SMALL >+#define DB_BUFFER_SMALL ENOMEM >+#endif >+ > /* > * Constants for the buffer pool: > * > * DEFAULT_CLC_BUFFER_PAGE_COUNT > * Little performance boost if it is too small. > * > * DEFAULT_CLC_BUFFER_PAGE_SIZE > * Its value is determined based on the DB requirement that >@@ -243,17 +252,17 @@ > > if ( NULL != *buf ) { > (*buf)->buf_consumer_ruv = consumer_ruv; > (*buf)->buf_local_ruv = local_ruv; > } > else { > slapi_log_error ( SLAPI_LOG_FATAL, get_thread_private_agmtname(), > "clcache_get_buffer: can't allocate new buffer\n" ); >- rc = ENOMEM; >+ rc = CL5_MEMORY_ERROR; > } > > return rc; > } > > /* > * Returns a buffer back to the buffer pool. > */ >@@ -374,17 +383,17 @@ > & buf->buf_data, > DB_SET ); > } > > /* > * Continue if the error is no-mem since we don't need to > * load in the key record anyway with DB_SET. > */ >- if ( 0 == rc || ENOMEM == rc ) >+ if ( 0 == rc || DB_BUFFER_SMALL == rc ) > rc = clcache_cursor_get ( cursor, buf, flag ); > > } > > /* > * Don't keep a cursor open across the whole replication session. > * That had caused noticable DB resource contention. > */ >@@ -847,17 +856,17 @@ > int rc = 0; > > PR_RWLock_Rlock ( _pool->pl_lock ); > for ( bl = _pool->pl_busy_lists; bl && bl->bl_db != db; bl = bl->bl_next ); > PR_RWLock_Unlock ( _pool->pl_lock ); > > if ( NULL == bl ) { > if ( NULL == ( bl = clcache_new_busy_list ()) ) { >- rc = ENOMEM; >+ rc = CL5_MEMORY_ERROR; > } > else { > PR_RWLock_Wlock ( _pool->pl_lock ); > bl->bl_db = db; > bl->bl_next = _pool->pl_busy_lists; > _pool->pl_busy_lists = bl; > PR_RWLock_Unlock ( _pool->pl_lock ); > } >@@ -893,17 +902,17 @@ > clcache_cursor_get ( DBC *cursor, CLC_Buffer *buf, int flag ) > { > int rc; > > rc = cursor->c_get ( cursor, > & buf->buf_key, > & buf->buf_data, > buf->buf_load_flag | flag ); >- if ( ENOMEM == rc ) { >+ if ( DB_BUFFER_SMALL == rc ) { > /* > * The record takes more space than the current size of the > * buffer. Fortunately, buf->buf_data.size has been set by > * c_get() to the actual data size needed. So we can > * reallocate the data buffer and try to read again. > */ > buf->buf_data.ulen = ( buf->buf_data.size / DEFAULT_CLC_BUFFER_PAGE_SIZE + 1 ) * DEFAULT_CLC_BUFFER_PAGE_SIZE; > buf->buf_data.data = slapi_ch_realloc ( buf->buf_data.data, buf->buf_data.ulen ); >@@ -918,17 +927,17 @@ > } > > switch ( rc ) { > case EINVAL: > slapi_log_error ( SLAPI_LOG_FATAL, buf->buf_agmt_name, > "clcache_cursor_get: invalid parameter\n" ); > break; > >- case ENOMEM: >+ case DB_BUFFER_SMALL: > slapi_log_error ( SLAPI_LOG_FATAL, buf->buf_agmt_name, > "clcache_cursor_get: can't allocate %u bytes\n", buf->buf_data.ulen ); > break; > > default: > break; > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 442170
:
307048
|
307054
|
307059
|
307061
|
307064
|
307069
|
307072
| 310041 |
310059