Skip to content
This repository was archived by the owner on Nov 9, 2024. It is now read-only.
This repository was archived by the owner on Nov 9, 2024. It is now read-only.

lodestone-fs-publisher crashes at start when documents symlinks to mount point #132

@mippos

Description

@mippos

lodestonehq/lodestone-fs-publisher:v0.1.0 docker image crashes at start.

Documents directory is actually a symlink to a mounted smb path which is very likely behind this problem.

/data/infra/lodestone/data/storage$ ls -al
lrwxrwxrwx ... documents -> /mnt/Releases

fstab: //10.1.2.3/Releases /mnt/Releases cifs credentials=/root/.smbcredentials,noperm,rw 0 0

 __    _____  ____  ____  ___  ____  _____  _  _  ____
(  )  (  _  )(  _ \( ___)/ __)(_  _)(  _  )( \( )( ___)
 )(__  )(_)(  )(_) ))__) \__ \  )(   )(_)(  )  (  )__)
(____)(_____)(____/(____)(___/ (__) (_____)(_)\_)(____)
AnalogJ/lodestone-publisher                  .-0.0.20
time="2021-03-18T06:22:12Z" level=info msg="Attempting to connect" type=fs
time="2021-03-18T06:22:12Z" level=info msg="Watching new directory: /data" type=fs
time="2021-03-18T06:22:12Z" level=info msg="Watching new directory: /data/Benchmarking" type=fs
time="2021-03-18T06:22:12Z" level=info msg="Watching new directory: <removed>" type=fs
time="2021-03-18T06:22:12Z" level=info msg="Connected!" type=fs
time="2021-03-18T06:22:12Z" level=info msg="Watching new directory: <removed>" type=fs
...
time="2021-03-18T06:22:12Z" level=warning msg="Channel closed. Re-running init..." type=fs
panic: runtime error: invalid memory address or nil pointer dereference
        panic: close of nil channel
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x6f0ee6]

goroutine 1 [running]:
github.com/analogj/lodestone-publisher/pkg/notify.(*AmqpNotify).Close(0xc0000bc540, 0x0, 0x0)
        /go/src/github.com/analogj/lodestone-publisher/pkg/notify/amqp.go:260 +0x93
panic(0x74d000, 0x9e3cf0)
        /usr/local/go/src/runtime/panic.go:969 +0x1b9
github.com/analogj/lodestone-publisher/pkg/watch.(*FsWatcher).AddWatchDir(0xc000097090, 0xc000094900, 0x56, 0x0, 0x0, 0x805e40, 0xc000099380, 0x805e40, 0xc000099380)
        /go/src/github.com/analogj/lodestone-publisher/pkg/watch/fs.go:122 +0x26
path/filepath.walk(0xc0001003c0, 0x32, 0x80d5c0, 0xc0001252b0, 0xc0001d3650, 0x0, 0x0)
        /usr/local/go/src/path/filepath/path.go:380 +0x213
path/filepath.walk(0xc0000b2780, 0x2c, 0x80d5c0, 0xc0001251e0, 0xc0001d3650, 0x0, 0x0)
        /usr/local/go/src/path/filepath/path.go:384 +0x2fe
path/filepath.walk(0xc0000b26c0, 0x28, 0x80d5c0, 0xc000125110, 0xc0001d3650, 0x0, 0x0)
        /usr/local/go/src/path/filepath/path.go:384 +0x2fe
path/filepath.walk(0xc0000b2180, 0x21, 0x80d5c0, 0xc00009ba00, 0xc0001d3650, 0x0, 0x0)
        /usr/local/go/src/path/filepath/path.go:384 +0x2fe
path/filepath.walk(0xc0000b8320, 0x15, 0x80d5c0, 0xc00009b930, 0xc0001d3650, 0x0, 0x0)
        /usr/local/go/src/path/filepath/path.go:384 +0x2fe
path/filepath.walk(0xc0000b8260, 0x12, 0x80d5c0, 0xc00009b860, 0xc0001d3650, 0x0, 0x0)
        /usr/local/go/src/path/filepath/path.go:384 +0x2fe
path/filepath.walk(0x7fffd9b2df68, 0x5, 0x80d5c0, 0xc00009b5f0, 0xc0001d3650, 0x0, 0xc0000ceb40)
        /usr/local/go/src/path/filepath/path.go:384 +0x2fe
path/filepath.Walk(0x7fffd9b2df68, 0x5, 0xc000093650, 0x3, 0xc0000cebc8)
        /usr/local/go/src/path/filepath/path.go:406 +0x105
github.com/analogj/lodestone-publisher/pkg/watch.(*FsWatcher).Start(0xc000097090, 0xc0000ccc40, 0x80a460, 0xc0000bc540, 0xc000099080)
        /go/src/github.com/analogj/lodestone-publisher/pkg/watch/fs.go:29 +0x172
main.main.func2(0xc0000da780, 0x0, 0x0)
        /go/src/github.com/analogj/lodestone-publisher/cmd/fs-publisher/fs-publisher.go:80 +0x59c
github.com/analogj/lodestone-publisher/vendor/github.com/urfave/cli.HandleAction(0x73ac20, 0x7b89d0, 0xc0000da780, 0xc0000bc400, 0x0)
        /go/src/github.com/analogj/lodestone-publisher/vendor/github.com/urfave/cli/app.go:485 +0x82
github.com/analogj/lodestone-publisher/vendor/github.com/urfave/cli.Command.Run(0x79f442, 0x5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7ab831, 0x26, 0x0, ...)
        /go/src/github.com/analogj/lodestone-publisher/vendor/github.com/urfave/cli/command.go:193 +0x976
github.com/analogj/lodestone-publisher/vendor/github.com/urfave/cli.(*App).Run(0xc0000a4ea0, 0xc0000c0000, 0x5, 0x5, 0x0, 0x0)
        /go/src/github.com/analogj/lodestone-publisher/vendor/github.com/urfave/cli/app.go:250 +0x848
main.main()
        /go/src/github.com/analogj/lodestone-publisher/cmd/fs-publisher/fs-publisher.go:123 +0x4d7

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions