Description of problem: When trying to trace library calls with ftrace, it crashes with an java exception. Version-Release number of selected component (if applicable): Applicable to frysk running on both F30-latest and F31-latest. On current testbed: frysk-0.4-65.fc31.x86_64 Linux 5.3.8-300.fc31.x86_64 #1 SMP Tue Oct 29 14:28:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux How reproducible: 100% Steps to Reproduce: 1. Install Fedora 30 or 31. 2. dnf -y install frysk 3. ftrace -sym=plt:* ls Actual results: $ sudo ftrace -sym='plt:*' ls Exception in thread "main" java.lang.NoClassDefFoundError: antlr/RecognitionException at frysk.bindir.ftrace$1.rule(ftrace.java:151) at frysk.bindir.ftrace.parseGenericRules(ftrace.java:140) at frysk.bindir.ftrace.parseSymbolRules(ftrace.java:146) at frysk.bindir.ftrace.run(ftrace.java:400) at frysk.bindir.ftrace.main(ftrace.java:455) Caused by: java.lang.ClassNotFoundException: antlr.RecognitionException at java.net.URLClassLoader.findClass(URLClassLoader.java:382) at java.lang.ClassLoader.loadClass(ClassLoader.java:418) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352) at java.lang.ClassLoader.loadClass(ClassLoader.java:351) ... 5 more Expected results: Successful trace Additional info: 'ftrace -sys= ls' works, but all combinations of -sym option that I can think of fails with the java exception above.
I can't reproduce this.
Created attachment 1634779 [details] strace of ftrace that fails
I can replicate this on another instance of F31... I guess there is a dependency missing then. I only installed the frysk package, nothing else.
Created attachment 1634781 [details] sosreport from system which has 100% replicator of issue
From the java error message: 'Caused by: java.lang.ClassNotFoundException: antlr.RecognitionException' There's something missing. What antlr related package do you have installed cagney?
This seems suspect: [mglantz@darkred ~]$ grep -i "no such file" strace-ftrace.txt |grep -i antlr [pid 16862] 1573460032.285803 lstat("/usr/share/java/antlr.jar", 0x7f02a8d02120) = -1 ENOENT (No such file or directory) [pid 16862] 1573460032.285901 stat("/usr/share/java/antlr.jar", 0x7f02a8d041e0) = -1 ENOENT (No such file or directory) [pid 16862] 1573460032.431554 stat("/usr/share/java/antlr.jar", 0x7f02a8d02180) = -1 ENOENT (No such file or directory)
Yes, indeed. /usr/share/java/antlr.jar is provided by the antlr-tool package. After installing this, ftrace works.
So, the frysk RPM needs to depend on antlr-tool for Fedora 30+31 at least.
There's something decidedly screwy going on with dependencies. It has had: BuildRequires: antlr >= 2.7.4 since 2016. I guess I now get to spell out all the java runtime dependencies vis: Requires: antlr-tool jline .... as rpm -qR frysk is looking decidedly sparse (but I'm sure that wasn't a requirement).
FEDORA-2019-6f4defd30f has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2019-6f4defd30f
frysk-0.4-68.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-6f4defd30f
frysk-0.4-68.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.