Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 03 Jan 2017 14:15:03 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   [Bug 215730] databases/kyototycoon: coredump when forking to write snapshot using in-memory hash db
Message-ID:  <bug-215730-13@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D215730

            Bug ID: 215730
           Summary: databases/kyototycoon: coredump when forking to write
                    snapshot using in-memory hash db
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: sunpoet@FreeBSD.org
          Reporter: dch@skunkwerks.at
          Assignee: sunpoet@FreeBSD.org
             Flags: maintainer-feedback?(sunpoet@FreeBSD.org)

We're using replication to push in a bunch of records from a Debian system,
running via spiped tunnel, to the in-memory hash db.=20

Each time KT forks to create the snapshot, it coredumps, & the snap is miss=
ing.

If a physical file backing db is used, snapshots are created as expected,
using: /var/db/kyototycoon/db.kch#opts=3Dl#bnum=3D200000#ktcapsiz=3D512m
however the db format is also different so the performance is not equivalen=
t.

```
sudo -u kyototycoon /usr/local/bin/ktserver -sid 2 -dmn -host 127.0.0.1 -po=
rt
1978 -li -log /var/log/kyototycoon/kyoto.log -bgs /var/db/kyototycoon/snaps=
hots
-ulog /var/db/kyototycoon/updates -rts /var/db/kyototycoon/timestamp.rts -m=
host
127.0.0.1  -bgsi 30 -bgsc zlib  -mport 11979 :#opts=3Dl#bnum=3D200000#ktcap=
siz=3D512m

tail -F /var/log/kyototycoon/kyoto.log

2017-01-03T13:27:26.840894Z: [SYSTEM]: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D [START]: pid=3D89116
2017-01-03T13:27:26.841824Z: [SYSTEM]: opening the update log:
path=3D/var/db/kyototycoon/updates sid=3D2
2017-01-03T13:27:26.842787Z: [SYSTEM]: opening a database: path=3D:#bnum=3D=
200000#
2017-01-03T13:27:26.843594Z: [SYSTEM]: starting the server: expr=3D127.0.0.=
1:1978
2017-01-03T13:27:26.843765Z: [SYSTEM]: server socket opened:
expr=3D127.0.0.1:1978 timeout=3D30.0
2017-01-03T13:27:26.843856Z: [SYSTEM]: listening server socket started: fd=
=3D4
2017-01-03T13:27:27.386037Z: [SYSTEM]: replication started: host=3D127.0.0.1
port=3D11979 rts=3D0
...
2017-01-03T13:27:57.040883Z: [INFO]: snapshotting databases
2017-01-03T13:27:57.149034Z: [ERROR]: database error: 7: no record: no reco=
rd

# 2017-01-03T13:28:17.341527Z: [SYSTEM]: server stopped
2017-01-03T13:28:17.341742Z: [SYSTEM]: finishing the server

# 2017-01-03T13:28:17.343796Z: [SYSTEM]: closing the server socket
2017-01-03T13:28:17.936916Z: [SYSTEM]: replication finished: host=3D127.0.0=
.1
port=3D11979
2017-01-03T13:28:17.937432Z: [SYSTEM]: snapshotting databases
2017-01-03T13:28:18.049065Z: [ERROR]: database error: 0: success: no error
2017-01-03T13:28:18.049227Z: [SYSTEM]: closing a database: path=3D:#bnum=3D=
200000#
2017-01-03T13:28:18.113054Z: [SYSTEM]: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D [FINISH]: pid=3D89116
```


dtrace/dtruss shows the fork dying off, it is never seen again.


