Bug 437137

Summary: Calling dlm_ls_lockx() wth LKF_VALBLK set and NULL sb_lvbptr seg faults libdlm.
Product: Red Hat Enterprise Linux 5 Reporter: Dean Jansa <djansa>
Component: cmanAssignee: Christine Caulfield <ccaulfie>
Status: CLOSED ERRATA QA Contact: GFS Bugs <gfs-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 5.2CC: cluster-maint, edamato, teigland
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-01-20 21:52:21 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:

Description Dean Jansa 2008-03-12 16:05:30 UTC
Description of problem:

I called dlm_ls_lock() with a the LKF_VALBLK flag and had initialized the lksb.sb_lvbptr to NULL.
This resulted in a SIGSEGV from libdlm:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 46912496179680 (LWP 16933)]
0x000000343ca0317b in unlock_resource () from /usr/lib64/libdlm.so.2
(gdb) bt
#0  0x000000343ca0317b in unlock_resource () from /usr/lib64/libdlm.so.2

(gdb) up
#1  0x00002aaaae09d854 in lockObjCmd (cdata=0x1cb5cd40, interp=0x1cb22100, 
    objc=7, objv=0x1cb37a58) at tcl_dlm.c:568
568		if (dlm_ls_lockx(dlmPtr->lsPtr->lsh, mode, lkPtr->lksb, flags, resourceStr,

(gdb) p lkPtr->lksb
$1 = (struct dlm_lksb *) 0x1cb925b0

(gdb) p (*lkPtr->lksb)
$2 = {sb_status = 0, sb_lkid = 0, sb_flags = 0 '\0', sb_lvbptr = 0x0}

Version-Release number of selected component (if applicable):
cman-devel-2.0.80-1.el5
cman-2.0.80-1.el5

How reproducible:

Every time

Steps to Reproduce:

Make a call to dlm_ls_lockx() with LKF_VALBLK flag and a NULL sb_lvbptr.

Expected results:

Error from libdlm.

Comment 1 Dean Jansa 2008-03-12 16:07:52 UTC
Forgot to include the flags in the gdb output:

(gdb) up
#1  0x00002aaaae09d854 in lockObjCmd (cdata=0x1cb5cd40, interp=0x1cb22100, 
    objc=7, objv=0x1cb37a58) at tcl_dlm.c:568
568		if (dlm_ls_lockx(dlmPtr->lsPtr->lsh, mode, lkPtr->lksb, flags, resourceStr,
(gdb) p flags
$3 = 8



Comment 2 Christine Caulfield 2008-03-13 16:45:50 UTC
The branch, master has been updated
       via  5c00e231b21d2b8e0be1b4dd028122313e603597 (commit)
      from  674aec455c8f4506c390532276d1392aa017f1b6 (commit)

The branch, STABLE2 has been updated
       via  31b6d55cadb4aa87a76d907dc2fa7696fda89379 (commit)
      from  088cad7ce9f46b501fcfd8475c71e0909a86d895 (commit)


Comment 3 David Teigland 2008-03-25 16:19:39 UTC
commit in RHEL5 branch 0484ef93e8d09313f8f110d23c2a6a6b4aca2f60


Comment 7 errata-xmlrpc 2009-01-20 21:52:21 UTC
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/RHBA-2009-0189.html