Description of problem: As part of glfs_fini(), stderr is closed by libgfapi. This is problematic for applications that are linked to libfapi but are using stderr for their own error logging purpose. The solution is to explicitly check if stderr is being used as logfile and not close it.
REVIEW: http://review.gluster.org/6452 (gfapi: Don't close stderr logfile) posted (#1) for review on master by Bharata B Rao (bharata.rao)
REVIEW: http://review.gluster.org/6452 (libglusterfs: Explicitly open /dev/stderr logfile) posted (#2) for review on master by Bharata B Rao (bharata.rao)
COMMIT: http://review.gluster.org/6452 committed in master by Anand Avati (avati) ------ commit 00b159840added72099f61f45b38133e856d23bf Author: Bharata B Rao <bharata.ibm.com> Date: Mon Dec 9 11:15:02 2013 +0530 libglusterfs: Explicitly open /dev/stderr logfile Currently if stderr is specified as logfile, /dev/stderr isn't opened but stderr is directly used. However libgfapi closes the logfile (and hence stderr) from glfs_fini() which results in stderr becoming unavailable for the application that links to libgfapi. Prevent this unexpected behaviour for the application by explicitly opening /dev/stderr like it is done for any other logfile. Change-Id: I76b754598a2acf40b91ff0461726c5918e278c84 BUG: 1038924 Signed-off-by: Bharata B Rao <bharata.ibm.com> Reviewed-on: http://review.gluster.org/6452 Tested-by: Gluster Build System <jenkins.com> Reviewed-by: Anand Avati <avati>
Bharata, can you please send a backport to release-3.5 as well?
REVIEW: http://review.gluster.org/6477 (libglusterfs: Explicitly open /dev/stderr logfile) posted (#1) for review on release-3.5 by Bharata B Rao (bharata.rao)
COMMIT: http://review.gluster.org/6477 committed in release-3.5 by Vijay Bellur (vbellur) ------ commit e29080425a762232a90229c380c1ac52593dd0cc Author: Bharata B Rao <bharata.ibm.com> Date: Wed Dec 11 12:03:59 2013 +0530 libglusterfs: Explicitly open /dev/stderr logfile From: Bharata B Rao <bharata.ibm.com> Currently if stderr is specified as logfile, /dev/stderr isn't opened but stderr is directly used. However libgfapi closes the logfile (and hence stderr) from glfs_fini() which results in stderr becoming unavailable for the application that links to libgfapi. Prevent this unexpected behaviour for the application by explicitly opening /dev/stderr like it is done for any other logfile. Change-Id: I76b754598a2acf40b91ff0461726c5918e278c84 BUG: 1038924 Signed-off-by: Bharata B Rao <bharata.ibm.com> Reviewed-on: http://review.gluster.org/6477 Tested-by: Gluster Build System <jenkins.com> Reviewed-by: Vijay Bellur <vbellur>
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.5.0, please reopen this bug report. glusterfs-3.5.0 has been announced on the Gluster Developers mailinglist [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://thread.gmane.org/gmane.comp.file-systems.gluster.devel/6137 [2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user