Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-60141

Excessive number of "login -s" requests

    Details

    • Similar Issues:

      Description

      Change JENKINS-44166 of the Jenkins P4 plugin modified the plugin to work in cases when a pre-login perforce triggers was being used.

      The 'fix' for the above issue:

      now means that a 'p4 login -s' call is made to the Perforce server during each and every call to the isLogin() method. This can literally result in 10,000's of 'p4 login -s' requests an hour and cause the server to lock up (by using up all the available TCP sockets).

      The consequence being very similar to a DoS attach on the Perforce server.

        Attachments

        1. log.case
          15 kB
        2. log.poll
          2 kB

          Issue Links

            Activity

            Hide
            rpetti Rob Petti added a comment -

            Wrong plugin. Perforce-plugin is deprecated and no longer supported. Please make sure you are filing tickets under the correct plugin (p4-plugin).

            Show
            rpetti Rob Petti added a comment - Wrong plugin. Perforce-plugin is deprecated and no longer supported. Please make sure you are filing tickets under the correct plugin (p4-plugin).
            Hide
            p4karl Karl Wirth added a comment -

            James Bateman - Again sorry for missing this one. It bypassed our monitoring scripts.

             

            We have the problem that we provide the endpoints and Jenkins calls us as needed and there is no continuity or object sharing between calls. This means that we can never be sure if we are logged in or not. As part of the work to reduce 'p4 client -i' we did try and cut down on some of the 'p4 login' commands already.

             

            I will produce some example here on number of 'login -s' for a simple script then will pass to the developers.

            Show
            p4karl Karl Wirth added a comment - James Bateman - Again sorry for missing this one. It bypassed our monitoring scripts.   We have the problem that we provide the endpoints and Jenkins calls us as needed and there is no continuity or object sharing between calls. This means that we can never be sure if we are logged in or not. As part of the work to reduce 'p4 client -i' we did try and cut down on some of the 'p4 login' commands already.   I will produce some example here on number of 'login -s' for a simple script then will pass to the developers.
            Hide
            p4karl Karl Wirth added a comment -

            Sample of a basic freestyle job with a manual workspace executed on a slave. Polling enabled but polling did not trigger the job. Poll Now was clicked to collect the polling P4 commands.

             

            Single Freestyle job run through the GUI:
            # P4 commands
            $ grep user- log.case | grep jenkins | wc -l
            58
            # P4 info or login commands
            $ grep user- log.case | grep jenkins | grep "login\|info" | wc -l
            37
            Polling for the freestyle job:
            
            # P4 Commands
            $ grep user log.poll | grep jenkins | wc -l
            9
            # P4 info or login commands
            $ grep user log.poll | grep jenkins | grep "login\|info" | wc -l
            5
            

            Have attached the logs for the above output.

             

            Show
            p4karl Karl Wirth added a comment - Sample of a basic freestyle job with a manual workspace executed on a slave. Polling enabled but polling did not trigger the job. Poll Now was clicked to collect the polling P4 commands.   Single Freestyle job run through the GUI: # P4 commands $ grep user- log. case | grep jenkins | wc -l 58 # P4 info or login commands $ grep user- log. case | grep jenkins | grep "login\|info" | wc -l 37 Polling for the freestyle job: # P4 Commands $ grep user log.poll | grep jenkins | wc -l 9 # P4 info or login commands $ grep user log.poll | grep jenkins | grep "login\|info" | wc -l 5 Have attached the logs for the above output.  
            Hide
            cbopardikar Charusheela Bopardikar added a comment - - edited

            Refactored the code to reduce number of times login -s is called.

            https://github.com/jenkinsci/p4-plugin/pull/112

            Show
            cbopardikar Charusheela Bopardikar added a comment - - edited Refactored the code to reduce number of times login -s is called. https://github.com/jenkinsci/p4-plugin/pull/112
            Hide
            cbopardikar Charusheela Bopardikar added a comment -

            Released in 1.10.9

            Show
            cbopardikar Charusheela Bopardikar added a comment - Released in 1.10.9

              People

              • Assignee:
                cbopardikar Charusheela Bopardikar
                Reporter:
                jbateman James Bateman
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: