Bug 762442 (GLUSTER-710)

Summary: Posix Locks do not work correctly on Solaris
Product: [Community] GlusterFS Reporter: Pavan Vilas Sondur <pavan>
Component: locksAssignee: Pavan Vilas Sondur <pavan>
Status: CLOSED DUPLICATE QA Contact:
Severity: high Docs Contact:
Priority: urgent    
Version: mainlineCC: gluster-bugs, lakshmipathi, vbellur
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Solaris   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: RTP Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Pavan Vilas Sondur 2010-03-10 15:34:40 UTC

*** This bug has been marked as a duplicate of bug 708 ***

Comment 1 Pavan Vilas Sondur 2010-03-10 16:31:18 UTC
Posix locks do not work *correctly* on Solaris because of including types such as F_RDLCK, F_WRLCK, F_UNLCK from <fcntl.h>

Linux:
/usr/include/bits/fcntl.h:#define F_RDLCK		0	/* Read lock.  */
/usr/include/bits/fcntl.h:#define F_WRLCK		1	/* Write lock. */
/usr/include/bits/fcntl.h:#define F_UNLCK		2	/* Remove lock.*/

Solaris:
/usr/include/sys/fcntl.h:#define        F_RDLCK         01      /* Read lock */
/usr/include/sys/fcntl.h:#define        F_WRLCK         02      /* Write lock */
/usr/include/sys/fcntl.h:#define        F_UNLCK         03      /* Remove lock(s) */


This was observed with process state dump when deadlocked using the ping-pong program on multiple mount points:

<snip>
xlator.feature.locks.lock-dump.domain.posixlk.posixlk[8](ACTIVE)=type=UNKNOWN, start=0, len=0, pid=0, lk-owner=11111567171309590679
xlator.feature.locks.lock-dump.domain.posixlk.posixlk[9](ACTIVE)=type=UNKNOWN, start=0, len=0, pid=0, lk-owner=11111567171309590679
xlator.feature.locks.lock-dump.domain.posixlk.posixlk[10](ACTIVE)=type=UNKNOWN, start=0, len=0, pid=0, lk-owner=11111567171309590679
xlator.feature.locks.lock-dump.domain.posixlk.posixlk[11](BLOCKED)=type=WRITE, start=0, len=1, pid=0, lk-owner=11111567171309590679
xlator.feature.locks.lock-dump.domain.posixlk.posixlk[12](ACTIVE)=type=READ, sta
<snip>