Closed NiuYawei closed 5 years ago
Sys info is missing from GitHub's web view, text mail says RHEL7.
Reproducible on Debian Buster, with PMDK 1.5.1 + ndctl 63, and PMDK 1.6 + ndctl 65.
I think what happens is pmemobj_tx_free()
is being called in during TX_STAGE_ONABORT
and an ASSERT is getting triggered.
Remember that unsuccessful pmemobj_tx_alloc()
will cause an abort.
Yes, I think you are right. I realized this could be the cause as well.
For our use case, we don't use the TX macros and the longjmp is disabled, we just explicitly call pmemobj_tx_begin() and pmemobj_tx_commit/abort() and do error cleanup by ourselves, also the same code is shared by transactional & non-transactional interfaces, that's why the pmemobj_tx_free() could be called on error cleanup code path even if the transaction is already aborted by previous failed tx_alloc() call.
I was wondering if it's better to skip such implicit tx_abort() call in PMDK for above use case?
Anyway, I think I can fix our code to solve the problem, thank you for your help and please feel free to close this issue.
For some time we actually wanted to add a feature that would skip the abort in transaction operations. I'll add a feature request and add it to the backlog, until then I'll leave the bug open.
Took me a while, but I created a new feature request: #1066. If you have any questions or suggestions, please feel free to state them in the new issue.
ISSUE: <pmemobj_tx_free() crashed when the pool is full>
Environment Information
Please provide a reproduction of the bug:
The code to reproduce the defect:
int main(int argc, char *argv) { char pool_file = "rep.pool"; uint64_t pool_size = (20 << 20); / 20MB / PMEMobjpool *umm_pool; PMEMoid oid, prev_oid; uint64_t tot_allocated = 0, alloc_size = 4096; int rc;
}
How often bug is revealed: (always, often, rare):
Actual behavior:
Expected behavior:
Details
Additional information about Priority and Help Requested:
Are you willing to submit a pull request with a proposed change? (Yes, No)
Requested priority: (Showstopper, High, Medium, Low)