Skip to content
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

Format Exception when opening the CPU view on on a Linux Trace. #166

Closed
vancem opened this issue Mar 6, 2017 · 18 comments
Closed

Format Exception when opening the CPU view on on a Linux Trace. #166

vancem opened this issue Mar 6, 2017 · 18 comments

Comments

@vancem
Copy link
Contributor

vancem commented Mar 6, 2017

To Repro

Download https://github.com/deppe/XmlSerializerPerf/blob/master/xmlperf.trace.zip

Open PerfView on it,

Open CPU view.

From the Log we get

Completed: Opening CPU Stacks (Elapsed Time: 6.138 sec)
Exception Occurred: System.AggregateException: One or more errors occurred. ---> System.FormatException: Input string was not in a correct format.
at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt)
at Diagnostics.Tracing.StackSources.LinuxPerfScriptEventParser.d__29.MoveNext() in C:\Users\Vancem\Source\Repos\perfview\src\PerfView\OtherSources\Linux\LinuxPerfScriptEventParser.cs:line 326
at Diagnostics.Tracing.StackSources.LinuxPerfScriptEventParser.d__9.MoveNext() in C:\Users\Vancem\Source\Repos\perfview\src\PerfView\OtherSources\Linux\LinuxPerfScriptEventParser.cs:line 85
at Diagnostics.Tracing.StackSources.ParallelLinuxPerfScriptStackSource.<>c__DisplayClass1_0.b__0(Object givenArrayIndex) in C:\Users\Vancem\Source\Repos\perfview\src\PerfView\OtherSources\Linux\LinuxPerfScriptStackSource.cs:line 63
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.WaitAll(Task[] tasks, Int32 millisecondsTimeout, CancellationToken cancellationToken)
at Diagnostics.Tracing.StackSources.ParallelLinuxPerfScriptStackSource.DoInterning() in C:\Users\Vancem\Source\Repos\perfview\src\PerfView\OtherSources\Linux\LinuxPerfScriptStackSource.cs:line 80
at Diagnostics.Tracing.StackSources.LinuxPerfScriptStackSource.InternAllLinuxEvents(Stream stream) in C:\Users\Vancem\Source\Repos\perfview\src\PerfView\OtherSources\Linux\LinuxPerfScriptStackSource.cs:line 351
at Diagnostics.Tracing.StackSources.LinuxPerfScriptStackSource..ctor(String path, Boolean doThreadTime) in C:\Users\Vancem\Source\Repos\perfview\src\PerfView\OtherSources\Linux\LinuxPerfScriptStackSource.cs:line 266
at Diagnostics.Tracing.StackSources.ParallelLinuxPerfScriptStackSource..ctor(String path, Boolean doThreadTime) in C:\Users\Vancem\Source\Repos\perfview\src\PerfView\OtherSources\Linux\LinuxPerfScriptStackSource.cs:line 20
at PerfView.LinuxPerfViewData.OpenStackSourceImpl(String streamName, TextWriter log, Double startRelativeMSec, Double endRelativeMSec, Predicate1 predicate) in C:\Users\Vancem\Source\Repos\perfview\src\PerfView\PerfViewData.cs:line 6078 at PerfView.PerfViewStackSource.OpenStackSource(String streamName, TextWriter log, Double startRelativeMSec, Double endRelativeMSec, Predicate1 predicate) in C:\Users\Vancem\Source\Repos\perfview\src\PerfView\PerfViewData.cs:line 2381
at PerfView.PerfViewStackSource.<>c__DisplayClass23_0.b__0() in C:\Users\Vancem\Source\Repos\perfview\src\PerfView\PerfViewData.cs:line 2399
at PerfView.StatusBar.<>c__DisplayClass19_0.b__0(Object ) in C:\Users\Vancem\Source\Repos\perfview\src\PerfView\GuiUtilities\StatusBar\StatusBar.xaml.cs:line 216
---> (Inner Exception #0) System.FormatException: Input string was not in a correct format.
at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt)
at Diagnostics.Tracing.StackSources.LinuxPerfScriptEventParser.d__29.MoveNext() in C:\Users\Vancem\Source\Repos\perfview\src\PerfView\OtherSources\Linux\LinuxPerfScriptEventParser.cs:line 326
at Diagnostics.Tracing.StackSources.LinuxPerfScriptEventParser.d__9.MoveNext() in C:\Users\Vancem\Source\Repos\perfview\src\PerfView\OtherSources\Linux\LinuxPerfScriptEventParser.cs:line 85
at Diagnostics.Tracing.StackSources.ParallelLinuxPerfScriptStackSource.<>c__DisplayClass1_0.b__0(Object givenArrayIndex) in C:\Users\Vancem\Source\Repos\perfview\src\PerfView\OtherSources\Linux\LinuxPerfScriptStackSource.cs:line 63
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.Execute()<---

vancem added a commit that referenced this issue Mar 6, 2017
The problem is that trace had a process whose name began with a number.
Fixed it to not be so senstive (however if the process has a name that has a space and then a number it it will still be confused).
Still this is much better, and arguably good enough
@vancem
Copy link
Contributor Author

vancem commented Mar 6, 2017

Fixed with commit 3462084

@vancem vancem closed this as completed Mar 6, 2017
@danmoseley
Copy link
Member

@vancem the customer who hit this presumably woudl have to clone and build perfview in order to get the fix. Is this a good opportunity to update the download center copy (which is 9 months old now)? :)

@vancem
Copy link
Contributor Author

vancem commented Mar 22, 2017

Getting a signed version of PerfView is currently a relatively manual process. I agree I need to do it, but it may still be while (the process is also in flux, a lot about that process has changed (or we want to change) since 9 months ago).

I have created a new beta release
https://github.com/Microsoft/perfview/releases/tag/V1.9.52

Which contains a build of PerfView.exe. It is not signed, but it does contain a hash they can check which is probably good enough for most users until we get a proper release out on the download center

@danmoseley
Copy link
Member

Thanks @vancem . I guess this tag will also help verify the version works before it goes up.

@MatthewLymer
Copy link

I'm getting this issue when loading a trace created by core 2.0.0 on Ubuntu 16.0.4

