dworkin / dgd

Dworkin's Game Driver, an object-oriented database management system originally used to run MUDs.
https://www.dworkin.nl/dgd/
GNU Affero General Public License v3.0
103 stars 31 forks source link

Incremental snapshot funkiness #24

Closed shentino closed 4 years ago

shentino commented 4 years ago

For some reason incremental snapshots either quit working or I'm doing something wrong.

See transcript. I can also privately provide the actual snapshot files on request.

shentino@metalhead 0 ~/git/kotaka $ dgd kotaka.dgd Mar 27 09:16:43 DGD 1.6.11 Mar 27 09:16:43 Initializing... Mar 27 09:16:43 Kernel library version: 1.3.4 Mar 27 09:16:43 Kotaka version: 0.60 Mar 27 09:16:43 System core loaded Mar 27 09:16:43 Initialization complete.

Mar 27 09:16:43 System discovered Mar 27 09:16:43 System loaded Mar 27 09:16:43 Booted Ecru Mar 27 09:16:43 Booted String Mar 27 09:16:43 Restoring accounts Mar 27 09:16:43 Booted Account Mar 27 09:16:43 Booted Bigstruct Mar 27 09:16:43 Booted Channel Mar 27 09:16:43 Booted Utility Mar 27 09:16:43 Booted Thing Mar 27 09:16:43 Booted Geometry Mar 27 09:16:43 Booted Http Mar 27 09:16:43 Booted Kotaka Mar 27 09:16:43 Booted Verb Mar 27 09:16:43 Booted Text Mar 27 09:16:43 Booted Action Mar 27 09:16:43 Booted Intermud Mar 27 09:16:43 Booted Test Mar 27 09:16:43 Booted Game Mar 27 09:16:44 Big mapping benchmark, 41690 ops/sec Mar 27 09:16:44 Using saved password for Ulario Mar 27 09:16:44 I3: Received startup reply Mar 27 09:17:23 System halted. --- DGD hotbooting --- Mar 27 09:17:23 DGD 1.6.11 Mar 27 09:17:23 Kernel library version: 1.3.4 Mar 27 09:17:23 Kotaka version: 0.60 Mar 27 09:17:23 ** State restored.

Mar 27 09:17:26 ** System halted. --- DGD hotbooting --- Bad or incompatible restore file header Config error: initialization failed

shentino@metalhead 1 ~ $ telnet localhost 50000 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. Welcome to Shentino's mudclient extension. /\ / / /--------- ----------------------------------------\ ()()(*) -----------------------------------------> --------- ----------------------------------------/
       \ \                    U l a r i o
        \/

Welcome to Ulario:

If you wish to connect as a guest, simply type enter.

Login: shentino Password: [Shentino@ulario] hotboot Hotbooting... [Shentino@ulario] [09:17:23] #debug Auditing filequota hotboot Hotbooting... [Shentino@ulario] Connection closed by foreign host.

files.tar.gz

shentino commented 4 years ago

I can give you a reproduction kit but it needs to be kept confidential due to private

dworkin commented 4 years ago

You did not provide sufficient information to reproduce the problem. Please pare down this "reproduction kit" so it only contains clear instructions and no confidential information.

shentino commented 4 years ago

Did you get the email I sent?

shentino commented 4 years ago

The latest updates seem to have fixed it.

shentino commented 4 years ago

I'm curious, what about your latest updates fixed this or was it a coincidence? Looking at the latest deltas I can't quite see what the problem was.

shentino commented 4 years ago

Spoke too soon it's still crashing

shentino commented 4 years ago

Nevermind that, I forgot to recompile.

But now I got a segfault:

Core was generated by `../dgd/bin/dgd kotaka.dgd state/snapshot state/snapshot.old'. Program terminated with signal SIGSEGV, Segmentation fault.

0 0x0000559e593ab1f4 in Swap::conv2 (m=0x7f37a952c268 "", vec=0x7f37a54ec028, size=4, idx=48)

at swap.cpp:519

519 P_lseek(dump2, (off_t) (map[vec] + 1L) restoresecsize, [Current thread is 1 (Thread 0x7f37a9dcc740 (LWP 3856))] (gdb) bt

0 0x0000559e593ab1f4 in Swap::conv2 (m=0x7f37a952c268 "", vec=0x7f37a54ec028, size=4, idx=48)

at swap.cpp:519

1 0x0000559e593ab32c in Swap::convert (m=0x7f37a54ec02c "", vec=0x7f37a54ec028,

layout=0x559e59442129 "d", n=1, idx=48, 
readv=0x559e593ab174 <Swap::conv2(char*, unsigned int*, unsigned int, unsigned int)>)
at swap.cpp:544

2 0x0000559e593e40d9 in Control::conv (obj=0x559e5a9610e0, instance=1,

readv=0x559e593ab174 <Swap::conv2(char*, unsigned int*, unsigned int, unsigned int)>)
at control.cpp:2579

3 0x0000559e593e5e40 in Control::restore (obj=0x559e5a9610e0, instance=1,

readv=0x559e593ab174 <Swap::conv2(char*, unsigned int*, unsigned int, unsigned int)>)
at control.cpp:3202

4 0x0000559e593b5bea in Object::restore (fd=3, part=true) at object.cpp:1423

5 0x0000559e593cfa83 in Config::restore (fd=3, fd2=4) at config.cpp:368

6 0x0000559e593d31be in Config::init (configfile=0x7ffd7d306101 "kotaka.dgd",

snapshot=0x7ffd7d30610c "state/snapshot", snapshot2=0x7ffd7d30611b "state/snapshot.old", 
module=0x0, fragment=0x559e5946754c <fragment>) at config.cpp:1580

7 0x0000559e593d833d in dgd_main (argc=3, argv=0x7ffd7d305970) at dgd.cpp:195

8 0x0000559e5942ca3f in main (argc=4, argv=0x7ffd7d305968) at local.cpp:50

shentino commented 4 years ago

This segfault only happened when hotbooting after immediate restore from an old backup snapshot I had, but statedump cycling before hotbooting cleared it up, so I dunno

shentino commented 4 years ago

Could not reproduce