Skip to content

runtime: another deadlock issue maybe #5055

@alberts

Description

@alberts
What steps will reproduce the problem?

running an internal test

will try to factor it out when I can reproduce it

What do you see instead?

program is stuck doing this:

[pid 18251] select(0, NULL, NULL, NULL, {0, 10000}) = 0 (Timeout)
[pid 18251] select(0, NULL, NULL, NULL, {0, 10000}) = 0 (Timeout)
[pid 18251] select(0, NULL, NULL, NULL, {0, 10000}) = 0 (Timeout)
[pid 18251] select(0, NULL, NULL, NULL, {0, 10000}) = 0 (Timeout)
[pid 18251] select(0, NULL, NULL, NULL, {0, 10000}) = 0 (Timeout)
[pid 18251] select(0, NULL, NULL, NULL, {0, 10000}) = 0 (Timeout)

gdb backtraces:

Thread 4 (Thread 0x7f820101e700 (LWP 18251)):
#0  runtime.usleep (usec=void) at /build/go/go/src/pkg/runtime/sys_linux_amd64.s:76
#1  0x00000000004176a7 in sysmon () at /build/go/go/src/pkg/runtime/proc.c:1989
#2  0x00000000004145c2 in runtime.mstart () at /build/go/go/src/pkg/runtime/proc.c:485
#3  0x00000000006115c4 in crosscall_amd64 ()
#4  0x0000000000000003 in ?? ()
#5  0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7f820071a700 (LWP 18256)):
#0  runtime.futex () at /build/go/go/src/pkg/runtime/sys_linux_amd64.s:267
#1  0x000000000041baf9 in runtime.futexsleep (addr=void, val=void, ns=void) at
/build/go/go/src/pkg/runtime/thread_linux.c:58
#2  0x000000000040aa49 in runtime.notesleep (n=void) at
/build/go/go/src/pkg/runtime/lock_futex.c:125
#3  0x0000000000414bcf in stopm () at /build/go/go/src/pkg/runtime/proc.c:794
#4  0x00000000004163f8 in exitsyscall0 (gp=void) at
/build/go/go/src/pkg/runtime/proc.c:1407
#5  0x0000000000421559 in runtime.mcall (fn=void) at
/build/go/go/src/pkg/runtime/asm_amd64.s:194
#6  0x000000c2000c1000 in ?? ()
#7  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7f81fff19700 (LWP 18257)):
#0  bytes.(*Buffer).Read (b=0xc20016d000, p= []uint8 = {...}, n=0, err=0) at
/build/go/go/src/pkg/bytes/buffer.go:256
#1  0x00000000004967ba in foo.bytesBuffer.Read (this=..., p·4= []uint8 = {...}, n·1=0,
err·2=0)
#2  0x000000000049838e in foo.start (this=0xc2000bbc00) at foo.go:36
#3  0x0000000000415b90 in ?? () at /build/go/go/src/pkg/runtime/proc.c:1209
#4  0x000000c2000bbc00 in ?? ()
#5  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f8211802700 (LWP 18241)):
#0  runtime.futex () at /build/go/go/src/pkg/runtime/sys_linux_amd64.s:267
#1  0x000000000041baf9 in runtime.futexsleep (addr=void, val=void, ns=void) at
/build/go/go/src/pkg/runtime/thread_linux.c:58
#2  0x000000000040aa49 in runtime.notesleep (n=void) at
/build/go/go/src/pkg/runtime/lock_futex.c:125
#3  0x0000000000414bcf in stopm () at /build/go/go/src/pkg/runtime/proc.c:794
#4  0x00000000004163f8 in exitsyscall0 (gp=void) at
/build/go/go/src/pkg/runtime/proc.c:1407
#5  0x0000000000421559 in runtime.mcall (fn=void) at
/build/go/go/src/pkg/runtime/asm_amd64.s:194
#6  0x00000000009c6fa0 in runtime.g0 ()
#7  0x0000000000421421 in _rt0_amd64 () at /build/go/go/src/pkg/runtime/asm_amd64.s:85
#8  0x0000000000000004 in ?? ()
#9  0x00007fffabf93018 in ?? ()
#10 0x0000000000000004 in ?? ()
#11 0x00007fffabf93018 in ?? ()
#12 0x0000000000000000 in ?? ()

Which compiler are you using (5g, 6g, 8g, gccgo)?

6g

Which operating system are you using?

linux

Which version are you using?  (run 'go version')

go version devel +90c75b8f9526 Wed Mar 13 23:32:12 2013 -0400

Please provide any additional information below.

looks a bit like issue #5025, but not quite.

I'm going to try to get a smaller sample that shows the problem.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions