Bug 1191497 - Stripe translator wrongly calculating vector size and count
Summary: Stripe translator wrongly calculating vector size and count
Keywords:
Status: CLOSED EOL
Alias: None
Product: GlusterFS
Classification: Community
Component: stripe
Version: mainline
Hardware: x86_64
OS: Linux
high
medium
Target Milestone: ---
Assignee: bugs@gluster.org
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-02-11 11:57 UTC by Mohammed Rafi KC
Modified: 2018-09-18 08:38 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2018-09-18 08:38:30 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Mohammed Rafi KC 2015-02-11 11:57:19 UTC
Description of problem:

If we are trying to write more than 3 gb file through a fuse mount with write behind loaded, It will give transport endpoint disconnected error for rdma transport. 

When write-behind aggregates two or more write request,. then that request will reach in stripe writev with vector count > 1. Stripe translator will try to cut the total size as chunks of stripe-size. When it tries to cut the a request with vector count>1, the calculation is went wrong here 

3718 
3719                 fill_size = (local->stripe_size - 
3720                              ((offset + offset_offset) % local->stripe_size)); 
3721                 if (fill_size > remaining_size) 
3722                         fill_size = remaining_size; 
3723  
3724                 remaining_size -= fill_size; 
3725  
3726                 tmp_count = iov_subset (vector, count, offset_offset, 
3727                                         offset_offset + fill_size, NULL); 
3728                 tmp_vec = GF_CALLOC (tmp_count, sizeof (struct iovec), 
3729                                      gf_stripe_mt_iovec); 
3730                 if (!tmp_vec) { 
3731                         op_errno = ENOMEM; 
3732                         goto err; 
3733                 } 
3734                 tmp_count = iov_subset (vector, count, offset_offset, 
3735                                         offset_offset + fill_size, tmp_vec); 
3736  

When calculating the new vector with striped size, it generates a new invalid vector with a valid address and the vector size as zero from iov_subset ().

If this request comes in rdma transport, rdma is not expecting to send a vector with length as zero. So it will give an error from rdma transport. 

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

mainline.

How reproducible:

50%

Steps to Reproduce:
1. Create a stripe 3 distributed volume with transport type as rdma
2. start the volume. 
3. mount the volume using fuse mount.
4. run dd if=/dev/zero of=/mnt/file1.txt bs=1M count=600 or run iozone -Rac -i 0 -g 8G (on mount point)

Actual results:

write fails with Transport end point is not connected

Expected results:

Should complete the write without any error.

Additional info:

Comment 1 Amar Tumballi 2018-09-18 08:38:30 UTC
Not planning to work any more on the component:

https://lists.gluster.org/pipermail/gluster-users/2018-July/034400.html


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