https://bugzilla.redhat.com/show_bug.cgi?id=1195244
Bug ID: 1195244 Summary: Mis-configured logging mutes log messages Product: Fedora Version: 22 Component: javapackages-tools Assignee: mizdebsk@redhat.com Reporter: leamas.alec@gmail.com QA Contact: extras-qa@fedoraproject.org CC: java-sig-commits@lists.fedoraproject.org, mat.booth@redhat.com, mizdebsk@redhat.com, msimacek@redhat.com, msrb@redhat.com
Created attachment 994371 --> https://bugzilla.redhat.com/attachment.cgi?id=994371&action=edit Test case provoking bug with non-readable metadata.
Description of problem:
Version-Release number of selected component (if applicable):
How reproducible: Always
Steps to Reproduce: 1. Install DecodeIrCaller from https://copr.fedoraproject.org/coprs/leamas/harctoolbox/ 2. For the example, create a bug: $ sudo chmod 600 /usr/share/maven-metadata/DecodeIrCaller.xml 3.Run attached maven.req. It is a patched version of the thing run by rpmbuild $ ./maven.req 4. Watch in output Processing files: IrpMaster-1.0.2-1.fc21.noarch No handlers could be found for logger "pyxb.binding.basis" No handlers could be found for logger "pyxb.binding.basis"
The messages stems from the XML parsing in javapackages/metadata/pyxbmetadata.py around line 59. Obviously, they are not really helpful, loggers should be configure
Actual results: Useless messages
Expected results: Good messages.
Additional info:
Same thing is likely to happen for any maven-driver spec given a non-readable metadata dependency. And there are other things which might got wrong, needing configured logger I guess.
https://bugzilla.redhat.com/show_bug.cgi?id=1195244
--- Comment #1 from Michal Srb msrb@redhat.com --- Hmm... I think that the problem lies somewhere else. pyxbmetadata.py takes already opened file, so it must have been accessible.
What version of javapackages-tools are we talking about here?
https://bugzilla.redhat.com/show_bug.cgi?id=1195244
--- Comment #2 from Alec Leamas leamas.alec@gmail.com --- javapackages-tools-4.1.0-7.fc21.noarch
https://bugzilla.redhat.com/show_bug.cgi?id=1195244
--- Comment #3 from Alec Leamas leamas.alec@gmail.com --- (In reply to Michal Srb from comment #1)
Hmm... I think that the problem lies somewhere else. pyxbmetadata.py takes already opened file, so it must have been accessible.
Well, when I step the thing (pdb) the log message is in the parsing statement
https://bugzilla.redhat.com/show_bug.cgi?id=1195244
--- Comment #4 from Michal Srb msrb@redhat.com --- (In reply to Alec Leamas from comment #3)
Well, when I step the thing (pdb) the log message is in the parsing statement
The problem is that you can't parse what you can't read. Do you have a build.log from build when this error actually happened?
https://bugzilla.redhat.com/show_bug.cgi?id=1195244
--- Comment #5 from Michael Simacek msimacek@redhat.com --- The message about misconfigured logging appears always, it's not related to the problem you're having. The current upstream version (unreleased) no longer uses PyXB, so such message can no longer happen.
To Michal: IMO, the problem is that metadata cache simply ignores anything it cannot read.
The problematic part of code (cache/metadata.py:55): for path in metadata_paths: try: metadata = Metadata.create_from_file(path) if metadata: cache.update({path: metadata}) except MetadataLoadingException: continue
https://bugzilla.redhat.com/show_bug.cgi?id=1195244
--- Comment #6 from Michael Simacek msimacek@redhat.com --- Nevermind, the metadata cache wasn't used back then in the version thats on f21. Can you provide a full reproducer SRPM? (the attached thing points to your home)
https://bugzilla.redhat.com/show_bug.cgi?id=1195244
--- Comment #7 from Alec Leamas leamas.alec@gmail.com --- Sort of. Using my copr at [1]:
- Install DecodeIrCaller. - chmod 600 /usr/share/maven-metadata/DecodeIrCaller.xml - Download the IrpMaster srpm - Install builddeps for IrpMaster srpm - Rebuild IrpMaster srpm
Havn't checked, but it should "work" (in the sense that it fails...).
https://copr.fedoraproject.org/coprs/leamas/harctoolbox/
https://bugzilla.redhat.com/show_bug.cgi?id=1195244
--- Comment #8 from Alec Leamas leamas.alec@gmail.com ---
(In reply to Michael Simacek from comment #6)
Nevermind, the metadata cache wasn't used back then in the version thats on f21. Can you provide a full reproducer SRPM? (the attached thing points to your home)
Oops, sorry. Attaching that file, just store it somewhere and patch maven-req. That should be simpler and faster while testing.
https://bugzilla.redhat.com/show_bug.cgi?id=1195244
--- Comment #9 from Alec Leamas leamas.alec@gmail.com --- Created attachment 994406 --> https://bugzilla.redhat.com/attachment.cgi?id=994406&action=edit File referenced in maven.req
https://bugzilla.redhat.com/show_bug.cgi?id=1195244
--- Comment #10 from Michal Srb msrb@redhat.com --- (In reply to Alec Leamas from comment #7)
Sort of. Using my copr at [1]:
- Install DecodeIrCaller.
- chmod 600 /usr/share/maven-metadata/DecodeIrCaller.xml
- Download the IrpMaster srpm
- Install builddeps for IrpMaster srpm
- Rebuild IrpMaster srpm
Havn't checked, but it should "work" (in the sense that it fails...).
I am getting completely different error:
[ERROR] Failed to execute goal on project IrpMaster: Could not resolve dependencies for project org.harctoolbox:IrpMaster:jar:1.0.2: Cannot access repo.jenkins-ci.org (http://repo.jenkins-ci.org/public/) in offline mode and the artifact com.hifiremote:DecodeIrCaller:jar:0.1314 has not been downloaded from it before. -> [Help 1]
https://bugzilla.redhat.com/show_bug.cgi?id=1195244
--- Comment #11 from Alec Leamas leamas.alec@gmail.com --- Hey, I made my first maven pom-file some days ago...maven is certainly full of surprises... you have installed DecodeIrCaller, have you?
https://bugzilla.redhat.com/show_bug.cgi?id=1195244
--- Comment #12 from Michal Srb msrb@redhat.com --- (In reply to Alec Leamas from comment #11)
Hey, I made my first maven pom-file some days ago...maven is certainly full of surprises... you have installed DecodeIrCaller, have you?
Yes, I have. I am just trying to understand where the problem could be. I have installed DecodeIrCaller, but since permissions are 600, even Maven/XMvn can't read it.
https://bugzilla.redhat.com/show_bug.cgi?id=1195244
Mikolaj Izdebski mizdebsk@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|mizdebsk@redhat.com |msrb@redhat.com
https://bugzilla.redhat.com/show_bug.cgi?id=1195244
Michal Srb msrb@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEW
--- Comment #13 from Michal Srb msrb@redhat.com --- Moving back to NEW as I never actually started working on a fix. The discussion here was just an attempt to triage the bug.
https://bugzilla.redhat.com/show_bug.cgi?id=1195244
Michal Srb msrb@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |CLOSED Resolution|--- |INSUFFICIENT_DATA Last Closed| |2015-12-21 04:21:18
--- Comment #14 from Michal Srb msrb@redhat.com --- Actually, I am going to close this bug as I wasn't able to reproduce it. To my best knowledge, it doesn't seem to be a bug in javapackages-tools.
Alec, please feel free to reopen this bug if you're still able to reproduce it. Thanks ;)
java-sig-commits@lists.fedoraproject.org