Project

General

Profile

Actions

Bug #20663

closed

Segmentation fault when exporting rgw bucket in nfs-ganesha

Added by supriti singh almost 7 years ago. Updated over 6 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
% Done:

0%

Source:
Q/A
Tags:
Backport:
kraken jewel
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

We see a segmentation fault when trying to export rgw bucket using nfs-ganesha (with latest master and ceph v 12.1.0) It happens only on Intel arch.
Looking at the core dump, the segmentation fault occurs at __lll_unlock_elision (). It occurs because unlock is called on object on which no lock was taken. From man page of pthread_mutex_unlock: "f a thread attempts to unlock a mutex that it has not locked or a mutex which is unlocked, undefined behavior results." With lock elision unlocking a free lock is not tolerated anymore. Hence it occurs only on intel arch.

This seems like the culprit code: https://github.com/ceph/ceph/blob/master/src/rgw/rgw_file.h#L1032-L1037

The lock on "fh->mtx.lock" is taken and in insert_latched(), "lat.lock->unlock();" is called. Lock (lat.lock->lock()) should be taken on latch before calling unlock.


Files

backtrace.txt (3.48 KB) backtrace.txt supriti singh, 07/18/2017 11:32 AM

Related issues 2 (0 open2 closed)

Copied to rgw - Backport #20711: kraken: Segmentation fault when exporting rgw bucket in nfs-ganeshaRejectedActions
Copied to rgw - Backport #20820: jewel: Segmentation fault when exporting rgw bucket in nfs-ganeshaResolvedNathan CutlerActions
Actions

Also available in: Atom PDF