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

Segfault while parsing headers #188

Closed
ararslan opened this issue Feb 4, 2018 · 11 comments
Closed

Segfault while parsing headers #188

ararslan opened this issue Feb 4, 2018 · 11 comments

Comments

@ararslan
Copy link
Member

ararslan commented Feb 4, 2018

This happened on Nanosoldier so I'm not sure what the context is exactly, but here's the backtrace: https://gist.github.com/ararslan/7285cc13990ebb5bb5799970ef7fdd08

@samoconnor
Copy link
Contributor

parseheaders at /home/nanosoldier/.julia/v0.6/HTTP/src/Parsers.jl:311

error says line 311, but Parsers.jl is only 309 lines long:

end # module Parsers

Out of date version?

@samoconnor
Copy link
Contributor

However, there is interaction with the PCRE C library in Parsers.jl, so a segfault originating there is plausible.

@quinnj
Copy link
Member

quinnj commented Feb 4, 2018

@ararslan said he was on 0.5.7 (an older version). That's why I tagged a new release in the hopes that some of your recent parser work had already fixed the issue.

@ararslan
Copy link
Member Author

ararslan commented Feb 4, 2018

No I got the segfault on HTTP v0.6.1. I reverted to 0.5.7 to keep Nanosoldier working until this is resolved.

@EricForgy
Copy link
Contributor

Just pulling out .jl stuff. Maybe it helps...

(chronology top to bottom)

#105 at ./event.jl:73
macro expansion at ./distributed/process_messages.jl:268 [inlined]
run_work_thunk at ./distributed/process_messages.jl:56
#106 at ./distributed/process_messages.jl:268 [inlined]
run at /home/nanosoldier/.julia/v0.6/Nanosoldier/src/jobs/BenchmarkJob.jl:234
report at /home/nanosoldier/.julia/v0.6/Nanosoldier/src/jobs/BenchmarkJob.jl:444
reply_status at /home/nanosoldier/.julia/v0.6/Nanosoldier/src/jobs/jobs.jl:11
#reply_status#7 at /home/nanosoldier/.julia/v0.6/Nanosoldier/src/jobs/jobs.jl:11
reply_status at /home/nanosoldier/.julia/v0.6/Nanosoldier/src/submission.jl:111
  Note: Several "<missing>" after this.
    #create_status at ./<missing>:0
    #create_status#94 at ./<missing>:0 [inlined]
    #create_status at ./<missing>:0
#create_status#93 at /home/nanosoldier/.julia/v0.6/GitHub/src/repositories/statuses.jl:31
    #gh_post_json at ./<missing>:0
#gh_post_json#10 at /home/nanosoldier/.julia/v0.6/GitHub/src/utils/requests.jl:74
#gh_post#5 at /home/nanosoldier/.julia/v0.6/GitHub/src/utils/requests.jl:68
    #github_request at ./<missing>:0
#github_request#3 at /home/nanosoldier/.julia/v0.6/GitHub/src/utils/requests.jl:61
    #post at ./<missing>:0

The above happens before reaching HTTP.jl.

#post#13 at /home/nanosoldier/.julia/v0.6/HTTP/src/HTTP.jl:362 [inlined]
#request#9 at /home/nanosoldier/.julia/v0.6/HTTP/src/HTTP.jl:306
    #request at ./<missing>:0
#request#8 at /home/nanosoldier/.julia/v0.6/HTTP/src/HTTP.jl:294
#request#1 at /home/nanosoldier/.julia/v0.6/HTTP/src/RedirectRequest.jl:26
    #request at ./<missing>:0
#request#1 at /home/nanosoldier/.julia/v0.6/HTTP/src/ContentTypeRequest.jl:24
    #request at ./<missing>:0
#request#1 at /home/nanosoldier/.julia/v0.6/HTTP/src/MessageRequest.jl:46
    #request at ./<missing>:0
#request#1 at /home/nanosoldier/.julia/v0.6/HTTP/src/RetryRequest.jl:45
#request#1 at /home/nanosoldier/.julia/v0.6/HTTP/src/ConnectionRequest.jl:34
#request#1 at /home/nanosoldier/.julia/v0.6/HTTP/src/StreamRequest.jl:44
macro expansion at /home/nanosoldier/.julia/v0.6/HTTP/src/StreamRequest.jl:48 [inlined]
startread at /home/nanosoldier/.julia/v0.6/HTTP/src/Streams.jl:155
readheaders at /home/nanosoldier/.julia/v0.6/HTTP/src/Messages.jl:466
parseheaders at /home/nanosoldier/.julia/v0.6/HTTP/src/Parsers.jl:311
while loading no file, in expression starting on line 0
signal (11): Segmentation fault [193/1981]

@samoconnor
Copy link
Contributor

#188 (comment): error says line 311, but Parsers.jl is only 309 lines long

@ararslan are you seeing a segfault with latest master or v0.6.2 ?

@ararslan
Copy link
Member Author

I haven't tried again since 0.6.1. I'll see if I can get around to trying on 0.6.2 this week.

@samoconnor
Copy link
Contributor

@ararslan bump :)

@ararslan
Copy link
Member Author

ararslan commented Mar 4, 2018

I have to experiment with upgrading Nanosoldier again in order to see whether this still happens with the most recent version of HTTP. Haven't had time yet.

@ararslan
Copy link
Member Author

Nanosoldier is running 0.6.4 (I think?) now and it hasn't segfaulted.

@ararslan
Copy link
Member Author

Buuuuut now it's hitting this #220

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

No branches or pull requests

4 participants