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

misc/gdb: breakpoints break things #7803

Open
alberts opened this issue Apr 17, 2014 · 4 comments
Open

misc/gdb: breakpoints break things #7803

alberts opened this issue Apr 17, 2014 · 4 comments
Milestone

Comments

@alberts
Copy link
Contributor

alberts commented Apr 17, 2014

What steps reproduce the problem?

hg clone tip
cd $GOROOT/src
./make.bash
cd pkg/net/http
go test -c
gdb ./http.test
break strings.Repeat
run

What happened?

Reading symbols from /home/albert/go/src/pkg/net/http/http.test...done.
Loading Go Runtime support.
(gdb) break strings.Repeat
Breakpoint 1 at 0x535cfb: strings.Repeat. (2 locations)
(gdb) run
Starting program: /home/albert/go/src/pkg/net/http/http.test 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7ffff7e2b700 (LWP 12059)]
runtime: unexpected return pc for flag.(*FlagSet).parseOne called from 0x1a
runtime: unexpected return pc for flag.(*FlagSet).parseOne called from 0x1a
fatal error: unknown caller pc

runtime stack:
runtime.throw(0xa0b471)
    /home/albert/go/src/pkg/runtime/panic.c:520 +0x69 fp=0x7fffffffd8d8
runtime.gentraceback(0x40a962, 0xc2080674a8, 0x0, 0xc208002120, 0xc200000000, 0x0,
0x7fffffff, 0x4090c0, 0x7fffffffdaa0, 0x0)
    /home/albert/go/src/pkg/runtime/traceback_x86.c:167 +0x819 fp=0x7fffffffd9a0
addstackroots(0xc208002120, 0x7fffffffdaa0)
    /home/albert/go/src/pkg/runtime/mgc0.c:1676 +0x168 fp=0x7fffffffda30
markroot(0xc20800c900, 0x2b00000005)
    /home/albert/go/src/pkg/runtime/mgc0.c:1309 +0xbe fp=0x7fffffffdab0
runtime.parfordo(0xc20800c900)
    /home/albert/go/src/pkg/runtime/parfor.c:88 +0xa3 fp=0x7fffffffdb28
gc(0xc2080674c0)
    /home/albert/go/src/pkg/runtime/mgc0.c:2387 +0x1d6 fp=0x7fffffffdc58
mgc(0xc208002120)
    /home/albert/go/src/pkg/runtime/mgc0.c:2329 +0x2e fp=0x7fffffffdc68
runtime.mcall(0x42b587)
    /home/albert/go/src/pkg/runtime/asm_amd64.s:181 +0x4b fp=0x7fffffffdc78

goroutine 16 [garbage collection]:
runtime.gc(0xc200000000)
    /home/albert/go/src/pkg/runtime/mgc0.c:2309 +0x1b2 fp=0xc2080674d0
runtime.mallocgc(0xbdc000, 0x6ff561, 0x1)
    /home/albert/go/src/pkg/runtime/malloc.goc:204 +0x1d6 fp=0xc208067538
cnew(0x6ff560, 0xbdb328, 0x1)
    /home/albert/go/src/pkg/runtime/malloc.goc:835 +0xc1 fp=0xc208067558
runtime.cnewarray(0x6ff560, 0xbdb328)
    /home/albert/go/src/pkg/runtime/malloc.goc:848 +0x3a fp=0xc208067578
makeslice1(0x6ed6c0, 0x0, 0xbdb328, 0xc2080675d8)
    /home/albert/go/src/pkg/runtime/slice.goc:55 +0x4d fp=0xc208067590
runtime.makeslice(0x6ed6c0, 0x0, 0xbdb328, 0x0, 0x0, 0xbdb328)
    /home/albert/go/src/pkg/runtime/slice.goc:36 +0xb3 fp=0xc2080675c0
strconv.quoteWith(0x53605a, 0x7e7770, 0x22, 0x0, 0x0)
    /home/albert/go/src/pkg/strconv/quote.go:15 +0x79 fp=0xc2080676a8
strconv.Quote(0x53605a, 0x7e7770, 0x0, 0x0)
    /home/albert/go/src/pkg/strconv/quote.go:91 +0x4d fp=0xc2080676d8
fmt.(*fmt).fmt_q(0xc208026060, 0x53605a, 0x7e7770)
    /home/albert/go/src/pkg/fmt/format.go:334 +0x11f fp=0xc208067728
fmt.(*pp).fmtString(0xc208026000, 0x53605a, 0x7e7770, 0x71)
    /home/albert/go/src/pkg/fmt/print.go:517 +0xa2 fp=0xc208067758
fmt.(*pp).printArg(0xc208026000, 0x6ff160, 0xc208000f20, 0x71, 0x0, 0x0)
    /home/albert/go/src/pkg/fmt/print.go:780 +0xabb fp=0xc2080677d8
fmt.(*pp).doPrintf(0xc208026000, 0x85b1f0, 0x24, 0xc208067dd0, 0x3, 0x3)
    /home/albert/go/src/pkg/fmt/print.go:1159 +0x2044 fp=0xc208067b20
fmt.Sprintf(0x85b1f0, 0x24, 0xc208067dd0, 0x3, 0x3, 0x0, 0x0)
    /home/albert/go/src/pkg/fmt/print.go:203 +0x7c fp=0xc208067b70
fmt.Errorf(0x85b1f0, 0x24, 0xc208067dd0, 0x3, 0x3, 0x0, 0x0)
    /home/albert/go/src/pkg/fmt/print.go:212 +0x6c fp=0xc208067bc8
flag.(*FlagSet).failf(0x5432d1, 0x85b1f0, 0x24, 0xc208067dd0, 0x3, 0x3, 0x0, 0x0)
    /home/albert/go/src/pkg/flag/flag.go:694 +0x83 fp=0xc208067c68
runtime: unexpected return pc for flag.(*FlagSet).parseOne called from 0x1a
flag.(*FlagSet).parseOne(0x5432d1, 0xc20802c120, 0xc208000010, 0x0)
    /home/albert/go/src/pkg/flag/flag.go:758 +0x76a fp=0xc208067e08
created by _rt0_go
    /home/albert/go/src/pkg/runtime/asm_amd64.s:97 +0x120

goroutine 17 [runnable]:
runtime.MHeap_Scavenger()
    /home/albert/go/src/pkg/runtime/mheap.c:507 fp=0x7ffff7febfa8
runtime.goexit()
    /home/albert/go/src/pkg/runtime/proc.c:1430 fp=0x7ffff7febfb0
created by runtime.main
    /home/albert/go/src/pkg/runtime/proc.c:207

goroutine 18 [runnable]:
bgsweep()
    /home/albert/go/src/pkg/runtime/mgc0.c:1960 fp=0x7ffff7fdcfa8
runtime.goexit()
    /home/albert/go/src/pkg/runtime/proc.c:1430 fp=0x7ffff7fdcfb0
created by runtime.gc
    /home/albert/go/src/pkg/runtime/mgc0.c:2249

goroutine 19 [runnable]:
runfinq()
    /home/albert/go/src/pkg/runtime/mgc0.c:2586 fp=0x7ffff7feafa8
runtime.goexit()
    /home/albert/go/src/pkg/runtime/proc.c:1430 fp=0x7ffff7feafb0
created by runtime.gc
    /home/albert/go/src/pkg/runtime/mgc0.c:2249
[Thread 0x7ffff7e2b700 (LWP 12059) exited]
[Inferior 1 (process 12055) exited with code 02]


Please provide any additional information below.

Fedora Core 20 x86_64 with most updates installed

gdb-7.6.50.20130731-19.fc20.x86_64
@DanielMorsing
Copy link
Contributor

Comment 1:

This looks a bit like issue #6776.

@ianlancetaylor
Copy link
Contributor

Comment 2:

Labels changed: added repo-main, release-go1.3maybe.

@robpike
Copy link
Contributor

robpike commented May 19, 2014

Comment 4:

Labels changed: added release-none, removed release-go1.3maybe.

@glycerine
Copy link

Comment 5:

I suspect this issue is related to issue I'm seeing with breakpoints as well;
https://golang.org/issue/8098

@bradfitz bradfitz removed the new label Dec 18, 2014
@rsc rsc added this to the Unplanned milestone Apr 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants