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

msg/async: print error log if add_event fail #17102

Merged
merged 1 commit into from Sep 11, 2017

Conversation

mychoxin
Copy link
Contributor

@mychoxin mychoxin commented Aug 20, 2017

I ran into some osd assert fail, I thought it resulted of /proc/sys/fs/aio-max-nr being exhausted, but I can not
reproduce it and verify it (not so easy), so I think here we should add some error log, which makes us know what the error code is.

@mychoxin
Copy link
Contributor Author

@xiexingguo @joscollin I think this is necessary, how do you think of it ?

@mychoxin
Copy link
Contributor Author

@tchaikov

<< " with " << (ioc->num_running.load() - 1)
<< " aios left" << dendl;
assert(r >= 0);
}

Copy link
Member

Choose a reason for hiding this comment

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

<< " with " << (ioc->num_running.load() - 1)
<< " aios left" << dendl;
assert(r >= 0);
}
dout(10) << __func__ << " finished aio " << aio[i] << " r " << r
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@joscollin at first, for dout(10) when the error happens this log with 10 level not always prints, because opening low level log impacts the performance, for the second, in order to avoid printing log twice when we exactly opened log of this level, i just handle the error before dout(10), how do you think of it ?

Copy link
Member

Choose a reason for hiding this comment

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

just change the dout(10) to dout(r < 0 ? -1 : 10). (dout(-1) is equivalent to derr)

@mychoxin mychoxin closed this Aug 26, 2017
@mychoxin mychoxin reopened this Aug 26, 2017
@mychoxin mychoxin closed this Aug 27, 2017
@mychoxin mychoxin reopened this Aug 27, 2017
@mychoxin mychoxin force-pushed the yuanxin_print_log_if_add_event_fail branch from 4ef24b9 to 31cc06c Compare August 29, 2017 02:13
<< " with " << (ioc->num_running.load() - 1)
<< " aios left" << dendl;
assert(r >= 0);
}
dout(10) << __func__ << " finished aio " << aio[i] << " r " << r
Copy link
Member

Choose a reason for hiding this comment

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

just change the dout(10) to dout(r < 0 ? -1 : 10). (dout(-1) is equivalent to derr)

@mychoxin mychoxin force-pushed the yuanxin_print_log_if_add_event_fail branch from 31cc06c to 16ad044 Compare September 3, 2017 02:21
@mychoxin
Copy link
Contributor Author

mychoxin commented Sep 3, 2017

@liewegas I modified it, please have a look.

Copy link
Member

@joscollin joscollin left a comment

Choose a reason for hiding this comment

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

LGTM.

@liewegas Thank you.

Signed-off-by: mychoxin <mychoxin@gmail.com>
@mychoxin mychoxin force-pushed the yuanxin_print_log_if_add_event_fail branch from 16ad044 to 52c4c13 Compare September 7, 2017 02:25
@mychoxin
Copy link
Contributor Author

mychoxin commented Sep 7, 2017

@joscollin @liewegas
#17522 I think this commit is better, so i removed one of my commit.

Copy link
Contributor

@liupan1111 liupan1111 left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Member

@joscollin joscollin left a comment

Choose a reason for hiding this comment

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

LGTM

@joscollin
Copy link
Member

Jenkins retest this please

@mychoxin
Copy link
Contributor Author

@liewegas please let me know if there is exists any problems.

@liewegas liewegas merged commit 3b4a9d0 into ceph:master Sep 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants