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

Maven Event Spy seems to still have a thread safe problem

      Exception:

      ERROR: [withMaven] WARNING Exception parsing the logs generated by the Jenkins Maven Event Spy /var/lib/jenkins/workspace/_appia=gui/F__appia_-_gui_-_master@tmp/withMaven1afdee4c/maven-spy-20170831-215714-662.log, ignore file.  Please report a bug associated for the component 'pipeline-maven-plugin' at https://issues.jenkins-ci.org 
      ERROR: org.xml.sax.SAXParseException; lineNumber: 3824; columnNumber: 53; XML document structures must start and end within the same entity.
      

          [JENKINS-46579] Maven Event Spy seems to still have a thread safe problem

          Pino Silvaggio created issue -
          Cyrille Le Clerc made changes -
          Link New: This issue is related to JENKINS-43449 [ JENKINS-43449 ]

          Cyrille Le Clerc added a comment - - edited

          Hello pino, we have fixed such issue in version 2.0.1 on April 2017. What version do you use?

          As you say "still have", you seem to be in a more recent version.

          Cyrille Le Clerc added a comment - - edited Hello pino , we have fixed such issue in version 2.0.1 on April 2017. What version do you use? As you say "still have", you seem to be in a more recent version.

          Pino Silvaggio added a comment - - edited

          I am aware that an issue regarding this was resolved. However, running 3.0.0 with a threaded build results in this error from time to time.

          Pino Silvaggio added a comment - - edited I am aware that an issue regarding this was resolved. However, running 3.0.0 with a threaded build results in this error from time to time.

          Alvaro Lobato added a comment -

          Hi,

           

          Can you attach one of the broken log files? Also any information you could give us about the pipeline you are using and the pom, etc would be helpful to try to reproduce it.

           

          Alvaro Lobato added a comment - Hi,   Can you attach one of the broken log files? Also any information you could give us about the pipeline you are using and the pom, etc would be helpful to try to reproduce it.  

          Yes I will try to give you more info.

          I am debugging right now as this is important to us to keep the trust in the ci.

          However, quickly glancing at the code I am wondering if the source of the problem is not the onEvent method. Nothing prevents the different threads to output content in the middle of another unfinished task. I know the underlying classes use thread safe operations but handlers will use more than 1 output operation and therefore another thread can output stuff right in the middle of it.

          But that's just speculation after looking at the code on my cellphone fast fast.

          Pino Silvaggio added a comment - Yes I will try to give you more info. I am debugging right now as this is important to us to keep the trust in the ci. However, quickly glancing at the code I am wondering if the source of the problem is not the onEvent method. Nothing prevents the different threads to output content in the middle of another unfinished task. I know the underlying classes use thread safe operations but handlers will use more than 1 output operation and therefore another thread can output stuff right in the middle of it. But that's just speculation after looking at the code on my cellphone fast fast.

          Alvaro Lobato added a comment -

          I'm not sure if that is the problem given that all the handlers print in a single operation passing the Xpp3Dom object and the method is thread safe.

          Alvaro Lobato added a comment - I'm not sure if that is the problem given that all the handlers print in a single operation passing the Xpp3Dom object and the method is thread safe.

          Not an easy one.

          • I'm wondering if there could be 2 maven builds starting at the very same milisecond (here).
          • Can you share with us more details? the pom.xml, the spy logs (see here)...

          Cyrille Le Clerc added a comment - Not an easy one. I'm wondering if there could be 2 maven builds starting at the very same milisecond ( here ). Can you share with us more details? the pom.xml, the spy logs (see here )...

          That's funny.

          I was about to write you about the exact same thing. Because I just isolated the problem and it looks to be it.

          I don't think it's ever a good idea to use a timestamp as a "unique" id for anything. I will run some tests but I am pretty sure that's the problem as I have added output and see 2 outFile with the same name.

          Pino Silvaggio added a comment - That's funny. I was about to write you about the exact same thing. Because I just isolated the problem and it looks to be it. I don't think it's ever a good idea to use a timestamp as a "unique" id for anything. I will run some tests but I am pretty sure that's the problem as I have added output and see 2 outFile with the same name.

          Ok, so yeah I've got more than 1 case. There one where if the build is reentrant and 2 or more concurrent builds run we might get the same file name.

          However, this is not the only case. I am trying to package details on the problem.

          Pino Silvaggio added a comment - Ok, so yeah I've got more than 1 case. There one where if the build is reentrant and 2 or more concurrent builds run we might get the same file name. However, this is not the only case. I am trying to package details on the problem.

            Unassigned Unassigned
            pino Pino Silvaggio
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: