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

Crash when saving configuration of a project containing EOF shell script

      Crash when saving configuration of a project containing EOF shell script which contains following format:

      cd ${WORKSPACE}
      
      cat > HelloWorld.sh <<- 'EOF'
      #!/bin/bash
      
      echo HelloWorld
      
      EOF
      
      bash HelloWorld.sh

       

      HTTP Exception:

          [JENKINS-72327] Crash when saving configuration of a project containing EOF shell script

          Dan Wang added a comment - - edited

          Workaround solution: Remove "cd ${WORKSPACE}" before EOF.

          Fail Pass
          cd ${WORKSPACE}
          cat > HelloWorld.sh <<- 'EOF'
          #!/bin/bash
          echo HelloWorld
          EOF
          cat > HelloWorld.sh <<- 'EOF'
          #!/bin/bash
          echo HelloWorld
          EOF

          Dan Wang added a comment - - edited Workaround solution: Remove "cd ${WORKSPACE}" before EOF. Fail Pass cd ${WORKSPACE} cat > HelloWorld.sh <<- 'EOF' #!/bin/bash echo HelloWorld EOF cat > HelloWorld.sh <<- 'EOF' #!/bin/bash echo HelloWorld EOF

          Mark Waite added a comment -

          I am not a user of the shell script scm plugin, so it may be that I'm not understanding how you see the failure or the details of the failure. I assumed that you chose shell script scm plugin in this bug report accidentally and are instead using an "execute shell" step in a freestyle project. When I enter that text into a freestyle project definition using the "Execute shell" step, it saves without any issue. The resulting job runs as expected and reports "HelloWorld" as expected.

          Can you provide the stack trace that is written to the Jenkins log file when the failure happens?

          Can you provide the list of plugins and their versions as generated by the system groovy script in "How to report an issue"?

          Can you provide a more detailed description of the location where you enter that text?

          Mark Waite added a comment - I am not a user of the shell script scm plugin, so it may be that I'm not understanding how you see the failure or the details of the failure. I assumed that you chose shell script scm plugin in this bug report accidentally and are instead using an "execute shell" step in a freestyle project. When I enter that text into a freestyle project definition using the "Execute shell" step, it saves without any issue. The resulting job runs as expected and reports "HelloWorld" as expected. Can you provide the stack trace that is written to the Jenkins log file when the failure happens? Can you provide the list of plugins and their versions as generated by the system groovy script in "How to report an issue" ? Can you provide a more detailed description of the location where you enter that text?

          Dan Wang added a comment -

          I have checked the log files, and there is no error log recorded. I have also updated the screenshot in the description. Additionally, I found that if I use a PC with "English language" for the same configuration, there is no issue.

          Currently, I have updated another Jenkins server with the same version, and the problems have disappeared...

          Dan Wang added a comment - I have checked the log files, and there is no error log recorded. I have also updated the screenshot in the description. Additionally, I found that if I use a PC with "English language" for the same configuration, there is no issue. Currently, I have updated another Jenkins server with the same version, and the problems have disappeared...

          Mark Waite added a comment -

          Closing as "Cannot reproduce"

          Mark Waite added a comment - Closing as "Cannot reproduce"

            Unassigned Unassigned
            sbc8112 Dan Wang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: