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

cowboy_clock badarg looking up rfc1123 in ets table #820

Closed
pdtwonotes opened this issue May 10, 2015 · 9 comments
Closed

cowboy_clock badarg looking up rfc1123 in ets table #820

pdtwonotes opened this issue May 10, 2015 · 9 comments

Comments

@pdtwonotes
Copy link

Cowboy 1.0.1 running on an armv7h processor, gets this error when the first browser request comes in. The cowboy_clock module is trying to fetch the rfc1123 value from the ets table. Since the value is placed there during init, I am not sure how this could happen.

Ranch listener http had connection process started with cowboy_protocol:start_link/4 at <0.180.0> exit with reason: {badarg,[{ets,lookup_element,[cowboy_clock,rfc1123,2],[]},{cowboy_clock,rfc1123,0,[{file,"/home/pd/Develop/benzaiten/bz/_build/default/lib/cowboy/src/cowboy_clock.erl"},{line,54}]},{cowboy_req,reply_no_compress,8,[{file,"/home/pd/Develop/benzaiten/bz/_build/default/lib/cowboy/src/cowboy_req.erl"},{line,933}]},{cowboy_req,reply,4,[{file,"/home/pd/Develop/benzaiten/bz/_build/default/lib/cowboy/src/cowboy_req.erl"},{line,886}]},{cowboy_req,maybe_reply,2,[{file,"/home/pd/Develop/benzaiten/bz/_build/default/lib/cowboy/src/cowboy_req.erl"},{line,996}]},{cowboy_rest,upgrade,4,[{file,"/home/pd/Develop/benzaiten/bz/_build/default/lib/cowboy/src/cowboy_rest.erl"},{line,70}]},{cowboy_protocol,execute,4,[{file,"/home/pd/Develop/benzaiten/bz/_build/default/lib/cowboy/src/cowboy_protocol.erl"},{line,442}]}]}

@essen
Copy link
Member

essen commented May 10, 2015

Is the Cowboy application started?

@pdtwonotes
Copy link
Author

The top Supervisor has called cowboy:start_http, is that what you mean? Or a more general application:start(cowboy)? I will try adding 'cowboy' to the must-be-started-first list.

@essen
Copy link
Member

essen commented May 10, 2015

Depending on how you do things either add cowboy to that list or use application:start yes.

@pdtwonotes
Copy link
Author

Ok, explicitly starting cowlib and cowboy seems to have fixed that. And there have been other changes I was not aware of. I have modified my dependency to "1.0.x" instead of "master" so that things do not catch me unawares in the future.

@mokevnin
Copy link

mokevnin commented Oct 7, 2015

@essen hi, i've got the same error. Cowboy version is 1.0.3.

=ERROR REPORT==== 7-Oct-2015::23:18:04 ===
Ranch listener http had connection process started with cowboy_protocol:start_link/4 at <0.11188.2> exit with reason: {badarg,[{ets,lookup_element,[cowboy_clo
ck,rfc1123,2],[]},{cowboy_clock,rfc1123,0,[{file,"/usr/src/app/app/battle/_build/default/lib/cowboy/src/cowboy_clock.erl"},{line,54}]},{cowboy_req,reply_no_co
mpress,8,[{file,"/usr/src/app/app/battle/_build/default/lib/cowboy/src/cowboy_req.erl"},{line,933}]},{cowboy_req,reply,4,[{file,"/usr/src/app/app/battle/_buil
d/default/lib/cowboy/src/cowboy_req.erl"},{line,886}]},{cowboy_req,maybe_reply,2,[{file,"/usr/src/app/app/battle/_build/default/lib/cowboy/src/cowboy_req.erl"
},{line,996}]},{cowboy_handler,handler_init,4,[{file,"/usr/src/app/app/battle/_build/default/lib/cowboy/src/cowboy_handler.erl"},{line,88}]},{cowboy_protocol,
execute,4,[{file,"/usr/src/app/app/battle/_build/default/lib/cowboy/src/cowboy_protocol.erl"},{line,442}]}]}

=ERROR REPORT==== 7-Oct-2015::23:18:04 ===
Error in process <0.11191.2> on node 'battle@127.0.0.1' with exit value:
{badarg,[{ets,lookup_element,[cowboy_clock,rfc1123,2],[]},
         {cowboy_clock,rfc1123,0,
                       [{file,"/usr/src/app/app/battle/_build/default/lib/cowboy/src/cowboy_clock.erl"},
                        {line,54}]},
         {cowboy_req,reply_no_compress,8,
                     [{file,"/usr/src/app/app/battle/_build/default/lib/cowboy/src/cowboy_req.erl"},
                      {line,933}]},
         {cowboy_req,reply,4,
                     [{file,"/usr/src/app/app/battle/_build/default/lib/cowboy/src/cowboy_req.erl"},
                      {line,886}]},
         {cowboy_req,maybe_reply,2,
                     [{file,"/usr/src/app/app/battle/_build/default/lib/cowboy/src/cowboy_req.erl"},
                      {line,996}]},
         {cowboy_handler,handler_init,4,
                         [{file,"/usr/src/app/app/battle/_build/default/lib/cowboy/src/cowboy_handler.erl"},
                          {line,88}]},
         {cowboy_protocol,execute,4,
                          [{file,"/usr/src/app/app/battle/_build/default/lib/cowboy/src/cowboy_protocol.erl"},
                           {line,442}]}]}

@essen
Copy link
Member

essen commented Oct 7, 2015

Same question as above? This is not a bug.

@mokevnin
Copy link

mokevnin commented Oct 7, 2015

ops, i see the question, my issue is different. it happens in random time during working.

@essen
Copy link
Member

essen commented Oct 7, 2015

Then open a new ticket and add more information, if this error happens it's because the cowboy_clock has crashed, so there should be an error when that happens and I'll need it to understand the problem.

@mokevnin
Copy link

mokevnin commented Oct 7, 2015

ok, thanks

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