GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [ISSUE 3040] RocksDB segfaulted during CompactionTest by dlg99 · Pull Request #3043 · apache/bookkeeper

Conversation

@dlg99

@dlg99 dlg99 commented Feb 11, 2022

Copy link
Copy Markdown
Contributor

Descriptions of the changes in this PR:

Motivation

RocksDB segfaulted during CompactionTest

Changes

RocksDB can segfault if one tries to use it after close.
Shutdown/compaction sequence can lead to such situation. The fix prevents segfault.

CompactionTests were updated at some point to use metadata cache and non-cached case is not tested.
I added the test suites for this case.

Master Issue: #3040

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@dlg99
dlg99 force-pushed the fix/issue3040 branch from 7c6945f to bd77d86 Compare February 11, 2022 22:29
nicoloboschi
nicoloboschi reviewed Feb 12, 2022
View reviewed changes

@nicoloboschi nicoloboschi left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch, I left a question

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/GarbageCollectorThread.java Outdated
gcStats.getMinorCompactionCounter().inc();
minorCompacting.set(false);
}
if (force && forceGarbageCollection.compareAndSet(true, false)) {

@nicoloboschi nicoloboschi Feb 12, 2022

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did you move this statement inside the above else if ?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@dlg99 dlg99 Feb 12, 2022

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed. I meant to move under finally, but under different finally.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@dlg99
dlg99 force-pushed the fix/issue3040 branch from bd77d86 to cb74a36 Compare February 12, 2022 00:08
@dlg99
[ISSUE 3040] RocksDB segfaulted during CompactionTest
7758fb8
@dlg99
dlg99 force-pushed the fix/issue3040 branch from cb74a36 to 7758fb8 Compare February 12, 2022 00:11
@dlg99
Report failed compaction in stats
d5f8ffd
nicoloboschi
nicoloboschi approved these changes Feb 14, 2022
View reviewed changes
@zymap zymap assigned dlg99 Feb 15, 2022
@zymap zymap added the area/tests label Feb 15, 2022
zymap
zymap approved these changes Feb 15, 2022
View reviewed changes
@dlg99 dlg99 added this to the 4.15.0 milestone Feb 15, 2022
@dlg99 dlg99 added area/bookie release/4.15.0 type/bug labels Feb 15, 2022
@dlg99
dlg99 merged commit 9b1b188 into apache:master Feb 15, 2022
StevenLuMT pushed a commit to StevenLuMT/bookkeeper that referenced this pull request Feb 16, 2022
@dlg99 @StevenLuMT
ISSUE apache#3040: RocksDB segfaulted during CompactionTest
e48bcdd
Descriptions of the changes in this PR:

### Motivation

RocksDB segfaulted during CompactionTest

### Changes

RocksDB can segfault if one tries to use it after close.
[Shutdown/compaction sequence](apache#3040 (comment)) can lead to such situation. The fix prevents segfault.

CompactionTests were updated at some point to use metadata cache and non-cached case is not tested. 
I added the test suites for this case.

Master Issue: apache#3040 



Reviewers: Yong Zhang <[email protected]>, Nicolò Boschi <[email protected]>

This closes apache#3043 from dlg99/fix/issue3040, closes apache#3040
@dlg99 dlg99 mentioned this pull request Jan 31, 2023
RocksDB: segfault in org.rocksdb.WriteBatch::delete called from org.apache.bookkeeper.bookie.storage.ldb.EntryLocationIndex#removeOffsetFromDeletedLedgers #3734
Closed
Ghatage pushed a commit to sijie/bookkeeper that referenced this pull request Jul 12, 2024
@dlg99 Anup Ghatage
ISSUE apache#3040: RocksDB segfaulted during CompactionTest
9b35b39
Descriptions of the changes in this PR:

### Motivation

RocksDB segfaulted during CompactionTest

### Changes

RocksDB can segfault if one tries to use it after close.
[Shutdown/compaction sequence](apache#3040 (comment)) can lead to such situation. The fix prevents segfault.

CompactionTests were updated at some point to use metadata cache and non-cached case is not tested. 
I added the test suites for this case.

Master Issue: apache#3040 



Reviewers: Yong Zhang <[email protected]>, Nicolò Boschi <[email protected]>

This closes apache#3043 from dlg99/fix/issue3040, closes apache#3040
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@nicoloboschi nicoloboschi nicoloboschi approved these changes
@zymap zymap zymap approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@dlg99 dlg99

Labels

area/bookie area/tests release/4.15.0 type/bug

Projects

None yet

Milestone

4.15.0

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@dlg99 @nicoloboschi @zymap
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.