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

net/http/cgi: TestBeChildCGIProcess hangs on Plan 9 #8621

Closed
0intro opened this issue Aug 30, 2014 · 6 comments
Closed

net/http/cgi: TestBeChildCGIProcess hangs on Plan 9 #8621

0intro opened this issue Aug 30, 2014 · 6 comments
Milestone

Comments

@0intro
Copy link
Member

0intro commented Aug 30, 2014

What steps will reproduce the problem?

% all.rc

What is the expected output? What do you see instead?

Since the recent changes in the Go runtime (August 27 to 29),
the TestBeChildCGIProcess test is hanging when running all.rc.

Running the test individually still works fine.

djc          100041    0:00   0:00      240K Await    all.rc -e ./all.rc
djc          100803    0:00   0:00      244K Await    run.rc -e ./run.rc --no-rebuild
djc          100808    0:00   0:00       48K Await    time go test std -short -timeout
120s
djc          100809    0:01   0:07   793484K Pread    go test std -short -timeout 120s
djc          100810    0:00   0:00   793484K Tsemacqu go
djc          100811    0:00   0:01   793484K Tsemacqu go
djc          100813    0:00   0:02   793484K Semacqui go
djc          100819    0:00   0:00   793484K Semacqui go
djc          101728    0:00   0:00   792068K Broken  
/tmp/go-build672138940/net/http/cgi/_test/cgi.test -test.run=TestBeChildCGIProcess
djc          101729    0:00   0:00   792068K Tsemacqu cgi.test
djc          101731    0:00   0:00   792068K Semacqui cgi.test

% acid 101728
/proc/101728/text:386 plan 9 executable
/sys/lib/acid/port
/sys/lib/acid/386
acid: stk()
runtime.gomallocgc(runtime.~r3=0x0,runtime.flags=0x3,runtime.typ=0x0,runtime.size=0xb)+0x74
?file?:0
runtime.cmallocgc(runtime.ret=0x10493e70,runtime.flags=0x3,runtime.typ=0x0,runtime.size=0xb)+0x3d
?file?:0
runtime.mallocgc()+0x54 ?file?:0
gostringsize()+0x5a ?file?:0
runtime.gostring()+0x3f ?file?:0
runtime.snprintf(runtime.s=0x3696ba,runtime.n=0x80,runtime.dst=0x10493f00)+0x92 ?file?:0
runtime.goexitsall()+0x51 ?file?:0
runtime.sighandler()+0x15a ?file?:0
runtime.sigtramp()+0x50 ?file?:0
0x1053fb58 ?file?:0
acid: asm(*PC)
runtime.gomallocgc+0x74 0x00008414  MOVL    0xc(DI),BP
runtime.gomallocgc+0x77 0x00008417  MOVL    BP,runtime.tinysize+0x10(SP)
runtime.gomallocgc+0x7b 0x0000841b  MOVL    runtime.tinysize+0x10(SP),BX
runtime.gomallocgc+0x7f 0x0000841f  CMPL    BX,AX
runtime.gomallocgc+0x81 0x00008421  JHI runtime.gomallocgc+0xce(SB)
runtime.gomallocgc+0x83 0x00008423  MOVL    0x8(DI),CX
runtime.gomallocgc+0x86 0x00008426  MOVL    AX,BX
runtime.gomallocgc+0x88 0x00008428  ANDL    $0x7,BX
runtime.gomallocgc+0x8b 0x0000842b  CMPL    BX,$0x0
runtime.gomallocgc+0x8e 0x0000842e  JNE runtime.gomallocgc+0x4ad(SB)
runtime.gomallocgc+0x94 0x00008434  MOVL    $0x8,BX
runtime.gomallocgc+0x99 0x00008439  MOVL    CX,BP
runtime.gomallocgc+0x9b 0x0000843b  XCHGL   BX,BP
runtime.gomallocgc+0x9d 0x0000843d  NEGL    BX
runtime.gomallocgc+0x9f 0x0000843f  XCHGL   BX,BP
runtime.gomallocgc+0xa1 0x00008441  DECL    BX
runtime.gomallocgc+0xa2 0x00008442  ANDL    BX,BP
runtime.gomallocgc+0xa4 0x00008444  ADDL    BP,CX
runtime.gomallocgc+0xa6 0x00008446  MOVL    0x8(DI),BX
runtime.gomallocgc+0xa9 0x00008449  MOVL    CX,DX
runtime.gomallocgc+0xab 0x0000844b  SUBL    BX,DX
runtime.gomallocgc+0xad 0x0000844d  ADDL    AX,DX
runtime.gomallocgc+0xaf 0x0000844f  MOVL    runtime.tinysize+0x10(SP),BX
runtime.gomallocgc+0xb3 0x00008453  CMPL    BX,DX
runtime.gomallocgc+0xb5 0x00008455  JHI runtime.gomallocgc+0xce(SB)
runtime.gomallocgc+0xb7 0x00008457  MOVL    CX,BX
runtime.gomallocgc+0xb9 0x00008459  ADDL    AX,BX
runtime.gomallocgc+0xbb 0x0000845b  MOVL    BX,0x8(DI)
runtime.gomallocgc+0xbe 0x0000845e  MOVL    0xc(DI),BP
runtime.gomallocgc+0xc1 0x00008461  SUBL    DX,BP
acid: regs()
PC  0x00008414 runtime.gomallocgc+0x74  ?file?:0
SP  0x10493df8 ECODE 0x00000004 EFLAG 0x00010283
CS  0x00000023 DS    0x0000001b SS  0x0000001b
GS  0x0000001b FS    0x0000001b ES  0x0000001b
TRAP    0x0000000e page fault
AX  0x0000000b BX   0x00000001 CX   0x10482000 DX   0x00000003
DI  0x00000000 SI   0x1053fcc4 BP   0x003696ba
@0intro
Copy link
Member Author

0intro commented Aug 31, 2014

Comment 1:

Labels changed: added repo-main.

@0intro
Copy link
Member Author

0intro commented Aug 31, 2014

Comment 2:

I guess this is an issue in the handling of the kill signal.

@0intro
Copy link
Member Author

0intro commented Aug 31, 2014

Comment 3:

=== RUN TestKillChildAfterCopyError
2014/08/31 21:24:30 cgi: copy error: past write limit
cgi.test 7167: suicide: sys: trap: fault read addr=0xc pc=0x00009214
0x00009214 is /usr/go/src/pkg/runtime/malloc.go:109
    tinysize := uintptr(c.tinysize)

@0intro
Copy link
Member Author

0intro commented Sep 2, 2014

Comment 4:

It seems to be related to the allocation done by the runtime·snprintf function called
in runtime·goexitsall.

@gopherbot
Copy link

Comment 5:

CL https://golang.org/cl/135280043 mentions this issue.

@rsc
Copy link
Contributor

rsc commented Sep 16, 2014

Comment 6:

CL had wrong 'fix' tag.

Status changed to Fixed.

@rsc rsc added this to the Go1.4 milestone Apr 14, 2015
@rsc rsc removed the release-go1.4 label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 25, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants