Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-9267

Unable to create new native thread error when using unattended installer

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • High
    • 4.10.2
    • 4.10.0, 4.10.1
    • None

    Description

      Summary

      When using unattended mode to install Bitbucket Server, the installation fails and throws java.lang.OutOfMemoryError: unable to create new native thread.

      Environment

      • Linux

      Steps to Reproduce

      1. Install Bitbucket Server 4.9 as a service
      2. Create a varfile with the following parameters
        app.install.service$Boolean=true
        portChoice=custom
        httpPort=7990
        serverPort=8006
        app.bitbucketHome=/var/atlassian/application-data/bitbucket
        app.defaultInstallDir=/opt/atlassian/bitbucket/4.10.1
      3. Run the installer in unattended mode to upgrade to 4.10.1
        sudo ./atlassian-bitbucket-4.10.1-x64.bin -q -varfile varfile 

      Expected Results

      Installation completes successfully.

      Actual Results

      The installer errors out with the following:

      sudo ./atlassian-bitbucket-4.10.1-x64.bin -q -varfile varfile
      
      Starting Installer ...
      The target home directory is not empty.
      The installation directory has been set to /opt/atlassian/bitbucket/4.10.1.
      Bitbucket uses port 7992 to communicate with its embedded Elasticsearch instance. Please ensure this port is available before starting Bitbucket.
      An error occurred:
      java.lang.OutOfMemoryError: unable to create new native thread
      Error log: /home/vagrant/install4jError4022854783457034284.log
      java.lang.OutOfMemoryError: unable to create new native thread
      	at java.lang.Thread.start0(Native Method)
      	at java.lang.Thread.start(Thread.java:714)
      	at com.atlassian.bitbucket.installer.Tracker.track(Tracker.java:37)
      	at com.install4j.script.I4jScript_Internal_59.eval(I4jScript_Internal_59.java:20)
      	at com.install4j.script.I4jScript_Internal_59.evaluate(I4jScript_Internal_59.java:24)
      	at com.install4j.runtime.installer.helper.Script.evaluate(Script.java:29)
      	at com.install4j.runtime.installer.ContextImpl.runScript(ContextImpl.java:181)
      	at com.install4j.runtime.installer.ContextImpl.runScript(ContextImpl.java:176)
      	at com.install4j.runtime.installer.ContextImpl.runBooleanScript(ContextImpl.java:49)
      	at com.install4j.runtime.installer.ContextImpl.runBooleanScript(ContextImpl.java:210)
      	at com.install4j.runtime.installer.frontend.headless.UnattendedScreenExecutor.handleScreen(UnattendedScreenExecutor.java:99)
      	at com.install4j.runtime.installer.frontend.headless.AbstractHeadlessScreenExecutor.execute(AbstractHeadlessScreenExecutor.java:81)
      	at com.install4j.runtime.installer.controller.Controller$1.run(Controller.java:133)
      	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
      	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
      	at java.awt.EventQueue.access$500(EventQueue.java:97)
      	at java.awt.EventQueue$3.run(EventQueue.java:709)
      	at java.awt.EventQueue$3.run(EventQueue.java:703)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
      	at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
      	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
      	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
      	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
      	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
      	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
      	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
      Finishing installation ...
      

      The installer logs indicate that it's looping through the following, these lines are repeated until the error occurs:

      [INFO] com.install4j.runtime.beans.actions.control.RunScriptAction [ID 81761]: Execute action
             Property rollbackScript: null
             Property rollbackSupported: false
             Property script: com.install4j.script.I4jScript_Internal_61
      [ERROR] com.install4j.runtime.beans.actions.control.RunScriptAction [ID 81761]: Execute action not successful after 0 ms
      [INFO] com.install4j.runtime.beans.screens.FormScreen [ID 54715]: command: go back 0 screens
             Show screen
             Variable changed: app.install.service=true[class java.lang.Boolean]
             Sending pingback for event installer-install-service
      [INFO] com.install4j.runtime.beans.actions.control.RunScriptAction [ID 81761]: Execute action
             Property rollbackScript: null
             Property rollbackSupported: false
             Property script: com.install4j.script.I4jScript_Internal_61
      [ERROR] com.install4j.runtime.beans.actions.control.RunScriptAction [ID 81761]: Execute action not successful after 0 ms
      ...

      Workaround

      Install Bitbucket Server without the unattended option (-q).

      Attachments

        Activity

          People

            jpalacios Juan Palacios (Inactive)
            jethomas Jeff Thomas
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: