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

Parse failure for specific log file #12

Open
jaspervdj opened this issue Feb 1, 2018 · 10 comments
Open

Parse failure for specific log file #12

jaspervdj opened this issue Feb 1, 2018 · 10 comments

Comments

@jaspervdj
Copy link

File and error reported here: jaspervdj/profiteur#22

I reproduced it using ghc-prof version 1.4.0.4

@maoe
Copy link
Owner

maoe commented Feb 2, 2018

Looking at the prof file in jaspervdj/profiteur#22, it seems to be broken:

 34157      ==                                                                                                                                            Process                               src/Process.hs:22:54-55                                   25284          0    0.0    0.0     0.0    0.0
 34158       ==                                                                                                                                           Data.Text                             Data/Text.hs:(325,5)-(327,30)                             25285          2    0.0    0.0     0.0    0.0
 34159        aBA                                                                                                                                         Data.Text.Array                       Data/Text/Array.hs:84:7-9                                 25295          4    0.0    0.0     0.0    0.0
 34160                                                                                                Data.ASN1.Parse                       Data/ASN1/Parse.hs:34:27-30                               46923        306    0.0    0.0     0.0    0.0                                                    
 34161                                    return                                                                                                          Data.ASN1.Parse                       Data/ASN1/Parse.hs:48:5-24                                46962        153    0.0    0.0     0.0    0.0
 34162                                     pure                                                                                                           Data.ASN1.Parse                       Data/ASN1/Parse.hs:39:5-35                                46963        153    0.0    0.0     0.0    0.0

Look at the line 34160. There is no cost centre name in that line. Also return at the next line is indented too much. I'm not sure whether this is a bug in the GHC profiler or something was messed up when uploading the file. @varosi Any ideas?

@maoe
Copy link
Owner

maoe commented Feb 2, 2018

BTW, maybe I should switch the ghc-prof parser from attoparsec to (mega)parsec or something for better error messages. Do you have any opinions to pick a parser library?

@varosi
Copy link

varosi commented Feb 5, 2018

It's coming from a ZIP file. It's the same as on my machine.
File is generated with runing few concurrent processes with this RTS options:

+RTS -N -s -h -i0.1 -p -M1G -S/var/log/processJiraS.log -po/var/log/processJira.log

with GHC 8.2.2 (LTS 10.3)

@varosi
Copy link

varosi commented Feb 5, 2018

@maoe about parser library, I don't have opinions.
But here is some list:
https://github.com/Gabriel439/post-rfc/blob/master/sotu.md

@maoe
Copy link
Owner

maoe commented Feb 6, 2018

@varosi Can you check if you can generate a broken .prof file again? If it's reproducible, I guess we should report it to GHC trac.

In any case I'll probably give megaparsec a try for better error messages when I have time.

@varosi
Copy link

varosi commented Feb 6, 2018

Here is another one, but it seems that is opening fine:
processJira.log.prof.zip

I think that if multiple processes try to create the same file - it could mess the file. In the perfect case they should wait one another or just use different (unique) file names and check if the file already exists.

@maoe
Copy link
Owner

maoe commented Feb 7, 2018

@varosi Thanks for checking. In that case you might want to use the -po option to distinguish processes.

@varosi
Copy link

varosi commented Feb 7, 2018

Thanks, but it is the same executable ran multiple times, i.e. all the processes have the same name, but different process id.

@maoe
Copy link
Owner

maoe commented Feb 8, 2018

Yeah I understand that. I mean, can you specify a unique identifier for each process using -po option at runtime?

@varosi
Copy link

varosi commented Feb 12, 2018

It's possible with redirecting via shell script, because currently the process is called from a application that we don't have control on.

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

3 participants