Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aio write imcompletely bug #196

Open
qinzuoyan opened this issue Dec 6, 2016 · 3 comments
Open

aio write imcompletely bug #196

qinzuoyan opened this issue Dec 6, 2016 · 3 comments

Comments

@qinzuoyan
Copy link
Contributor

core dump:

F10:16:40.459 (1480990600459595051 156a) replica.io-thrd.05482: assertion expression: size >= this_size
F10:16:40.459 (1480990600459612035 156a) replica.io-thrd.05482: written buffer size does not equal to input buffer's size: 5256 vs 11448

source code:

aio_task* disk_file::on_write_completed(aio_task* wk, void* ctx, error_code err, size_t size)
{
    auto ret = _write_queue.on_work_completed(wk, ctx);
    
    while (wk)
    {
        aio_task* next = (aio_task*)wk->next;
        wk->next = nullptr;

        if (err == ERR_OK)
        {
            size_t this_size = (size_t)wk->aio()->buffer_size;
            dassert(size >= this_size, 
                "written buffer size does not equal to input buffer's size: %d vs %d",
                (int)size,
                (int)this_size
                );

            wk->enqueue(err, this_size);
            size -= this_size;
        }
@imzhenyu
Copy link
Contributor

Thanks, Zuoyan. This is a serious bug. I'll look into it to see any clues.

@qinzuoyan
Copy link
Contributor Author

@imzhenyu , the core reason is that the SSD is full....

@imzhenyu
Copy link
Contributor

then why err == ERR_OK? If SSD is full, should not we have errors returned?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants