ETA application crashed in ripc10IntFlushSess

The application uses ETA to send over 10,000 messages per second. Recently, the application crashed with a segmentation fault in ripc10IntFlushSess. Two threads crashed in the same function, a few microseconds apart.

Program terminated with signal 11
#0 0x00000000004282a0 in ripc10IntFlushSess ()
Missing separate debuginfos, use: debuginfo-install
glibc-2.12-1.80.el6.x86_64 libgcc-4.4.6-4.el6.x86_64 libstdc++-4.4.6-4.el6.x86_64
(gdb) bt
#0 0x00000000004282a0 in ripc10IntFlushSess ()
#1 0x0000000000428cb8 in ripc10FlushSess ()
#2 0x0000000000420c60 in rsslSocketFlush ()
#3 0x000000000041362d in rsslFlush ()

Could you please help?

Best Answer

  • Jirapongse
    Jirapongse admin
    Answer ✓

    From the problem description, the application uses ETA with
    multiple threads and two threads can call rsslFlush function on the same
    channel concurrently. In this scenario, the application must use RSSL_LOCK_GLOBAL_AND_CHANNEL
    instead of RSSL_LOCK_NONE when calling rsslInitialize or rsslInitializeEx
    function. This setting allows for accessing the same channel from multiple
    threads.

    RsslInitializeExOpts initOpts = RSSL_INIT_INITIALIZE_EX_OPTS;
    RsslError error;

    initOpts.rsslLocking = RSSL_LOCK_GLOBAL_AND_CHANNEL;
    if (rsslInitializeEx(&initOpts, &error) != RSSL_RET_SUCCESS)
    {

    }

    Note that writing messages from multiple threads can result
    in ordering issues and it is not recommended to write related messages across
    different threads.