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

panic: runtime error: invalid memory address or nil pointer dereference while trying to mount directory using FUSE #1391

Closed
angad-k opened this issue Jul 16, 2020 · 2 comments

Comments

@angad-k
Copy link

angad-k commented Jul 16, 2020

Describe the bug
Seaweed is giving a runtime error whenever I'm trying to mount a folder using FUSE.

System Setup

  • Started seaweed with weed server -filer=true. The related logs are as follows:
I0716 23:45:55  6308 master.go:151] current: 192.168.0.107:9333 peers:
I0716 23:45:55  6308 file_util.go:20] Folder /tmp Permission: -rwxrwxrwx
I0716 23:45:55  6308 master.go:151] current: 192.168.0.107:9333 peers:192.168.0.107:9333
I0716 23:45:55  6308 master_server.go:108] Volume Size Limit is 30000 MB
I0716 23:45:55  6308 file_util.go:20] Folder /tmp Permission: -rwxrwxrwx
I0716 23:45:55  6308 master_server.go:196] adminScripts:
I0716 23:45:55  6308 master.go:114] Start Seaweed Master 30GB 1.85 5a4f258 at 0.0.0.0:9333
I0716 23:45:55  6308 raft_server.go:47] Starting RaftServer with 192.168.0.107:9333
I0716 23:45:55  6308 raft_server.go:55] Peers Change: [] => [192.168.0.107:9333]
I0716 23:45:55  6308 disk_location.go:123] Store started on dir: /tmp with 0 volumes max 8
I0716 23:45:55  6308 disk_location.go:126] Store started on dir: /tmp with 0 ec shards
I0716 23:45:55  6308 volume_grpc_client_to_master.go:27] Volume server start with seed master nodes: [192.168.0.107:9333]
I0716 23:45:55  6308 volume.go:319] Start Seaweed volume server 30GB 1.85 5a4f258 at 0.0.0.0:8080
I0716 23:45:55  6308 volume_grpc_client_to_master.go:71] SendHeartbeat to 192.168.0.107:9333: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial tcp 192.168.0.107:19333: connect: connection refused"
I0716 23:45:55  6308 volume_grpc_client_to_master.go:51] heartbeat error: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial tcp 192.168.0.107:19333: connect: connection refused"
I0716 23:45:55  6308 raft_server.go:75] Initializing new cluster
I0716 23:45:55  6308 raft_server.go:88] current cluster leader: 192.168.0.107:9333
I0716 23:45:55  6308 master_server.go:151] [ 192.168.0.107:9333 ] I am the leader!
I0716 23:45:55  6308 master.go:138] Start Seaweed Master 30GB 1.85 5a4f258 grpc server at 0.0.0.0:19333
I0716 23:45:55  6308 master_grpc_server.go:253] + client master@192.168.0.107:56862
I0716 23:45:56  6308 master_grpc_server.go:253] + client filer@192.168.0.107:8888
I0716 23:45:56  6308 leveldb_store.go:41] filer store dir: .
I0716 23:45:56  6308 file_util.go:20] Folder . Permission: -rwxrwxr-x
I0716 23:45:56  6308 configuration.go:25] Configure filer for leveldb
I0716 23:45:56  6308 filer.go:144] Start Seaweed Filer 30GB 1.85 5a4f258 at 192.168.0.107:8888
I0716 23:45:56  6308 filer_grpc_server_sub_meta.go:130] + listener filer@192.168.0.107:45336
I0716 23:45:56  6308 filer_grpc_server_sub_meta.go:60]  filer@192.168.0.107:45336 local subscribe / from 2020-07-16 23:45:56.559028587 +0530 IST
I0716 23:46:00  6308 volume_grpc_client_to_master.go:74] Heartbeat to: 192.168.0.107:9333
I0716 23:46:00  6308 node.go:278] topo adds child DefaultDataCenter
I0716 23:46:00  6308 node.go:278] topo:DefaultDataCenter adds child DefaultRack
I0716 23:46:00  6308 node.go:278] topo:DefaultDataCenter:DefaultRack adds child 192.168.0.107:8080
I0716 23:46:00  6308 master_grpc_server.go:74] added volume server 192.168.0.107:8080
  • Then tried to mount a directory with weed mount -filer=localhost:8888 -dir=~/seaweed/dir1 -filer.path=/ This gave the error :
This is SeaweedFS version 30GB 1.85 5a4f258 linux amd64
current uid=1000 gid=1000
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x177ba95]

goroutine 1 [running]:
github.com/chrislusf/seaweedfs/weed/command.RunMount(0x2ff4c40, 0x12, 0x0)
	/home/travis/gopath/src/github.com/chrislusf/seaweedfs/weed/command/mount_std.go:169 +0xa15
github.com/chrislusf/seaweedfs/weed/command.runMount(0x2fdd8a0, 0xc00003a0e0, 0x0, 0x0, 0x0)
	/home/travis/gopath/src/github.com/chrislusf/seaweedfs/weed/command/mount_std.go:41 +0xc3
main.main()
	/home/travis/gopath/src/github.com/chrislusf/seaweedfs/weed/weed.go:66 +0x2f9
  • OS version
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04 LTS
Release:	20.04
Codename:	focal
  • output of weed version : version 30GB 1.85 5a4f258 linux amd64

  • if using filer, show the content of filer.toml

[leveldb]
enabled = true
dir = "."	

Expected behavior
The directory should get mounted.

@chrislusf
Copy link
Collaborator

try to use an absolute path in -dir=~/seaweed/dir1

chrislusf added a commit that referenced this issue Jul 16, 2020
@chrislusf
Copy link
Collaborator

Added fixes to resolve the home directory tilde ~

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

No branches or pull requests

2 participants