New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Java: error message broken in KDBExceptions (Internal Sorry) #2855
Comments
Happened again https://build.libelektra.org/jenkins/blue/organizations/jenkins/libelektra/detail/master/835/pipeline
@Piankero Can you take a look at the maven files? |
This error happens randomly and not with every build? I could only suggest to upgrade the maven-compiler-plugin from |
Yes, it happens randomly. Do we need the sonar dependency at all? Can we upgrade to maven-compiler-plugin 3.8.1 and still support Apache Maven 3.3.9? |
The sonar dependency is not used by us directly but by the
The version of |
Thank you, could you please upgrade the version? |
It seems like the upgrade did not help, the first build after merging the PR already failed:
|
Is the build multithreaded? It would explain the error (https://jira.apache.org/jira/browse/MDEP-518) |
Do you mean if we call maven several times concurrently? This might be possible. |
Then this is an open maven issue unfortunately. |
The Java build is very simple, it would be a shame to not get this reliable. Maybe we simply forgot a dependency on CMake level (e.g. between testjna_maven and the binding?). If it really is an internal problem in maven, in the last post of the maven issue a solution is described, can you try it? |
The last post describes an extension which severely alters the behavior of maven in terms of jar management. We would just get another dependency into the build which is probably not very stable. Also we probably would limit us with upgrading maven in the future because it alters the behavior like this. Also I currently do not have the resources to patch every build job with this |
As said before, I do not think we need such an extension as our Java builds are completely standard. More likely is that two maven processes are started at the same time. It should not be too difficult to avoid that JNI is only build if JNA already was built. |
#2967 now contains a full list of problems, I hope we can fix this soon to have one problem less 👍 |
Failed again in the same PR https://build.libelektra.org/jenkins/blue/organizations/jenkins/libelektra/detail/PR-1950/74/pipeline |
actually this build job did not fail at all @sanssecours (or @Chemin1 ): How exactly does the jenkins build work in regards of caches. Does every build load a docker image and downloads all dependencies of maven itself into the container? Or is there a general folder which is used by all builds to reduce disk/network load? |
I do not know about any special code to download Maven packages on the Jenkins build server. I would assume |
mvn does implicitly download dependencies when jna is build. Any dependency is usually downloaded in a local .m2 repository under the |
I only know that we already add Google Test to most of our Docker images. For example, here is the relevant code for Debian Buster: libelektra/scripts/docker/debian/buster/Dockerfile Lines 87 to 94 in 990b866
. |
Unfortunately, I don't have the slightest clue. @Mistreated Do you know more about this? |
I am just confused how docker interacts with the jenkins directories. The problem of this issue does only occur if multiple maven instances try to download into the same directory when resolving dependencies. If however this is done via docker this should not happen unless the same volumes are mounted for all docker images which include the mvn directory. This would also explain why this issue only happens on the jenkins server since travis uses VMs which are correctly encapsulated. This line suggests at least that volumes are mounted but I do not know exactly how it is done on the jenkins as |
I think that is just a tutorial, not what's actually happening on our jenkins. Access to the local git mirror is the only mount I see in our Jenkinsfile. I don't think there are any other direct interactions with the host filesystem. Docs are published via SSH and artifacts are stored via |
Seems like Travis does not keep the failed build after retry, at least I also cannot find it anymore.
It has nothing to do with Jenkins as it also fails locally and on Travis.
This is a step into the right direction. As already said, Elektra does at least two mvn calls during build (jni and jna). The dependency between them most likely is incorrect, leading to concurrent executions. Please investigate this. |
Ok, this was not clear to me.
I opened #3113 |
Let us observe if the error occurs again. |
Have you seen this error again? We could probably close it and reopen if a build fails |
I did not see it again. So it seems like you fixed it 💯 |
@markus2330 seems like this happened on master now. https://build.libelektra.org/blue/organizations/jenkins/libelektra/detail/master/35/pipeline Output was: log.txt Is that a temporary failure we can ignore for the release? |
It is maybe not temporary [0] but I think we can ignore it for the release. [0] #3269 seems to have been temporary because there was some "connection reset" but here I do not see it and The error message is completely wrong, this is an issue for @Piankero. I reopen to track this new issue (in future better open new issues, reusing issues is always somewhat problematic). |
Sorry, I did not want to re-use issues. I glanced over it and thought it was the same. |
No need to be sorry, I was the one who reused it 😉 |
I cannot reproduce this error unfortunately and also do not have an idea how this can actually happen because Elektra returned -1 to the binding with an "InternalError" ( Lines 26 to 29 in 09f2fdc
libelektra/src/bindings/jna/libelektra4j/src/main/java/org/libelektra/exception/KDBException.java Lines 54 to 57 in 09f2fdc
As if the key with its metadata was deleted in between. Did this error happen again in between the release an now? |
Do you have an explanation why the error message is so distorted? Please add a Java unit test about an error happening in Elektra (e.g. with the error plugin). The error plugin might also be useful for the Error tutorial you started to write. |
This class actually integration tests every exception with the error plugin. This tests if the metadata is correctly extracted.
What you mean by "distorted"? Do you mean the dots at the end or what exactly? |
Only if an exception is thrown but not which message it renders.
This test also has nothing to do with errors coming from Elektra.
See title of this issue and log.txt:
Which part of this error message do you believe to be correct? Also this is completely broken:
|
This message here is just a truncated output from maven as summary and maven appends dots to indicate that there is more text to come. It would do that for all tests that have failed. It has nothing to do with the actual message.
It unit tests the correct metadata extraction and an integration test for this seems a bit of an overkill. I can add an extra integration test for the text parsing but I can assure you that this will not fix the existing problem. It looks to be a random error to me and never happened again since then ... |
So maven shuffles around the words? Even if it does it does not explain the broken first message.
"Random errors" only occur if there are some timeout problems or the software is broken. I do not see where in this case there could be a timeout. But concentrate on an amazing tutorial first. |
https://build.libelektra.org/jenkins/blue/organizations/jenkins/libelektra/detail/master/826/pipeline/422
The text was updated successfully, but these errors were encountered: