Bug 1408976 - dbscan-bin crashing due to a segmentation fault.
Summary: dbscan-bin crashing due to a segmentation fault.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: 389-ds-base
Version: 6.8
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Noriko Hosoi
QA Contact: Viktor Ashirov
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-12-28 16:26 UTC by Têko Mihinto
Modified: 2020-09-13 21:56 UTC (History)
6 users (show)

Fixed In Version: 389-ds-base-1.2.11.15-88.el6
Doc Type: Bug Fix
Doc Text:
There was a logic error in the print out code. When a truncate option (-t width) was given, the print function cut the output and replaced the last 5 bytes with " ...\0". The position to start the replace was not correct in some case, which crashed the dbscan utility. The position to start putting the 5 bytes is now correct, thus dbscan does not crash with the truncate option.
Clone Of:
Environment:
Last Closed: 2017-03-21 10:24:31 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github 389ds 389-ds-base issues 2163 0 None None None 2020-09-13 21:56:13 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-12-28 16:26:18 UTC
Description of problem:

A customer needed to get the number of entries in a given DB.
Based on this article we asked him to run dbscan:
https://github.com/richm/scripts/wiki/dbmon.sh

But dbscan is crashing in the customer environment.


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

RHDS 9 - 389 1.2.11.15-84.


How reproducible:

Easily at customer site.


Steps to Reproduce:

For instance,
# dbscan -f /var/lib/dirsrv/slapd-389/db/customer/id2entry.db4  -t 200 > slapd-389_customer.txt
/usr/bin/dbscan: line 51: 28783 Segmentation fault      (core dumped) ${dir}/${COMMAND} "$@"
#


Actual results:

Command is crashing.


Expected results:

On a Red Hat test machine with RHDS 9 ( 1.2.11.15-62 ):
# dbscan -f /var/lib/dirsrv/slapd-gparenterhel64/db/userRoot/id2entry.db4 -t 200 | grep rdn:
	rdn: dc=hq,dc=gsslab,dc=rdu,dc=redhat,dc=com
	rdn: cn=Directory Administrators
	rdn: ou=Groups
	rdn: ou=People
	rdn: ou=Special Users
	rdn: cn=Accounting Managers
	rdn: cn=HR Managers
	rdn: cn=QA Managers
	rdn: cn=PD Managers
#


Additional info:

An excerpt of the backtrace:
===============================================
GNU gdb (GDB) Red Hat Enterprise Linux (7.2-75.el6)
...

Program terminated with signal 11, Segmentation fault.
#0  0x00000035e12784fd in _int_free () from /lib64/libc.so.6

Thread 1 (Thread 0x7fa12fa57700 (LWP 25124)):
#0  0x00000035e12784fd in _int_free () from /lib64/libc.so.6
No symbol table info available.
#1  0x00000035e127b72e in _int_realloc () from /lib64/libc.so.6
No symbol table info available.
#2  0x00000035e127baf5 in realloc () from /lib64/libc.so.6
No symbol table info available.
#3  0x000000341172ad48 in __os_urealloc () from /usr/lib64/libdb-4.7.so
No symbol table info available.
#4  0x00000034116f2ce6 in __db_retcopy () from /usr/lib64/libdb-4.7.so
No symbol table info available.
#5  0x00000034116f2e28 in __db_ret () from /usr/lib64/libdb-4.7.so
No symbol table info available.
#6  0x00000034116d5eaf in __dbc_get () from /usr/lib64/libdb-4.7.so
No symbol table info available.
#7  0x00000034116de91d in __dbc_get_pp () from /usr/lib64/libdb-4.7.so
No symbol table info available.
#8  0x0000000000403014 in main (argc=<value optimized out>, argv=<value optimized out>) at ldap/servers/slapd/tools/dbscan.c:1297
===============================================

Comment 17 Noriko Hosoi 2017-01-25 21:17:20 UTC
Upstream ticket:
https://fedorahosted.org/389/ticket/49104

Comment 26 errata-xmlrpc 2017-03-21 10:24:31 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.