Bug 1636570
| Summary: | Cores due to SIGILL during multiplex regression tests | ||
|---|---|---|---|
| Product: | [Community] GlusterFS | Reporter: | Shyamsundar <srangana> |
| Component: | posix | Assignee: | bugs <bugs> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | mainline | CC: | bugs, nbalacha, pasik |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | glusterfs-6.0 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2019-03-25 16:31:17 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Shyamsundar
2018-10-05 17:49:56 UTC
Correct.
in posix_fini:
if (priv->health_check_active) {
priv->health_check_active = _gf_false;
pthread_cancel(priv->health_check); <--- this is not synchronous, so posix_fini will continue after calling this. From the man page:
"the return status of pthread_cancel() merely informs the caller whether the cancellation request was successfully queued."
priv->health_check = 0;
}
In posix_health_check_thread_proc ()
while (1) {
/* aborting sleep() is a request to exit this thread, sleep()
* will normally not return when cancelled */
ret = sleep(interval);
if (ret > 0)
break;
/* prevent thread errors while doing the health-check(s) */
pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);
<---- if the pthread_cancel is sent here, the thread will continue running until the cancel state is enabled again or it hits a cancellation point.
/* Do the health-check.*/
ret = posix_fs_health_check(this);
if (ret < 0 && priv->health_check_active)
goto abort;
if (!priv->health_check_active)
goto out;
pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
}
posix_fini needs to wait for the thread to exit before it cleans up priv. The thread is a detached thread so one easy way to solve this is to change that to a joinable thread and wait until it returns before proceeding with the fini.
REVIEW: https://review.gluster.org/21717 (posix: posix_health_check_thread_proc crash due to priv is NULL) posted (#1) for review on master by MOHIT AGRAWAL REVIEW: https://review.gluster.org/21717 (posix: posix_health_check_thread_proc crash due to priv is NULL) posted (#9) for review on master by Amar Tumballi This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-6.0, please open a new bug report. glusterfs-6.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution. [1] https://lists.gluster.org/pipermail/announce/2019-March/000120.html [2] https://www.gluster.org/pipermail/gluster-users/ |