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

"unexpected signal during runtime execution" error when making project1 #310

Open
shili2017 opened this issue Nov 15, 2021 · 2 comments
Open

Comments

@shili2017
Copy link

Environment:
macOS 11.5.2
go version go1.17.3 darwin/amd64

Description:
I have just completed the code of project 1 but failed to run the test by make project1. Unexpected signal occurs in kv/util/engine_util/engines.go:75:

db, err := badger.Open(opts)

Error message:

GO111MODULE=on go test -v --count=1 --parallel=1 -p=1 ./kv/server -run 1
=== RUN   TestRawGet1
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0xb01dfacedebac1e pc=0x7fff20473c9e]

runtime stack:
runtime: unexpected return pc for runtime.sigpanic called from 0x7fff20473c9e
stack: frame={sp:0x7ffeefbff6d8, fp:0x7ffeefbff728} stack=[0x7ffeefb80778,0x7ffeefbff7e0)
0x00007ffeefbff5d8:  0x01007ffeefbff5f8  0x0000000000000004 
0x00007ffeefbff5e8:  0x000000000000001f  0x00007fff20473c9e 
0x00007ffeefbff5f8:  0x0b01dfacedebac1e  0x0000000000000001 
0x00007ffeefbff608:  0x0000000004038e51 <runtime.throw+0x0000000000000071>  0x00007ffeefbff6a8 
0x00007ffeefbff618:  0x000000000492a758  0x00007ffeefbff660 
0x00007ffeefbff628:  0x0000000004039108 <runtime.fatalthrow.func1+0x0000000000000048>  0x0000000005041560 
0x00007ffeefbff638:  0x0000000000000001  0x0000000000000001 
0x00007ffeefbff648:  0x00007ffeefbff6a8  0x0000000004038e51 <runtime.throw+0x0000000000000071> 
0x00007ffeefbff658:  0x0000000005041560  0x00007ffeefbff698 
0x00007ffeefbff668:  0x0000000004039090 <runtime.fatalthrow+0x0000000000000050>  0x00007ffeefbff678 
0x00007ffeefbff678:  0x00000000040390c0 <runtime.fatalthrow.func1+0x0000000000000000>  0x0000000005041560 
0x00007ffeefbff688:  0x0000000004038e51 <runtime.throw+0x0000000000000071>  0x00007ffeefbff6a8 
0x00007ffeefbff698:  0x00007ffeefbff6c8  0x0000000004038e51 <runtime.throw+0x0000000000000071> 
0x00007ffeefbff6a8:  0x00007ffeefbff6b0  0x0000000004038e80 <runtime.throw.func1+0x0000000000000000> 
0x00007ffeefbff6b8:  0x00000000049378b5  0x000000000000002a 
0x00007ffeefbff6c8:  0x00007ffeefbff718  0x000000000404f2d6 <runtime.sigpanic+0x0000000000000396> 
0x00007ffeefbff6d8: <0x00000000049378b5  0x0000000004d93e18 
0x00007ffeefbff6e8:  0x0100000004f28b00  0x0000000005290a10 
0x00007ffeefbff6f8:  0x00000000000012c0  0x0000000005041700 
0x00007ffeefbff708:  0x0000000005290a88  0x00007ffeefbff768 
0x00007ffeefbff718:  0x00007ffeefbff760 !0x00007fff20473c9e 
0x00007ffeefbff728: >0x00007ffeefbff760  0x0000000004f14000 
0x00007ffeefbff738:  0x00000000000004bd  0x0000000004153625 <golang.org/x/sys/unix.libc_flock_trampoline+0x0000000000000005> 
0x00007ffeefbff748:  0x000000000406df3f <runtime.syscall+0x000000000000001f>  0x000000c0001374b8 
0x00007ffeefbff758:  0x000000000406d8ac <runtime.nanotime_trampoline+0x000000000000000c>  0x000000c000137488 
0x00007ffeefbff768:  0x000000000406bd90 <runtime.asmcgocall+0x0000000000000070>  0x000000000401c5f5 <runtime.SetFinalizer.func2+0x0000000000000035> 
0x00007ffeefbff778:  0x000000c0000452c0  0x00000000049653b8 
0x00007ffeefbff788:  0x0000000000000010  0x0000000004822560 
0x00007ffeefbff798:  0x0000000000000ba0  0x000000c0001036c0 
0x00007ffeefbff7a8:  0x0000000004069ea9 <runtime.systemstack+0x0000000000000049>  0x0000000000000004 
0x00007ffeefbff7b8:  0x0000000004a074d8  0x0000000005041560 
0x00007ffeefbff7c8:  0x00007ffeefbff810  0x0000000004069da5 <runtime.mstart+0x0000000000000005> 
0x00007ffeefbff7d8:  0x0000000004069d5d <runtime.rt0_go+0x000000000000013d> 
runtime.throw({0x49378b5, 0x4d93e18})
        /usr/local/go/src/runtime/panic.go:1198 +0x71
runtime: unexpected return pc for runtime.sigpanic called from 0x7fff20473c9e
stack: frame={sp:0x7ffeefbff6d8, fp:0x7ffeefbff728} stack=[0x7ffeefb80778,0x7ffeefbff7e0)
0x00007ffeefbff5d8:  0x01007ffeefbff5f8  0x0000000000000004 
0x00007ffeefbff5e8:  0x000000000000001f  0x00007fff20473c9e 
0x00007ffeefbff5f8:  0x0b01dfacedebac1e  0x0000000000000001 
0x00007ffeefbff608:  0x0000000004038e51 <runtime.throw+0x0000000000000071>  0x00007ffeefbff6a8 
0x00007ffeefbff618:  0x000000000492a758  0x00007ffeefbff660 
0x00007ffeefbff628:  0x0000000004039108 <runtime.fatalthrow.func1+0x0000000000000048>  0x0000000005041560 
0x00007ffeefbff638:  0x0000000000000001  0x0000000000000001 
0x00007ffeefbff648:  0x00007ffeefbff6a8  0x0000000004038e51 <runtime.throw+0x0000000000000071> 
0x00007ffeefbff658:  0x0000000005041560  0x00007ffeefbff698 
0x00007ffeefbff668:  0x0000000004039090 <runtime.fatalthrow+0x0000000000000050>  0x00007ffeefbff678 
0x00007ffeefbff678:  0x00000000040390c0 <runtime.fatalthrow.func1+0x0000000000000000>  0x0000000005041560 
0x00007ffeefbff688:  0x0000000004038e51 <runtime.throw+0x0000000000000071>  0x00007ffeefbff6a8 
0x00007ffeefbff698:  0x00007ffeefbff6c8  0x0000000004038e51 <runtime.throw+0x0000000000000071> 
0x00007ffeefbff6a8:  0x00007ffeefbff6b0  0x0000000004038e80 <runtime.throw.func1+0x0000000000000000> 
0x00007ffeefbff6b8:  0x00000000049378b5  0x000000000000002a 
0x00007ffeefbff6c8:  0x00007ffeefbff718  0x000000000404f2d6 <runtime.sigpanic+0x0000000000000396> 
0x00007ffeefbff6d8: <0x00000000049378b5  0x0000000004d93e18 
0x00007ffeefbff6e8:  0x0100000004f28b00  0x0000000005290a10 
0x00007ffeefbff6f8:  0x00000000000012c0  0x0000000005041700 
0x00007ffeefbff708:  0x0000000005290a88  0x00007ffeefbff768 
0x00007ffeefbff718:  0x00007ffeefbff760 !0x00007fff20473c9e 
0x00007ffeefbff728: >0x00007ffeefbff760  0x0000000004f14000 
0x00007ffeefbff738:  0x00000000000004bd  0x0000000004153625 <golang.org/x/sys/unix.libc_flock_trampoline+0x0000000000000005> 
0x00007ffeefbff748:  0x000000000406df3f <runtime.syscall+0x000000000000001f>  0x000000c0001374b8 
0x00007ffeefbff758:  0x000000000406d8ac <runtime.nanotime_trampoline+0x000000000000000c>  0x000000c000137488 
0x00007ffeefbff768:  0x000000000406bd90 <runtime.asmcgocall+0x0000000000000070>  0x000000000401c5f5 <runtime.SetFinalizer.func2+0x0000000000000035> 
0x00007ffeefbff778:  0x000000c0000452c0  0x00000000049653b8 
0x00007ffeefbff788:  0x0000000000000010  0x0000000004822560 
0x00007ffeefbff798:  0x0000000000000ba0  0x000000c0001036c0 
0x00007ffeefbff7a8:  0x0000000004069ea9 <runtime.systemstack+0x0000000000000049>  0x0000000000000004 
0x00007ffeefbff7b8:  0x0000000004a074d8  0x0000000005041560 
0x00007ffeefbff7c8:  0x00007ffeefbff810  0x0000000004069da5 <runtime.mstart+0x0000000000000005> 
0x00007ffeefbff7d8:  0x0000000004069d5d <runtime.rt0_go+0x000000000000013d> 
runtime.sigpanic()
        /usr/local/go/src/runtime/signal_unix.go:719 +0x396

