Bug 1475255
| Summary: | [Geo-rep]: Geo-rep hangs in changelog mode | |||
|---|---|---|---|---|
| Product: | [Community] GlusterFS | Reporter: | Kotresh HR <khiremat> | |
| Component: | geo-replication | Assignee: | Niels de Vos <ndevos> | |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | ||
| Severity: | high | Docs Contact: | ||
| Priority: | unspecified | |||
| Version: | mainline | CC: | bugs, ndevos | |
| Target Milestone: | --- | Keywords: | Triaged | |
| Target Release: | --- | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | glusterfs-3.13.0 | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 1475258 (view as bug list) | Environment: | ||
| Last Closed: | 2017-12-08 17:35: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: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 1475258 | |||
|
Description
Kotresh HR
2017-07-26 09:56:05 UTC
Easy reproducer:
1. Create gluster volume and enable changelog
'gluster vol set <volname> changelog on
'gluster vol set <volname> changelog.rollover-time 5'
2. Export path to libgfchangelog.pc
export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig/"
3. Compile the get-changes.c located in "xlators/features/changelog/lib/examples/c/get-changes.c" as below.
gcc -g -o getchanges `pkg-config --cflags libgfchangelog` get-changes.c `pkg-config --libs libgfchangelog`
4. Run getchanges.
5. In other terminal, mount the gluster volume and touch a file. After 5 secs,
you should see the path of changelog file in getchanges. But it's hanging and pring the changelog path
REVIEW: https://review.gluster.org/17899 (mem-pool: track and verify initialization state) posted (#1) for review on master by Niels de Vos (ndevos) REVIEW: https://review.gluster.org/17900 (changelog: add mem-pool initialization) posted (#1) for review on master by Niels de Vos (ndevos) COMMIT: https://review.gluster.org/17899 committed in master by Jeff Darcy (jeff.us) ------ commit b5fa5ae05f73e03023db37e43fb203267b719160 Author: Niels de Vos <ndevos> Date: Wed Jul 26 16:16:11 2017 +0200 mem-pool: track and verify initialization state It is possible that pthread_getspecific() returns a non-NULL value in case the pthread_key_t is not initialized. The behaviour for pthread_getspecific() is not defined in this case. This can happen when applications use mem-pools from libglusterfs.so, but did not call mem_pools_init_early(). By tracking the status of the mem-pools initialization, it is now possible to prevent calling pthread_getspecific() in case the pthread_key_t is not initialized. In future, we might want to exend this more to faciliate debugging. Reported-by: Kotresh HR <khiremat> Tested-by: Jiffin Tony Thottan <jthottan> Change-Id: I6255419fe05792dc78b1eaff55bc008fc5ff3933 Fixes: 1e8e62640 ("mem-pool: initialize pthread_key_t pool_key in mem_pool_init_early()") BUG: 1475255 Signed-off-by: Niels de Vos <ndevos> Reviewed-on: https://review.gluster.org/17899 Smoke: Gluster Build System <jenkins.org> CentOS-regression: Gluster Build System <jenkins.org> Reviewed-by: jiffin tony Thottan <jthottan> Reviewed-by: Jeff Darcy <jeff.us> COMMIT: https://review.gluster.org/17900 committed in master by Jeff Darcy (jeff.us) ------ commit 1bc3cd9bd59e3826fd14fc239322f039d7a814da Author: Niels de Vos <ndevos> Date: Wed Jul 26 16:17:03 2017 +0200 changelog: add mem-pool initialization With recent changes to the mem-pool initialization, mem_pools_init_early() and mem_pools_init_late() need to be called before mem_get() is usable. This change has been tested manually with the included test from xlators/features/changelog/lib/examples/c/get-changes.c. Change-Id: I139563c4ff78a566cef2ff7e3da2ee10306def92 BUG: 1475255 Reported-by: Kotresh HR <khiremat> Signed-off-by: Niels de Vos <ndevos> Reviewed-on: https://review.gluster.org/17900 Smoke: Gluster Build System <jenkins.org> Reviewed-by: Kotresh HR <khiremat> CentOS-regression: Gluster Build System <jenkins.org> Reviewed-by: Jeff Darcy <jeff.us> 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-3.13.0, please open a new bug report. glusterfs-3.13.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] http://lists.gluster.org/pipermail/announce/2017-December/000087.html [2] https://www.gluster.org/pipermail/gluster-users/ |