Dgraph v20.11.0 (for Windows) failed to run the second time (aborted itself)

Report a Dgraph Bug

What version of Dgraph are you using?

dgraph-v20.11.0

Have you tried reproducing the issue with the latest release?

The one being used is currently the latest release.

What is the hardware spec (RAM, OS)?

Two computers:

  • Windows 10 x64 20H2 (CPU: i7-6700, RAM: 12 GB)
  • Windows 10 x64 20H2 (CPU: i3-1005G1, RAM: 4 GB)

Steps to reproduce the issue (command/config used to run Dgraph).

(Usual routine.)

Make sure dgraph.exe is available and ready to use. Add them to PATH, if plausible.

Execute these two commands (in order) on fresh directory, abort them and try to execute them again.

$ dgraph zero
$ dgraph alpha

Note: I usually set up --lru_mb in Alpha, but it seems no longer required this time.

Expected behaviour and actual result.

Obviously, since I did nothing else to the database, there should be no problem and the server should keep running as usual, but what’s happening on the logs below says otherwise:

Dgraph Zero (second time):

[Decoder]: Using assembly version of decoder
Page Size: 4096
[Sentry] 2020/12/19 23:12:31 Integration installed: ContextifyFrames
[Sentry] 2020/12/19 23:12:31 Integration installed: Environment
[Sentry] 2020/12/19 23:12:31 Integration installed: Modules
[Sentry] 2020/12/19 23:12:31 Integration installed: IgnoreErrors
[Decoder]: Using assembly version of decoder
Page Size: 4096
[Sentry] 2020/12/19 23:12:32 Integration installed: ContextifyFrames
[Sentry] 2020/12/19 23:12:32 Integration installed: Environment
[Sentry] 2020/12/19 23:12:32 Integration installed: Modules
[Sentry] 2020/12/19 23:12:32 Integration installed: IgnoreErrors
I1219 23:12:32.448709    8420 sentry_integration.go:48] This instance of Dgraph will send anonymous reports of panics back to Dgraph Labs via Sentry. No confidential information is sent. These reports help improve Dgraph. To opt-out, restart your instance with the --enable_sentry=false flag. For more info, see https://dgraph.io/docs/howto/#data-handling.
I1219 23:12:32.639848    8420 init.go:107]

Dgraph version   : v20.11.0
Dgraph codename  : tchalla
Dgraph SHA-256   : 3cc88a3601c3ad36a469b70ab39ba4507e91e4a3fcdb3d4cfd7e2118e8544b9e
Commit SHA-1     : c4245ad55
Commit timestamp : 2020-12-16 15:55:40 +0530
Branch           : HEAD
Go version       : go1.15.5
jemalloc enabled : false

For Dgraph official documentation, visit https://dgraph.io/docs/.
For discussions about Dgraph     , visit http://discuss.dgraph.io.

Licensed variously under the Apache Public License 2.0 and Dgraph Community License.
Copyright 2015-2020 Dgraph Labs, Inc.


I1219 23:12:32.639848    8420 run.go:185] Setting Config to: {bindall:true portOffset:0 nodeId:1 numReplicas:1 peer: w:zw rebalanceInterval:480000000000 tlsClientConfig:<nil>}
I1219 23:12:32.639848    8420 run.go:98] Setting up grpc listener at: 0.0.0.0:5080
I1219 23:12:32.640819    8420 run.go:98] Setting up http listener at: 0.0.0.0:6080
[Sentry] 2020/12/19 23:12:32 Sending fatal event [5835e8489bcb4fc597f4db5cbc33c9ec] to o318308.ingest.sentry.io project: 1805390
2020/12/19 23:12:32 strconv.ParseInt: parsing "zw\\00001": invalid syntax
while parsing: zw\00001.wal
github.com/dgraph-io/dgraph/raftwal.getLogFiles
        /ext-go/1/src/github.com/dgraph-io/dgraph/raftwal/log.go:283
github.com/dgraph-io/dgraph/raftwal.openWal
        /ext-go/1/src/github.com/dgraph-io/dgraph/raftwal/wal.go:391
github.com/dgraph-io/dgraph/raftwal.InitEncrypted
        /ext-go/1/src/github.com/dgraph-io/dgraph/raftwal/storage.go:110
github.com/dgraph-io/dgraph/raftwal.Init
        /ext-go/1/src/github.com/dgraph-io/dgraph/raftwal/storage.go:90
github.com/dgraph-io/dgraph/dgraph/cmd/zero.run
        /ext-go/1/src/github.com/dgraph-io/dgraph/dgraph/cmd/zero/run.go:232
github.com/dgraph-io/dgraph/dgraph/cmd/zero.init.0.func1
        /ext-go/1/src/github.com/dgraph-io/dgraph/dgraph/cmd/zero/run.go:75
github.com/spf13/cobra.(*Command).execute
        /go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:830
github.com/spf13/cobra.(*Command).ExecuteC
        /go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:914
github.com/spf13/cobra.(*Command).Execute
        /go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:864
github.com/dgraph-io/dgraph/dgraph/cmd.Execute
        /ext-go/1/src/github.com/dgraph-io/dgraph/dgraph/cmd/root.go:71
main.main
        /ext-go/1/src/github.com/dgraph-io/dgraph/dgraph/main.go:102
runtime.main
        /usr/local/go/src/runtime/proc.go:204
runtime.goexit
        /usr/local/go/src/runtime/asm_amd64.s:1374

github.com/dgraph-io/dgraph/x.Check
        /ext-go/1/src/github.com/dgraph-io/dgraph/x/error.go:42
github.com/dgraph-io/dgraph/raftwal.Init
        /ext-go/1/src/github.com/dgraph-io/dgraph/raftwal/storage.go:91
github.com/dgraph-io/dgraph/dgraph/cmd/zero.run
        /ext-go/1/src/github.com/dgraph-io/dgraph/dgraph/cmd/zero/run.go:232
github.com/dgraph-io/dgraph/dgraph/cmd/zero.init.0.func1
        /ext-go/1/src/github.com/dgraph-io/dgraph/dgraph/cmd/zero/run.go:75
github.com/spf13/cobra.(*Command).execute
        /go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:830
github.com/spf13/cobra.(*Command).ExecuteC
        /go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:914
github.com/spf13/cobra.(*Command).Execute
        /go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:864
github.com/dgraph-io/dgraph/dgraph/cmd.Execute
        /ext-go/1/src/github.com/dgraph-io/dgraph/dgraph/cmd/root.go:71
main.main
        /ext-go/1/src/github.com/dgraph-io/dgraph/dgraph/main.go:102
runtime.main
        /usr/local/go/src/runtime/proc.go:204
runtime.goexit
        /usr/local/go/src/runtime/asm_amd64.s:1374

Dgraph Alpha (second time)

[Decoder]: Using assembly version of decoder
Page Size: 4096
[Sentry] 2020/12/19 23:12:16 Integration installed: ContextifyFrames
[Sentry] 2020/12/19 23:12:16 Integration installed: Environment
[Sentry] 2020/12/19 23:12:16 Integration installed: Modules
[Sentry] 2020/12/19 23:12:16 Integration installed: IgnoreErrors
[Decoder]: Using assembly version of decoder
Page Size: 4096
[Sentry] 2020/12/19 23:12:16 Integration installed: ContextifyFrames
[Sentry] 2020/12/19 23:12:16 Integration installed: Environment
[Sentry] 2020/12/19 23:12:16 Integration installed: Modules
[Sentry] 2020/12/19 23:12:16 Integration installed: IgnoreErrors
I1219 23:12:16.959150    4548 sentry_integration.go:48] This instance of Dgraph will send anonymous reports of panics back to Dgraph Labs via Sentry. No confidential information is sent. These reports help improve Dgraph. To opt-out, restart your instance with the --enable_sentry=false flag. For more info, see https://dgraph.io/docs/howto/#data-handling.
I1219 23:12:16.960148    4548 util_ee.go:126] KeyReader instantiated of type <nil>
I1219 23:12:17.149636    4548 init.go:107]

Dgraph version   : v20.11.0
Dgraph codename  : tchalla
Dgraph SHA-256   : 3cc88a3601c3ad36a469b70ab39ba4507e91e4a3fcdb3d4cfd7e2118e8544b9e
Commit SHA-1     : c4245ad55
Commit timestamp : 2020-12-16 15:55:40 +0530
Branch           : HEAD
Go version       : go1.15.5
jemalloc enabled : false

For Dgraph official documentation, visit https://dgraph.io/docs/.
For discussions about Dgraph     , visit http://discuss.dgraph.io.

Licensed variously under the Apache Public License 2.0 and Dgraph Community License.
Copyright 2015-2020 Dgraph Labs, Inc.


I1219 23:12:17.149636    4548 run.go:696] x.Config: {PortOffset:0 QueryEdgeLimit:1000000 NormalizeNodeLimit:10000 MutationsNQuadLimit:1000000 PollInterval:1s GraphqlExtension:true GraphqlDebug:false GraphqlLambdaUrl:}
I1219 23:12:17.149636    4548 run.go:697] x.WorkerConfig: {TmpDir:t ExportPath:export NumPendingProposals:256 Tracing:0.01 MyAddr: ZeroAddr:[localhost:5080] TLSClientConfig:<nil> TLSServerConfig:<nil> RaftId:0 WhiteListedIPRanges:[] MaxRetries:-1 StrictMutations:false AclEnabled:false AbortOlderThan:5m0s SnapshotAfter:10000 ProposedGroupId:0 StartTime:2020-12-19 23:12:16.5631768 +0700 +07 m=+0.015944201 LudicrousMode:false LudicrousConcurrency:2000 EncryptionKey:**** LogRequest:0 HardSync:false}
I1219 23:12:17.149636    4548 run.go:698] worker.Config: {PostingDir:p PostingDirCompression:1 PostingDirCompressionLevel:0 WALDir:w MutationsMode:0 AuthToken: PBlockCacheSize:697932185 PIndexCacheSize:375809638 WalCache:0 HmacSecret:**** AccessJwtTtl:0s RefreshJwtTtl:0s CachePercentage:0,65,35,0 CacheMb:0}
[Sentry] 2020/12/19 23:12:17 Sending fatal event [5686f0d043ec4f27a36abd3e6e1e4370] to o318308.ingest.sentry.io project: 1805390
2020/12/19 23:12:17 strconv.ParseInt: parsing "w\\00001": invalid syntax
while parsing: w\00001.wal
github.com/dgraph-io/dgraph/raftwal.getLogFiles
        /ext-go/1/src/github.com/dgraph-io/dgraph/raftwal/log.go:283
github.com/dgraph-io/dgraph/raftwal.openWal
        /ext-go/1/src/github.com/dgraph-io/dgraph/raftwal/wal.go:391
github.com/dgraph-io/dgraph/raftwal.InitEncrypted
        /ext-go/1/src/github.com/dgraph-io/dgraph/raftwal/storage.go:110
github.com/dgraph-io/dgraph/worker.(*ServerState).initStorage
        /ext-go/1/src/github.com/dgraph-io/dgraph/worker/server_state.go:101
github.com/dgraph-io/dgraph/worker.InitServerState
        /ext-go/1/src/github.com/dgraph-io/dgraph/worker/server_state.go:54
github.com/dgraph-io/dgraph/dgraph/cmd/alpha.run
        /ext-go/1/src/github.com/dgraph-io/dgraph/dgraph/cmd/alpha/run.go:700
github.com/dgraph-io/dgraph/dgraph/cmd/alpha.init.2.func1
        /ext-go/1/src/github.com/dgraph-io/dgraph/dgraph/cmd/alpha/run.go:94
github.com/spf13/cobra.(*Command).execute
        /go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:830
github.com/spf13/cobra.(*Command).ExecuteC
        /go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:914
github.com/spf13/cobra.(*Command).Execute
        /go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:864
github.com/dgraph-io/dgraph/dgraph/cmd.Execute
        /ext-go/1/src/github.com/dgraph-io/dgraph/dgraph/cmd/root.go:71
main.main
        /ext-go/1/src/github.com/dgraph-io/dgraph/dgraph/main.go:102
runtime.main
        /usr/local/go/src/runtime/proc.go:204
runtime.goexit
        /usr/local/go/src/runtime/asm_amd64.s:1374

github.com/dgraph-io/dgraph/x.Check
        /ext-go/1/src/github.com/dgraph-io/dgraph/x/error.go:42
github.com/dgraph-io/dgraph/worker.(*ServerState).initStorage
        /ext-go/1/src/github.com/dgraph-io/dgraph/worker/server_state.go:102
github.com/dgraph-io/dgraph/worker.InitServerState
        /ext-go/1/src/github.com/dgraph-io/dgraph/worker/server_state.go:54
github.com/dgraph-io/dgraph/dgraph/cmd/alpha.run
        /ext-go/1/src/github.com/dgraph-io/dgraph/dgraph/cmd/alpha/run.go:700
github.com/dgraph-io/dgraph/dgraph/cmd/alpha.init.2.func1
        /ext-go/1/src/github.com/dgraph-io/dgraph/dgraph/cmd/alpha/run.go:94
github.com/spf13/cobra.(*Command).execute
        /go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:830
github.com/spf13/cobra.(*Command).ExecuteC
        /go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:914
github.com/spf13/cobra.(*Command).Execute
        /go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:864
github.com/dgraph-io/dgraph/dgraph/cmd.Execute
        /ext-go/1/src/github.com/dgraph-io/dgraph/dgraph/cmd/root.go:71
main.main
        /ext-go/1/src/github.com/dgraph-io/dgraph/dgraph/main.go:102
runtime.main
        /usr/local/go/src/runtime/proc.go:204
runtime.goexit
        /usr/local/go/src/runtime/asm_amd64.s:1374

For sake of completion, here are the first runs:

Dgraph Zero (first time)

[Decoder]: Using assembly version of decoder
Page Size: 4096
[Sentry] 2020/12/19 23:11:26 Integration installed: ContextifyFrames
[Sentry] 2020/12/19 23:11:26 Integration installed: Environment
[Sentry] 2020/12/19 23:11:26 Integration installed: Modules
[Sentry] 2020/12/19 23:11:26 Integration installed: IgnoreErrors
[Decoder]: Using assembly version of decoder
Page Size: 4096
[Sentry] 2020/12/19 23:11:26 Integration installed: ContextifyFrames
[Sentry] 2020/12/19 23:11:26 Integration installed: Environment
[Sentry] 2020/12/19 23:11:26 Integration installed: Modules
[Sentry] 2020/12/19 23:11:26 Integration installed: IgnoreErrors
I1219 23:11:27.117561    5288 sentry_integration.go:48] This instance of Dgraph will send anonymous reports of panics back to Dgraph Labs via Sentry. No confidential information is sent. These reports help improve Dgraph. To opt-out, restart your instance with the --enable_sentry=false flag. For more info, see https://dgraph.io/docs/howto/#data-handling.
I1219 23:11:27.307056    5288 init.go:107]

Dgraph version   : v20.11.0
Dgraph codename  : tchalla
Dgraph SHA-256   : 3cc88a3601c3ad36a469b70ab39ba4507e91e4a3fcdb3d4cfd7e2118e8544b9e
Commit SHA-1     : c4245ad55
Commit timestamp : 2020-12-16 15:55:40 +0530
Branch           : HEAD
Go version       : go1.15.5
jemalloc enabled : false

For Dgraph official documentation, visit https://dgraph.io/docs/.
For discussions about Dgraph     , visit http://discuss.dgraph.io.

Licensed variously under the Apache Public License 2.0 and Dgraph Community License.
Copyright 2015-2020 Dgraph Labs, Inc.


I1219 23:11:27.307056    5288 run.go:185] Setting Config to: {bindall:true portOffset:0 nodeId:1 numReplicas:1 peer: w:zw rebalanceInterval:480000000000 tlsClientConfig:<nil>}
I1219 23:11:27.307056    5288 run.go:98] Setting up grpc listener at: 0.0.0.0:5080
I1219 23:11:27.308057    5288 run.go:98] Setting up http listener at: 0.0.0.0:6080
I1219 23:11:27.309023    5288 storage.go:132] Init Raft Storage with snap: 0, first: 1, last: 0
I1219 23:11:27.310020    5288 node.go:152] Setting raft.Config to: &{ID:1 peers:[] learners:[] ElectionTick:20 HeartbeatTick:1 Storage:0xc00049aa00 Applied:0 MaxSizePerMsg:262144 MaxCommittedSizePerReady:67108864 MaxUncommittedEntriesSize:0 MaxInflightMsgs:256 CheckQuorum:false PreVote:true ReadOnlyOption:0 Logger:0x239b7f8 DisableProposalForwarding:false}
I1219 23:11:27.314009    5288 node.go:326] Group 0 found 0 entries
I1219 23:11:27.314009    5288 raft.go:600] Starting a brand new node
I1219 23:11:27.314009    5288 log.go:34] 1 became follower at term 0
I1219 23:11:27.314009    5288 log.go:34] newRaft 1 [peers: [], term: 0, commit: 0, applied: 0, lastindex: 0, lastterm: 0]
I1219 23:11:27.314009    5288 log.go:34] 1 became follower at term 1
I1219 23:11:27.314009    5288 run.go:303] Running Dgraph Zero...
E1219 23:11:27.315016    5288 raft.go:484] While proposing CID: Not Zero leader. Aborting proposal: cid:"0028fe5b-74a1-4cb9-ae6a-1e299c250da8" . Retrying...
I1219 23:11:27.315016    5288 node.go:189] Setting conf state to nodes:1
I1219 23:11:27.316003    5288 raft.go:878] Done applying conf change at 0x1
I1219 23:11:29.317848    5288 log.go:34] 1 is starting a new election at term 1
I1219 23:11:29.317848    5288 log.go:34] 1 became pre-candidate at term 1
I1219 23:11:29.317848    5288 log.go:34] 1 received MsgPreVoteResp from 1 at term 1
I1219 23:11:29.317848    5288 log.go:34] 1 became candidate at term 2
I1219 23:11:29.317848    5288 log.go:34] 1 received MsgVoteResp from 1 at term 2
I1219 23:11:29.317848    5288 log.go:34] 1 became leader at term 2
I1219 23:11:29.317848    5288 log.go:34] raft.node: 1 elected leader 1 at term 2
I1219 23:11:29.317848    5288 raft.go:843] I've become the leader, updating leases.
I1219 23:11:29.317848    5288 assign.go:42] Updated Lease id: 1. Txn Ts: 1
I1219 23:11:30.316967    5288 raft.go:477] CID set for cluster: c9983897-cf71-45eb-9361-85e4ba685663
I1219 23:11:30.316967    5288 license_ee.go:45] Enterprise trial license proposed to the cluster: license:<maxNodes:18446744073709551615 expiryTs:1610986290 >
I1219 23:11:55.000150    5288 zero.go:432] Got connection request: cluster_info_only:true
I1219 23:11:55.000150    5288 zero.go:450] Connected: cluster_info_only:true
I1219 23:11:55.001142    5288 zero.go:432] Got connection request: addr:"localhost:7080"
I1219 23:11:55.002109    5288 pool.go:162] CONNECTING to localhost:7080
I1219 23:11:55.002109    5288 zero.go:584] Connected: id:1 group_id:1 addr:"localhost:7080"
W1219 23:12:13.859919    5288 pool.go:267] Connection lost with localhost:7080. Error: rpc error: code = Unavailable desc = transport is closing
I1219 23:12:27.322829    5288 raft.go:717] Skipping creating a snapshot. Num groups: 1, Num checkpoints: 0
I1219 23:12:29.769930    5288 run.go:267] --- Received interrupt signal
I1219 23:12:29.769930    5288 run.go:286] Shutting down...
E1219 23:12:29.769930    5288 server.go:24] error from cmux serve: accept tcp [::]:6080: use of closed network connection
[Sentry] 2020/12/19 23:12:29 Buffer flushed successfully.
I1219 23:12:29.769930    5288 raft.go:807] Zero Node.Run finished.
E1219 23:12:29.769930    5288 server.go:66] Stopped taking more http(s) requests. Err: mux: listener closed
I1219 23:12:29.769930    5288 server.go:70] All http(s) requests finished.
I1219 23:12:29.769930    5288 run.go:143] gRPC server stopped : accept tcp [::]:5080: use of closed network connection
I1219 23:12:29.769930    5288 run.go:305] Closer closed.
I1219 23:12:29.769930    5288 run.go:308] Raft WAL closed with err: <nil>
I1219 23:12:29.769930    5288 run.go:310] All done. Goodbye!

Somehow, this one below encountered error a lot (I had to erase several lines to fit the quota).

Dgraph Alpha (first time)

[Decoder]: Using assembly version of decoder
Page Size: 4096
[Sentry] 2020/12/19 23:11:54 Integration installed: ContextifyFrames
[Sentry] 2020/12/19 23:11:54 Integration installed: Environment
[Sentry] 2020/12/19 23:11:54 Integration installed: Modules
[Sentry] 2020/12/19 23:11:54 Integration installed: IgnoreErrors
[Decoder]: Using assembly version of decoder
Page Size: 4096
[Sentry] 2020/12/19 23:11:54 Integration installed: ContextifyFrames
[Sentry] 2020/12/19 23:11:54 Integration installed: Environment
[Sentry] 2020/12/19 23:11:54 Integration installed: Modules
[Sentry] 2020/12/19 23:11:54 Integration installed: IgnoreErrors
I1219 23:11:54.688677   10224 sentry_integration.go:48] This instance of Dgraph will send anonymous reports of panics back to Dgraph Labs via Sentry. No confidential information is sent. These reports help improve Dgraph. To opt-out, restart your instance with the --enable_sentry=false flag. For more info, see https://dgraph.io/docs/howto/#data-handling.
I1219 23:11:54.689642   10224 util_ee.go:126] KeyReader instantiated of type <nil>
I1219 23:11:54.878199   10224 init.go:107]

Dgraph version   : v20.11.0
Dgraph codename  : tchalla
Dgraph SHA-256   : 3cc88a3601c3ad36a469b70ab39ba4507e91e4a3fcdb3d4cfd7e2118e8544b9e
Commit SHA-1     : c4245ad55
Commit timestamp : 2020-12-16 15:55:40 +0530
Branch           : HEAD
Go version       : go1.15.5
jemalloc enabled : false

For Dgraph official documentation, visit https://dgraph.io/docs/.
For discussions about Dgraph     , visit http://discuss.dgraph.io.

Licensed variously under the Apache Public License 2.0 and Dgraph Community License.
Copyright 2015-2020 Dgraph Labs, Inc.

...

E1219 23:11:54.892135   10224 groups.go:1143] Error during SubscribeForUpdates for prefix "\x00\x00\vdgraph.cors\x00": Unable to find any servers for group: 1. closer err: <nil>
E1219 23:11:54.894236   10224 groups.go:1143] Error during SubscribeForUpdates for prefix "\x00\x00\x15dgraph.graphql.schema\x00": Unable to find any servers for group: 1. closer err: <nil>
E1219 23:11:56.009139   10224 log.go:32] while deleting file: p/00001.mem, err: remove p/00001.mem: The process cannot access the file because it is being used by another process.
badger 2020/12/19 23:11:56 ERROR: while deleting file: C:\Users\ua\AppData\Local\Temp\dgraph_index_314701839/00001.mem, err: remove C:\Users\ua\AppData\Local\Temp\dgraph_index_314701839/00001.mem: The process cannot access the file because it is being used by another process.
I1219 23:11:56.047036   10224 index.go:942] Rebuilding index for attr dgraph.cors and tokenizers [exact]
I1219 23:11:56.048034   10224 groups.go:487] Serving tablet for: dgraph.type
I1219 23:11:56.098901   10224 log.go:34] Rebuilding index for predicate dgraph.cors (1/2): Sent data of size 0 B
badger 2020/12/19 23:11:56 ERROR: while deleting file: C:\Users\ua\AppData\Local\Temp\dgraph_index_370177570/00001.mem, err: remove C:\Users\ua\AppData\Local\Temp\dgraph_index_370177570/00001.mem: The process cannot access the file because it is being used by another process.
I1219 23:11:56.116853   10224 mutation.go:188] Done schema update predicate:"dgraph.cors" value_type:STRING directive:INDEX tokenizer:"exact" list:true upsert:true
I1219 23:11:56.116853   10224 draft.go:124] Operation completed with id: opIndexing
E1219 23:11:56.116853   10224 draft.go:714] Applying proposal. Error: operation opIndexing is already running. Proposal: {"group_id:1 start_ts:2 schema:<predicate:\"dgraph.type\" value_type:STRING directive:INDEX tokenizer:\"exact\" list:true > " [] "<nil>" "" "<nil>" "<nil>" '\t' '\x00' "<nil>" {} "" '\x00'}.
E1219 23:11:56.116853   10224 groups.go:260] Error while proposing initial schema: operation opIndexing is already running
E1219 23:11:56.228888   10224 log.go:32] while deleting file: p/00002.mem, err: remove p/00002.mem: The process cannot access the file because it is being used by another process.
W1219 23:11:56.253883   10224 log.go:36] [Compactor: 174] LOG Compact FAILED with error: remove p\000001.sst: The process cannot access the file because it is being used by another process.: {span:0xc006738580 compactorId:174 t:{baseLevel:6 targetSz:[0 10485760 10485760 10485760 10485760 10485760 10485760] fileSz:[67108864 2097152 2097152 2097152 2097152 2097152 2097152]} p:{level:0 score:1.74 adjusted:0 dropPrefixes:[[0 0 11 100 103 114 97 112 104 46 116 121 112 101 2 2] [4 0 11 100 103 114 97 112 104 46 116 121 112 101 2 2] [0 0 11 100 103 114 97 112 104 46 116 121 112 101 2 3] [4 0 11 100 103 114 97 112 104 46 116 121 112 101 2 3]] t:{baseLevel:6 targetSz:[0 10485760 10485760 10485760 10485760 10485760 10485760] fileSz:[67108864 2097152 2097152 2097152 2097152 2097152 2097152]}} thisLevel:0xc000480a80 nextLevel:0xc000480cc0 top:[0xc006592e40] bot:[] thisRange:{left:[1 0 11 100 103 114 97 112 104 46 99 111 114 115 0 0 0 0 0 0 0 0] right:[1 0 11 100 103 114 97 112 104 46 99 111 114 115 255 255 255 255 255 255 255 255] inf:false} nextRange:{left:[1 0 11 100 103 114 97 112 104 46 99 111 114 115 0 0 0 0 0 0 0 0] right:[1 0 11 100 103 114 97 112 104 46 99 111 114 115 255 255 255 255 255 255 255 255] inf:false} splits:[] thisSize:0 dropPrefixes:[[0 0 11 100 103 114 97 112 104 46 116 121 112 101 2 2] [4 0 11 100 103 114 97 112 104 46 116 121 112 101 2 2] [0 0 11 100 103 114 97 112 104 46 116 121 112 101 2 3] [4 0 11 100 103 114 97 112 104 46 116 121 112 101 2 3]]}
W1219 23:11:56.253883   10224 log.go:36] While compacting level 0: remove p\000001.sst: The process cannot access the file because it is being used by another process.
badger 2020/12/19 23:11:56 ERROR: while deleting file: C:\Users\ua\AppData\Local\Temp\dgraph_index_314456345/00001.mem, err: remove C:\Users\ua\AppData\Local\Temp\dgraph_index_314456345/00001.mem: The process cannot access the file because it is being used by another process.
badger 2020/12/19 23:11:56 ERROR: while deleting file: C:\Users\ua\AppData\Local\Temp\dgraph_index_221637028/00001.mem, err: remove C:\Users\ua\AppData\Local\Temp\dgraph_index_221637028/00001.mem: The process cannot access the file because it is being used by another process.
E1219 23:11:56.387512   10224 groups.go:260] Error while proposing initial schema: operation opIndexing is already running
E1219 23:11:56.497601   10224 log.go:32] while deleting file: p/00003.mem, err: remove p/00003.mem: The process cannot access the file because it is being used by another process.
W1219 23:11:56.508571   10224 log.go:36] [Compactor: 174] LOG Compact FAILED with error: remove p\000003.sst: The process cannot access the file because it is being used by another process.: {span:0xc00048b200 compactorId:174 t:{baseLevel:6 targetSz:[0 10485760 10485760 10485760 10485760 10485760 10485760] fileSz:[67108864 2097152 2097152 2097152 2097152 2097152 2097152]} p:{level:0 score:1.74 adjusted:0 dropPrefixes:[[0 0 18 100 103 114 97 112 104 46 103 114 97 112 104 113 108 46 120 105 100 2 2] [4 0 18 100 103 114 97 112 104 46 103 114 97 112 104 113 108 46 120 105 100 2 2] [0 0 18 100 103 114 97 112 104 46 103 114 97 112 104 113 108 46 120 105 100 2 3] [4 0 18 100 103 114 97 112 104 46 103 114 97 112 104 113 108 46 120 105 100 2 3]] t:{baseLevel:6 targetSz:[0 10485760 10485760 10485760 10485760 10485760 10485760] fileSz:[67108864 2097152 2097152 2097152 2097152 2097152 2097152]}} thisLevel:0xc000480a80 nextLevel:0xc000480cc0 top:[0xc006592e40] bot:[] thisRange:{left:[1 0 11 100 103 114 97 112 104 46 116 121 112 101 0 0 0 0 0 0 0 0] right:[1 0 21 100 103 114 97 112 104 46 103 114 97 112 104 113 108 46 115 99 104 101 109 97 255 255 255 255 255 255 255 255] inf:false} nextRange:{left:[1 0 11 100 103 114 97 112 104 46 116 121 112 101 0 0 0 0 0 0 0 0] right:[1 0 21 100 103 114 97 112 104 46 103 114 97 112 104 113 108 46 115 99 104 101 109 97 255 255 255 255 255 255 255 255] inf:false} splits:[] thisSize:0 dropPrefixes:[[0 0 18 100 103 114 97 112 104 46 103 114 97 112 104 113 108 46 120 105 100 2 2] [4 0 18 100 103 114 97 112 104 46 103 114 97 112 104 113 108 46 120 105 100 2 2] [0 0 18 100 103 114 97 112 104 46 103 114 97 112 104 113 108 46 120 105 100 2 3] [4 0 18 100 103 114 97 112 104 46 103 114 97 112 104 113 108 46 120 105 100 2 3]]}
W1219 23:11:56.508571   10224 log.go:36] While compacting level 0: remove p\000003.sst: The process cannot access the file because it is being used by another process.
badger 2020/12/19 23:11:56 ERROR: while deleting file: C:\Users\ua\AppData\Local\Temp\dgraph_index_920113843/00001.mem, err: remove C:\Users\ua\AppData\Local\Temp\dgraph_index_920113843/00001.mem: The process cannot access the file because it is being used by another process.
E1219 23:11:56.568414   10224 draft.go:714] Applying proposal. Error: operation opIndexing is already running. Proposal: {"group_id:1 start_ts:6 schema:<predicate:\"dgraph.graphql.schema_history\" value_type:STRING > " [] "<nil>" "" "<nil>" "<nil>" '\x17' '\x00' "<nil>" {} "" '\x00'}.
E1219 23:11:56.569408   10224 groups.go:260] Error while proposing initial schema: operation opIndexing is already running..
E1219 23:11:56.682113   10224 log.go:32] while deleting file: p/00004.mem, err: remove p/00004.mem: The process cannot access the file because it is being used by another process.
W1219 23:11:56.692108   10224 log.go:36] [Compactor: 174] LOG Compact FAILED with error: remove p\000004.sst: The process cannot access the file because it is being used by another process.: {span:0xc006738580 compactorId:174 t:{baseLevel:6 targetSz:[0 10485760 10485760 10485760 10485760 10485760 10485760] fileSz:[67108864 2097152 2097152 2097152 2097152 2097152 2097152]} p:{level:0 score:1.74 adjusted:0 dropPrefixes:[[0 0 27 100 103 114 97 112 104 46 103 114 97 112 104 113 108 46 112 95 115 104 97 50 53 54 104 97 115 104 2 2] [4 0 27 100 103 114 97 112 104 46 103 114 97 112 104 113 108 46 112 95 115 104 97 50 53 54 104 97 115 104 2 2] [0 0 27 100 103 114 97 112 104 46 103 114 97 112 104 113 108 46 112 95 115 104 97 50 53 54 104 97 115 104 2 3] [4 0 27 100 103 114 97 112 104 46 103 114 97 112 104 113 108 46 112 95 115 104 97 50 53 54 104 97 115 104 2 3]] t:{baseLevel:6 targetSz:[0 10485760 10485760 10485760 10485760 10485760 10485760] fileSz:[67108864 2097152 2097152 2097152 2097152 2097152 2097152]}} thisLevel:0xc000480a80 nextLevel:0xc000480cc0 top:[0xc006592e40] bot:[0xc006592fc0] thisRange:{left:[1 0 18 100 103 114 97 112 104 46 103 114 97 112 104 113 108 46 120 105 100 0 0 0 0 0 0 0 0] right:[1 0 32 100 103 114 97 112 104 46 103 114 97 112 104 113 108 46 115 99 104 101 109 97 95 99 114 101 97 116 101 100 95 97 116 255 255 255 255 255 255 255 255] inf:false} nextRange:{left:[1 0 11 100 103 114 97 112 104 46 116 121 112 101 0 0 0 0 0 0 0 0] right:[1 0 21 100 103 114 97 112 104 46 103 114 97 112 104 113 108 46 115 99 104 101 109 97 255 255 255 255 255 255 255 255] inf:false} splits:[] thisSize:0 dropPrefixes:[[0 0 27 100 103 114 97 112 104 46 103 114 97 112 104 113 108 46 112 95 115 104 97 50 53 54 104 97 115 104 2 2] [4 0 27 100 103 114 97 112 104 46 103 114 97 112 104 113 108 46 112 95 115 104 97 50 53 54 104 97 115 104 2 2] [0 0 27 100 103 114 97 112 104 46 103 114 97 112 104 113 108 46 112 95 115 104 97 50 53 54 104 97 115 104 2 3] [4 0 27 100 103 114 97 112 104 46 103 114 97 112 104 113 108 46 112 95 115 104 97 50 53 54 104 97 115 104 2 3]]}
W1219 23:11:56.692108   10224 log.go:36] While compacting level 0: remove p\000004.sst: The process cannot access the file because it is being used by another process.
badger 2020/12/19 23:11:56 ERROR: while deleting file: C:\Users\ua\AppData\Local\Temp\dgraph_index_738943094/00001.mem, err: remove C:\Users\ua\AppData\Local\Temp\dgraph_index_738943094/00001.mem: The process cannot access the file because it is being used by another process.
E1219 23:12:13.858926   10224 groups.go:1143] Error during SubscribeForUpdates for prefix "\x00\x00\vdgraph.cors\x00": while receiving from stream: rpc error: code = Canceled desc = context canceled. closer err: context canceled
E1219 23:12:13.858926   10224 groups.go:937] Error in oracle delta stream. Error: rpc error: code = Canceled desc = context canceled
E1219 23:12:13.858926   10224 groups.go:829] Unable to sync memberships. Error: rpc error: code = Canceled desc = context canceled. State: <nil>
E1219 23:12:13.859919   10224 groups.go:1143] Error during SubscribeForUpdates for prefix "\x00\x00\x15dgraph.graphql.schema\x00": while receiving from stream: rpc error: code = Canceled desc = context canceled. closer err: context canceled
W1219 23:12:13.859919   10224 pool.go:267] Connection lost with localhost:7080. Error: rpc error: code = Unavailable desc = transport is closing
E1219 23:12:13.865903   10224 log.go:32] while deleting file: p/00005.mem, err: remove p/00005.mem: The process cannot access the file because it is being used by another process.

If I had to deduce from the log, it seems to be this common issue where Windows handles paths in a different manner compared to the rest.

Needless to say, the previous build v20.07.2 runs perfectly fine on both my PCs.

Are you using a File System different from NTFS?

No. Both PCs are using NTFS as boot drive.

Guess I’m gonna reinstall Windows tomorrow and we’ll see if the issue persists.

Update: Turns out the issue exists even on fresh-installed OS.

Okay, I have accepted it. Ping @hardik - On monday he can take a look.

1 Like

I faced the same issue as well and found out that the latest master of dgraph has the fix, but not released.

fix(dgraph): Fix dgraph crash on windows by jarifibrahim · Pull Request #7261 · dgraph-io/dgraph (github.com)

1 Like

Hey, this fix will be released by the end of January in dgraph v20.11.1 .

1 Like

Thanks @ibrahim. I build dgraph from source on windows and it does work, so will wait for official release.