goroutine 12 [syscall]:
syscall.syscall(0x4153620, 0x6, 0x6, 0x0)
        /usr/local/go/src/runtime/sys_darwin.go:22 +0x3b fp=0xc0001374b8 sp=0xc000137498 pc=0x40689db
syscall.syscall(0xc00007b520, 0x0, 0xc000000000, 0x1b)
        <autogenerated>:1 +0x26 fp=0xc000137500 sp=0xc0001374b8 pc=0x406e786
golang.org/x/sys/unix.Flock(0xc000038f48, 0x16)
        /Users/lishi/go/pkg/mod/golang.org/x/sys@v0.0.0-20191120155948-bd437916bb0e/unix/zsyscall_darwin_amd64.go:1150 +0x38 fp=0xc000137530 sp=0xc000137500 pc=0x4153278
github.com/Connor1996/badger.acquireDirectoryLock({0xc000038f48, 0x16}, {0x490bd05, 0x0}, 0x0)
        /Users/lishi/go/pkg/mod/github.com/!connor1996/badger@v1.5.1-0.20210202034640-5ff470f827f8/dir_unix.go:61 +0x125 fp=0xc0001375f0 sp=0xc000137530 pc=0x4377665
github.com/Connor1996/badger.Open({{0xc000038f48, 0x16}, {0xc000038f48, 0x16}, 0x1, 0x1, 0x0, 0x4000000, 0x20, 0x5, ...})
        /Users/lishi/go/pkg/mod/github.com/!connor1996/badger@v1.5.1-0.20210202034640-5ff470f827f8/db.go:214 +0x3c5 fp=0xc000137ad8 sp=0xc0001375f0 pc=0x43709c5
github.com/pingcap-incubator/tinykv/kv/util/engine_util.CreateDB({0xc000038f48, 0x16}, 0x0)
        /Users/lishi/JI/2021FA/tinykv/kv/util/engine_util/engines.go:75 +0x158 fp=0xc000137d58 sp=0xc000137ad8 pc=0x4395138
github.com/pingcap-incubator/tinykv/kv/storage/standalone_storage.NewStandAloneStorage(0xc00037adc0)
        /Users/lishi/JI/2021FA/tinykv/kv/storage/standalone_storage/standalone_storage.go:26 +0x6d fp=0xc000137da8 sp=0xc000137d58 pc=0x46c056d
github.com/pingcap-incubator/tinykv/kv/server.TestRawGet1(0x4009699)
        /Users/lishi/JI/2021FA/tinykv/kv/server/server_test.go:52 +0xd9 fp=0xc000137f70 sp=0xc000137da8 pc=0x46cfe79
testing.tRunner(0xc0003cc4e0, 0x4964a50)
        /usr/local/go/src/testing/testing.go:1259 +0x102 fp=0xc000137fc0 sp=0xc000137f70 pc=0x4108be2
testing.(*T).Run·dwrap·21()
        /usr/local/go/src/testing/testing.go:1306 +0x2a fp=0xc000137fe0 sp=0xc000137fc0 pc=0x41098ea
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:1581 +0x1 fp=0xc000137fe8 sp=0xc000137fe0 pc=0x406c081
created by testing.(*T).Run
        /usr/local/go/src/testing/testing.go:1306 +0x35a

goroutine 1 [chan receive]:
testing.(*T).Run(0xc0003cc340, {0x4913e7a, 0xfae10491a09d8}, 0x4964a50)
        /usr/local/go/src/testing/testing.go:1307 +0x375
testing.runTests.func1(0xc0003c2720)
        /usr/local/go/src/testing/testing.go:1598 +0x6e
testing.tRunner(0xc0003cc340, 0xc0002f3d18)
        /usr/local/go/src/testing/testing.go:1259 +0x102
testing.runTests(0xc0000ca700, {0x5014940, 0xa, 0xa}, {0x408b1ed, 0x491776a, 0x5040be0})
        /usr/local/go/src/testing/testing.go:1596 +0x43f
testing.(*M).Run(0xc0000ca700)
        /usr/local/go/src/testing/testing.go:1504 +0x51d
main.main()
        _testmain.go:61 +0x14b
FAIL    github.com/pingcap-incubator/tinykv/kv/server   0.760s
FAIL
make: *** [project1] Error 1
@Veeupup
Copy link

Veeupup commented Nov 15, 2021

I have encountered this problem before.
just downgrade go version to 1.16 and it will be ok.

@shili2017
Copy link
Author

Perfectly solve my problem. Many thanks!!

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

2 participants