|
|
|
Created:
13 years, 1 month ago by remyoudompheng Modified:
13 years, 1 month ago CC:
golang-dev, minux1, iant, bradfitz, dave_cheney.net Visibility:
Public. |
Descriptionlog/syslog: fix channel race in test.
Patch Set 1 #Patch Set 2 : diff -r c224c490576b https://go.googlecode.com/hg/ #Patch Set 3 : diff -r c224c490576b https://go.googlecode.com/hg/ #
Total comments: 1
Patch Set 4 : diff -r aceba1ebb946 https://go.googlecode.com/hg/ #
Total comments: 2
Patch Set 5 : diff -r aceba1ebb946 https://go.googlecode.com/hg/ #MessagesTotal messages: 20
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
Sign in to reply to this message.
See also CL 7311052.
Sign in to reply to this message.
https://codereview.appspot.com/7314057/diff/4001/src/pkg/log/syslog/syslog_te... File src/pkg/log/syslog/syslog_test.go (right): https://codereview.appspot.com/7314057/diff/4001/src/pkg/log/syslog/syslog_te... src/pkg/log/syslog/syslog_test.go:57: wg.Add(1) It seems to me that if we're going to wait for this goroutine to stop, we need something to ensure that it will actually stop. Right now it seems that it could hang waiting for another string to come in.
Sign in to reply to this message.
Hello golang-dev@googlegroups.com, minux.ma@gmail.com, iant@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
Sign in to reply to this message.
LGTM On Wed, Feb 13, 2013 at 11:56 AM, <remyoudompheng@gmail.com> wrote: > Hello golang-dev@googlegroups.com, minux.ma@gmail.com, iant@golang.org > (cc: golang-dev@googlegroups.com), > > Please take another look. > > > > https://codereview.appspot.**com/7314057/<https://codereview.appspot.com/7314... > > -- > > ---You received this message because you are subscribed to the Google > Groups "golang-dev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-dev+unsubscribe@**googlegroups.com<golang-dev%2Bunsubscribe@googlegrou... > . > For more options, visit https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/o... > . > > >
Sign in to reply to this message.
https://codereview.appspot.com/7314057/diff/7001/src/pkg/log/syslog/syslog_te... File src/pkg/log/syslog/syslog_test.go (right): https://codereview.appspot.com/7314057/diff/7001/src/pkg/log/syslog/syslog_te... src/pkg/log/syslog/syslog_test.go:59: defer wg.Done() I would be more comfortable if we set a deadline here.
Sign in to reply to this message.
Hello golang-dev@googlegroups.com, minux.ma@gmail.com, iant@golang.org, bradfitz@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
Sign in to reply to this message.
https://codereview.appspot.com/7314057/diff/7001/src/pkg/log/syslog/syslog_te... File src/pkg/log/syslog/syslog_test.go (right): https://codereview.appspot.com/7314057/diff/7001/src/pkg/log/syslog/syslog_te... src/pkg/log/syslog/syslog_test.go:59: defer wg.Done() On 2013/02/13 20:47:56, iant wrote: > I would be more comfortable if we set a deadline here. Done.
Sign in to reply to this message.
LGTM. Thank you to everyone for fixing this race.
Sign in to reply to this message.
Remy, are you able to commit this today. If you are unable too, I can do so. On Thu, Feb 14, 2013 at 10:38 AM, <dave@cheney.net> wrote: > LGTM. Thank you to everyone for fixing this race. > > https://codereview.appspot.com/7314057/
Sign in to reply to this message.
I will submit this on Remy's behalf. @fullung, can you please let me/us/someone know if this fix does not clear your torture test.
Sign in to reply to this message.
*** Submitted as https://code.google.com/p/go/source/detail?r=fdf84e3a0efe *** log/syslog: fix channel race in test. R=golang-dev, minux.ma, iant, bradfitz, dave CC=golang-dev https://codereview.appspot.com/7314057 Committer: Dave Cheney <dave@cheney.net>
Sign in to reply to this message.
Message was sent while issue was closed.
I still see the panic (on Darwin *and* with some scheduler changes): $ go test -v -cpu=1,2,5,7,9 log/syslog === RUN TestWithSimulated-2 panic: runtime error: send on closed channel goroutine 22 [running]: log/syslog.func·001(0xc200000bf0, 0xc200000be8, 0xc2000ae2a0, 0xc200000f18, 0x0, ...) src/pkg/log/syslog/syslog_test.go:67 +0x162 created by log/syslog.runStreamSyslog src/pkg/log/syslog/syslog_test.go:70 +0x164 goroutine 1 [chan receive]: testing.RunTests(0x2000, 0x275940, 0x8, 0x8, 0x1, ...) src/pkg/testing/testing.go:431 +0x898 testing.Main(0x2000, 0x275940, 0x8, 0x8, 0x279450, ...) src/pkg/testing/testing.go:327 +0x8a main.main() log/syslog/_test/_testmain.go:57 +0x9a goroutine 3 [chan receive]: net.(*pollServer).WaitRead(0xc20005d6c0, 0xc2000a98f0, 0xc20005d600, 0x23, 0xc20005d601, ...) src/pkg/net/fd_unix.go:244 +0x63 net.(*netFD).accept(0xc2000a98f0, 0xb0ac0, 0x0, 0xc20005d600, 0x23, ...) src/pkg/net/fd_unix.go:631 +0x171 net.(*UnixListener).AcceptUnix(0xc200092b00, 0xc200000001, 0x43ef10, 0x31e64) src/pkg/net/unixsock_posix.go:282 +0x49 net.(*UnixListener).Accept(0xc200092b00, 0x0, 0x0, 0x0, 0x0, ...) src/pkg/net/unixsock_posix.go:293 +0x49 log/syslog.runStreamSyslog(0xc2000a3640, 0xc200092b00, 0xc2000aeae0, 0xc200092a80, 0x0, ...) src/pkg/log/syslog/syslog_test.go:53 +0x78 created by log/syslog.startServer src/pkg/log/syslog/syslog_test.go:109 +0x4f5 goroutine 4 [syscall]: syscall.Syscall6() src/pkg/syscall/asm_darwin_amd64.s:38 +0x5 syscall.kevent(0x6, 0x0, 0x0, 0xc20005e308, 0xa, ...) src/pkg/syscall/zsyscall_darwin_amd64.go:199 +0x83 syscall.Kevent(0x6, 0x0, 0x0, 0x0, 0xc20005e308, ...) src/pkg/syscall/syscall_bsd.go:554 +0x9b net.(*pollster).WaitFD(0xc20005e300, 0xc20005d6c0, 0x51c8128, 0x0, 0x0, ...) src/pkg/net/fd_darwin.go:101 +0x187 net.(*pollServer).Run(0xc20005d6c0, 0x0) src/pkg/net/fd_unix.go:212 +0x10a created by net.newPollServer src/pkg/net/newpollserver_unix.go:33 +0x2d5 goroutine 5 [chan receive]: net.(*pollServer).WaitRead(0xc20005d6c0, 0xc2000a90d0, 0xc20005d600, 0x23, 0xc20005d601, ...) src/pkg/net/fd_unix.go:244 +0x63 net.(*netFD).accept(0xc2000a90d0, 0xb0ac0, 0x0, 0xc20005d600, 0x23, ...) src/pkg/net/fd_unix.go:631 +0x171 net.(*UnixListener).AcceptUnix(0xc200092300, 0xc200000001, 0x43cf10, 0x31e64) src/pkg/net/unixsock_posix.go:282 +0x49 net.(*UnixListener).Accept(0xc200092300, 0x0, 0x0, 0x0, 0x0, ...) src/pkg/net/unixsock_posix.go:293 +0x49 log/syslog.runStreamSyslog(0xc2000a3640, 0xc200092300, 0xc2000ae180, 0xc200092260, 0x0, ...) src/pkg/log/syslog/syslog_test.go:53 +0x78 created by log/syslog.startServer src/pkg/log/syslog/syslog_test.go:109 +0x4f5 goroutine 6 [running]: created by testing.RunTests src/pkg/testing/testing.go:430 +0x875 goroutine 7 [chan receive]: net.(*pollServer).WaitRead(0xc20005d6c0, 0xc2000a9680, 0xc20005d600, 0x23, 0xc20005d601, ...) src/pkg/net/fd_unix.go:244 +0x63 net.(*netFD).accept(0xc2000a9680, 0xac690, 0x0, 0xc20005d600, 0x23, ...) src/pkg/net/fd_unix.go:631 +0x171 net.(*TCPListener).AcceptTCP(0xc2000004a0, 0xc200000001, 0x0, 0x0, 0x20, ...) src/pkg/net/tcpsock_posix.go:232 +0x57 net.(*TCPListener).Accept(0xc2000004a0, 0x0, 0x0, 0x0, 0x0, ...) src/pkg/net/tcpsock_posix.go:242 +0x49 log/syslog.runStreamSyslog(0xc2000a3bc0, 0xc2000004a0, 0xc2000ae840, 0xc200092860, 0x0, ...) src/pkg/log/syslog/syslog_test.go:53 +0x78 created by log/syslog.startServer src/pkg/log/syslog/syslog_test.go:109 +0x4f5 goroutine 8 [chan receive]: net.(*pollServer).WaitRead(0xc20005d6c0, 0xc2000cc680, 0xc20005d600, 0x23, 0x1, ...) src/pkg/net/fd_unix.go:244 +0x63 net.(*netFD).ReadFrom(0xc2000cc680, 0xc2000d4000, 0x1000, 0x1000, 0x0, ...) src/pkg/net/fd_unix.go:471 +0x387 net.(*UDPConn).ReadFromUDP(0xc200000ab0, 0xc2000d4000, 0x1000, 0x1000, 0x279fe0, ...) src/pkg/net/udpsock_posix.go:72 +0x116 net.(*UDPConn).ReadFrom(0xc200000ab0, 0xc2000d4000, 0x1000, 0x1000, 0x0, ...) src/pkg/net/udpsock_posix.go:87 +0xe4 log/syslog.runPktSyslog(0xc2000ae6c0, 0xc200000ab0, 0xc2000ce360, 0x169f0, 0xc200000a88, ...) src/pkg/log/syslog/syslog_test.go:31 +0x118 log/syslog.func·002(0xc200000a88, 0xc2000d3020, 0xc200000a80, 0x0, 0x0, ...) src/pkg/log/syslog/syslog_test.go:101 +0x58 created by log/syslog.startServer src/pkg/log/syslog/syslog_test.go:102 +0x2fb goroutine 9 [chan receive]: net.(*pollServer).WaitRead(0xc20005d6c0, 0xc2000a9b60, 0xc20005d600, 0x23, 0xc20005d601, ...) src/pkg/net/fd_unix.go:244 +0x63 net.(*netFD).accept(0xc2000a9b60, 0xb0ac0, 0x0, 0xc20005d600, 0x23, ...) src/pkg/net/fd_unix.go:631 +0x171 net.(*UnixListener).AcceptUnix(0xc200092d20, 0x0, 0x0, 0x0) src/pkg/net/unixsock_posix.go:282 +0x49 net.(*UnixListener).Accept(0xc200092d20, 0x0, 0x0, 0x0, 0x0, ...) src/pkg/net/unixsock_posix.go:293 +0x49 log/syslog.runStreamSyslog(0xc2000a3640, 0xc200092d20, 0xc2000aeae0, 0xc200092ca0, 0x0, ...) src/pkg/log/syslog/syslog_test.go:53 +0x78 created by log/syslog.startServer src/pkg/log/syslog/syslog_test.go:109 +0x4f5 goroutine 10 [chan receive]: net.(*pollServer).WaitRead(0xc2000c4f00, 0xc2000fa340, 0xc20005d600, 0x23, 0xffffffffffffff01, ...) src/pkg/net/fd_unix.go:244 +0x63 net.(*netFD).Read(0xc2000fa340, 0xc200129000, 0x1000, 0x1000, 0x0, ...) src/pkg/net/fd_unix.go:441 +0x2ec net.(*conn).Read(0xc200115048, 0xc200129000, 0x1000, 0x1000, 0x0, ...) src/pkg/net/net.go:123 +0xc3 bufio.(*Reader).fill(0xc2000cef00, 0x0) src/pkg/bufio/bufio.go:79 +0x10c bufio.(*Reader).ReadSlice(0xc2000cef00, 0xbe0a, 0x0, 0x0, 0x0, ...) src/pkg/bufio/bufio.go:262 +0x202 bufio.(*Reader).ReadBytes(0xc2000cef00, 0xc2000ced0a, 0x0, 0x0, 0x0, ...) src/pkg/bufio/bufio.go:343 +0xb7 bufio.(*Reader).ReadString(0xc2000cef00, 0xc2000ced0a, 0x0, 0x0, 0x0, ...) src/pkg/bufio/bufio.go:382 +0x53 log/syslog.func·001(0xc200115028, 0xc200115020, 0xc2000ae2a0, 0xc200115048, 0x0, ...) src/pkg/log/syslog/syslog_test.go:63 +0x106 created by log/syslog.runStreamSyslog src/pkg/log/syslog/syslog_test.go:70 +0x164 goroutine 18 [syscall]: syscall.Syscall6() src/pkg/syscall/asm_darwin_amd64.s:38 +0x5 syscall.kevent(0x1e, 0x0, 0x0, 0xc20005e488, 0xa, ...) src/pkg/syscall/zsyscall_darwin_amd64.go:199 +0x83 syscall.Kevent(0x1e, 0x0, 0x0, 0x0, 0xc20005e488, ...) src/pkg/syscall/syscall_bsd.go:554 +0x9b net.(*pollster).WaitFD(0xc20005e480, 0xc2000c4f00, 0x0, 0x0, 0x34cdb, ...) src/pkg/net/fd_darwin.go:101 +0x187 net.(*pollServer).Run(0xc2000c4f00, 0x0) src/pkg/net/fd_unix.go:212 +0x10a created by net.newPollServer src/pkg/net/newpollserver_unix.go:33 +0x2d5 goroutine 20 [chan receive]: net.(*pollServer).WaitRead(0xc2000c4f00, 0xc2000fa1a0, 0xc20005d600, 0x23, 0xc20005d601, ...) src/pkg/net/fd_unix.go:244 +0x63 net.(*netFD).accept(0xc2000fa1a0, 0xb0ac0, 0x0, 0xc20005d600, 0x23, ...) src/pkg/net/fd_unix.go:631 +0x171 net.(*UnixListener).AcceptUnix(0xc2000fde80, 0xc200000001, 0x450f10, 0x31e64) src/pkg/net/unixsock_posix.go:282 +0x49 net.(*UnixListener).Accept(0xc2000fde80, 0x0, 0x0, 0x0, 0x0, ...) src/pkg/net/unixsock_posix.go:293 +0x49 log/syslog.runStreamSyslog(0xc2000a3640, 0xc2000fde80, 0xc2000cede0, 0xc2000fdde0, 0x0, ...) src/pkg/log/syslog/syslog_test.go:53 +0x78 created by log/syslog.startServer src/pkg/log/syslog/syslog_test.go:109 +0x4f5 goroutine 23 [runnable]: log/syslog.func·001(0xc200000bf0, 0xc200000be8, 0xc2000ae2a0, 0xc200000f38, 0x0, ...) src/pkg/log/syslog/syslog_test.go:58 created by log/syslog.runStreamSyslog src/pkg/log/syslog/syslog_test.go:70 +0x164 goroutine 24 [runnable]: log/syslog.func·001(0xc200000bf0, 0xc200000be8, 0xc2000ae2a0, 0xc200000f58, 0x0, ...) src/pkg/log/syslog/syslog_test.go:58 created by log/syslog.runStreamSyslog src/pkg/log/syslog/syslog_test.go:70 +0x164 goroutine 25 [runnable]: log/syslog.func·001(0xc200000bf0, 0xc200000be8, 0xc2000ae2a0, 0xc200000f78, 0x0, ...) src/pkg/log/syslog/syslog_test.go:58 created by log/syslog.runStreamSyslog src/pkg/log/syslog/syslog_test.go:70 +0x164 goroutine 26 [runnable]: log/syslog.func·001(0xc200000bf0, 0xc200000be8, 0xc2000ae2a0, 0xc200000f98, 0x0, ...) src/pkg/log/syslog/syslog_test.go:58 created by log/syslog.runStreamSyslog src/pkg/log/syslog/syslog_test.go:70 +0x164 goroutine 27 [runnable]: log/syslog.func·001(0xc200000bf0, 0xc200000be8, 0xc2000ae2a0, 0xc200000fb8, 0x0, ...) src/pkg/log/syslog/syslog_test.go:58 created by log/syslog.runStreamSyslog src/pkg/log/syslog/syslog_test.go:70 +0x164 goroutine 28 [runnable]: log/syslog.func·001(0xc200000bf0, 0xc200000be8, 0xc2000ae2a0, 0xc200000fd8, 0x0, ...) src/pkg/log/syslog/syslog_test.go:58 created by log/syslog.runStreamSyslog src/pkg/log/syslog/syslog_test.go:70 +0x164 goroutine 29 [runnable]: log/syslog.func·001(0xc200000bf0, 0xc200000be8, 0xc2000ae2a0, 0xc200000ff8, 0x0, ...) src/pkg/log/syslog/syslog_test.go:58 created by log/syslog.runStreamSyslog src/pkg/log/syslog/syslog_test.go:70 +0x164 goroutine 30 [runnable]: log/syslog.func·001(0xc200000bf0, 0xc200000be8, 0xc2000ae2a0, 0xc200115118, 0x0, ...) src/pkg/log/syslog/syslog_test.go:58 created by log/syslog.runStreamSyslog src/pkg/log/syslog/syslog_test.go:70 +0x164 goroutine 31 [runnable]: log/syslog.func·001(0xc200000bf0, 0xc200000be8, 0xc2000ae2a0, 0xc200115138, 0x0, ...) src/pkg/log/syslog/syslog_test.go:58 created by log/syslog.runStreamSyslog src/pkg/log/syslog/syslog_test.go:70 +0x164 exit status 2 FAIL log/syslog 2.050s
Sign in to reply to this message.
Bummer. If you do not intend to fix this yourself, would you please file an issue. On 17/02/2013, at 19:12, dvyukov@google.com wrote: > I still see the panic (on Darwin *and* with some scheduler changes): > > $ go test -v -cpu=1,2,5,7,9 log/syslog > === RUN TestWithSimulated-2 > panic: runtime error: send on closed channel > > goroutine 22 [running]: > log/syslog.func·001(0xc200000bf0, 0xc200000be8, 0xc2000ae2a0, > 0xc200000f18, 0x0, ...) > src/pkg/log/syslog/syslog_test.go:67 +0x162 > created by log/syslog.runStreamSyslog > src/pkg/log/syslog/syslog_test.go:70 +0x164 > > goroutine 1 [chan receive]: > testing.RunTests(0x2000, 0x275940, 0x8, 0x8, 0x1, ...) > src/pkg/testing/testing.go:431 +0x898 > testing.Main(0x2000, 0x275940, 0x8, 0x8, 0x279450, ...) > src/pkg/testing/testing.go:327 +0x8a > main.main() > log/syslog/_test/_testmain.go:57 +0x9a > > goroutine 3 [chan receive]: > net.(*pollServer).WaitRead(0xc20005d6c0, 0xc2000a98f0, 0xc20005d600, > 0x23, 0xc20005d601, ...) > src/pkg/net/fd_unix.go:244 +0x63 > net.(*netFD).accept(0xc2000a98f0, 0xb0ac0, 0x0, 0xc20005d600, 0x23, ...) > src/pkg/net/fd_unix.go:631 +0x171 > net.(*UnixListener).AcceptUnix(0xc200092b00, 0xc200000001, 0x43ef10, > 0x31e64) > src/pkg/net/unixsock_posix.go:282 +0x49 > net.(*UnixListener).Accept(0xc200092b00, 0x0, 0x0, 0x0, 0x0, ...) > src/pkg/net/unixsock_posix.go:293 +0x49 > log/syslog.runStreamSyslog(0xc2000a3640, 0xc200092b00, 0xc2000aeae0, > 0xc200092a80, 0x0, ...) > src/pkg/log/syslog/syslog_test.go:53 +0x78 > created by log/syslog.startServer > src/pkg/log/syslog/syslog_test.go:109 +0x4f5 > > goroutine 4 [syscall]: > syscall.Syscall6() > src/pkg/syscall/asm_darwin_amd64.s:38 +0x5 > syscall.kevent(0x6, 0x0, 0x0, 0xc20005e308, 0xa, ...) > src/pkg/syscall/zsyscall_darwin_amd64.go:199 +0x83 > syscall.Kevent(0x6, 0x0, 0x0, 0x0, 0xc20005e308, ...) > src/pkg/syscall/syscall_bsd.go:554 +0x9b > net.(*pollster).WaitFD(0xc20005e300, 0xc20005d6c0, 0x51c8128, 0x0, 0x0, > ...) > src/pkg/net/fd_darwin.go:101 +0x187 > net.(*pollServer).Run(0xc20005d6c0, 0x0) > src/pkg/net/fd_unix.go:212 +0x10a > created by net.newPollServer > src/pkg/net/newpollserver_unix.go:33 +0x2d5 > > goroutine 5 [chan receive]: > net.(*pollServer).WaitRead(0xc20005d6c0, 0xc2000a90d0, 0xc20005d600, > 0x23, 0xc20005d601, ...) > src/pkg/net/fd_unix.go:244 +0x63 > net.(*netFD).accept(0xc2000a90d0, 0xb0ac0, 0x0, 0xc20005d600, 0x23, ...) > src/pkg/net/fd_unix.go:631 +0x171 > net.(*UnixListener).AcceptUnix(0xc200092300, 0xc200000001, 0x43cf10, > 0x31e64) > src/pkg/net/unixsock_posix.go:282 +0x49 > net.(*UnixListener).Accept(0xc200092300, 0x0, 0x0, 0x0, 0x0, ...) > src/pkg/net/unixsock_posix.go:293 +0x49 > log/syslog.runStreamSyslog(0xc2000a3640, 0xc200092300, 0xc2000ae180, > 0xc200092260, 0x0, ...) > src/pkg/log/syslog/syslog_test.go:53 +0x78 > created by log/syslog.startServer > src/pkg/log/syslog/syslog_test.go:109 +0x4f5 > > goroutine 6 [running]: > created by testing.RunTests > src/pkg/testing/testing.go:430 +0x875 > > goroutine 7 [chan receive]: > net.(*pollServer).WaitRead(0xc20005d6c0, 0xc2000a9680, 0xc20005d600, > 0x23, 0xc20005d601, ...) > src/pkg/net/fd_unix.go:244 +0x63 > net.(*netFD).accept(0xc2000a9680, 0xac690, 0x0, 0xc20005d600, 0x23, ...) > src/pkg/net/fd_unix.go:631 +0x171 > net.(*TCPListener).AcceptTCP(0xc2000004a0, 0xc200000001, 0x0, 0x0, 0x20, > ...) > src/pkg/net/tcpsock_posix.go:232 +0x57 > net.(*TCPListener).Accept(0xc2000004a0, 0x0, 0x0, 0x0, 0x0, ...) > src/pkg/net/tcpsock_posix.go:242 +0x49 > log/syslog.runStreamSyslog(0xc2000a3bc0, 0xc2000004a0, 0xc2000ae840, > 0xc200092860, 0x0, ...) > src/pkg/log/syslog/syslog_test.go:53 +0x78 > created by log/syslog.startServer > src/pkg/log/syslog/syslog_test.go:109 +0x4f5 > > goroutine 8 [chan receive]: > net.(*pollServer).WaitRead(0xc20005d6c0, 0xc2000cc680, 0xc20005d600, > 0x23, 0x1, ...) > src/pkg/net/fd_unix.go:244 +0x63 > net.(*netFD).ReadFrom(0xc2000cc680, 0xc2000d4000, 0x1000, 0x1000, 0x0, > ...) > src/pkg/net/fd_unix.go:471 +0x387 > net.(*UDPConn).ReadFromUDP(0xc200000ab0, 0xc2000d4000, 0x1000, 0x1000, > 0x279fe0, ...) > src/pkg/net/udpsock_posix.go:72 +0x116 > net.(*UDPConn).ReadFrom(0xc200000ab0, 0xc2000d4000, 0x1000, 0x1000, 0x0, > ...) > src/pkg/net/udpsock_posix.go:87 +0xe4 > log/syslog.runPktSyslog(0xc2000ae6c0, 0xc200000ab0, 0xc2000ce360, > 0x169f0, 0xc200000a88, ...) > src/pkg/log/syslog/syslog_test.go:31 +0x118 > log/syslog.func·002(0xc200000a88, 0xc2000d3020, 0xc200000a80, 0x0, 0x0, > ...) > src/pkg/log/syslog/syslog_test.go:101 +0x58 > created by log/syslog.startServer > src/pkg/log/syslog/syslog_test.go:102 +0x2fb > > goroutine 9 [chan receive]: > net.(*pollServer).WaitRead(0xc20005d6c0, 0xc2000a9b60, 0xc20005d600, > 0x23, 0xc20005d601, ...) > src/pkg/net/fd_unix.go:244 +0x63 > net.(*netFD).accept(0xc2000a9b60, 0xb0ac0, 0x0, 0xc20005d600, 0x23, ...) > src/pkg/net/fd_unix.go:631 +0x171 > net.(*UnixListener).AcceptUnix(0xc200092d20, 0x0, 0x0, 0x0) > src/pkg/net/unixsock_posix.go:282 +0x49 > net.(*UnixListener).Accept(0xc200092d20, 0x0, 0x0, 0x0, 0x0, ...) > src/pkg/net/unixsock_posix.go:293 +0x49 > log/syslog.runStreamSyslog(0xc2000a3640, 0xc200092d20, 0xc2000aeae0, > 0xc200092ca0, 0x0, ...) > src/pkg/log/syslog/syslog_test.go:53 +0x78 > created by log/syslog.startServer > src/pkg/log/syslog/syslog_test.go:109 +0x4f5 > > goroutine 10 [chan receive]: > net.(*pollServer).WaitRead(0xc2000c4f00, 0xc2000fa340, 0xc20005d600, > 0x23, 0xffffffffffffff01, ...) > src/pkg/net/fd_unix.go:244 +0x63 > net.(*netFD).Read(0xc2000fa340, 0xc200129000, 0x1000, 0x1000, 0x0, ...) > src/pkg/net/fd_unix.go:441 +0x2ec > net.(*conn).Read(0xc200115048, 0xc200129000, 0x1000, 0x1000, 0x0, ...) > src/pkg/net/net.go:123 +0xc3 > bufio.(*Reader).fill(0xc2000cef00, 0x0) > src/pkg/bufio/bufio.go:79 +0x10c > bufio.(*Reader).ReadSlice(0xc2000cef00, 0xbe0a, 0x0, 0x0, 0x0, ...) > src/pkg/bufio/bufio.go:262 +0x202 > bufio.(*Reader).ReadBytes(0xc2000cef00, 0xc2000ced0a, 0x0, 0x0, 0x0, > ...) > src/pkg/bufio/bufio.go:343 +0xb7 > bufio.(*Reader).ReadString(0xc2000cef00, 0xc2000ced0a, 0x0, 0x0, 0x0, > ...) > src/pkg/bufio/bufio.go:382 +0x53 > log/syslog.func·001(0xc200115028, 0xc200115020, 0xc2000ae2a0, > 0xc200115048, 0x0, ...) > src/pkg/log/syslog/syslog_test.go:63 +0x106 > created by log/syslog.runStreamSyslog > src/pkg/log/syslog/syslog_test.go:70 +0x164 > > goroutine 18 [syscall]: > syscall.Syscall6() > src/pkg/syscall/asm_darwin_amd64.s:38 +0x5 > syscall.kevent(0x1e, 0x0, 0x0, 0xc20005e488, 0xa, ...) > src/pkg/syscall/zsyscall_darwin_amd64.go:199 +0x83 > syscall.Kevent(0x1e, 0x0, 0x0, 0x0, 0xc20005e488, ...) > src/pkg/syscall/syscall_bsd.go:554 +0x9b > net.(*pollster).WaitFD(0xc20005e480, 0xc2000c4f00, 0x0, 0x0, 0x34cdb, > ...) > src/pkg/net/fd_darwin.go:101 +0x187 > net.(*pollServer).Run(0xc2000c4f00, 0x0) > src/pkg/net/fd_unix.go:212 +0x10a > created by net.newPollServer > src/pkg/net/newpollserver_unix.go:33 +0x2d5 > > goroutine 20 [chan receive]: > net.(*pollServer).WaitRead(0xc2000c4f00, 0xc2000fa1a0, 0xc20005d600, > 0x23, 0xc20005d601, ...) > src/pkg/net/fd_unix.go:244 +0x63 > net.(*netFD).accept(0xc2000fa1a0, 0xb0ac0, 0x0, 0xc20005d600, 0x23, ...) > src/pkg/net/fd_unix.go:631 +0x171 > net.(*UnixListener).AcceptUnix(0xc2000fde80, 0xc200000001, 0x450f10, > 0x31e64) > src/pkg/net/unixsock_posix.go:282 +0x49 > net.(*UnixListener).Accept(0xc2000fde80, 0x0, 0x0, 0x0, 0x0, ...) > src/pkg/net/unixsock_posix.go:293 +0x49 > log/syslog.runStreamSyslog(0xc2000a3640, 0xc2000fde80, 0xc2000cede0, > 0xc2000fdde0, 0x0, ...) > src/pkg/log/syslog/syslog_test.go:53 +0x78 > created by log/syslog.startServer > src/pkg/log/syslog/syslog_test.go:109 +0x4f5 > > goroutine 23 [runnable]: > log/syslog.func·001(0xc200000bf0, 0xc200000be8, 0xc2000ae2a0, > 0xc200000f38, 0x0, ...) > src/pkg/log/syslog/syslog_test.go:58 > created by log/syslog.runStreamSyslog > src/pkg/log/syslog/syslog_test.go:70 +0x164 > > goroutine 24 [runnable]: > log/syslog.func·001(0xc200000bf0, 0xc200000be8, 0xc2000ae2a0, > 0xc200000f58, 0x0, ...) > src/pkg/log/syslog/syslog_test.go:58 > created by log/syslog.runStreamSyslog > src/pkg/log/syslog/syslog_test.go:70 +0x164 > > goroutine 25 [runnable]: > log/syslog.func·001(0xc200000bf0, 0xc200000be8, 0xc2000ae2a0, > 0xc200000f78, 0x0, ...) > src/pkg/log/syslog/syslog_test.go:58 > created by log/syslog.runStreamSyslog > src/pkg/log/syslog/syslog_test.go:70 +0x164 > > goroutine 26 [runnable]: > log/syslog.func·001(0xc200000bf0, 0xc200000be8, 0xc2000ae2a0, > 0xc200000f98, 0x0, ...) > src/pkg/log/syslog/syslog_test.go:58 > created by log/syslog.runStreamSyslog > src/pkg/log/syslog/syslog_test.go:70 +0x164 > > goroutine 27 [runnable]: > log/syslog.func·001(0xc200000bf0, 0xc200000be8, 0xc2000ae2a0, > 0xc200000fb8, 0x0, ...) > src/pkg/log/syslog/syslog_test.go:58 > created by log/syslog.runStreamSyslog > src/pkg/log/syslog/syslog_test.go:70 +0x164 > > goroutine 28 [runnable]: > log/syslog.func·001(0xc200000bf0, 0xc200000be8, 0xc2000ae2a0, > 0xc200000fd8, 0x0, ...) > src/pkg/log/syslog/syslog_test.go:58 > created by log/syslog.runStreamSyslog > src/pkg/log/syslog/syslog_test.go:70 +0x164 > > goroutine 29 [runnable]: > log/syslog.func·001(0xc200000bf0, 0xc200000be8, 0xc2000ae2a0, > 0xc200000ff8, 0x0, ...) > src/pkg/log/syslog/syslog_test.go:58 > created by log/syslog.runStreamSyslog > src/pkg/log/syslog/syslog_test.go:70 +0x164 > > goroutine 30 [runnable]: > log/syslog.func·001(0xc200000bf0, 0xc200000be8, 0xc2000ae2a0, > 0xc200115118, 0x0, ...) > src/pkg/log/syslog/syslog_test.go:58 > created by log/syslog.runStreamSyslog > src/pkg/log/syslog/syslog_test.go:70 +0x164 > > goroutine 31 [runnable]: > log/syslog.func·001(0xc200000bf0, 0xc200000be8, 0xc2000ae2a0, > 0xc200115138, 0x0, ...) > src/pkg/log/syslog/syslog_test.go:58 > created by log/syslog.runStreamSyslog > src/pkg/log/syslog/syslog_test.go:70 +0x164 > exit status 2 > FAIL log/syslog 2.050s > > > https://codereview.appspot.com/7314057/
Sign in to reply to this message.
On 2013/2/17 <dvyukov@google.com> wrote: > I still see the panic (on Darwin *and* with some scheduler changes): > > $ go test -v -cpu=1,2,5,7,9 log/syslog > === RUN TestWithSimulated-2 > panic: runtime error: send on closed channel Please see whether https://codereview.appspot.com/7322089 solves the issue. However the log is misleading: I don't understand how this panic can occur in TestWithSimulated given that this test doesn't close any channel. Rémy.
Sign in to reply to this message.
On Sun, Feb 17, 2013 at 2:00 PM, Rémy Oudompheng <remyoudompheng@gmail.com> wrote: > On 2013/2/17 <dvyukov@google.com> wrote: >> I still see the panic (on Darwin *and* with some scheduler changes): >> >> $ go test -v -cpu=1,2,5,7,9 log/syslog >> === RUN TestWithSimulated-2 >> panic: runtime error: send on closed channel > > Please see whether https://codereview.appspot.com/7322089 solves the issue. > > However the log is misleading: I don't understand how this panic can > occur in TestWithSimulated given that this test doesn't close any > channel. Perhaps runStreamSyslog() leaked from a previous test.
Sign in to reply to this message.
I'm not sure that any of the builders test with this option, not even @fullungs torture test. On 17/02/2013, at 21:11, Dmitry Vyukov <dvyukov@google.com> wrote: > On Sun, Feb 17, 2013 at 2:00 PM, Rémy Oudompheng > <remyoudompheng@gmail.com> wrote: >> On 2013/2/17 <dvyukov@google.com> wrote: >>> I still see the panic (on Darwin *and* with some scheduler changes): >>> >>> $ go test -v -cpu=1,2,5,7,9 log/syslog >>> === RUN TestWithSimulated-2 >>> panic: runtime error: send on closed channel >> >> Please see whether https://codereview.appspot.com/7322089 solves the issue. >> >> However the log is misleading: I don't understand how this panic can >> occur in TestWithSimulated given that this test doesn't close any >> channel. > > > Perhaps runStreamSyslog() leaked from a previous test.
Sign in to reply to this message.
On Sun, Feb 17, 2013 at 2:00 PM, Rémy Oudompheng <remyoudompheng@gmail.com> wrote: > On 2013/2/17 <dvyukov@google.com> wrote: >> I still see the panic (on Darwin *and* with some scheduler changes): >> >> $ go test -v -cpu=1,2,5,7,9 log/syslog >> === RUN TestWithSimulated-2 >> panic: runtime error: send on closed channel > > Please see whether https://codereview.appspot.com/7322089 solves the issue. Seems that it helps. The test runs for >30min w/o crashes. > > However the log is misleading: I don't understand how this panic can > occur in TestWithSimulated given that this test doesn't close any > channel. > > Rémy.
Sign in to reply to this message.
Hello On Sunday, February 17, 2013 12:17:37 PM UTC+2, Dave Cheney wrote: > > I'm not sure that any of the builders test with this option, not even > @fullungs torture test. For what it's worth, I currently run: for i in `seq 1 5`; do export GOMAXPROCS=$[ 1 + $[ RANDOM % 128 ]] ./run.bash --no-rebuild done go test -v -short -cpu 1,2,4 std go test -v -cpu 1,2,4 std for i in `seq 1 3`; do export GOMAXPROCS=$[ 1 + $[ RANDOM % 128 ]] time go test -v -race -short std done go test -v -race -short -cpu 1,2,4 std cpus=$[ 1 + $[ RANDOM % 32 ]] go test -v -race -run=XXX -bench=.* -benchtime=.1s -cpu=$cpus std I don't run: # not quite sure why... I think a few tests still take too long go test -v -race std #http://code.google.com/p/go/issues/detail?id=4703 #http://code.google.com/p/go/issues/detail?id=4715 go test -v -short -cpu 1,2,4 code.google.com/... go test -v -cpu 1,2,4 code.google.com/... go test -race -short -cpu 1,2,4 code.google.com/... It hasn't picked up this latest log/syslog issue. Just spotted this for the first time though: === RUN TestFreeOSMemory-4 --- FAIL: TestFreeOSMemory-4 (0.00 seconds) garbage_test.go:85: released before=1048576; released after=1048576; did not go up Regards Albert
Sign in to reply to this message.
On Sun, Feb 17, 2013 at 10:31 PM, Albert Strasheim <fullung@gmail.com> wrote: > Hello > > > On Sunday, February 17, 2013 12:17:37 PM UTC+2, Dave Cheney wrote: >> >> I'm not sure that any of the builders test with this option, not even >> @fullungs torture test. > > > For what it's worth, I currently run: > > for i in `seq 1 5`; do > export GOMAXPROCS=$[ 1 + $[ RANDOM % 128 ]] > ./run.bash --no-rebuild > done > > go test -v -short -cpu 1,2,4 std > go test -v -cpu 1,2,4 std > > for i in `seq 1 3`; do > export GOMAXPROCS=$[ 1 + $[ RANDOM % 128 ]] > time go test -v -race -short std > done > > go test -v -race -short -cpu 1,2,4 std > > cpus=$[ 1 + $[ RANDOM % 32 ]] go test -v -race -run=XXX -bench=.* > -benchtime=.1s -cpu=$cpus std > > I don't run: > > # not quite sure why... I think a few tests still take too long > go test -v -race std > > #http://code.google.com/p/go/issues/detail?id=4703 > #http://code.google.com/p/go/issues/detail?id=4715 > go test -v -short -cpu 1,2,4 code.google.com/... > go test -v -cpu 1,2,4 code.google.com/... > go test -race -short -cpu 1,2,4 code.google.com/... > > It hasn't picked up this latest log/syslog issue. Just spotted this for the > first time though: > > === RUN TestFreeOSMemory-4 > --- FAIL: TestFreeOSMemory-4 (0.00 seconds) > garbage_test.go:85: released before=1048576; released after=1048576; did not > go up Here is the fix: http://codereview.appspot.com/7319050
Sign in to reply to this message.
|
