Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-3983

C client test suite hangs forever 'sss' is configured in /etc/nsswitch.conf

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.7.0
    • 3.6.3, 3.7.0
    • c client, tests
    • Fedora 32 x86_64
      default /etc/nsswitch.conf file (provided by glibc package)
      sssd services are not running, but sss does appear above files in the 'passwd' entry

    Description

      While testing a full build on the master branch (3.7.0-SNAPSHOT), I observed that the C client tests hang indefinitely when reaching the zktest-mt's Zookeeper_close test suite (nothing is printed from that suite, but Zookeeper_init finishes and then nothing is printed)

      Attaching gdb as a debugger to the zktest-mt process, with the help of ztzg and symat I saw that it was stuck in the sss because of the test mocking sockets, and sss requiring a non-mocked socket to call getpwuid_r and getlogin functions in zookeeper-client/zookeeper-client-c/src/zookeeper.c

      Disabling the lines in zookeeper.c that called those functions, which seemed to be used for logging information only, the tests were able to proceed and complete in under 9 minutes (full-build, without running any surefire/junit tests).

      Attachments

        1. workaround.patch
          1 kB
          Christopher Tubbs
        2. backtrace.txt
          5 kB
          Christopher Tubbs

        Issue Links

          Activity

            People

              ctubbsii Christopher Tubbs
              ctubbsii Christopher Tubbs
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h
                  1h