| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
This patch fixes CID 1395067, 1388767 and 1395068.
updates: bz#789278
Change-Id: Ie92252281bf559dd29fab462e121445ff4d3b865
Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If unlinking of an invalid linkto file failed in lookup-everywhere
codepath, lookup was failed with EIO. The rational as per the comment
was,
<snip>
/* When dht_lookup_everywhere is performed, one cached
*and one hashed file was found and hashed file does
*not point to the above mentioned cached node. So it
*was considered as stale and an unlink was performed.
*But unlink fails. So may be rebalance is in progress.
*now ideally we have two data-files. One obtained during
*lookup_everywhere and one where unlink-failed. So
*at this point in time we cannot decide which one to
*choose because there are chances of first cached
*file is truncated after rebalance and if it is chosen
*as cached node, application will fail. So return EIO.
*/
</snip>
However, this reasoning is only valid when
* op_errno is EBUSY, indicating rebalance is in progress
* op_errno is ENOTCONN as wecannot determine what was the status of
file on brick.
Hence this patch doesn't fail lookup unless unlink fails with an
either EBUSY or ENOTCONN
Change-Id: Ife55f3d97fe557f3db05beae0c2d786df31e8e55
Fixes: bz#1635145
Signed-off-by: Raghavendra Gowdappa <rgowdapp@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The #include "uuid.h" left over from using .../contrib/uuid is debatably
incorrect now that we use the "system header" file /usr/include/uuid/uuid.h
from libuuid-devel.
Unfortunately this is complicated by things like FreeBSD having its own
/usr/include/uuid.h, and the e2fsprogs-libuuid uuid.h in installed - as
most third-party packages in FreeBSD are - in /usr/local as
/usr/local/include/uuid/uuid.h
With a system header file it should at least be #include <uuid.h>, and
even better as #include <uuid/uuid.h>, much like the way <sys/types.h>
and <net/if.h> are included. Using #include <uuid/uuid.h> guarantees
not getting the /usr/include/uuid.h on FreeBSD, but clang/cc knows to
find "system" header files like this in /usr/local/include; with or
without the -I/... from uuid.pc. Also using #include "uuid.h" leaves
the compiler free to find a uuid.h from any -I option it might be passed.
(Fortunately we don't have any at this time.)
As we now require libuuid-devel or e2fsprogs-libuuid and configure will
exit with an error if the uuid.pc file doesn't exist, the HAVE_LIBUUID
(including the #elif FreeBSD) tests in compat-uuid.h are redundant. We
are guaranteed to have it, so testing for it is a bit silly IMO. It may
also break building third party configure scripts if they omit defining
it. (Just how hard do we want to make things for third party developers?)
Change-Id: I7317f63c806281a5d27de7d3b2208d86965545e1
updates: bz#1193929
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In __shard_update_shards_inode_list(), previously shard translator
was not holding a ref on the base inode whenever a shard was added to
the lru list. But if the base shard is forgotten and destroyed either
by fuse due to memory pressure or due to the file being deleted at some
point by a different client with this client still containing stale
shards in its lru list, the client would crash at the time of locking
lru_base_inode->lock owing to illegal memory access.
So now the base shard is ref'd into the inode ctx of every shard that
is added to lru list until it gets lru'd out.
The patch also handles the case where none of the shards associated
with a file that is about to be deleted are part of the LRU list and
where an unlink at the beginning of the operation destroys the base
inode (because there are no refkeepers) and hence all of the shards
that are about to be deleted will be resolved without the existence
of a base shard in-memory. This, if not handled properly, could lead
to a crash.
Change-Id: Ic15ca41444dd04684a9458bd4a526b1d3e160499
updates: bz#1605056
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
One needs to be very careful about giving same key for the key and
SLEN(key) arguments in dict_xxxn() functions. Writing macros that
would take care of passing the SLEN(key) would help reduce this
burden on the developer and reviewer.
updates: bz#1193929
Change-Id: I312c479b919826570b47ae2c219c53e2f9b2ddef
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem and Analysis:
The length of canonical format of uuid is 36 but
'GF_UUID_BUF_SIZE 50' was being used everywhere.
glusterd/geo-rep code was earlier using strncpy,
but recently changes to memcpy with the drive
to avoid strncpys. This leads to memory corruption
and glusterd is crashing without a core with geo-rep
creation with ASAN build.
Fix:
'GF_UUID_BUF_SIZE 37' (+ 1 for NULL byte)
And change geo-rep to use UUID_CANONICAL_FORM_LEN
instead
Updates: bz#1633930
Change-Id: Ibd347d542b92e64a96ce06780cda643557233bc7
Signed-off-by: Kotresh HR <khiremat@redhat.com>
|
|
|
|
|
|
|
|
|
| |
This patch addresses memory leaks other than
'gf_cli_rsp' response structure.
Updates: bz#1633930
Change-Id: Idc5940dca623e33bc01004a9324bc435fc60b006
Signed-off-by: Kotresh HR <khiremat@redhat.com>
|
|
|
|
|
|
|
|
| |
CID: 1396060
updates: bz#789278
Change-Id: Ia25aa9a4ca7505e747aa92bb3ae81415da7d19d1
Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: At the time of processing GF_EVENT_PARENT_DOWN
at brick xlator, it forwards the event to next xlator
only while xlator ensures no stub is in progress.
At io-thread xlator it decreases stub_cnt before the process
a stub and notify EVENT to next xlator
Solution: Introduce a new counter to save stub_cnt and decrease
the counter after process the stub completely at io-thread
xlator.
To avoid brick crash at the time of call xlator_mem_cleanup
move only brick xlator if detach brick name has found in
the graph
Note: Thanks to pranith for sharing a simple reproducer to
reproduce the same
fixes bz#1637934
Change-Id: I1a694a001f7a5417e8771e3adf92c518969b6baa
Signed-off-by: Mohit Agrawal <moagrawal@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes https://github.com/gluster/glusterfs/issues/519
Credits: "Fabian Wannenmacher <@wanneut>"
Updates: bz#1193929
Change-Id: If8d60c3379093a868ad6ba8c2ad86a4b99d35f2c
Signed-off-by: Sheetal Pamecha <sheetal.pamecha08@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CID:
1395812 Explicit null dereferenced
1356542 Dereference null return value
https://scan6.coverity.com/reports.htm#v42607/p10714/fileInstanceId=86261835&defectInstanceId=26407100&mergedDefectId=1395812
https://scan6.coverity.com/reports.htm#v42607/p10714/fileInstanceId=86261835&defectInstanceId=26407215&mergedDefectId=1356542
Change-Id: I2c20972a8080fa7a70b88eab0688b9cf734bbf24
updates: bz#789278
Signed-off-by: Ashish Pandey <aspandey@redhat.com>
|
|
|
|
|
|
|
|
|
| |
This patch fixes CID 1325525 (double free).
updates: bz#789278
Change-Id: I26a5f428dde83dd7708815f06830decf4068b94c
Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Argument with 'nonnull' attribute passed null.
Adding a check to avoid the issue.
Updates: bz#1622665
Change-Id: I1d3a166e154a51da59bebb93a49f5174e593c98e
Signed-off-by: Iraj Jamali <ijamali@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
'gf_cli_rsp' structure has 'op_errstr' and 'dict.dict_val'
which could get allocated by xdr and should be freed. This
patch takes care of all instances of the same.
Updates: bz#1633930
Change-Id: I2a5d129ffe85cfca743c89edb45b658f3ce688cb
Signed-off-by: Kotresh HR <khiremat@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Argument with 'nonnull' attribute passed null.
Added checks to avoid the issues.
Updates: bz#1622665
Change-Id: I0dba1185cee5baba3c124d687560a06fe182381e
Signed-off-by: Iraj Jamali <ijamali@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: dereferencing of this->name; volinfo and xl
can be null.
Solution: Replaced this->name with apropriate names in few places,
added a null check to avoid dereferencing of volinfo,
and introduced a goto out statement, such that null pointer value is
not passed to the function volgen_xlator_link when xl becomes NULL.
Updates: bz#1622665
Change-Id: I77616bd23f58328cb6dbe681914a028991d49abb
Signed-off-by: Shwetha Acharya <sacharya@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reduces the no. of syscalls on Linux systems from 2, accept(2) and
fcntl(2) for setting O_NONBLOCK, to a single accept4(2). On NetBSD, we
have paccept(2) that does the same, if we leave signal masking aside.
Added sys_accept which accepts an extra flags argument than accept(2).
This would opportunistically use accept4/paccept as available. It would
fallback to accept(2) and fcntl(2) otherwise.
While at this, the patch sets FD_CLOEXEC flag on the accepted socket fd.
BUG: 1236272
Change-Id: I41e43fd3e36d6dabb07e578a1cea7f45b7b4e37f
fixes: bz#1236272
Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: wb_directory_inode->lock can be null.
Solution: added a condition, if(!wb_directory_inode->lock.spinlock)
to address the issue (checked one of the attributes of union lock
to ensure that union is not null).
Updates: bz#1622665
Change-Id: I0749ee16aa2c23f51d4b4c7b0979d494bcd4d90e
Signed-off-by: Shwetha Acharya <sacharya@redhat.com>
|
|
|
|
|
|
|
|
|
| |
For more information, see http://udrepper.livejournal.com/20407.html
BUG: 1236272
Change-Id: I25a645c10bdbe733a81d53cb714eb036251f8129
fixes: bz#1236272
Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
|
|
|
|
|
|
| |
Change-Id: I1529494504c38172f56759c0f06231864e32df24
updates: bz#1193929
Signed-off-by: Amar Tumballi <amarts@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
To check if the gfid is null or not
we should use function gf_uuid_is_null
CID: 1382364
https://scan6.coverity.com/reports.htm#v42607/p10714/fileInstanceId=86243257&defectInstanceId=26374360&mergedDefectId=1382364
Change-Id: I81944b823c9ee6e6dcc9695f64f7e5966e0d7030
updates: bz#789278
Signed-off-by: Ashish Pandey <aspandey@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
0 0x00007fb3db3a2ee4 in pub_glfs_fini (fs=0x7f8977d63f00) at glfs.c:1236
1 0x00007fb3db3a2065 in pub_glfs_new (volname=0x7f80de4d4d40 "openfs1")
at glfs.c:784
2 0x00007fb3db5cf089 in glusterfs_get_fs (params=...,
up_ops=up_ops@entry=0x7fb3ca643130)
at /usr/src/debug/nfs-ganesha/src/FSAL/FSAL_GLUSTER/export.c:889
3 0x00007fb3db5cf99a in glusterfs_create_export (
fsal_hdl=0x7fb3db7e2490 <GlusterFS+112>, parse_node=0x7fb3ca6387d0,
err_type=<optimized out>, up_ops=0x7fb3ca643130)
at /usr/src/debug/nfs-ganesha/src/FSAL/FSAL_GLUSTER/export.c:1011
4 0x00007fb3e11c485f in mdcache_fsal_create_export (
sub_fsal=0x7fb3db7e2490 <GlusterFS+112>,
parse_node=parse_node@entry=0x7fb3ca6387d0,
err_type=err_type@entry=0x7fb3c0bef140, super_up_ops=<optimized out>)
at /usr/src/debug/nfs-ganesha/src/FSAL/Stackable_FSALs/FSAL_MDCACHE/mdcache_main.c:281
(gdb) p errno
$1 = 12
Change-Id: I3dd5b84b52962ceb0b5d4f9b4f475bf4aa724292
updates: bz#1626313
Signed-off-by: Kinglong Mee <mijinlong@open-fs.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
In an arbiter volume, if there is a pending data heal of a file only on
arbiter brick, self-heal takes inodelks twice due to a code-bug but unlocks
it only once, leaving behind a stale lock on the brick. This causes
the next write to the file to hang.
Fix:
Fix the code-bug to take lock only once. This bug was introduced master
with commit eb472d82a083883335bc494b87ea175ac43471ff
Thanks to Pranith Kumar K <pkarampu@redhat.com> for finding the RCA.
fixes: bz#1637802
Change-Id: I15ad969e10a6a3c4bd255e2948b6be6dcddc61e1
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Avoided NULL pointer dereferencing by doing GF_VALIDATE_OR_GOTO for rvec
Updates: bz#1622665
Change-Id: I650e0203796dd705d79060f9506fc6c559b30f56
Signed-off-by: Iraj Jamali <ijamali@redhat.com>
|
|
|
|
|
|
|
|
|
| |
This patch fixes CID 1356544 and 1356539.
Both are of type NULL_RETURNS.
Change-Id: I2ef7c3ff9929c4d85b79fff00e835ebee3ff3ce0
updates: bz#789278
Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
|
|
|
|
|
|
| |
Change-Id: Ibce94f282b0aafaa1ca60ab927a469b70595e81f
updates: bz#1626313
Signed-off-by: Zhang Huan <zhanghuan@open-fs.com>
|
|
|
|
|
|
|
|
|
|
| |
When compiling in other architectures there appear many warnings. Some
of them are actual problems that prevent gluster to work correctly on
those architectures.
Change-Id: Icdc7107a2bc2da662903c51910beddb84bdf03c0
fixes: bz#1632717
Signed-off-by: Xavi Hernandez <xhernandez@redhat.com>
|
|
|
|
|
|
|
|
| |
Closes the log file and reopens it to prevent leakage of file handles.
Change-Id: Idfaa479961bb0088004d0d5558bdb0eb32cff632
updates: bz#1626313
Signed-off-by: Kinglong Mee <mijinlong@open-fs.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I did not see a good reason to copy the temp strings str1 and str2
into msg string, and just used str1 (sprintf'ed str2 into it first).
Hope it makes logging somewhat faster, but I also hope there's more
room for improvement for faster logging.
Renamed str1 to logline and str2 to msg for better readability.
Also, remove dead assignment in _gf_msg() (clang complained).
Compile-tested only!
updates: bz#1193929
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
Change-Id: I19457d705c0b043937d96a4db35d087bb8e9b35a
|
|
|
|
|
|
| |
Change-Id: I87f01d86f50eb2fca21febb0ea3e77fbd152eb93
updates: bz#1626610
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
|
|
|
|
|
|
|
|
|
| |
CID: 1394649 1394657
Issue: Explicit null dereferenced
Change-Id: Ic1040ffa5548e1ecd49cfdc9a8716be445cbdf0f
Updates: bz#789278
Signed-off-by: Susant Palai <spalai@redhat.com>
|
|
|
|
|
|
|
|
|
| |
With this fix, a run on 'rpc-coverage.t' passes properly.
This should help to get started with other fixes soon!
Change-Id: I257ae4e28b9974998a451d3b490cc18c02650ba2
updates: bz#1633930
Signed-off-by: Amar Tumballi <amarts@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes import issue in cliutils.
Provided solution is to use relative import.
Change-Id: I14c9a0b528ef52e7c91f6b17b569c68c2ced8912
updates: #411
Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For debugging performance issues we found that this script is very
useful. Script collects the stats of vmstat/iostat/top/sar to get
metrics about memory/disk/cpu/network respectively at the configured
interval. It is very important to collect all these metrics at the
same time so that they can be correlated easily, so made this into a
script
fixes bz#1633926
Change-Id: Iea52e55179b21c505953722c8898293fe92cb8de
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
timeout
If a syncenv_task starts after syncenv_destroy, the syncenv_task enters
a 600s timeout cond timedwait, and syncenv_destroy must waits it timeout.
Change-Id: I972a2b231e50cbebd3c71707800e58033e40c29d
updates: bz#1626313
Signed-off-by: Kinglong Mee <mijinlong@open-fs.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CID: [1] 1394646 Unchecked return value from library
CID: [2] 1394633 Unused value
CID: 1382443 Sleeping while holding a lock [This is intentional]
[1] https://scan6.coverity.com/reports.htm#v40014/p10714/fileInstanceId=86159112&defectInstanceId=26360786&mergedDefectId=1394646
[2] https://scan6.coverity.com/reports.htm#v40014/p10714/fileInstanceId=86159365&defectInstanceId=26360919&mergedDefectId=1394633
Change-Id: I03086f7a9672c9f50a2bc44cdbce0006c887357b
updates: bz#789278
Signed-off-by: Milind Changire <mchangir@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
1. Fix imports
2. Use universal_newlines flag in Popen
3. encode msg used in 'sendto'
Updates: #411
Change-Id: Ieacdc2ba86953ff3a2e9d9b9a97157e8e0e36836
Signed-off-by: Kotresh HR <khiremat@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. ctypes/syscalls
A) arguments is expected to be encoded
B) Raw conversion of return value from bytearray into string
2. struct pack/unpack - Raw converstion of string to bytearray
3. basestring -> str
Updates: #411
Change-Id: I80f939adcdec0ed0022c87c0b76d057ad5559e5a
Signed-off-by: Kotresh HR <khiremat@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
CentOS5 too
It's been a couple of years since we stopped doing anything with
RHEL/CentOS 5
Change-Id: I83e78fa84b93fa5baddaf3fab92736d692a9bbca
updates: bz#1193929
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Current resource cleanup sequence is not
perfect while brick mux is enabled
Solution: 1) Destroying xprt after cleanup all fd associated
with a client
2) Before call fini for brick xlators ensure no stub
should be running on a brick
Change-Id: I86195785e428f57d3ef0da3e4061021fafacd435
fixes: bz#1631357
Signed-off-by: Mohit Agrawal <moagrawal@redhat.com>
|
|
|
|
|
|
|
|
| |
This patch fixes CID 1175017.
Change-Id: I4968c35489aeb5bfa0461b2edf2a0d73b7f03c14
updates: bz#789278
Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes CID : 1124725
Issue : Resource leak
updates: bz#789278
Change-Id: I2afe65875fa393fd2d2f90b6f7cf7f6782dabf89
Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: local could be NULL
Added condition checks to address this issue
Updates: bz#1622665
Change-Id: I7be7dacc5386a77441385240b43f22d85074b69d
Signed-off-by: Sheetal Pamecha <sheetal.pamecha08@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When geo-replication session is running, run
"gluster get-state" command to test.
https://review.gluster.org/#/c/glusterfs/+/20461/
patch fixes glusterd crash, when we run get-state
command with geo-rep session configured.
Adding the test now.
Fixes: bz#1598345
Change-Id: I56283fba2c782f83669923ddfa4af3400255fed6
Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is critical because we shouldn't be applying the automated
coding standard (clang-format) tool on these files.
This patchset is done by below steps:
* clang-format -i ${filename}
This creates syntax errors. Fix them using below two commands:
* sed -i -e 's/ @/@/g' ${filename}
* sed -i -e 's/,@/, @/g' ${filename}
With this, these files are having minimum changes requried to
compile, and is as close to the coding standard as possible.
* git rename ${filename} ${filename}.in
Updates: bz#1564149
Change-Id: Icf90f7f81d6fa4400be4826e094fdff8e64508d0
Signed-off-by: Amar Tumballi <amarts@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes CID 1395248.
Issue : Resource leak
updates: bz#789278
Change-Id: I2fd4e36ac2c2a034e56883436abfc5199b095026
Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
CID: 1356541 Issue: Dereference null return value
CID: 1382411 Issue: Dereference after null check
CID: 1391409 Issue: Unchecked return value
Change-Id: Id3d4feb4e88df424003cc8e8a1540e77bbe030e3
Updates: bz#789278
Signed-off-by: Susant Palai <spalai@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes CID : 1395323.
Issue : Uninitialized scalar variable (UNINIT)
updates: bz#789278
Change-Id: Id9567ca2ff9b5a36b9014afa70cc5795fe67161d
Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Added a Label "err" to avoid NULL pointer dereferencing
Updates: bz#1622665
Change-Id: I7ec02a9cbbc482c2cf77f66e5692e86cd251cd53
Signed-off-by: Harpreet Lalwani <hlalwani@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
CID: 1394631 1394634 1394643 1394645 1394652 1394655 1394661 1394666
1394669 1394670 1394671
Issue: Argument cannot be negative
Change-Id: Id4a9b1adcc271374971e788f161d91e8c9ac442f
Updates: bz#789278
Signed-off-by: Susant Palai <spalai@redhat.com>
|