```
 27774/100285:=E2=80=82=E2=80=82write(0x3, "2017-01-03T09:23:20.259852Z: [I=
NFO]: snapshotting
databases\n\0", 0x3C)=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=
=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=3D=
 60 0
 27774/100285:=E2=80=82=E2=80=82sched_yield(0x0, 0x0, 0x0)=E2=80=82=E2=80=
=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=
=E2=80=82=E2=80=82=E2=80=82=E2=80=82 =3D 0 0
 27774/100285:=E2=80=82=E2=80=82sched_yield(0x0, 0x0, 0x0)=E2=80=82=E2=80=
=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=
=E2=80=82=E2=80=82=E2=80=82=E2=80=82 =3D 0 0
 27774/100285:=E2=80=82=E2=80=82sched_yield(0x0, 0x0, 0x0)=E2=80=82=E2=80=
=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=
=E2=80=82=E2=80=82=E2=80=82=E2=80=82 =3D 0 0
 27774/100285:=E2=80=82=E2=80=82sched_yield(0x0, 0x0, 0x0)=E2=80=82=E2=80=
=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=
=E2=80=82=E2=80=82=E2=80=82=E2=80=82 =3D 0 0
 27774/100285:=E2=80=82=E2=80=82sigprocmask(0x1, 0x8014CAB80, 0x802617EE8)=
=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=
=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82 =3D 0x0
0
 27774/100285:=E2=80=82=E2=80=82fork(0x0, 0x0, 0x0)=E2=80=82=E2=80=82=E2=80=
=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=
=E2=80=82=E2=80=82=E2=80=82=3D 35497 0
 27774/100285:=E2=80=82=E2=80=82fork()=E2=80=82=E2=80=82=E2=80=82=E2=80=82=
=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82 =3D 35497 0
 35497/101532:=E2=80=82=E2=80=82thr_self(0x802617E00, 0x0, 0x0)=E2=80=82=E2=
=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=
=82=3D 0 0
 27774/100285:=E2=80=82=E2=80=82sigprocmask(0x3, 0x802617EE8, 0x0)=E2=80=82=
=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=
=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82 =3D 0x0 0
 27774/100285:=E2=80=82=E2=80=82sched_yield(0x0, 0x0, 0x0)=E2=80=82=E2=80=
=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=
=E2=80=82=E2=80=82=E2=80=82=E2=80=82 =3D 0 0
 27774/100285:=E2=80=82=E2=80=82sched_yield(0x0, 0x0, 0x0)=E2=80=82=E2=80=
=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=
=E2=80=82=E2=80=82=E2=80=82=E2=80=82 =3D 0 0
 35497/101532:=E2=80=82=E2=80=82sysarch(0x81, 0x7FFFDF5F8B58, 0x0)=E2=80=82=
=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=
=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82 =3D 0 0
 27774/100285:=E2=80=82=E2=80=82wait4(0x8AA9, 0x7FFFDF5F8C5C, 0x1)=E2=80=82=
=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=
=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82 =3D 0 0
 35497/101532:=E2=80=82=E2=80=82sigprocmask(0x3, 0x802617EE8, 0x0)=E2=80=82=
=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=
=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82 =3D 0x0 0
 35497/101532:=E2=80=82=E2=80=82sigprocmask(0x3, 0x7FFFDF5F8BD0, 0x0)=E2=80=
=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=
=E2=80=82=E2=80=82=E2=80=82=3D 0x0 0
 35497/101532:=E2=80=82=E2=80=82thr_self(0x7FFFDF5F8BC0, 0x0, 0x0)=E2=80=82=
=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=
=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82 =3D 0 0
 35497/101532:=E2=80=82=E2=80=82thr_kill(0x18C9C, 0x6, 0x0)=E2=80=82=E2=80=
=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=
=E2=80=82=E2=80=82=E2=80=82=E2=80=82=3D 0 0
 27774/100280:=E2=80=82=E2=80=82nanosleep(0x7FFFDFFFDF50, 0x7FFFDFFFDF40, 0=
x0)=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=
=E2=80=82=E2=80=82 =3D 0 0
 27774/100280:=E2=80=82=E2=80=82sched_yield(0x0, 0x0, 0x0)=E2=80=82=E2=80=
=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=
=E2=80=82=E2=80=82=E2=80=82=E2=80=82 =3D 0 0
 ```

coredump & logfiles available on request with pgp or similar encryption.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-215730-13>