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

Fix timeout issue when formatting large traces #3

Open
Stratus3D opened this issue Oct 20, 2021 · 1 comment · Fixed by #4
Open

Fix timeout issue when formatting large traces #3

Stratus3D opened this issue Oct 20, 2021 · 1 comment · Fixed by #4

Comments

@Stratus3D
Copy link
Owner

@jj1bdx you are right, I see I am not handling all the trace messages as I should. I don't think I really need those gc start and end events, so I will update the code accordingly so those events aren't logged.

For the issue you linked to, I do see the exception:

** exception exit: {timeout,
                       {gen_server,call,
                           [eflambe_server,
                            {stop_trace,#Ref<0.4056665575.1064304643.107444>}]}}
     in function  gen_server:call/2 (gen_server.erl, line 239)
     in call from eflambe:stop_trace/1 (/Users/kenji/src/sfmt-erlang/_build/default/lib/eflambe/src/eflambe.erl, line 125)
     in call from eflambe:apply/2 (/Users/kenji/src/sfmt-erlang/_build/default/lib/eflambe/src/eflambe.erl, line 87)
2> =ERROR REPORT==== 19-Oct-2021::12:49:34.479003 ===
** Generic server eflambe_server terminating 
** Last message in was {stop_trace,#Ref<0.4056665575.1064304643.107444>}
** When Server state == {state,
                            [{trace,#Ref<0.4056665575.1064304643.107444>,1,1,
                                 true,<0.249.0>,
                                 [{open,speedscope}]}]}
** Reason for termination ==
** {{timeout,{gen_server,call,[<0.249.0>,finish]}},
    [{gen_server,call,2,[{file,"gen_server.erl"},{line,239}]},
     {eflambe_server,handle_call,3,
                     [{file,"/Users/kenji/src/sfmt-erlang/_build/default/lib/eflambe/src/eflambe_server.erl"},
                      {line,131}]},
     {gen_server,try_handle_call,4,[{file,"gen_server.erl"},{line,721}]},
     {gen_server,handle_msg,6,[{file,"gen_server.erl"},{line,750}]}, �
     {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,226}]}]}
** Client <0.238.0> is dead

And it looks like that gen server was currently executing this line when the timeout occurred - https://github.com/Stratus3D/eflambe/blob/master/src/eflambe_brendan_gregg.erl#L178. It's not clear to me why it timed out, but it could have been because the formatting was taking a while, which could have been caused by a large amount of trace data being collected. Does the sfmt_pure_tests:test_short_speed/0 function run for a long time? Either way I need to get this fixed. If formatting of trace data takes longer than the gen server timeout, you'll get this error. I need change the code so that an unlimited amount of time is permitted for trace formatting.

Originally posted by @Stratus3D in #1 (comment)

juanperi added a commit to juanperi/eflambe that referenced this issue Oct 27, 2021
@Stratus3D
Copy link
Owner Author

Re-open as explained in #4 (comment)

@Stratus3D Stratus3D reopened this Oct 27, 2021
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

Successfully merging a pull request may close this issue.

1 participant