Completed: Opening CPU Stacks   (Elapsed Time: 0.196 sec)
Exception Occurred: System.AggregateException: One or more errors occurred. ---> System.FormatException: Input string was not in a correct format.
   at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt)
   at Diagnostics.Tracing.StackSources.LinuxPerfScriptEventParser.<NextEvent>d__29.MoveNext()
   at Diagnostics.Tracing.StackSources.LinuxPerfScriptEventParser.<Parse>d__9.MoveNext()
   at Diagnostics.Tracing.StackSources.ParallelLinuxPerfScriptStackSource.<>c__DisplayClass1_0.<DoInterning>b__0(Object givenArrayIndex)
   at System.Threading.Tasks.Task.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.WaitAll(Task[] tasks, Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at Diagnostics.Tracing.StackSources.ParallelLinuxPerfScriptStackSource.DoInterning()
   at Diagnostics.Tracing.StackSources.LinuxPerfScriptStackSource.InternAllLinuxEvents(Stream stream)
   at Diagnostics.Tracing.StackSources.LinuxPerfScriptStackSource..ctor(String path, Boolean doThreadTime)
   at Diagnostics.Tracing.StackSources.ParallelLinuxPerfScriptStackSource..ctor(String path, Boolean doThreadTime)
   at PerfView.LinuxPerfViewData.OpenStackSourceImpl(String streamName, TextWriter log, Double startRelativeMSec, Double endRelativeMSec, Predicate`1 predicate)
   at PerfView.PerfViewStackSource.OpenStackSource(String streamName, TextWriter log, Double startRelativeMSec, Double endRelativeMSec, Predicate`1 predicate)
   at PerfView.PerfViewStackSource.<>c__DisplayClass23_0.<Open>b__0()
   at PerfView.StatusBar.<>c__DisplayClass19_0.<StartWork>b__0(Object <state>)
---> (Inner Exception #0) System.FormatException: Input string was not in a correct format.
   at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt)
   at Diagnostics.Tracing.StackSources.LinuxPerfScriptEventParser.<NextEvent>d__29.MoveNext()
   at Diagnostics.Tracing.StackSources.LinuxPerfScriptEventParser.<Parse>d__9.MoveNext()
   at Diagnostics.Tracing.StackSources.ParallelLinuxPerfScriptStackSource.<>c__DisplayClass1_0.<DoInterning>b__0(Object givenArrayIndex)
   at System.Threading.Tasks.Task.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()<---

---> (Inner Exception #1) System.FormatException: Input string was not in a correct format.
   at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt)
   at Diagnostics.Tracing.StackSources.LinuxPerfScriptEventParser.<NextEvent>d__29.MoveNext()
   at Diagnostics.Tracing.StackSources.LinuxPerfScriptEventParser.<Parse>d__9.MoveNext()
   at Diagnostics.Tracing.StackSources.ParallelLinuxPerfScriptStackSource.<>c__DisplayClass1_0.<DoInterning>b__0(Object givenArrayIndex)
   at System.Threading.Tasks.Task.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()<---

---> (Inner Exception #2) System.FormatException: Input string was not in a correct format.
   at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt)
   at Diagnostics.Tracing.StackSources.LinuxPerfScriptEventParser.<NextEvent>d__29.MoveNext()
   at Diagnostics.Tracing.StackSources.LinuxPerfScriptEventParser.<Parse>d__9.MoveNext()
   at Diagnostics.Tracing.StackSources.ParallelLinuxPerfScriptStackSource.<>c__DisplayClass1_0.<DoInterning>b__0(Object givenArrayIndex)
   at System.Threading.Tasks.Task.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()<---

---> (Inner Exception #3) System.FormatException: Input string was not in a correct format.
   at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt)
   at Diagnostics.Tracing.StackSources.LinuxPerfScriptEventParser.<NextEvent>d__29.MoveNext()
   at Diagnostics.Tracing.StackSources.LinuxPerfScriptEventParser.<Parse>d__9.MoveNext()
   at Diagnostics.Tracing.StackSources.ParallelLinuxPerfScriptStackSource.<>c__DisplayClass1_0.<DoInterning>b__0(Object givenArrayIndex)
   at System.Threading.Tasks.Task.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()<---

@vancem
Copy link
Contributor Author

vancem commented Oct 10, 2017

@MatthewLymer Can you place the *.trace.zip file that caused the error somewhere I can get at it (if it is small you can drag it into the issue, otherwise you need to put it in the cloud and give me the URL.

@MatthewLymer
Copy link

MatthewLymer commented Oct 10, 2017

https://www.dropbox.com/s/b28fj6n9iok4wqf/no-proxy.trace.zip?dl=0

EDIT: I'm using perfview v1.9.52

@vancem
Copy link
Contributor Author

vancem commented Oct 10, 2017

PR #400 fixes this. It is caused by a process names that has a what looks like an number in it. The offending process name is "rs:action 13 qu". You can either rebuild PerfView after that PR goes through or make sure that process is not running when you take the trace.

@MatthewLymer
Copy link

Awesome, thanks for the quick turnaround on this, I'll check it out tomorrow.

@MatthewLymer
Copy link

This solves my problem, thank you for your help Vance.

vancem added a commit to vancem/perfview that referenced this issue Dec 20, 2017
The problem is that trace had a process whose name began with a number.
Fixed it to not be so senstive (however if the process has a name that has a space and then a number it it will still be confused).
Still this is much better, and arguably good enough
@paraspatidar
Copy link

paraspatidar commented Mar 5, 2019

@vancem , I am using perfview 2.0.26 , and traces were generated on kubenetes pod and the CPU traces are generated (as i am running pod on elevated rightes) , but when opening trace file in perfview on windows for CPU stack, i am getting similer exception.
is the fix available in V2.0.26 ?

here is trace file.

https://drive.google.com/file/d/1eyQWCIAefVyCCp0zm5vCSr0f0Jp99EGC/view?usp=sharing

for event , it works perfectly fine.

@vancem
Copy link
Contributor Author

vancem commented Mar 6, 2019

@paraspatidar Pull request #890 fixes this. \clrmain\tools\PerfView.exe has this fix. You can also build a version of PerfView yourself. In a week or so I will make an official release that includes the fix.

@Anteru
Copy link

Anteru commented Sep 2, 2019

I still have this issue using 2.0.45 -- did the fix make it into the official releases?

@billwert
Copy link
Member

billwert commented Sep 5, 2019

@Anteru there seem to be three separate issues in this issue. Which one are you hitting? Can you share a trace that repros it?

@Anteru
Copy link

Anteru commented Sep 6, 2019

Unfortunately, I cannot share the trace :( I'm running into this one here:

Exception Occurred: System.AggregateException: One or more errors occurred. ---> System.FormatException: Input string was not in a correct format.
   at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt)
   at Diagnostics.Tracing.StackSources.LinuxPerfScriptEventParser.<NextEvent>d__30.MoveNext()
   at Diagnostics.Tracing.StackSources.LinuxPerfScriptEventParser.<Parse>d__9.MoveNext()
   at Diagnostics.Tracing.StackSources.ParallelLinuxPerfScriptStackSource.<>c__DisplayClass1_1.<DoInterning>b__0(Object givenArrayIndex)
   at System.Threading.Tasks.Task.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.WaitAll(Task[] tasks, Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at Diagnostics.Tracing.StackSources.ParallelLinuxPerfScriptStackSource.DoInterning()
   at Diagnostics.Tracing.StackSources.LinuxPerfScriptStackSource.InternAllLinuxEvents(Stream stream)
   at Diagnostics.Tracing.StackSources.LinuxPerfScriptStackSource..ctor(String path, Boolean doThreadTime)
   at Diagnostics.Tracing.StackSources.ParallelLinuxPerfScriptStackSource..ctor(String path, Boolean doThreadTime)
   at PerfView.LinuxPerfViewData.OpenStackSourceImpl(String streamName, TextWriter log, Double startRelativeMSec, Double endRelativeMSec, Predicate`1 predicate)
   at PerfView.PerfViewStackSource.OpenStackSource(String streamName, TextWriter log, Double startRelativeMSec, Double endRelativeMSec, Predicate`1 predicate)
   at PerfView.PerfViewStackSource.<>c__DisplayClass23_0.<Open>b__0()
   at PerfView.StatusBar.<>c__DisplayClass22_0.<StartWork>b__0()
---> (Inner Exception #0) System.FormatException: Input string was not in a correct format.
   at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt)
   at Diagnostics.Tracing.StackSources.LinuxPerfScriptEventParser.<NextEvent>d__30.MoveNext()
   at Diagnostics.Tracing.StackSources.LinuxPerfScriptEventParser.<Parse>d__9.MoveNext()
   at Diagnostics.Tracing.StackSources.ParallelLinuxPerfScriptStackSource.<>c__DisplayClass1_1.<DoInterning>b__0(Object givenArrayIndex)
   at System.Threading.Tasks.Task.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()<---

---> (Inner Exception #1) System.FormatException: Input string was not in a correct format.
   at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt)
   at Diagnostics.Tracing.StackSources.LinuxPerfScriptEventParser.<NextEvent>d__30.MoveNext()
   at Diagnostics.Tracing.StackSources.LinuxPerfScriptEventParser.<Parse>d__9.MoveNext()
   at Diagnostics.Tracing.StackSources.ParallelLinuxPerfScriptStackSource.<>c__DisplayClass1_1.<DoInterning>b__0(Object givenArrayIndex)
   at System.Threading.Tasks.Task.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()<---

---> (Inner Exception #2) System.FormatException: Input string was not in a correct format.
   at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt)
   at Diagnostics.Tracing.StackSources.LinuxPerfScriptEventParser.<NextEvent>d__30.MoveNext()
   at Diagnostics.Tracing.StackSources.LinuxPerfScriptEventParser.<Parse>d__9.MoveNext()
   at Diagnostics.Tracing.StackSources.ParallelLinuxPerfScriptStackSource.<>c__DisplayClass1_1.<DoInterning>b__0(Object givenArrayIndex)
   at System.Threading.Tasks.Task.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()<---

---> (Inner Exception #3) System.FormatException: Input string was not in a correct format.
   at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt)
   at Diagnostics.Tracing.StackSources.LinuxPerfScriptEventParser.<NextEvent>d__30.MoveNext()
   at Diagnostics.Tracing.StackSources.LinuxPerfScriptEventParser.<Parse>d__9.MoveNext()
   at Diagnostics.Tracing.StackSources.ParallelLinuxPerfScriptStackSource.<>c__DisplayClass1_1.<DoInterning>b__0(Object givenArrayIndex)
   at System.Threading.Tasks.Task.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()<---

@sandeeprawat
Copy link

sandeeprawat commented Nov 13, 2019

I'm getting the same issue with .net core 2.1 trace from Linux. Using latest PerfView (2.0.46)

Shared trace at https://drive.google.com/open?id=1z-WOW_jjoOz_a7GKEjgHrbQFluSA0lfQ

Completed: Opening CPU Stacks (Elapsed Time: 115.629 sec)
Exception Occurred: System.AggregateException: One or more errors occurred. ---> System.FormatException: Input string was not in a correct format.
at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt)
at Diagnostics.Tracing.StackSources.LinuxPerfScriptEventParser.d__30.MoveNext()
at Diagnostics.Tracing.StackSources.LinuxPerfScriptEventParser.d__9.MoveNext()
at Diagnostics.Tracing.StackSources.ParallelLinuxPerfScriptStackSource.<>c__DisplayClass1_1.b__0(Object givenArrayIndex)
at System.Threading.Tasks.Task.Execute()

@ktmaul
Copy link

ktmaul commented May 6, 2020

I'm experiencing the same issue as @sandeeprawat and @Anteru with the same stack trace. Trace originates from a kubernetes pod and all the data seems intact when viewed using perfcollect.

@jaredrsowers
Copy link

Same issue:

Started: Opening CPU Stacks
Completed: Opening CPU Stacks (Elapsed Time: 0.702 sec)
Exception Occurred: System.FormatException: Input string was not in a correct format.
at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt)
at Microsoft.Diagnostics.Tracing.StackSources.LinuxPerfScriptEventParser.d__30.MoveNext()
at Microsoft.Diagnostics.Tracing.StackSources.LinuxPerfScriptEventParser.d__9.MoveNext()
at Microsoft.Diagnostics.Tracing.StackSources.LinuxPerfScriptStackSource.DoInterning()
at Microsoft.Diagnostics.Tracing.StackSources.LinuxPerfScriptStackSource.InternAllLinuxEvents(Stream stream)
at Microsoft.Diagnostics.Tracing.StackSources.LinuxPerfScriptStackSource..ctor(String path, Boolean doThreadTime)
at PerfView.LinuxPerfViewData.OpenStackSourceImpl(String streamName, TextWriter log, Double startRelativeMSec, Double endRelativeMSec, Predicate1 predicate) in C:\A\_work\68\s\src\PerfView\PerfViewData.cs:line 8404 at PerfView.PerfViewStackSource.OpenStackSource(String streamName, TextWriter log, Double startRelativeMSec, Double endRelativeMSec, Predicate1 predicate) in C:\A_work\68\s\src\PerfView\PerfViewData.cs:line 3890
at PerfView.PerfViewStackSource.<>c__DisplayClass23_0.b__0() in C:\A_work\68\s\src\PerfView\PerfViewData.cs:line 3914
at PerfView.StatusBar.<>c__DisplayClass22_0.b__0() in C:\A_work\68\s\src\PerfView\GuiUtilities\StatusBar\StatusBar.xaml.cs:line 254
An exceptional condition occurred, see log for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants