Project

General

Profile

Bug #21065

client: UserPerm delete with supp. groups allocated by malloc generates valgrind error

Added by Patrick Donnelly about 2 years ago. Updated about 2 years ago.

Status:
Resolved
Priority:
High
Assignee:
Category:
-
Target version:
Start date:
08/22/2017
Due date:
% Done:

0%

Source:
Q/A
Tags:
Backport:
luminous
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
ceph-fuse
Labels (FS):
Pull request ID:

Description

  <kind>MismatchedFree</kind>
  <what>Mismatched free() / delete / delete []</what>
...
  <stack>
    <frame>
      <ip>0x998C63D</ip>
      <obj>/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so</obj>
      <fn>operator delete[](void*)</fn>
      <dir>/builddir/build/BUILD/valgrind-3.11.0/coregrind/m_replacemalloc</dir>
      <file>vg_replace_malloc.c</file>
      <line>621</line>
    </frame>
    <frame>
      <ip>0x31F85F</ip>
      <obj>/usr/bin/ceph-fuse</obj>
      <fn>~UserPerm</fn>
      <dir>/usr/src/debug/ceph-12.1.2-962-g40d762d/src/client</dir>
      <file>UserPerm.h</file>
      <line>62</line>
    </frame>
    <frame>
      <ip>0x31F85F</ip>
      <obj>/usr/bin/ceph-fuse</obj>
      <fn>fuse_ll_statfs(fuse_req*, unsigned long)</fn>
      <dir>/usr/src/debug/ceph-12.1.2-962-g40d762d/src/client</dir>
      <file>fuse_ll.cc</file>
      <line>801</line>
    </frame>

From: /ceph/teuthology-archive/pdonnell-2017-08-21_23:13:19-fs-wip-pdonnell-testing-20170821-distro-basic-smithi/1549045/remote/smithi130/log/valgrind/client.0.log.gz

This happens because this branch is turning supplementary group loading on in fuse.


Related issues

Copied to fs - Backport #21100: luminous: client: UserPerm delete with supp. groups allocated by malloc generates valgrind error Resolved

History

#1 Updated by Patrick Donnelly about 2 years ago

  • Description updated (diff)

#2 Updated by Jeff Layton about 2 years ago

We'll need to convert the UserPerm constructor and such to use malloc/free. ceph_userperm_new can be called from C code and we can't mandate that it use new to allocate the gids list.

#3 Updated by Patrick Donnelly about 2 years ago

  • Status changed from New to Need Review

#4 Updated by Patrick Donnelly about 2 years ago

  • Status changed from Need Review to Pending Backport

#5 Updated by Patrick Donnelly about 2 years ago

  • Copied to Backport #21100: luminous: client: UserPerm delete with supp. groups allocated by malloc generates valgrind error added

#6 Updated by Patrick Donnelly about 2 years ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF