Bug 692331
Summary: | Segfault on index update during full replication push on 1.2.7.5 | ||||||
---|---|---|---|---|---|---|---|
Product: | [Retired] 389 | Reporter: | Karsten Sperling <mail> | ||||
Component: | Database - Indexes/Searches | Assignee: | Rich Megginson <rmeggins> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Chandrasekar Kannan <ckannan> | ||||
Severity: | unspecified | Docs Contact: | |||||
Priority: | high | ||||||
Version: | 1.2.7 | CC: | amsharma, benl, nkinder | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | |||||||
: | 693516 (view as bug list) | Environment: | |||||
Last Closed: | 2014-06-16 16:23:50 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 639035, 656390, 693516 | ||||||
Attachments: |
|
Description
Karsten Sperling
2011-03-31 03:02:45 UTC
Created attachment 489855 [details]
0001-Bug-692331-Segfault-on-index-update-during-full-repl.patch
To ssh://git.fedorahosted.org/git/389/ds.git 27ff25d..466fced master -> master commit 62a7368e3aed00b44d9f1828b9235d0a2d7572cd Author: Rich Megginson <rmeggins> Date: Wed Mar 30 20:00:27 2011 -0600 Reviewed by: nkinder (Thanks!) Branch: master Fix Description: The collation plugin still uses the old style index key generation function that uses struct berval **. If we don't find a new style index key function that uses Slapi_Value**, wrap the old function to convert Slapi_Value** to struct berval ** The plugin_mr code keeps track of the Slapi_Value**. The old style collation code keeps track of and deletes the struct berval** values. We store the output keys in the MR_KEYS pblock field and free them in the indexer destroyer code. The new style mr indexer code sets MR_KEYS to NULL so the indexer destroyer code won't try to free them again. Steps to reproduce: 1) find or create an attribute which has an ORDERING matching rule (and not via inheritance - that's another bug) 2) add or change the index for the attribute to have an nsMatchingRule with one of the l10n matching rules defined by the collation plugin e.g. 2.16.840.1.113730.3.3.2.11.1 for en or en-US 3) add an entry which has that attribute and a valid value 4) do an import or re-index It crashes in matchrule_values_to_keys_sv because mrINDEX is NULL because the old style collation plugin indexer does not support Slapi_Values. Platforms tested: RHEL6 x86_64 Flag Day: no Doc impact: no To ssh://git.fedorahosted.org/git/389/ds.git e2288d9..5c1cd5f 389-ds-base-1.2.8 -> 389-ds-base-1.2.8 commit e98229a602b3acfafd616afda743d268dae42ff2 Author: Rich Megginson <rmeggins> Date: Wed Mar 30 20:00:27 2011 -0600 Hi Rich,
Got the error at step 2 only, Please check :
1) find or create an attribute which has an ORDERING matching rule
(and not via inheritance - that's another bug)
ldapmodify -x -h localhost -p 1389 -D "cn=directory manager" -w Secret123 -v << EOF
dn: cn=schema
changetype: modify
add: attributetypes
attributeTypes: (1.3.6.1.4.1.34217.1.1.1.2.6 NAME 'nzCoSkyReceiveMarketingNewsLetter' DESC 'Whether the user opts to receive SKY TV news letters' EQUALITY booleanMatch ORDERING booleanMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE)
add attributeTypes:
(1.3.6.1.4.1.34217.1.1.1.2.6 NAME 'nzCoSkyReceiveMarketingNewsLetter' DESC 'Whether the user opts to receive SKY TV news letters' EQUALITY booleanMatch ORDERING booleanMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE)
modifying entry "cn=schema"
modify complete
2) add or change the index for the attribute to have an nsMatchingRule
with one of the l10n matching rules defined by the collation plugin
e.g. 2.16.840.1.113730.3.3.2.11.1 for en or en-US
[root@rheltest slapd-rheltest]# ldapmodify -a -D "cn=directory manager" -w Secret123 -p 1389 -h localhost << EOF
> dn: cn=nzCoSkyReceiveMarketingNewsletter,cn=index,cn=userRoot,cn=ldbm
> database,cn=plugins,cn=config
> changetype: add
> objectClass: top
> objectClass: nsIndex
> cn:nzCoSkyReceiveMarketingNewsletter
> nsSystemIndex:false
> nsIndexType:eq
> nsMatchingRule: 2.16.840.1.113730.3.3.2.6.1
> nsMatchingRule: 2.16.840.1.113730.3.3.2.11.1
> EOF
ldapmodify: invalid format (line 2) entry: "cn=nzCoSkyReceiveMarketingNewsletter,cn=index,cn=userRoot,cn=ldbm"
Segmentation fault (core dumped)
1) find or create an attribute which has an ORDERING matching rule (and not via inheritance - that's another bug) - createTimestamp has ORDERING matching rule 2) add or change the index for the attribute to have an nsMatchingRule with one of the l10n matching rules defined by the collation plugin e.g. 2.16.840.1.113730.3.3.2.11.1 for en or en-US ldapmodify -a -D "cn=directory manager" -w Secret123 -p 1390 -h localhost << EOF dn: cn=createTimestamp,cn=index,cn=userRoot,cn=ldbm database,cn=plugins,cn=config changetype: add objectClass: top objectClass: nsIndex cn:createTimestamp nsSystemIndex:false nsIndexType:eq nsMatchingRule: 2.16.840.1.113730.3.3.2.11.1 3).add an entry which has that attribute and a valid value ldapmodify -x -h localhost -p 1390 -D "cn=Directory Manager" -w Secret123 << EOF dn: uid=amimash5,dc=example,dc=com changetype: add objectClass: top objectClass: inetorgperson objectClass: examplePerson cn: kkktestkrbuser sn: testkrbuser userPassword: redhat createTimestamp: ddmmyyy EOF 4) service dirsrv stop 5) [root@rhel61-ds90-amita ~]# /usr/lib64/dirsrv/slapd-rhel61-ds90-amita1/db2index [02/May/2011:19:14:46 +051800] - check_and_set_import_cache: pagesize: 4096, pages: 255398, procpages: 49700 [02/May/2011:19:14:46 +051800] - WARNING: After allocating import cache 408636KB, the available memory is 612956KB, which is less than the soft limit 1048576KB. You may want to decrease the import cache size and rerun import. [02/May/2011:19:14:46 +051800] - Import allocates 408636KB import cache. [02/May/2011:19:14:46 +051800] - Backing up file 0 (/var/lib/dirsrv/slapd-rhel61-ds90-amita1/bak/reindex_2011_05_02_19_14_46/userRoot/parentid.db4) [02/May/2011:19:14:46 +051800] - Backing up file 1 (/var/lib/dirsrv/slapd-rhel61-ds90-amita1/bak/reindex_2011_05_02_19_14_46/userRoot/sn.db4) [02/May/2011:19:14:46 +051800] - Backing up file 2 (/var/lib/dirsrv/slapd-rhel61-ds90-amita1/bak/reindex_2011_05_02_19_14_46/userRoot/entryrdn.db4) [02/May/2011:19:14:46 +051800] - Backing up file 3 (/var/lib/dirsrv/slapd-rhel61-ds90-amita1/bak/reindex_2011_05_02_19_14_46/userRoot/objectclass.db4) [02/May/2011:19:14:46 +051800] - Backing up file 4 (/var/lib/dirsrv/slapd-rhel61-ds90-amita1/bak/reindex_2011_05_02_19_14_46/userRoot/id2entry.db4) [02/May/2011:19:14:46 +051800] - Backing up file 5 (/var/lib/dirsrv/slapd-rhel61-ds90-amita1/bak/reindex_2011_05_02_19_14_46/userRoot/DBVERSION) [02/May/2011:19:14:46 +051800] - Backing up file 6 (/var/lib/dirsrv/slapd-rhel61-ds90-amita1/bak/reindex_2011_05_02_19_14_46/userRoot/uid.db4) [02/May/2011:19:14:46 +051800] - Backing up file 7 (/var/lib/dirsrv/slapd-rhel61-ds90-amita1/bak/reindex_2011_05_02_19_14_46/userRoot/createTimestamp.db4) [02/May/2011:19:14:46 +051800] - Backing up file 8 (/var/lib/dirsrv/slapd-rhel61-ds90-amita1/bak/reindex_2011_05_02_19_14_46/userRoot/aci.db4) [02/May/2011:19:14:46 +051800] - Backing up file 9 (/var/lib/dirsrv/slapd-rhel61-ds90-amita1/bak/reindex_2011_05_02_19_14_46/userRoot/cn.db4) [02/May/2011:19:14:46 +051800] - Backing up file 10 (/var/lib/dirsrv/slapd-rhel61-ds90-amita1/bak/reindex_2011_05_02_19_14_46/userRoot/nsuniqueid.db4) [02/May/2011:19:14:46 +051800] - Backing up file 11 (/var/lib/dirsrv/slapd-rhel61-ds90-amita1/bak/reindex_2011_05_02_19_14_46/userRoot/ancestorid.db4) [02/May/2011:19:14:46 +051800] - Backing up file 12 (/var/lib/dirsrv/slapd-rhel61-ds90-amita1/bak/reindex_2011_05_02_19_14_46/userRoot/numsubordinates.db4) [02/May/2011:19:14:46 +051800] - Backing up file 13 (/var/lib/dirsrv/slapd-rhel61-ds90-amita1/bak/reindex_2011_05_02_19_14_46/userRoot/uniquemember.db4) [02/May/2011:19:14:46 +051800] upgrade DB - userRoot: Start upgradedb. [02/May/2011:19:14:46 +051800] - WARNING: Import is running with nsslapd-db-private-import-mem on; No other process is allowed to access the database [02/May/2011:19:14:46 +051800] - reindex userRoot: Index buffering enabled with bucket size 100 [02/May/2011:19:14:47 +051800] - reindex userRoot: Workers finished; cleaning up... [02/May/2011:19:14:47 +051800] - reindex userRoot: Workers cleaned up. [02/May/2011:19:14:47 +051800] - reindex userRoot: Cleaning up producer thread... [02/May/2011:19:14:47 +051800] - reindex userRoot: Indexing complete. Post-processing... [02/May/2011:19:14:47 +051800] - reindex userRoot: Flushing caches... [02/May/2011:19:14:47 +051800] - reindex userRoot: Closing files... [02/May/2011:19:14:47 +051800] - All database threads now stopped [02/May/2011:19:14:47 +051800] - reindex userRoot: Reindexing complete. Processed 11 entries in 1 seconds. (11.00 entries/sec) [02/May/2011:19:14:47 +051800] - All database threads now stopped 6) service dirsrv start Working fine without any issue, marking as VERIFIED. should be marked CLOSED |