Uploaded image for project: 'JBoss Core Services'
  1. JBoss Core Services
  2. JBCS-645

httpd with mod_bmx* modules causes leak of semaphores

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • httpd 2.4.29 GA, httpd 2.4.23.GA
    • httpd
    • None
    • ?
    • Hide
      1. Install JBCS Apache HTTP Server 2.4.29.
      2. Copy conf.d/mod_bmx.conf.sample to conf.d/mod_bmx.conf, and then comment out the last 3 lines of mod_bmx.conf and save it.
        conf.d/mod_bmx.conf
        LoadModule bmx_module         modules/mod_bmx.so
        LoadModule bmx_status_module  modules/mod_bmx_status.so
        LoadModule bmx_vhost_module   modules/mod_bmx_vhost.so
        
        BMXVHostDBMFilename cache/mod_bmx/bmx_vhost.db
        BMXVHostLockFilename cache/mod_bmx/bmx_vhost.db.lock
        
        #<Location /bmx>
        #    SetHandler bmx-handler
        #</Location>
        
      3. Start httpd. (Optional)
        # cd $HTTPD_HOME/sbin
        # ./apachectl start
        
      4. Restart httpd repeatedly.
        # while : ; do $HTTPD_HOME/sbin/apachectl restart; sleep 10; done
        
      5. On another terminal, check if the number of semaphores increases.
        # while : ; do date "+%Y-%m-%d %H:%M:%S"; ipcs -a -t | grep apache | wc -l; sleep 10; done
        2018-10-03 02:43:36
        0
        2018-10-03 02:43:46
        12
        2018-10-03 02:43:56
        13
        2018-10-03 02:44:06
        14
        2018-10-03 02:44:16
        15
        2018-10-03 02:44:26
        16
        2018-10-03 02:44:36
        17
        2018-10-03 02:44:46
        18
        2018-10-03 02:44:56
        19
        2018-10-03 02:45:06
        20
            :
            :
        125
        2018-10-03 03:02:47
        126
        2018-10-03 03:02:57
        127
        2018-10-03 03:03:07
        128
        2018-10-03 03:03:17
        128
        2018-10-03 03:03:27
        128
        2018-10-03 03:03:37 
        128
                               <---------- (*2) httpd failed to start
        2018-10-03 03:03:47
        0
        2018-10-03 03:03:57
        12
        2018-10-03 03:04:07
        13
        2018-10-03 03:04:17
        13
        2018-10-03 03:04:27
        14
        2018-10-03 03:04:37
        15
        2018-10-03 03:04:47
        16
            :
            :
        

        (*2)

        logs/error_log
        [Wed Oct 03 03:03:47.544445 2018] [bmx_vhost:crit] [pid 80818] (28)No space left on device: Failed to create mod_bmx_vhost global mutex for DBM in file '/work/cases/02190079/jbcs-httpd24-2.4.29/httpd/cache/mod_bmx/bmx_vhost.db.lock'
        
      Show
      Install JBCS Apache HTTP Server 2.4.29. Copy conf.d/mod_bmx.conf.sample to conf.d/mod_bmx.conf, and then comment out the last 3 lines of mod_bmx.conf and save it. conf.d/mod_bmx.conf LoadModule bmx_module modules/mod_bmx.so LoadModule bmx_status_module modules/mod_bmx_status.so LoadModule bmx_vhost_module modules/mod_bmx_vhost.so BMXVHostDBMFilename cache/mod_bmx/bmx_vhost.db BMXVHostLockFilename cache/mod_bmx/bmx_vhost.db.lock #<Location /bmx> # SetHandler bmx-handler #</Location> Start httpd. (Optional) # cd $HTTPD_HOME/sbin # ./apachectl start Restart httpd repeatedly. # while : ; do $HTTPD_HOME/sbin/apachectl restart; sleep 10; done On another terminal, check if the number of semaphores increases. # while : ; do date "+%Y-%m-%d %H:%M:%S"; ipcs -a -t | grep apache | wc -l; sleep 10; done 2018-10-03 02:43:36 0 2018-10-03 02:43:46 12 2018-10-03 02:43:56 13 2018-10-03 02:44:06 14 2018-10-03 02:44:16 15 2018-10-03 02:44:26 16 2018-10-03 02:44:36 17 2018-10-03 02:44:46 18 2018-10-03 02:44:56 19 2018-10-03 02:45:06 20 : : 125 2018-10-03 03:02:47 126 2018-10-03 03:02:57 127 2018-10-03 03:03:07 128 2018-10-03 03:03:17 128 2018-10-03 03:03:27 128 2018-10-03 03:03:37 128 <---------- (*2) httpd failed to start 2018-10-03 03:03:47 0 2018-10-03 03:03:57 12 2018-10-03 03:04:07 13 2018-10-03 03:04:17 13 2018-10-03 03:04:27 14 2018-10-03 03:04:37 15 2018-10-03 03:04:47 16 : : (*2) logs/error_log [Wed Oct 03 03:03:47.544445 2018] [bmx_vhost:crit] [pid 80818] (28)No space left on device: Failed to create mod_bmx_vhost global mutex for DBM in file '/work/cases/02190079/jbcs-httpd24-2.4.29/httpd/cache/mod_bmx/bmx_vhost.db.lock'

      JBCS httpd 2.4.29 with mod_bmx modules will leak exactly one semaphore on every restart.

      This is applicable to JBCS httpd 2.4.23. In 2.4.23, httpd with mod_bmx modules will leak two semaphores on every restart, but one of the two semaphores is caused by mod_bmx modules and the other one is caused by mod_watchdog module. The leak of the latter was fixed in Bug 1410883 in 2.4.26 (*1).

      (*1) Bug 1410883 - httpd reload causes leak of semaphores
      https://bugzilla.redhat.com/show_bug.cgi?id=1410883

              rhn-engineering-jclere Jean-Frederic Clere
              rhn-support-myoshida Masato Yoshida
              Karm Karm Karm Karm
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: