Repository navigation
crimson/osd: add embedded suppression ruleset for LSan - #50598
Conversation
This commit, basing the idea from the Chromium browser,
embdeds the suppression rules directly into the crimson
executable. The benefit is simplicity and no need to modify
the teuthology code to ship a file across all involved nodes
like already happens for `valgrind.supp`.
From `teuthology/task/install/util.py`:
```
def _ship_utilities(ctx):
"""
Write a copy of valgrind.supp to each of the remote sites. Set executables
used by Ceph in /usr/local/bin. When finished (upon exit of the teuthology
run), remove these files.
:param ctx: Context
"""
testdir = teuthology.get_testdir(ctx)
filenames = []
log.info('Shipping valgrind.supp...')
assert 'suite_path' in ctx.config
try:
with open(
os.path.join(ctx.config['suite_path'], 'valgrind.supp'),
'rb'
) as f:
fn = os.path.join(testdir, 'valgrind.supp')
filenames.append(fn)
for rem in ctx.cluster.remotes.keys():
teuthology.sudo_write_file(
remote=rem,
path=fn,
data=f,
)
f.seek(0)
except IOError as e:
log.info('Cannot ship supression file for valgrind: %s...', e.strerror)
```
With these suppressions `--mkfs` with crimson, BlueStore and tcmalloc
starts returning the proper exit code:
```
[rzarzynski@o06 build]$ /home/rzarzynski/ceph1/build/bin/crimson-osd -i 0 -c /home/rzarzynski/ceph1/build/ceph.conf --mkfs --key AQCZsRBkM5CPIBAACmCbEiP3DPh+x9iiaRDZmA== --osd-uuid c3d4aea0-02de-459b-ad00-fe943906a9a8 --cpuset 0-0
...
created object store /home/rzarzynski/ceph1/build/dev/osd0 for osd.0 fsid 8c9aa852-1ba2-4800-9695-e0be4bf877dc
-----------------------------------------------------
Suppressions used:
count bytes template
1 8 InitModule
-----------------------------------------------------
[rzarzynski@o06 build]$ echo $?
0
```
Signed-off-by: Radoslaw Zarzynski <[email protected]>
|
LGTM. I would also suggest re-basing before testing again since the suite and some of the source have been changed recently. Moreover, this PR fixes @rzarzynski, Are we sure we want to suppress it as well? IIUC, this one seems like an actual error. |
Yes, we know – the run mentioned above had these two commits inside.
I don't think we're suppressing it. If so, LSan should inform it happened. Do you see something like below? I guess bigger change in the test run was the TC enablement and this might have hidden the buffer overflow. However, I'm not sure it's a good reason to block this change. |
|
jenkins test make check |
There was a problem hiding this comment.
I don't think we're suppressing it. If so, LSan should inform it happened. Do you see something like below?\
Yes, the same "Suppressions used" appears [1].
I guess bigger change in the test run was the TC enablement and this might have hidden the buffer overflow. However, I'm not sure it's a good reason to block this change.
I just wanted to make sure we are not coarsely suppressing actual leaks - which seems that it's not the case here since the test passed because of TC usage.
I'm also ok with merging this.
markhpc
left a comment
There was a problem hiding this comment.
LGTM, though I haven't looked closely at the specific issues Matan mentioned so I'll leave that for you guys!
This commit, basing the idea from the Chromium browser, embdeds the suppression rules directly into the crimson executable. The benefit is simplicity and no need to modify the teuthology code to ship a file across all involved nodes like already happens for
valgrind.supp.From
teuthology/task/install/util.py:With these suppressions
--mkfswith crimson, BlueStore and tcmalloc starts returning the proper exit code:Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "pacific"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume toxjenkins test windows