Code Monkey home page Code Monkey logo

boltd's Introduction

boltd Project status

This server allows you introspect Bolt database in a web browser. The boltd tool gives you access to low-level page information and b-tree structures so you can better understand how Bolt is laying out your data.

Getting Started

To install boltd, use the go get command:

$ go get github.com/boltdb/boltd/...

And then run the boltd binary by passing in the path to your database:

$ boltd path/to/my.db

HTTP Integration

You can also use boltd as an http.Handler in your own application. To use it, simply add the handler to your muxer:

http.Handle("/introspect", http.StripPrefix("/introspect", boltd.NewHandler(mydb)))

boltd's People

Contributors

benbjohnson avatar timmmm avatar tv42 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

boltd's Issues

Segfault on authorize

boltd 0.5 from Fedora 29 segfaults repeatably when I issue 'boltctl authorize ". Stacktrace:

Thread 1 "boltd" received signal SIGSEGV, Segmentation fault.
0x00007ffff7bb4895 in __strlen_avx2 () from target:/lib64/libc.so.6
(gdb) bt
#0 0x00007ffff7bb4895 in __strlen_avx2 () from target:/lib64/libc.so.6
#1 0x00007ffff7ed1893 in g_log_writer_journald () from target:/lib64/libglib-2.0.so.0
#2 0x000055555556cc5f in bolt_log_journal (ctx=ctx@entry=0x5555555ee980, log_level=log_level@entry=G_LOG_LEVEL_CRITICAL, flags=flags@entry=0) at ../boltd/bolt-log.c:551
#3 0x00005555555607a8 in daemon_logger (level=G_LOG_LEVEL_CRITICAL, fields=, n_fields=, user_data=) at ../boltd/bolt-daemon.c:82
#4 0x00007ffff7ed0047 in g_log_structured_array () from target:/lib64/libglib-2.0.so.0
#5 0x00007ffff7ed0491 in g_log_default_handler () from target:/lib64/libglib-2.0.so.0
#6 0x00007ffff7ed06df in g_logv () from target:/lib64/libglib-2.0.so.0
#7 0x00007ffff7ed08d3 in g_log () from target:/lib64/libglib-2.0.so.0
#8 0x0000555555572362 in bolt_domain_get_security (domain=0x0) at ../boltd/bolt-domain.c:266
#9 0x000055555556ab33 in handle_authorize (object=, params=, inv=0x7fffe800ca40, error=0x7fffffffe968) at ../boltd/bolt-device.c:1043
#10 0x0000555555573f7c in dispatch_method_call (method=, error=0x7fffffffe968, inv=0x7fffe800ca40, exported=0x5555555dc060) at ../boltd/bolt-exported.c:516
#11 query_authorization_done (source_object=, res=, user_data=0x5555555bcd80) at ../boltd/bolt-exported.c:553
#12 0x00007ffff7d63f74 in ?? () from target:/lib64/libgio-2.0.so.0
#13 0x00007ffff7d63fad in ?? () from target:/lib64/libgio-2.0.so.0
#14 0x00007ffff7ec5b7b in ?? () from target:/lib64/libglib-2.0.so.0
#15 0x00007ffff7ec926d in g_main_context_dispatch () from target:/lib64/libglib-2.0.so.0
#16 0x00007ffff7ec9638 in ?? () from target:/lib64/libglib-2.0.so.0
#17 0x00007ffff7ec9962 in g_main_loop_run () from target:/lib64/libglib-2.0.so.0
#18 0x00005555555603fa in main (argc=, argv=) at ../boltd/bolt-daemon.c:217

This might be caused by a kernel bug in 4.18.13-300.fc29.x86_64, because I'm also getting errors in dmesg as soon as I plug the usb-c dock:

[152045.125455] snd_hda_intel 0000:00:1f.3: azx_get_response timeout, switching to polling mode: last cmd=0x002f0600
[162715.019687] thunderbolt 0000:08:00.0: current switch config:
[162715.019696] thunderbolt 0000:08:00.0: Switch: 8086:15d3 (Revision: 6, TB Version: 2)
[162715.019699] thunderbolt 0000:08:00.0: Max Port Number: 11
[162715.019702] thunderbolt 0000:08:00.0: Config:
[162715.019708] thunderbolt 0000:08:00.0: Upstream Port Number: 3 Depth: 1 Route String: 0x1 Enabled: 1, PlugEventsDelay: 254ms
[162715.019712] thunderbolt 0000:08:00.0: unknown1: 0x0 unknown4: 0x0
[162715.362005] thunderbolt 0000:08:00.0: 1: reading drom (length: 0x83)
[162715.838180] thunderbolt 0000:08:00.0: 1: drom data crc32 mismatch (expected: 0x47457c83, got: 0x5244dec0), continuing
[162715.838688] thunderbolt 0000:08:00.0: 1: drom buffer overrun, aborting
[162715.838690] thunderbolt 0000:08:00.0: 1: tb_eeprom_read_rom failed

I can get boltd to work again by rebooting the machine. Reloading the thunderbolt module also made the issue disappear once, but doesn't seem to be working any more now. I'll update the bug if I can figure the exact sequence to reproduce this.

Fail to start

Using tip of both boltdb and boltd, when trying to get boltd I get:
$ go get github.com/boltdb/boltd/...

github.com/boltdb/boltd/cmd/boltd

src/github.com/boltdb/boltd/cmd/boltd/main.go:27: not enough arguments in call to bolt.Open

StripPrefix handler doesn't work

The docs say you can do this:

http.Handle("/introspect", http.StripPrefix("/introspect", boltd.NewHandler(db)))

But it doesn't work since Boltd's / handler redirects to /page - not to /instrospect/page.

To be honest I don't know why you've done it like that rather than just having the contents of the page handler in the index handler. Anyway, a hacky hacky "fix" is to do this instead:

http.Handle("/page", boltd.NewHandler(db))

And then go to /page instead of /introspect.

bolt db file path

Boltd cannot open database file which start with a dot,
for example go torrent lib use a file name : ".torrent.bolt.db"

current install

to install use:
go install github.com/boltdb/boltd/cmd/boltd@latest

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.