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

boltdb Cursor.Seek causes segfault. #2304

Closed
RobinGeuze opened this issue Jul 8, 2017 · 4 comments
Closed

boltdb Cursor.Seek causes segfault. #2304

RobinGeuze opened this issue Jul 8, 2017 · 4 comments

Comments

@RobinGeuze
Copy link

RobinGeuze commented Jul 8, 2017

Version

Microsoft Windows [Version 10.0.15063]
go version go1.8.3 linux/amd64

Steps to reproduce

  1. Create a new go project
  2. Put the following code in main.go:
package main

import (
	"fmt"
	"log"
	"os"

	"github.com/boltdb/bolt"
)

func main() {
	os.Remove("test.db")
	db, err := bolt.Open("test.db", 0600, nil)
	if err != nil {
		log.Fatal(err)
	}
	defer db.Close()

	db.Update(func(tx *bolt.Tx) error {
		_, err := tx.CreateBucket([]byte("MyBucket"))
		if err != nil {
			return fmt.Errorf("create bucket: %s", err)
		}
		return err
	})

	db.View(func(tx *bolt.Tx) error {
		b := tx.Bucket([]byte("MyBucket"))

		c := b.Cursor()

		c.Seek([]byte("test"))

		return nil
	})
	os.Remove("test.db")
}
  1. ensure github.com/boltdb/bolt is installed either via go get or in your vendor dir.
  2. execute go build
  3. run the binary

Result

The binary runs fine when build on windows itself or a normal Linux install but produces the following segfault on Bash for Windows:

fatal error: fault
[signal SIGSEGV: segmentation violation code=0x2 addr=0x7f8d2e0c4008 pc=0x4970e9]

goroutine 1 [running]:
runtime.throw(0x4db4d7, 0x5)
        /usr/local/go/src/runtime/panic.go:596 +0x95 fp=0xc420037bb0 sp=0xc420037b90
runtime.sigpanic()
        /usr/local/go/src/runtime/signal_unix.go:297 +0x28c fp=0xc420037c00 sp=0xc420037bb0
bolttest/vendor/github.com/boltdb/bolt.(*Cursor).search(0xc420037da8, 0xc420037e80, 0x8, 0x20, 0x4)
        /home/robing/go/src/bolttest/vendor/github.com/boltdb/bolt/cursor.go:255 +0x69 fp=0xc420037cc8 sp=0xc420037c00
bolttest/vendor/github.com/boltdb/bolt.(*Cursor).seek(0xc420037da8, 0xc420037e80, 0x8, 0x20, 0x0, 0x0, 0xc42000c040, 0x0, 0x550420, 0xc4200860e0, ...)
        /home/robing/go/src/bolttest/vendor/github.com/boltdb/bolt/cursor.go:159 +0xb1 fp=0xc420037d18 sp=0xc420037cc8
bolttest/vendor/github.com/boltdb/bolt.(*Bucket).Bucket(0xc4200860f8, 0xc420037e80, 0x8, 0x20, 0xc420037e80)
        /home/robing/go/src/bolttest/vendor/github.com/boltdb/bolt/bucket.go:112 +0x108 fp=0xc420037dd8 sp=0xc420037d18
bolttest/vendor/github.com/boltdb/bolt.(*Tx).Bucket(0xc4200860e0, 0xc420037e80, 0x8, 0x20, 0x8)
        /home/robing/go/src/bolttest/vendor/github.com/boltdb/bolt/tx.go:101 +0x4f fp=0xc420037e10 sp=0xc420037dd8
main.main.func2(0xc4200860e0, 0x4e25d0, 0xc4200860e0)
        /home/robing/go/src/bolttest/main.go:28 +0x81 fp=0xc420037ed8 sp=0xc420037e10
bolttest/vendor/github.com/boltdb/bolt.(*DB).View(0xc420080000, 0x4e2640, 0x0, 0x0)
        /home/robing/go/src/bolttest/vendor/github.com/boltdb/bolt/db.go:626 +0x9f fp=0xc420037f28 sp=0xc420037ed8
main.main()
        /home/robing/go/src/bolttest/main.go:35 +0x119 fp=0xc420037f88 sp=0xc420037f28
runtime.main()
        /usr/local/go/src/runtime/proc.go:185 +0x20a fp=0xc420037fe0 sp=0xc420037f88
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:2197 +0x1 fp=0xc420037fe8 sp=0xc420037fe0

strace:

execve("./bolttest", ["./bolttest"], [/* 18 vars */]) = 0
arch_prctl(ARCH_SET_FS, 0x550488)       = 0
sched_getaffinity(0, 8192, [f, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...]) = 64
mmap(0xc000000000, 65536, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xc000000000
munmap(0xc000000000, 65536)             = 0
mmap(NULL, 262144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc11b7b0000
mmap(0xc420000000, 1048576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xc420000000
mmap(0xc41fff8000, 32768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xc41fff8000
mmap(0xc000000000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xc000000000
mmap(NULL, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc11b7a0000
clock_gettime(CLOCK_MONOTONIC, {1000, 849492000}) = 0
mmap(NULL, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc11b790000
clock_gettime(CLOCK_MONOTONIC, {1000, 849864000}) = 0
clock_gettime(CLOCK_MONOTONIC, {1000, 850022000}) = 0
clock_gettime(CLOCK_MONOTONIC, {1000, 850174000}) = 0
clock_gettime(CLOCK_MONOTONIC, {1000, 850333000}) = 0
clock_gettime(CLOCK_MONOTONIC, {1000, 850488000}) = 0
clock_gettime(CLOCK_MONOTONIC, {1000, 850649000}) = 0
clock_gettime(CLOCK_MONOTONIC, {1000, 850805000}) = 0
clock_gettime(CLOCK_MONOTONIC, {1000, 850960000}) = 0
clock_gettime(CLOCK_MONOTONIC, {1000, 851126000}) = 0
clock_gettime(CLOCK_MONOTONIC, {1000, 851289000}) = 0
clock_gettime(CLOCK_MONOTONIC, {1000, 851474000}) = 0
clock_gettime(CLOCK_MONOTONIC, {1000, 851633000}) = 0
clock_gettime(CLOCK_MONOTONIC, {1000, 851810000}) = 0
clock_gettime(CLOCK_MONOTONIC, {1000, 851965000}) = 0
rt_sigprocmask(SIG_SETMASK, NULL, [], 8) = 0
clock_gettime(CLOCK_MONOTONIC, {1000, 852440000}) = 0
clock_gettime(CLOCK_MONOTONIC, {1000, 852653000}) = 0
sigaltstack(NULL, {ss_sp=NULL, ss_flags=SS_DISABLE, ss_size=0}) = 0
sigaltstack({ss_sp=0xc420002000, ss_flags=0, ss_size=32672}, NULL) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
gettid()                                = 8057
rt_sigaction(SIGHUP, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f8caea254b0}, 8) = 0
rt_sigaction(SIGHUP, {0x44f510, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x44f640}, NULL, 8) = 0
rt_sigaction(SIGINT, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f8caea254b0}, 8) = 0
rt_sigaction(SIGINT, {0x44f510, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x44f640}, NULL, 8) = 0
rt_sigaction(SIGQUIT, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f8caea254b0}, 8) = 0
rt_sigaction(SIGQUIT, {0x44f510, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x44f640}, NULL, 8) = 0
rt_sigaction(SIGILL, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f8caea254b0}, 8) = 0
rt_sigaction(SIGILL, {0x44f510, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x44f640}, NULL, 8) = 0
rt_sigaction(SIGTRAP, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f8caea254b0}, 8) = 0
rt_sigaction(SIGTRAP, {0x44f510, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x44f640}, NULL, 8) = 0
rt_sigaction(SIGABRT, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f8caea254b0}, 8) = 0
rt_sigaction(SIGABRT, {0x44f510, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x44f640}, NULL, 8) = 0
rt_sigaction(SIGBUS, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f8caea254b0}, 8) = 0
rt_sigaction(SIGBUS, {0x44f510, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x44f640}, NULL, 8) = 0
rt_sigaction(SIGFPE, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f8caea254b0}, 8) = 0
rt_sigaction(SIGFPE, {0x44f510, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x44f640}, NULL, 8) = 0
rt_sigaction(SIGUSR1, NULL, {SIG_DFL, [], SA_RESTORER|SA_INTERRUPT|SA_SIGINFO, 0x7f8caea254b0}, 8) = 0
rt_sigaction(SIGUSR1, {0x44f510, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x44f640}, NULL, 8) = 0
rt_sigaction(SIGSEGV, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f8caea254b0}, 8) = 0
rt_sigaction(SIGSEGV, {0x44f510, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x44f640}, NULL, 8) = 0
rt_sigaction(SIGUSR2, NULL, {SIG_DFL, [], SA_RESTORER|SA_INTERRUPT|SA_SIGINFO, 0x7f8caea254b0}, 8) = 0
rt_sigaction(SIGUSR2, {0x44f510, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x44f640}, NULL, 8) = 0
rt_sigaction(SIGPIPE, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f8caea254b0}, 8) = 0
rt_sigaction(SIGPIPE, {0x44f510, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x44f640}, NULL, 8) = 0
rt_sigaction(SIGALRM, NULL, {SIG_DFL, [], SA_RESTORER|SA_INTERRUPT, 0x7f8caea254b0}, 8) = 0
rt_sigaction(SIGALRM, {0x44f510, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x44f640}, NULL, 8) = 0
rt_sigaction(SIGTERM, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f8caea254b0}, 8) = 0
rt_sigaction(SIGTERM, {0x44f510, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x44f640}, NULL, 8) = 0
rt_sigaction(SIGSTKFLT, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f8fe16654b0}, 8) = 0
rt_sigaction(SIGSTKFLT, {0x44f510, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x44f640}, NULL, 8) = 0
rt_sigaction(SIGCHLD, NULL, {SIG_DFL, [CHLD], SA_RESTORER|SA_RESTART, 0x7f941c8654b0}, 8) = 0
rt_sigaction(SIGCHLD, {0x44f510, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x44f640}, NULL, 8) = 0
rt_sigaction(SIGURG, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f8fe16654b0}, 8) = 0
rt_sigaction(SIGURG, {0x44f510, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x44f640}, NULL, 8) = 0
rt_sigaction(SIGXCPU, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f8caea254b0}, 8) = 0
rt_sigaction(SIGXCPU, {0x44f510, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x44f640}, NULL, 8) = 0
rt_sigaction(SIGXFSZ, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f8caea254b0}, 8) = 0
rt_sigaction(SIGXFSZ, {0x44f510, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x44f640}, NULL, 8) = 0
rt_sigaction(SIGVTALRM, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f8caea254b0}, 8) = 0
rt_sigaction(SIGVTALRM, {0x44f510, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x44f640}, NULL, 8) = 0
rt_sigaction(SIGPROF, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f8fe16654b0}, 8) = 0
rt_sigaction(SIGPROF, {0x44f510, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x44f640}, NULL, 8) = 0
rt_sigaction(SIGWINCH, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f8caea254b0}, 8) = 0
rt_sigaction(SIGWINCH, {0x44f510, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x44f640}, NULL, 8) = 0
rt_sigaction(SIGIO, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f8fe16654b0}, 8) = 0
rt_sigaction(SIGIO, {0x44f510, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x44f640}, NULL, 8) = 0
rt_sigaction(SIGPWR, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f8fe16654b0}, 8) = 0
rt_sigaction(SIGPWR, {0x44f510, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x44f640}, NULL, 8) = 0
rt_sigaction(SIGSYS, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f8caea254b0}, 8) = 0
rt_sigaction(SIGSYS, {0x44f510, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x44f640}, NULL, 8) = 0
rt_sigaction(SIGRTMIN, NULL, {SIG_DFL, [], SA_RESTORER|SA_SIGINFO, 0x7f140c1c1390}, 8) = 0
rt_sigaction(SIGRT_1, NULL, {SIG_DFL, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x7f140c1c1390}, 8) = 0
rt_sigaction(SIGRT_2, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f8fe16654b0}, 8) = 0
rt_sigaction(SIGRT_2, {0x44f510, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x44f640}, NULL, 8) = 0
rt_sigaction(SIGRT_3, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f8fe16654b0}, 8) = 0
rt_sigaction(SIGRT_3, {0x44f510, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x44f640}, NULL, 8) = 0
rt_sigaction(SIGRT_4, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f8fe16654b0}, 8) = 0
rt_sigaction(SIGRT_4, {0x44f510, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x44f640}, NULL, 8) = 0
rt_sigaction(SIGRT_5, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f8fe16654b0}, 8) = 0
rt_sigaction(SIGRT_5, {0x44f510, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x44f640}, NULL, 8) = 0
rt_sigaction(SIGRT_6, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f8fe16654b0}, 8) = 0
rt_sigaction(SIGRT_6, {0x44f510, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x44f640}, NULL, 8) = 0
rt_sigaction(SIGRT_7, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f8fe16654b0}, 8) = 0
rt_sigaction(SIGRT_7, {0x44f510, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x44f640}, NULL, 8) = 0
rt_sigaction(SIGRT_8, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f8fe16654b0}, 8) = 0
rt_sigaction(SIGRT_8, {0x44f510, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x44f640}, NULL, 8) = 0
rt_sigaction(SIGRT_9, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f8fe16654b0}, 8) = 0
rt_sigaction(SIGRT_9, {0x44f510, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x44f640}, NULL, 8) = 0
rt_sigaction(SIGRT_10, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f8fe16654b0}, 8) = 0
rt_sigaction(SIGRT_10, {0x44f510, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x44f640}, NULL, 8) = 0
rt_sigaction(SIGRT_11, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f8fe16654b0}, 8) = 0
rt_sigaction(SIGRT_11, {0x44f510, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x44f640}, NULL, 8) = 0
rt_sigaction(SIGRT_12, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f8fe16654b0}, 8) = 0
rt_sigaction(SIGRT_12, {0x44f510, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x44f640}, NULL, 8) = 0
rt_sigaction(SIGRT_13, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f8fe16654b0}, 8) = 0
rt_sigaction(SIGRT_13, {0x44f510, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x44f640}, NULL, 8) = 0
rt_sigaction(SIGRT_14, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f8fe16654b0}, 8) = 0
rt_sigaction(SIGRT_14, {0x44f510, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x44f640}, NULL, 8) = 0
rt_sigaction(SIGRT_15, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f8fe16654b0}, 8) = 0
rt_sigaction(SIGRT_15, {0x44f510, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x44f640}, NULL, 8) = 0
rt_sigaction(SIGRT_16, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f8fe16654b0}, 8) = 0
rt_sigaction(SIGRT_16, {0x44f510, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x44f640}, NULL, 8) = 0
rt_sigaction(SIGRT_17, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f8fe16654b0}, 8) = 0
rt_sigaction(SIGRT_17, {0x44f510, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x44f640}, NULL, 8) = 0
rt_sigaction(SIGRT_18, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f8fe16654b0}, 8) = 0
rt_sigaction(SIGRT_18, {0x44f510, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x44f640}, NULL, 8) = 0
rt_sigaction(SIGRT_19, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f8fe16654b0}, 8) = 0
rt_sigaction(SIGRT_19, {0x44f510, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x44f640}, NULL, 8) = 0
rt_sigaction(SIGRT_20, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f8fe16654b0}, 8) = 0
rt_sigaction(SIGRT_20, {0x44f510, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x44f640}, NULL, 8) = 0
rt_sigaction(SIGRT_21, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f8fe16654b0}, 8) = 0
rt_sigaction(SIGRT_21, {0x44f510, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x44f640}, NULL, 8) = 0
rt_sigaction(SIGRT_22, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f8fe16654b0}, 8) = 0
rt_sigaction(SIGRT_22, {0x44f510, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x44f640}, NULL, 8) = 0
rt_sigaction(SIGRT_23, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f8fe16654b0}, 8) = 0
rt_sigaction(SIGRT_23, {0x44f510, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x44f640}, NULL, 8) = 0
rt_sigaction(SIGRT_24, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f8fe16654b0}, 8) = 0
rt_sigaction(SIGRT_24, {0x44f510, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x44f640}, NULL, 8) = 0
rt_sigaction(SIGRT_25, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f8fe16654b0}, 8) = 0
rt_sigaction(SIGRT_25, {0x44f510, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x44f640}, NULL, 8) = 0
rt_sigaction(SIGRT_26, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f8fe16654b0}, 8) = 0
rt_sigaction(SIGRT_26, {0x44f510, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x44f640}, NULL, 8) = 0
rt_sigaction(SIGRT_27, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f8fe16654b0}, 8) = 0
rt_sigaction(SIGRT_27, {0x44f510, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x44f640}, NULL, 8) = 0
rt_sigaction(SIGRT_28, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f8fe16654b0}, 8) = 0
rt_sigaction(SIGRT_28, {0x44f510, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x44f640}, NULL, 8) = 0
rt_sigaction(SIGRT_29, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f8fe16654b0}, 8) = 0
rt_sigaction(SIGRT_29, {0x44f510, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x44f640}, NULL, 8) = 0
rt_sigaction(SIGRT_30, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f8fe16654b0}, 8) = 0
rt_sigaction(SIGRT_30, {0x44f510, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x44f640}, NULL, 8) = 0
rt_sigaction(SIGRT_31, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f8fe16654b0}, 8) = 0
rt_sigaction(SIGRT_31, {0x44f510, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x44f640}, NULL, 8) = 0
rt_sigaction(SIGRT_32, NULL, {SIG_DFL, [], SA_RESTORER, 0x7f8fe16654b0}, 8) = 0
rt_sigaction(SIGRT_32, {0x44f510, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x44f640}, NULL, 8) = 0
clock_gettime(CLOCK_MONOTONIC, {1000, 872917000}) = 0
rt_sigprocmask(SIG_SETMASK, ~[], [], 8) = 0
clone(child_stack=0xc420036000, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD) = 8058
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, ~[], [], 8) = 0
clone(child_stack=0xc420032000, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD) = 8059
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, ~[], [], 8) = 0
clone(child_stack=0xc420034000, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD) = 8061
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
futex(0xc420026910, FUTEX_WAKE, 1)      = 1
futex(0xc420048110, FUTEX_WAKE, 1)      = 1
readlinkat(AT_FDCWD, "/proc/self/exe", "/home/robing/go/src/bolttest/bol"..., 128) = 37
futex(0xc420026910, FUTEX_WAKE, 1)      = 1
mmap(NULL, 262144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc11b750000
unlinkat(AT_FDCWD, "/tmp/test.db", 0)   = 0
openat(AT_FDCWD, "/tmp/test.db", O_RDWR|O_CREAT|O_CLOEXEC, 0600) = 3
clock_gettime(CLOCK_REALTIME, {1499515172, 103406100}) = 0
flock(3, LOCK_EX|LOCK_NB)               = 0
fstat(3, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
pwrite64(3, "\0\0\0\0\0\0\0\0\4\0\0\0\0\0\0\0\355\332\f\355\2\0\0\0\0\20\0\0\0\0\0\0"..., 16384, 0) = 16384
fdatasync(3)                            = 0
futex(0x54fef8, FUTEX_WAKE, 1)          = 1
futex(0x54fe30, FUTEX_WAKE, 1)          = 1
fstat(3, {st_mode=S_IFREG|0600, st_size=16384, ...}) = 0
mmap(NULL, 32768, PROT_READ, MAP_SHARED, 3, 0) = 0x7fc11b7f0000
madvise(0x7fc11b7f0000, 32768, MADV_RANDOM) = 0
clock_gettime(CLOCK_REALTIME, {1499515172, 118855500}) = 0
clock_gettime(CLOCK_REALTIME, {1499515172, 119043700}) = 0
clock_gettime(CLOCK_REALTIME, {1499515172, 119249800}) = 0
ftruncate(3, 32768)                     = 0
fsync(3)                                = 0
clock_gettime(CLOCK_REALTIME, {1499515172, 122083400}) = 0
pwrite64(3, "\4\0\0\0\0\0\0\0\2\0\1\0\0\0\0\0\1\0\0\0\20\0\0\0\10\0\0\0 \0\0\0"..., 4096, 16384) = 4096
pwrite64(3, "\5\0\0\0\0\0\0\0\20\0\2\0\0\0\0\0\2\0\0\0\0\0\0\0\3\0\0\0\0\0\0\0"..., 4096, 20480) = 4096
fdatasync(3)                            = 0
pwrite64(3, "\0\0\0\0\0\0\0\0\4\0\0\0\0\0\0\0\355\332\f\355\2\0\0\0\0\20\0\0\0\0\0\0"..., 4096, 0) = 4096
fdatasync(3)                            = 0
clock_gettime(CLOCK_REALTIME, {1499515172, 129002500}) = 0
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_ACCERR, si_addr=0x7fc11b7f4008} ---
rt_sigreturn({mask=[]})                 = 140467366739968
write(2, "unexpected fault address ", 25unexpected fault address ) = 25
write(2, "0x7fc11b7f4008", 140x7fc11b7f4008)          = 14
write(2, "\n", 1
)                       = 1
write(2, "fatal error: ", 13fatal error: )           = 13
write(2, "fault", 5fault)                    = 5
write(2, "\n", 1
)                       = 1
pselect6(0, NULL, NULL, NULL, {0, 1000000}, NULL) = 0 (Timeout)
pselect6(0, NULL, NULL, NULL, {0, 1000000}, NULL) = 0 (Timeout)
write(2, "[signal ", 8[signal )                 = 8
write(2, "SIGSEGV: segmentation violation", 31SIGSEGV: segmentation violation) = 31
write(2, " code=", 6 code=)                   = 6
write(2, "0x2", 30x2)                      = 3
write(2, " addr=", 6 addr=)                   = 6
write(2, "0x7fc11b7f4008", 140x7fc11b7f4008)          = 14
write(2, " pc=", 4 pc=)                     = 4
write(2, "0x4970e9", 80x4970e9)                 = 8
write(2, "]\n", 2]
)                      = 2
write(2, "\n", 1
)                       = 1
write(2, "goroutine ", 10goroutine )              = 10
write(2, "1", 11)                        = 1
write(2, " [", 2 [)                       = 2
write(2, "running", 7running)                  = 7
write(2, "]:\n", 3]:
)                     = 3
write(2, "runtime.throw", 13runtime.throw)           = 13
write(2, "(", 1()                        = 1
write(2, "0x4db4d7", 80x4db4d7)                 = 8
write(2, ", ", 2, )                       = 2
write(2, "0x5", 30x5)                      = 3
write(2, ")\n", 2)
)                      = 2
write(2, "\t", 1        )                       = 1
write(2, "/usr/local/go/src/runtime/panic."..., 34/usr/local/go/src/runtime/panic.go) = 34
write(2, ":", 1:)                        = 1
write(2, "596", 3596)                      = 3
write(2, " +", 2 +)                       = 2
write(2, "0x95", 40x95)                     = 4
write(2, " fp=", 4 fp=)                     = 4
write(2, "0xc420037bb0", 120xc420037bb0)            = 12
write(2, " sp=", 4 sp=)                     = 4
write(2, "0xc420037b90", 120xc420037b90)            = 12
write(2, "\n", 1
)                       = 1
write(2, "runtime.sigpanic", 16runtime.sigpanic)        = 16
write(2, "(", 1()                        = 1
write(2, ")\n", 2)
)                      = 2
write(2, "\t", 1        )                       = 1
write(2, "/usr/local/go/src/runtime/signal"..., 40/usr/local/go/src/runtime/signal_unix.go) = 40
write(2, ":", 1:)                        = 1
write(2, "297", 3297)                      = 3
write(2, " +", 2 +)                       = 2
write(2, "0x28c", 50x28c)                    = 5
write(2, " fp=", 4 fp=)                     = 4
write(2, "0xc420037c00", 120xc420037c00)            = 12
write(2, " sp=", 4 sp=)                     = 4
write(2, "0xc420037bb0", 120xc420037bb0)            = 12
write(2, "\n", 1
)                       = 1
write(2, "bolttest/vendor/github.com/boltd"..., 55bolttest/vendor/github.com/boltdb/bolt.(*Cursor).search) = 55
write(2, "(", 1()                        = 1
write(2, "0xc420037da8", 120xc420037da8)            = 12
write(2, ", ", 2, )                       = 2
write(2, "0xc420037e80", 120xc420037e80)            = 12
write(2, ", ", 2, )                       = 2
write(2, "0x8", 30x8)                      = 3
write(2, ", ", 2, )                       = 2
write(2, "0x20", 40x20)                     = 4
write(2, ", ", 2, )                       = 2
write(2, "0x4", 30x4)                      = 3
write(2, ")\n", 2)
)                      = 2
write(2, "\t", 1        )                       = 1
write(2, "/home/robing/go/src/bolttest/ven"..., 68/home/robing/go/src/bolttest/vendor/github.com/boltdb/bolt/cursor.go) = 68
write(2, ":", 1:)                        = 1
write(2, "255", 3255)                      = 3
write(2, " +", 2 +)                       = 2
write(2, "0x69", 40x69)                     = 4
write(2, " fp=", 4 fp=)                     = 4
write(2, "0xc420037cc8", 120xc420037cc8)            = 12
write(2, " sp=", 4 sp=)                     = 4
write(2, "0xc420037c00", 120xc420037c00)            = 12
write(2, "\n", 1
)                       = 1
write(2, "bolttest/vendor/github.com/boltd"..., 53bolttest/vendor/github.com/boltdb/bolt.(*Cursor).seek) = 53
write(2, "(", 1()                        = 1
write(2, "0xc420037da8", 120xc420037da8)            = 12
write(2, ", ", 2, )                       = 2
write(2, "0xc420037e80", 120xc420037e80)            = 12
write(2, ", ", 2, )                       = 2
write(2, "0x8", 30x8)                      = 3
write(2, ", ", 2, )                       = 2
write(2, "0x20", 40x20)                     = 4
write(2, ", ", 2, )                       = 2
write(2, "0x0", 30x0)                      = 3
write(2, ", ", 2, )                       = 2
write(2, "0x0", 30x0)                      = 3
write(2, ", ", 2, )                       = 2
write(2, "0xc42007c030", 120xc42007c030)            = 12
write(2, ", ", 2, )                       = 2
write(2, "0x0", 30x0)                      = 3
write(2, ", ", 2, )                       = 2
write(2, "0x550420", 80x550420)                 = 8
write(2, ", ", 2, )                       = 2
write(2, "0xc4200920e0", 120xc4200920e0)            = 12
write(2, ", ...", 5, ...)                    = 5
write(2, ")\n", 2)
)                      = 2
write(2, "\t", 1        )                       = 1
write(2, "/home/robing/go/src/bolttest/ven"..., 68/home/robing/go/src/bolttest/vendor/github.com/boltdb/bolt/cursor.go) = 68
write(2, ":", 1:)                        = 1
write(2, "159", 3159)                      = 3
write(2, " +", 2 +)                       = 2
write(2, "0xb1", 40xb1)                     = 4
write(2, " fp=", 4 fp=)                     = 4
write(2, "0xc420037d18", 120xc420037d18)            = 12
write(2, " sp=", 4 sp=)                     = 4
write(2, "0xc420037cc8", 120xc420037cc8)            = 12
write(2, "\n", 1
)                       = 1
write(2, "bolttest/vendor/github.com/boltd"..., 55bolttest/vendor/github.com/boltdb/bolt.(*Bucket).Bucket) = 55
write(2, "(", 1()                        = 1
write(2, "0xc4200920f8", 120xc4200920f8)            = 12
write(2, ", ", 2, )                       = 2
write(2, "0xc420037e80", 120xc420037e80)            = 12
write(2, ", ", 2, )                       = 2
write(2, "0x8", 30x8)                      = 3
write(2, ", ", 2, )                       = 2
write(2, "0x20", 40x20)                     = 4
write(2, ", ", 2, )                       = 2
write(2, "0xc420037e80", 120xc420037e80)            = 12
write(2, ")\n", 2)
)                      = 2
write(2, "\t", 1        )                       = 1
write(2, "/home/robing/go/src/bolttest/ven"..., 68/home/robing/go/src/bolttest/vendor/github.com/boltdb/bolt/bucket.go) = 68
write(2, ":", 1:)                        = 1
write(2, "112", 3112)                      = 3
write(2, " +", 2 +)                       = 2
write(2, "0x108", 50x108)                    = 5
write(2, " fp=", 4 fp=)                     = 4
write(2, "0xc420037dd8", 120xc420037dd8)            = 12
write(2, " sp=", 4 sp=)                     = 4
write(2, "0xc420037d18", 120xc420037d18)            = 12
write(2, "\n", 1
)                       = 1
write(2, "bolttest/vendor/github.com/boltd"..., 51bolttest/vendor/github.com/boltdb/bolt.(*Tx).Bucket) = 51
write(2, "(", 1()                        = 1
write(2, "0xc4200920e0", 120xc4200920e0)            = 12
write(2, ", ", 2, )                       = 2
write(2, "0xc420037e80", 120xc420037e80)            = 12
write(2, ", ", 2, )                       = 2
write(2, "0x8", 30x8)                      = 3
write(2, ", ", 2, )                       = 2
write(2, "0x20", 40x20)                     = 4
write(2, ", ", 2, )                       = 2
write(2, "0x8", 30x8)                      = 3
write(2, ")\n", 2)
)                      = 2
write(2, "\t", 1        )                       = 1
write(2, "/home/robing/go/src/bolttest/ven"..., 64/home/robing/go/src/bolttest/vendor/github.com/boltdb/bolt/tx.go) = 64
write(2, ":", 1:)                        = 1
write(2, "101", 3101)                      = 3
write(2, " +", 2 +)                       = 2
write(2, "0x4f", 40x4f)                     = 4
write(2, " fp=", 4 fp=)                     = 4
write(2, "0xc420037e10", 120xc420037e10)            = 12
write(2, " sp=", 4 sp=)                     = 4
write(2, "0xc420037dd8", 120xc420037dd8)            = 12
write(2, "\n", 1
)                       = 1
write(2, "main.main.func2", 15main.main.func2)         = 15
write(2, "(", 1()                        = 1
write(2, "0xc4200920e0", 120xc4200920e0)            = 12
write(2, ", ", 2, )                       = 2
write(2, "0x4e25d0", 80x4e25d0)                 = 8
write(2, ", ", 2, )                       = 2
write(2, "0xc4200920e0", 120xc4200920e0)            = 12
write(2, ")\n", 2)
)                      = 2
write(2, "\t", 1        )                       = 1
write(2, "/home/robing/go/src/bolttest/mai"..., 36/home/robing/go/src/bolttest/main.go) = 36
write(2, ":", 1:)                        = 1
write(2, "28", 228)                       = 2
write(2, " +", 2 +)                       = 2
write(2, "0x81", 40x81)                     = 4
write(2, " fp=", 4 fp=)                     = 4
write(2, "0xc420037ed8", 120xc420037ed8)            = 12
write(2, " sp=", 4 sp=)                     = 4
write(2, "0xc420037e10", 120xc420037e10)            = 12
write(2, "\n", 1
)                       = 1
write(2, "bolttest/vendor/github.com/boltd"..., 49bolttest/vendor/github.com/boltdb/bolt.(*DB).View) = 49
write(2, "(", 1()                        = 1
write(2, "0xc42008c000", 120xc42008c000)            = 12
write(2, ", ", 2, )                       = 2
write(2, "0x4e2640", 80x4e2640)                 = 8
write(2, ", ", 2, )                       = 2
write(2, "0x0", 30x0)                      = 3
write(2, ", ", 2, )                       = 2
write(2, "0x0", 30x0)                      = 3
write(2, ")\n", 2)
)                      = 2
write(2, "\t", 1        )                       = 1
write(2, "/home/robing/go/src/bolttest/ven"..., 64/home/robing/go/src/bolttest/vendor/github.com/boltdb/bolt/db.go) = 64
write(2, ":", 1:)                        = 1
write(2, "626", 3626)                      = 3
write(2, " +", 2 +)                       = 2
write(2, "0x9f", 40x9f)                     = 4
write(2, " fp=", 4 fp=)                     = 4
write(2, "0xc420037f28", 120xc420037f28)            = 12
write(2, " sp=", 4 sp=)                     = 4
write(2, "0xc420037ed8", 120xc420037ed8)            = 12
write(2, "\n", 1
)                       = 1
write(2, "main.main", 9main.main)                = 9
write(2, "(", 1()                        = 1
write(2, ")\n", 2)
)                      = 2
write(2, "\t", 1        )                       = 1
write(2, "/home/robing/go/src/bolttest/mai"..., 36/home/robing/go/src/bolttest/main.go) = 36
write(2, ":", 1:)                        = 1
write(2, "35", 235)                       = 2
write(2, " +", 2 +)                       = 2
write(2, "0x119", 50x119)                    = 5
write(2, " fp=", 4 fp=)                     = 4
write(2, "0xc420037f88", 120xc420037f88)            = 12
write(2, " sp=", 4 sp=)                     = 4
write(2, "0xc420037f28", 120xc420037f28)            = 12
write(2, "\n", 1
)                       = 1
write(2, "runtime.main", 12runtime.main)            = 12
write(2, "(", 1()                        = 1
write(2, ")\n", 2)
)                      = 2
write(2, "\t", 1        )                       = 1
write(2, "/usr/local/go/src/runtime/proc.g"..., 33/usr/local/go/src/runtime/proc.go) = 33
write(2, ":", 1:)                        = 1
write(2, "185", 3185)                      = 3
write(2, " +", 2 +)                       = 2
write(2, "0x20a", 50x20a)                    = 5
write(2, " fp=", 4 fp=)                     = 4
write(2, "0xc420037fe0", 120xc420037fe0)            = 12
write(2, " sp=", 4 sp=)                     = 4
write(2, "0xc420037f88", 120xc420037f88)            = 12
write(2, "\n", 1
)                       = 1
write(2, "runtime.goexit", 14runtime.goexit)          = 14
write(2, "(", 1()                        = 1
write(2, ")\n", 2)
)                      = 2
write(2, "\t", 1        )                       = 1
write(2, "/usr/local/go/src/runtime/asm_am"..., 37/usr/local/go/src/runtime/asm_amd64.s) = 37
write(2, ":", 1:)                        = 1
write(2, "2197", 42197)                     = 4
write(2, " +", 2 +)                       = 2
write(2, "0x1", 30x1)                      = 3
write(2, " fp=", 4 fp=)                     = 4
write(2, "0xc420037fe8", 120xc420037fe8)            = 12
write(2, " sp=", 4 sp=)                     = 4
write(2, "0xc420037fe0", 120xc420037fe0)            = 12
write(2, "\n", 1
)                       = 1
exit_group(2)                           = ?
+++ exited with 2 +++
@ghost
Copy link

ghost commented Sep 29, 2017

Exact same issue for me. Using mmap in wsl seems to be broken.

@whizzter
Copy link

whizzter commented Oct 18, 2017

They fixed part of MMAP's issues in the fall creator update so check if it works now? See the previous bug #658

@RobinGeuze
Copy link
Author

Seems to be working now :)

@therealkenc
Copy link
Collaborator

Duping to #658 since it is working now and that was almost certainly the cause.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants