Bug 1368209 - Crash in import_wait_for_space_in_fifo().
Summary: Crash in import_wait_for_space_in_fifo().
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: 389-ds-base
Version: 6.0
Hardware: x86_64
OS: Linux
urgent
urgent
Target Milestone: pre-dev-freeze
: ---
Assignee: Noriko Hosoi
QA Contact: Viktor Ashirov
URL:
Whiteboard:
Depends On:
Blocks: 1381153
TreeView+ depends on / blocked
 
Reported: 2016-08-18 16:57 UTC by Têko Mihinto
Modified: 2020-09-13 21:49 UTC (History)
8 users (show)

Fixed In Version: 389-ds-base-1.2.11.15-82.el6
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1381153 (view as bug list)
Environment:
Last Closed: 2017-03-21 10:22:27 UTC
Target Upstream Version:


Attachments (Terms of Use)
Stack trace. (103.53 KB, text/plain)
2016-08-18 17:08 UTC, Têko Mihinto
no flags Details
Tentative fix to sync exit of import_main with bulk_import_queue (1.87 KB, patch)
2016-08-19 15:44 UTC, thierry bordaz
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Github 389ds 389-ds-base issues 2019 0 None None None 2020-09-13 21:49:42 UTC
Red Hat Product Errata RHBA-2017:0667 0 normal SHIPPED_LIVE 389-ds-base bug fix update 2017-03-21 12:35:05 UTC

Description Têko Mihinto 2016-08-18 16:57:03 UTC
Description of problem:

An online reinitialization from a supplier to a consumer is causing the crash of the consumer after 15 hours.

Version-Release number of selected component (if applicable):

System Information:
OS: RHEL 6.6
DS Version: 389-ds-base-1.2.11.15-74.el6.x86_64


How reproducible:

Not sure how easy to reproduce as the import is running for a long time ( 15 hours ) before the crash.

Steps to Reproduce:

Customer was reinitializing a consumer from a supplier using the Console.
After some hours, the consumer crashed.

Actual results:


Expected results:


Additional info:


The crash seems to happen in the import code:

========================================
Core was generated by `/usr/sbin/ns-slapd -D /etc/dirsrv/slapd-389 -i /var/run/dirsrv/slapd-389.pid -w'.
Program terminated with signal 11, Segmentation fault.
#0  0x00007f688fa8d072 in import_wait_for_space_in_fifo (job=0x7f6744032850, new_esize=7011) at ldap/servers/slapd/back-ldbm/import-threads.c:1857
1857                temp_ep = job->fifo.item[i].entry;
========================================


An excerpt of the code:
========================================
1844 static void
1845 import_wait_for_space_in_fifo(ImportJob *job, size_t new_esize)
1846 {
1847     struct backentry *temp_ep = NULL;
1848     size_t i;
1849     int slot_found;
1850     PRIntervalTime sleeptime;
1851
1852     sleeptime = PR_MillisecondsToInterval(import_sleep_time);
1853
1854     /* Now check if fifo has enough space for the new entry */
1855     while ((job->fifo.c_bsize + new_esize) > job->fifo.bsize) {
1856         for ( i = 0, slot_found = 0 ; i < job->fifo.size ; i++ ) {
1857             temp_ep = job->fifo.item[i].entry;
1858             if (temp_ep) {
1859                 if (temp_ep->ep_refcnt == 0 && temp_ep->ep_id <= job->ready_EID) {
1860                     job->fifo.item[i].entry = NULL;
1861                     if (job->fifo.c_bsize > job->fifo.item[i].esize)
1862                         job->fifo.c_bsize -= job->fifo.item[i].esize;
1863                     else
1864                         job->fifo.c_bsize = 0;
1865                     backentry_free(&temp_ep);
1866                     slot_found = 1;
1867                 }
1868             }
1869         }
1870         if ( slot_found == 0 )
1871             DS_Sleep(sleeptime);
1872     }
1873 }
========================================

Comment 1 Têko Mihinto 2016-08-18 17:08:22 UTC
Created attachment 1191946 [details]
Stack trace.

Comment 10 thierry bordaz 2016-08-19 15:44:42 UTC
Created attachment 1192177 [details]
Tentative fix to sync exit of import_main with bulk_import_queue

Comment 11 Noriko Hosoi 2016-08-19 15:54:27 UTC
Upstream ticket:
https://fedorahosted.org/389/ticket/48960

Comment 29 errata-xmlrpc 2017-03-21 10:22:27 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2017-0667.html


Note You need to log in before you can comment on or make changes to this bug.