Skip to content

segfault on RAI_parseTensorSetArgs #443

Closed
@filipecosta90

Description

@filipecosta90

following redisai-py nightly test fails: https://app.circleci.com/pipelines/github/RedisAI/redisai-py/300/workflows/5608f512-affc-49c6-ac1b-361aeaa611af/jobs/648

running redisai-py tests (test causing issues is test_dagrun_calling_on_return on AI.TENSORSET ):

nosetests -vsx test 

command causing this:

AI.TENSORSET a FLOAT 2 2 VALUES 2 3 2 3

backtrace:

Thread 1 "redis-server" received signal SIGSEGV, Segmentation fault.
getDoubleFromObject (o=0x1, target=0x7fffd754cc98) at object.c:621
621	        serverAssertWithInfo(NULL,o,o->type == OBJ_STRING);
(gdb) bt
#0  getDoubleFromObject (o=0x1, target=0x7fffd754cc98) at object.c:621
#1  0x00005566109e9b4d in RM_StringToDouble (str=<optimized out>, d=<optimized out>) at module.c:1171
#2  0x00007fc2ef9159bb in RAI_parseTensorSetArgs (ctx=0x7fffd754cd90, argv=0x7fc2e007a190, argc=10, t=0x7fffd754cd58, enforceArity=1, error=0x7fffd754cd60)
    at /home/filipe/redislabs/RedisAI/src/tensor.c:872
#3  0x00007fc2ef8e62e1 in RedisAI_TensorSet_RedisCommand (ctx=0x7fffd754cd90, argv=0x7fc2e007a190, argc=10) at /home/filipe/redislabs/RedisAI/src/redisai.c:92
#4  0x00005566109f056d in RedisModuleCommandDispatcher (c=0x7fc2ef522300) at module.c:642
#5  0x0000556610975441 in call (c=0x7fc2ef522300, flags=15) at server.c:3277
#6  0x0000556610975fee in processCommand (c=c@entry=0x7fc2ef522300) at server.c:3691
#7  0x0000556610984634 in processCommandAndResetClient (c=c@entry=0x7fc2ef522300) at networking.c:1809
#8  0x0000556610988fef in processInputBuffer (c=0x7fc2ef522300) at networking.c:1891
#9  0x0000556610a0dc9c in callHandler (handler=<optimized out>, conn=0x7fc2ef415180) at connhelpers.h:79
#10 connSocketEventHandler (el=<optimized out>, fd=<optimized out>, clientData=0x7fc2ef415180, mask=<optimized out>) at connection.c:285
#11 0x000055661096e6d3 in aeProcessEvents (eventLoop=eventLoop@entry=0x7fc2ef40b480, flags=flags@entry=27) at ae.c:479
#12 0x000055661096ea0d in aeMain (eventLoop=0x7fc2ef40b480) at ae.c:539
#13 0x000055661096af25 in main (argc=<optimized out>, argv=0x7fffd754d158) at server.c:5234

redisai (tensor.c RAI_parseTensorSetArgs ) LOC of segfault:

const int retval = RedisModule_StringToDouble(argv[argpos],&val);

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions