Details

    • Number of attachments :
      0

      Description

      The issue comes down to the Python plugin using the API runtime.exec() and the
      Java runtime having problems to do this job without issues. The symptoms on a linux box are:

      • In the process tree you see a java process calling pylint or "python <args> pygenie"
      • Both processes are sleeping
      • When you look at them with strace you see both doing blocking system calls and waiting for one another
        (the one epoll and the another write, when I remember correctly)

      The solution is to use a smart wrapper around runtime.exec doing strange things like reading all
      output of the executed process as fast as possible. The best candidate is sonar's CommandExecutor.

      Read the following for details on the runtime.exec() craziness:
      http://kylecartmell.com/?p=9

        Issue Links

          Activity

          Hide
          Evgeny Mandrikov added a comment - - edited

          Should be noted that ability to capture of output available only with Sonar API 3.0 (SONAR-3318), however there is no way to inject environment variables, whereas integratin with Pylint requres injection of PYTHONPATH.

          Show
          Evgeny Mandrikov added a comment - - edited Should be noted that ability to capture of output available only with Sonar API 3.0 ( SONAR-3318 ), however there is no way to inject environment variables, whereas integratin with Pylint requres injection of PYTHONPATH.
          Hide
          Evgeny Mandrikov added a comment -

          Injection of environment variables available only with Sonar 3.2 (SONAR-3626).

          Show
          Evgeny Mandrikov added a comment - Injection of environment variables available only with Sonar 3.2 ( SONAR-3626 ).
          Hide
          Waleri Enns added a comment -

          Im currently observing reproducible lockups on Windows caused by the this error. So I decided to go on and fix it.

          Moreover, thinking more about the environment issue I really get the feeling that its setup is best left to the site.
          "export PYLINTPATH=<bla>:$PYLINTPATH; sonar-runner" is as simple as setting it in the properties of the plugin.
          Also, it saves code and lets us use the 3.0-version of CommandExecutor.

          Show
          Waleri Enns added a comment - Im currently observing reproducible lockups on Windows caused by the this error. So I decided to go on and fix it. Moreover, thinking more about the environment issue I really get the feeling that its setup is best left to the site. "export PYLINTPATH=<bla>:$PYLINTPATH; sonar-runner" is as simple as setting it in the properties of the plugin. Also, it saves code and lets us use the 3.0-version of CommandExecutor.
          Hide
          Waleri Enns added a comment -

          fixed with commit 4e0c5ff49aa9bfaccca2d0d92cd69a712ff52cf1

          Show
          Waleri Enns added a comment - fixed with commit 4e0c5ff49aa9bfaccca2d0d92cd69a712ff52cf1

            People

            • Assignee:
              Waleri Enns
              Reporter:
              Waleri Enns
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: