[Gluster-devel] IPC test is failing due to Segmentation Fault

Shyam Ranganathan srangana at redhat.com
Mon Nov 20 19:05:52 UTC 2017


On 11/15/2017 10:47 AM, Shyam Ranganathan wrote:
> On 11/14/2017 01:57 AM, Vaibhav Vaingankar wrote:
>> Hi
>>
>> I am building GlusterFS from source on s390x, while testing it is seen 
>> *features/ipc.t *is failing cause of segmentation fault. here is the 
>> bt log:
>> Please let me know if the issue is caused by bug in the source or bug 
>> in one of the dependent program.
> 
> This is a problem in master as well (same stack and all), when I tested 
> it on a Fedora x86-64 machine.
> 
> But, the IPC test has been deprecated, as the IPC FOP itself has been 
> deprecated (see [1]), hence this test is not run on the code anymore.
> 
> There still is the crash when accessing GFAPI via python as stated below 
> (without IPC code in place) and so there is some bug either in the 
> python code or otherwise (that I am currently ill equipped to debug).

This mail is informational, just closing the loop for myself.

Did some more digging (with John), as the python code still crashed, 
when I removed references to call glfs_ipc from the python code.

The original crash was due to a truncated fs pointer value passed to 
glfs_set_volfile_server from the python program (which is the return 
value from glfs_new).

The issue seems to be reproducible with python version 2.7.14, and not 
2.7.5 (which is what is present in centOS7, and possibly CentOS6 as 
well, which the regression test machines run).

The problem can be averted if we declare the argtypes for the various C 
calls that we are making from the python program, which for whatever 
reason works fine in 2.7.5 and not in 2.7.14.

IOW, adding the following lines, moved the segmentation fault from the 
set_volfile to the glfs_init,

 > api.glfs_ipc.restype = ctypes.c_int
api.glfs_new.restype = ctypes.c_void_p
api.glfs_set_volfile_server.argtypes = [ ctypes.c_void_p, 
ctypes.c_char_p, ctypes.c_char_p, ctypes.c_int ]

Applying this recursively, would solve the problem, when we bring back 
IPC support and enable this test case.

> 
> Request that you raise a but for the same, and we can look at getting 
> the right eyes on it.
> 
>> waiting for positive response.
>>
>> (gdb) bt
>> #0 0x000003fffd8a1904 in pub_glfs_set_volfile_server (fs=0x33efc0, 
>> transport=0x3fffdc20dc4 "tcp", host=0x3fffdc10524 "73da538ef028", 
>> port=<optimized out>) at glfs.c:422
> 
> Shyam
> 
> [1] Git hub issue dealing with IPC FOP being disabled in gfapi: 
> https://github.com/gluster/glusterfs/issues/269
> _______________________________________________
> Gluster-devel mailing list
> Gluster-devel at gluster.org
> http://lists.gluster.org/mailman/listinfo/gluster-devel


More information about the Gluster-devel mailing list