-
Notifications
You must be signed in to change notification settings - Fork 18k
runtime: segmentation violation in net/http.ListenAndServe #5861
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
Labels
Milestone
Comments
If you still have the binary, could you please run gdb on it and execute the command "x/10i 0x4121b3"? Maybe also "list *0x4121b3". That value is the rip printed by the SIGSEGV. It is possible that goroutine 10 was the one that faulted, since it's the only one listed as running, but then again it might not have been. I don't know of a tutorial for reading go stack traces. The running goroutine is supposed to be first but was not at the time you copied tip (nor in Go 1.1 I fear). I've fixed that at current tip, although current tip has other problems and I wouldn't trust it for production use. (In fact I wouldn't trust most tips. I'd stick with 1.1. But I appreciate the report nonetheless.) Russ |
Thanks for your reply. I did as you recommended, the result is showed below: (gdb) list *0x4121b3 0x4121b3 is in runtime.MHeap_Free (/home/jenkins/jenkins_bin/go-tip2013-06-02/src/pkg/runtime/mheap.c:300). 295 void 296 runtime·MHeap_Free(MHeap *h, MSpan *s, int32 acct) 297 { 298 runtime·lock(h); 299 runtime·purgecachedstats(m->mcache); 300 mstats.heap_inuse -= s->npages<<PageShift; 301 if(acct) { 302 mstats.heap_alloc -= s->npages<<PageShift; 303 mstats.heap_objects--; 304 } (gdb) x/10i 0x4121b3 0x4121b3 <runtime.MHeap_Free+67>: mov 0x18(%rcx),%rax 0x4121b7 <runtime.MHeap_Free+71>: shl $0xc,%rax 0x4121bb <runtime.MHeap_Free+75>: sub %rax,0x878c28 0x4121c3 <runtime.MHeap_Free+83>: cmpl $0x0,0x28(%rsp) 0x4121c8 <runtime.MHeap_Free+88>: je 0x4121e2 <runtime.MHeap_Free+114> 0x4121ca <runtime.MHeap_Free+90>: mov 0x18(%rcx),%rax 0x4121ce <runtime.MHeap_Free+94>: shl $0xc,%rax 0x4121d2 <runtime.MHeap_Free+98>: sub %rax,0x878c10 0x4121da <runtime.MHeap_Free+106>: decq 0x878c38 0x4121e2 <runtime.MHeap_Free+114>: mov 0x18(%rsp),%rax It seemed like the address store in 's' has been polluted. |
1. I nerver run my program under the race detector. I have difficulty in doing it under production environment. But will a data race cause segmentation violation as with the situation above? 2. I named directories as go-tip2013-06-02 just because I downloaded the source code at 2013-06-02. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
by zarcardfly:
The text was updated successfully, but these errors were encountered: