Bug 761992 (GLUSTER-260) - ls on booster VMP results in error: "File descriptor in bad state"
Summary: ls on booster VMP results in error: "File descriptor in bad state"
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: GLUSTER-260
Product: GlusterFS
Classification: Community
Component: write-behind
Version: mainline
Hardware: All
OS: Linux
high
medium
Target Milestone: ---
Assignee: Raghavendra G
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-09-15 06:06 UTC by Shehjar Tikoo
Modified: 2009-11-24 13:16 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Regression: RTA
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:


Attachments (Terms of Use)
Booster FSTAB file (100 bytes, text/plain)
2009-09-15 03:06 UTC, Shehjar Tikoo
no flags Details
Client vol file (665 bytes, text/plain)
2009-09-15 03:07 UTC, Shehjar Tikoo
no flags Details
Booster log (25.69 KB, application/octet-stream)
2009-09-15 03:07 UTC, Shehjar Tikoo
no flags Details
Server vol file (664 bytes, text/plain)
2009-09-15 03:08 UTC, Shehjar Tikoo
no flags Details

Description Shehjar Tikoo 2009-09-15 03:06:55 UTC
Created attachment 66 [details]
This gzipped patch should fix the probe output parsing

Comment 1 Shehjar Tikoo 2009-09-15 03:07:25 UTC
Created attachment 67 [details]
Please use this one, the other one contained a minor oversight

Comment 2 Shehjar Tikoo 2009-09-15 03:07:51 UTC
Created attachment 68 [details]
Fixed xtermfix (patch)

Comment 3 Shehjar Tikoo 2009-09-15 03:08:23 UTC
Created attachment 69 [details]
Patch for /etc/termcap which fixes the described problems

Comment 4 Shehjar Tikoo 2009-09-15 03:09:26 UTC
The test was done my me on release-2.0 branch but the fix needs to be committed to both mainline and r2.

Comment 5 Shehjar Tikoo 2009-09-15 06:06:16 UTC
Reported by Wei Dong on gluster-users and confirmed by myself.

For the attached log files and booster.conf, the following command results in an error:

root@indus:glusterfs# LD_PRELOAD=/usr/local/lib/glusterfs/glusterfs-booster.so ls /gluster
ls: closing directory /gluster: File descriptor in bad state
root@indus:glusterfs# 

The log file, shoes the following error message:
[2009-09-15 11:28:38] D [booster.c:1738:closedir] booster: closedir on gluster
[2009-09-15 11:28:38] D [write-behind.c:1705:wb_flush] client: write behind file pointer is not stored in context of fd(0x628230), returning EBADFD

The close dir in booster is resulting in a wb_flush which expects a fd context to be stored for every fd_t. The fix requires that we add a special case of directories since write-behind does not handle directory fops.

Comment 6 Anand Avati 2009-09-22 10:12:33 UTC
PATCH: http://patches.gluster.com/patch/1383 in master (performance/write-behind: check for the presence of context only in fds not opened on directories.)

Comment 7 Anand Avati 2009-09-22 10:13:42 UTC
PATCH: http://patches.gluster.com/patch/1382 in release-2.0 (performance/write-behind: check for the presence of context only in fds not opened on directories.)

Comment 8 Raghavendra G 2009-09-24 08:36:04 UTC
Crashes are observed because of lack of NULL checks on file pointer.

Comment 9 Anand Avati 2009-09-24 09:19:40 UTC
PATCH: http://patches.gluster.com/patch/1489 in release-2.0 (performance/write-behind: Add NULL checks for file pointer.)

Comment 10 Anand Avati 2009-09-24 11:13:44 UTC
PATCH: http://patches.gluster.com/patch/1490 in release-2.0 (write-behind: check for NULL file pointer in flush callback)

Comment 11 Anand Avati 2009-10-09 02:59:47 UTC
PATCH: http://patches.gluster.com/patch/1834 in master (performance/write-behind: Refining the check for fd_ctx in fds)


Note You need to log in before you can comment on or make changes to this bug.