Bug 483167 - db2ldif -s "" crashes with segmentation fault.
db2ldif -s "" crashes with segmentation fault.
Status: CLOSED CURRENTRELEASE
Product: 389
Classification: Community
Component: Database - Import/Export (Show other bugs)
1.1.3
All Linux
low Severity medium
: ---
: ---
Assigned To: Noriko Hosoi
Chandrasekar Kannan
:
Depends On:
Blocks: 249650 FDS1.2.0
  Show dependency treegraph
 
Reported: 2009-01-29 17:33 EST by Noriko Hosoi
Modified: 2015-01-04 18:36 EST (History)
3 users (show)

See Also:
Fixed In Version: 8.1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-04-29 19:09:57 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
cvs diff ldap/servers/slapd/main.c (869 bytes, patch)
2009-01-29 17:37 EST, Noriko Hosoi
no flags Details | Diff
cvs diff message (562 bytes, text/plain)
2009-01-30 19:06 EST, Noriko Hosoi
no flags Details

  None (edit)
Description Noriko Hosoi 2009-01-29 17:33:55 EST
Description of problem:
$ db2ldif -s ""
Program received signal SIGSEGV, Segmentation fault.
(note: this message is received in gdb)

Stack trace and debug info:
1920        for (ep = entries; *ep; ep++) {
(gdb) bt
#0  0x000000000041ee08 in lookup_instance_name_by_suffix (suffix=0x24ed350 "", 
    suffixes=0x0, instances=0x7fff86ccf5c0, isexact=0)
    at ldap/servers/slapd/main.c:1920
#1  0x000000000041ee6e in lookup_instance_name_by_suffixes (
    included=0x24ed370, excluded=0x0, instances=0x7fff86ccf868)
    at ldap/servers/slapd/main.c:1947
#2  0x000000000041f71f in slapd_exemode_db2ldif (argc=6, argv=0x7fff86ccfcd8)
    at ldap/servers/slapd/main.c:2194
#3  0x000000000041d0f8 in main (argc=6, argv=0x7fff86ccfcd8)
    at ldap/servers/slapd/main.c:939
(gdb) p entries
$1 = (Slapi_Entry **) 0x0
Comment 1 Noriko Hosoi 2009-01-29 17:37:57 EST
Created attachment 330410 [details]
cvs diff ldap/servers/slapd/main.c

Change description: adding a check to see if there is no entries.

With the fix, the same command line fails with a clearer message.
# ./db2ldif -s ""
Exported ldif file: /var/lib/dirsrv/slapd-escape/ldif/escape-2009_01_29_102502.ldif
[29/Jan/2009:10:25:02 -0800] - ERROR 2: There is no backend instance to export from.
Comment 2 Noriko Hosoi 2009-01-30 19:06:59 EST
Created attachment 330514 [details]
cvs diff message

Reviewed by Rich (Thank you!!)

Checked in into CVS HEAD.
Comment 3 Jenny Galipeau 2009-03-31 09:02:29 EDT
fix verified - DS 8.1 RHEL 5 - no Segmentation fault

[root@jennyv2 slapd-jennyv2]# ./db2ldif -s ""
Exported ldif file: /var/lib/dirsrv/slapd-jennyv2/ldif/jennyv2-2009_03_31_085615.ldif
[31/Mar/2009:08:56:15 -0400] - ERROR 2: There is no backend instance to export from.

errors log:
[31/Mar/2009:08:56:15 -0400] - ERROR 2: There is no backend instance to export from.
Comment 4 Chandrasekar Kannan 2009-04-29 19:09:57 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2009-0455.html

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