[Bugs] [Bug 1665880] New: After the shard feature is enabled, the glfs_read will always return the length of the read buffer, no the actual length readed

bugzilla at redhat.com bugzilla at redhat.com
Mon Jan 14 10:43:42 UTC 2019


https://bugzilla.redhat.com/show_bug.cgi?id=1665880

            Bug ID: 1665880
           Summary: After the shard feature is enabled, the glfs_read will
                    always return the length of the read buffer, no the
                    actual length readed
           Product: GlusterFS
           Version: mainline
            Status: NEW
         Component: sharding
          Assignee: bugs at gluster.org
          Reporter: xiubli at redhat.com
        QA Contact: bugs at gluster.org
                CC: bugs at gluster.org
  Target Milestone: ---
    Classification: Community



Description of problem:

When I was testing the gluster-block/tcmu-runner with the glsuterfs mainline
code, there will be a crash in gluster-block:

# journalctl -r
[...]
16878 Jan 14 17:42:16 rhel3 kernel: gluster-blockd[5209]: segfault at 0 ip
00007fc430c0ff81 sp 00007fc42bffc608 error 4 in
libc-2.17.so[7fc430aa1000+1c3000]                 
16879 Jan 14 17:42:16 rhel3 systemd: gluster-blockd.service: main process
exited, code=killed, status=11/SEGV
16880 Jan 14 17:42:16 rhel3 systemd: Unit gluster-blockd.service entered failed
state.
16881 Jan 14 17:42:16 rhel3 systemd: gluster-blockd.service failed.
[...]

This is because when reading and parsing the meta-data file and after EOF the
loop won't stop and keep reading and glfs_read returns none zero.



Version-Release number of selected component (if applicable):


How reproducible:
100%

Steps to Reproduce:
1. Create one volume and enable the features.shard
2. Try to allocate one buffer large enough and make sure the buffer size is
larger than the actual file size.
3. len = glfs_read (gfd, buffer, sizeof(buffer)).

Actual results:
len will always equal to sizeof(buffer)

Expected results:
len < sizeof(buffer)

Additional info:

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are on the CC list for the bug.
You are the assignee for the bug.


More information about the Bugs mailing list