Uploaded image for project: 'libzmq'
  1. libzmq
  2. LIBZMQ-496

Crash on heavy socket opening/closing: Device or resource busy (mutex.hpp:90)

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 3.2.2
    • Fix Version/s: 3.2.3
    • Component/s: core
    • Labels:
    • Environment:

      CentOS release 6.3 (Final Santiago)

      Description

      On heavy subscribe socket opening/closing I experience an assert hit when pthread_mutex_destroy is called in mutex.hpp.

      Attached is a piece of code which demonstrates this.
      Compiled with:

      gcc -O zmqpub.c -o zmqpub -lzmq -lpthread
      gcc -O zmqsub.c -o zmqsub -lzmq -lpthread

      Executed with:

      ./zmqpub &
      ./zmqsub

      zmqsub process will be crashed but the timing is very rare.
      It was taken few days to reproduce this issue on my environment.

      This test needs many open files so you should change the limits.

      ulimit -n 8192
      ulimit -c unlimited

      I got a core file and printed all stack trace of threads on this process.
      Please see bt.txt. But I couldn't find another thread to lock the mutex.

      I thought this issue looks same as LIBZMQ-281 - Crash on heavy socket creation: Device or resource busy (mutex.hpp:91) Complete .
      But the version is different so I create new issue for this problem.

        Attachments

        1. bt.txt
          238 kB
        2. bt2.txt
          131 kB
        3. zmqpub.c
          0.8 kB
        4. zmqsub.c
          1 kB

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              kanekotky Takayuki Kaneko
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: