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

System log no longer usable as soon as it is full of "<discarded>" messages (regression in 2.325)

    • 2.358, 2.346.3

      This issue is related to PR #6044

      These <discarded> messages seem to appear randomly after a few minutes of using the Jenkins server.

      Each time I refresh the log page, the date of the <discarded> messages is updated and the number of lines displayed no longer increases.

      Would it be possible to no longer display these <discarded> messages to keep access the relevant traces in the system logs?

      I haven't tried deploying Jenkins v2.332.3 on a Linux platform. Do these "<discarded>" messages only appear on Windows, or can they also appear on Linux?

          [JENKINS-68417] System log no longer usable as soon as it is full of "<discarded>" messages (regression in 2.325)

          Basil Crow added a comment -

          CC'ing jglick who implemented this change in behavior. My understanding is that these messages only appear when the system is under memory pressure. So I think you should be able to make these messages disappear by increasing the heap size of your JVM.

          Basil Crow added a comment - CC'ing jglick who implemented this change in behavior. My understanding is that these messages only appear when the system is under memory pressure. So I think you should be able to make these messages disappear by increasing the heap size of your JVM.

          Jesse Glick added a comment -

          Or install support-core which will write log messages to disk.

          Jesse Glick added a comment - Or install support-core which will write log messages to disk.

          Basil Crow added a comment -

          Thanks Jesse. eraimbau Can you confirm that one of the above solutions works? I am planning to close this ticket as "Not a Defect" because this is the intended behavior. I will try and add something to the release notes.

          Basil Crow added a comment - Thanks Jesse. eraimbau Can you confirm that one of the above solutions works? I am planning to close this ticket as "Not a Defect" because this is the intended behavior. I will try and add something to the release notes.

          Basil Crow added a comment -

          I proposed a documentation update to the Upgrade Guide in jenkins-infra/jenkins.io#5116 since this has been confusing a number of users recently.

          Basil Crow added a comment - I proposed a documentation update to the Upgrade Guide in jenkins-infra/jenkins.io#5116 since this has been confusing a number of users recently.

          Jesse Glick added a comment -

          I think it should be left open as there is clearly a need for some compromise behavior that will normally retain log messages but will not leak large message format parameters.

          Jesse Glick added a comment - I think it should be left open as there is clearly a need for some compromise behavior that will normally retain log messages but will not leak large message format parameters.

          Basil Crow added a comment -

          Sure, I will leave this open with the regression label then (see jenkinsci/jenkins#6044).

          Basil Crow added a comment - Sure, I will leave this open with the regression label then (see jenkinsci/jenkins#6044 ).

          Eric RAIMBAULT added a comment - - edited

          On my Jenkins test server, I increased the heap size of my JVM (from "-Xmx256m" to "-Xms 512m -Xmx1024m") : I have slightly less <discarded> messages among the relevant messages in the system log page. Thank you for your responsive support.

          Eric RAIMBAULT added a comment - - edited On my Jenkins test server, I increased the heap size of my JVM (from "-Xmx256m" to "-Xms 512m -Xmx1024m") : I have slightly less <discarded> messages among the relevant messages in the system log page. Thank you for your responsive support.

          curious - I installed this on Friday, redhat 7 host with more than sufficient memory as this is a test instance with zero job configs or builds -Xmx4086m -Xms4086m
          and my running system log ALSO is filled with these messages, so I don't buy the explanaition about memory pressure makeing this show up.

          Heather Mardis added a comment - curious - I installed this on Friday, redhat 7 host with more than sufficient memory as this is a test instance with zero job configs or builds -Xmx4086m -Xms4086m and my running system log ALSO is filled with these messages, so I don't buy the explanaition about memory pressure makeing this show up.

          Rich added a comment -

          Doesn't look related to heap size, we have -Xms4g -Xmx4g and only 687 MB out of 4096 MB is in use, but still messages show up.

          Rich added a comment - Doesn't look related to heap size, we have -Xms4g -Xmx4g and only 687 MB out of 4096 MB is in use, but still messages show up.

          Jesse Glick added a comment -

          Need to check interaction with the fix of JENKINS-63458

          Jesse Glick added a comment - Need to check interaction with the fix of JENKINS-63458 …

          Issue not fixed after upgrading the workflow-cps plugin to version 2729.vea_17b_79ed57a_ (cf. #557)

          Eric RAIMBAULT added a comment - Issue not fixed after upgrading the workflow-cps plugin to version 2729.vea_17b_79ed57a_ (cf. #557 )

          Basil Crow added a comment -

          eraimbau The fix for this just shipped in the 2.358 weekly release. You'll have to upgrade to that release, or wait for the backport to LTS.

          Basil Crow added a comment - eraimbau The fix for this just shipped in the 2.358 weekly release. You'll have to upgrade to that release, or wait for the backport to LTS.

          ok. Thanks for this clarification and thanks for the fix.

          Eric RAIMBAULT added a comment - ok. Thanks for this clarification and thanks for the fix.

          Jesse Glick added a comment -

          workflow-cps version 2729.vea_17b_79ed57a_ attempts to fix the memory leak for which the original core change (now reverted) was made.

          Jesse Glick added a comment - workflow-cps version 2729.vea_17b_79ed57a_ attempts to fix the memory leak for which the original core change (now reverted) was made.

          zhou xin added a comment -

          version 2.332.3

          i create one log recorder:

           

          it still full of "<discarded>" messages ,i want make sure is it same reason?

          zhou xin added a comment - version 2.332.3 i create one log recorder:   it still full of "<discarded>" messages ,i want make sure is it same reason?

            jglick Jesse Glick
            eraimbau Eric RAIMBAULT
            Votes:
            2 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: