Runtime error when run two bisync jobs with _async

What is the problem you are having with rclone?

When I run the first rcone rc bisync job with the async=true flag, it runs normally, but if I run another bisync task at the same time, the application throws an error "panic: runtime error: invalid memory address or nil pointer dereference" and stops.
If I use the resync=true flag, the error does not occur.

Run the command 'rclone version' and share the full output of the command.

rclone v1.69.1

  • os/version: ubuntu 24.04 (64 bit)
  • os/kernel: 6.8.0-59-generic (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.24.2
  • go/linking: static
  • go/tags: none

Which cloud storage system are you using? (eg Google Drive)

webdav (other)

The command you were trying to run (eg rclone copy /tmp remote:tmp)

./rclone  rcd --no-check-certificate --rc-user=admin --rc-pass=admin -vvv --log-file /tmp/rclone.log
./rclone rc sync/bisync --rc-user=admin --rc-pass=admin path2="TR:/07_Acts_with_contractors" path1="/home/ilya/csync_test/07_Acts_with_contractors" createEmptySrcDirs=true  _async=true
./rclone rc sync/bisync --rc-user=admin --rc-pass=admin path2="TR:/08_Minutes" path1="/home/ilya/csync_test/08_Minutes" createEmptySrcDirs=true  _async=true

The rclone config contents with secrets removed.

[TR]
type = webdav
vendor = other
pass = 
url = https://192.168.200.95/alfresco/webdav/sites/TR/documentLibrary
user = 

A log from the command with the -vv flag

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0xae78bc]

goroutine 1730 [running]:
github.com/rclone/rclone/fs/accounting.StatsGroupFromContext(...)
        github.com/rclone/rclone/fs/accounting/stats_groups.go:264
github.com/rclone/rclone/fs/accounting.Stats({0x0, 0x0})
        github.com/rclone/rclone/fs/accounting/stats_groups.go:273 +0x1c
github.com/rclone/rclone/cmd/bisync.(*bisyncRun).ForObject(0xc000d76000, {0x2c3a8e0, 0xc000d35560}, 0x1)
        github.com/rclone/rclone/cmd/bisync/march.go:132 +0x6b
github.com/rclone/rclone/cmd/bisync.(*bisyncRun).parse(0xc000d76000?, {0x75eb253c92e8?, 0xc000d35560?}, 0x1?)
        github.com/rclone/rclone/cmd/bisync/march.go:111 +0x107
github.com/rclone/rclone/cmd/bisync.(*bisyncRun).Match(0xc000d76000, {0x25eeec0?, 0xc000cd4380?}, {0x75eb25505800, 0xc00091e8a0}, {0x75eb253c92e8, 0xc000d35560})
        github.com/rclone/rclone/cmd/bisync/march.go:89 +0x1e5
github.com/rclone/rclone/fs/march.(*March).processJob(0xc000df8480, {{0xc0004f5920, 0x2a}, {0xc0009d7950, 0x2a}, 0x7ffffffc, 0x7ffffffc, 0x0, 0x0})
        github.com/rclone/rclone/fs/march/march.go:491 +0xd46
github.com/rclone/rclone/fs/march.(*March).Run.func1()
        github.com/rclone/rclone/fs/march/march.go:169 +0x1e5
created by github.com/rclone/rclone/fs/march.(*March).Run in goroutine 1559
        github.com/rclone/rclone/fs/march/march.go:159 +0x172

hi, might want to rclone selfupdate and test again.

The behavior is the same with the latest version of rclone

rclone v1.70.3

  • os/version: ubuntu 24.04 (64 bit)
  • os/kernel: 6.8.0-63-generic (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.24.4
  • go/linking: static
  • go/tags: none
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0xb12b5c]

goroutine 2467 [running]:
github.com/rclone/rclone/fs/accounting.StatsGroupFromContext(...)
        github.com/rclone/rclone/fs/accounting/stats_groups.go:268
github.com/rclone/rclone/fs/accounting.Stats({0x0, 0x0})
        github.com/rclone/rclone/fs/accounting/stats_groups.go:277 +0x1c
github.com/rclone/rclone/cmd/bisync.(*bisyncRun).ForObject(0xc000924500, {0x2edc560, 0xc000bcfda0}, 0x1)
        github.com/rclone/rclone/cmd/bisync/march.go:132 +0x6b
github.com/rclone/rclone/cmd/bisync.(*bisyncRun).parse(0x79ade55a4007?, {0x79ade55a4088?, 0xc000bcfda0?}, 0xb?)
        github.com/rclone/rclone/cmd/bisync/march.go:111 +0x107
github.com/rclone/rclone/cmd/bisync.(*bisyncRun).Match(0xc000924500, {0x2?, 0xc0009dda50?}, {0x79ade5416458, 0xc001257500}, {0x79ade55a4088, 0xc000bcfda0})
        github.com/rclone/rclone/cmd/bisync/march.go:89 +0x1e5
github.com/rclone/rclone/fs/march.(*March).processJob.func9({0x79ade5416458, 0xc001257500}, {0x79ade55a4088, 0xc000bcfda0})
        github.com/rclone/rclone/fs/march/march.go:512 +0x7d
github.com/rclone/rclone/fs/march.(*March).matchListings(0xc000ac8000, 0xc000415810, 0xc0004158f0, 0xc0009ddde8, 0xc0009ddd98, 0xc0009ddd48)
        github.com/rclone/rclone/fs/march/march.go:357 +0x9bd
github.com/rclone/rclone/fs/march.(*March).processJob(0xc000ac8000, {{0xc000067f80, 0x65}, {0xc000d51260, 0x65}, 0x7ffffffb, 0x7ffffffb, 0x0, 0x0})
        github.com/rclone/rclone/fs/march/march.go:491 +0x61b
github.com/rclone/rclone/fs/march.(*March).Run.func1()
        github.com/rclone/rclone/fs/march/march.go:213 +0x1e5
created by github.com/rclone/rclone/fs/march.(*March).Run in goroutine 2454
        github.com/rclone/rclone/fs/march/march.go:203 +0x172

Hmmm I think I see the issue. If I'm right, the problem is that we are using global instead of local vars in github.com/rclone/rclone/cmd/bisync/march.go. Normally it wouldn't matter when running one job per instance, but with two jobs running in the same instance they are competing with each other.

We should fix this. Would you want to make an issue on github and tag me?

As a temporary workaround, you could consider running a second server simultaneously on a different --rc-addr. Or just run the jobs at different times.

Thanks for the feedback
I created an issue here is the link

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.