--low-level-retries=0 causes panic: runtime error: invalid memory address or nil pointer dereference

What is the problem you are having with rclone?

Testing rclone with small/short values around internet connection time outs and retries. I was attempting to force some errors as if I had a bad/spotty internet connection.

If I sent --low-level-retires=0 this error occurs every time. If I set --low-level-retires=1 it works correctly.

This is not causing me any problems as it is not a --low-level-retries value I expect to use. However, it appears to be boundary condition that should be addressed.

What is your rclone version (output from rclone version)

1.54.0

Which OS you are using and how many bits (eg Windows 7, 64 bit)

raspbian 32bit

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

google drive

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

rclone -vv --retries=1 --retries-sleep=10s --low-level-retries=0 --timeout=5s --contimeout=2s --expect-continue-timeout=1s --max-duration=5s --checkers=1 --multi-thread-streams=0 --no-traverse --transfers=1 --check-first --use-mmap --buffer-size=64M move /home/pi/WaterLogger/moveTest gdrive:WaterLogger/dataTest --delete-empty-src-dirs

The rclone config contents with secrets removed.

[gdrive]
type = drive
client_id = xxx
client_secret = xxxx
scope = drive
token = {xxx

A log from the command with the -vv flag

RClone cmd: rclone -vv --retries=1 --retries-sleep=10s --low-level-retries=0 --timeout=5s --contimeout=2s --expect-continue-timeout=1s --max-duration=5s --checkers=1 --multi-thread-streams=0 --no-traverse --transfers=1 --check-first --use-mmap --buffer-size=64M move /home/pi/WaterLogger/moveTest gdrive:WaterLogger/dataTest --delete-empty-src-dirs
2021/02/13 14:47:59 DEBUG : rclone: Version "v1.54.0" starting with parameters ["rclone" "-vv" "--retries=1" "--retries-sleep=10s" "--low-level-retries=0" "--timeout=5s" "--contimeout=2s" "--expect-continue-timeout=1s" "--max-duration=5s" "--checkers=1" "--multi-thread-streams=0" "--no-traverse" "--transfers=1" "--check-first" "--use-mmap" "--buffer-size=64M" "move" "/home/pi/WaterLogger/moveTest" "gdrive:WaterLogger/dataTest" "--delete-empty-src-dirs"]
2021/02/13 14:47:59 DEBUG : Creating backend with remote "/home/pi/WaterLogger/moveTest"
2021/02/13 14:47:59 DEBUG : Using config file from "/home/pi/.config/rclone/rclone.conf"
2021/02/13 14:47:59 DEBUG : Creating backend with remote "gdrive:WaterLogger/dataTest"
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x68 pc=0x7fbc4c]

goroutine 1 [running]:
github.com/rclone/rclone/backend/drive.(*Fs).getRootID(0x396b300, 0x343c088, 0xbea107d1, 0x6, 0xbea107d8)
        github.com/rclone/rclone/backend/drive/drive.go:715 +0x90
github.com/rclone/rclone/backend/drive.NewFs(0x1675e20, 0x343c088, 0xbea107d1, 0x6, 0xbea107d8, 0x14, 0x1668240, 0x36aa040, 0x0, 0x0, ...)
        github.com/rclone/rclone/backend/drive/drive.go:1158 +0x654
github.com/rclone/rclone/fs.NewFs(0x1675e20, 0x343c088, 0xbea107d1, 0x1b, 0x340ac60, 0x1, 0x0, 0x87c01)
        github.com/rclone/rclone/fs/fs.go:1366 +0x10c
github.com/rclone/rclone/fs/cache.GetFn.func1(0xbea107d1, 0x1b, 0xbea107d1, 0x1b, 0x1ff9c58, 0x0, 0x0)
        github.com/rclone/rclone/fs/cache/cache.go:48 +0x44
github.com/rclone/rclone/lib/cache.(*Cache).Get(0x340ac60, 0xbea107d1, 0x1b, 0x3735df8, 0x0, 0x0, 0x0, 0x0)
        github.com/rclone/rclone/lib/cache/cache.go:61 +0x114
github.com/rclone/rclone/fs/cache.GetFn(0x1675e20, 0x343c088, 0xbea107d1, 0x1b, 0x146de10, 0x1d, 0x1688e50, 0x3514400, 0xea8d18)
        github.com/rclone/rclone/fs/cache/cache.go:47 +0x98
github.com/rclone/rclone/fs/cache.Get(...)
        github.com/rclone/rclone/fs/cache/cache.go:104
github.com/rclone/rclone/cmd.newFsDir(0xbea107d1, 0x1b, 0x1688e50, 0x362c540)
        github.com/rclone/rclone/cmd/cmd.go:142 +0x40
github.com/rclone/rclone/cmd.NewFsSrcFileDst(0x3742d80, 0x2, 0x12, 0x3742d80, 0x2, 0x12, 0x3716200, 0x139d392, 0x113e790)
        github.com/rclone/rclone/cmd/cmd.go:171 +0x78
github.com/rclone/rclone/cmd/move.glob..func1(0x1fdbaa0, 0x3742d80, 0x2, 0x12)
        github.com/rclone/rclone/cmd/move/move.go:60 +0x5c
github.com/spf13/cobra.(*Command).execute(0x1fdbaa0, 0x396b200, 0x12, 0x20, 0x1fdbaa0, 0x396b200)
        github.com/spf13/cobra@v1.1.1/command.go:854 +0x1e8
github.com/spf13/cobra.(*Command).ExecuteC(0x1fd7a50, 0x0, 0x3462070, 0x0)
        github.com/spf13/cobra@v1.1.1/command.go:958 +0x274
github.com/spf13/cobra.(*Command).Execute(...)
        github.com/spf13/cobra@v1.1.1/command.go:895
github.com/rclone/rclone/cmd.Main()
        github.com/rclone/rclone/cmd/cmd.go:543 +0x90
main.main()
        github.com/rclone/rclone/rclone.go:14 +0x14
RClone to GDrive return code:%d:%x exit code:%d:%x sig num:%d:%x 512 512 2 2 0 0
RClone update to GDrive returned error code: %d 2

With --low-level-retries=1

RClone cmd: rclone -vv --retries=1 --retries-sleep=10s --low-level-retries=1 --timeout=5s --contimeout=2s --expect-continue-timeout=1s --max-duration=5s --checkers=1 --multi-thread-streams=0 --no-traverse --transfers=1 --check-first --use-mmap --buffer-size=64M move /home/pi/WaterLogger/moveTest gdrive:WaterLogger/dataTest --delete-empty-src-dirs
2021/02/13 14:57:36 DEBUG : rclone: Version "v1.54.0" starting with parameters ["rclone" "-vv" "--retries=1" "--retries-sleep=10s" "--low-level-retries=1" "--timeout=5s" "--contimeout=2s" "--expect-continue-timeout=1s" "--max-duration=5s" "--checkers=1" "--multi-thread-streams=0" "--no-traverse" "--transfers=1" "--check-first" "--use-mmap" "--buffer-size=64M" "move" "/home/pi/WaterLogger/moveTest" "gdrive:WaterLogger/dataTest" "--delete-empty-src-dirs"]
2021/02/13 14:57:36 DEBUG : Creating backend with remote "/home/pi/WaterLogger/moveTest"
2021/02/13 14:57:36 DEBUG : Using config file from "/home/pi/.config/rclone/rclone.conf"
2021/02/13 14:57:36 DEBUG : Creating backend with remote "gdrive:WaterLogger/dataTest"
2021/02/13 14:57:38 DEBUG : Google drive root 'WaterLogger/dataTest': root_folder_id = "0AEGVUEE5jRR3Uk9PVA" - save this in the config to speed up startup
2021/02/13 14:57:39 INFO  : Google drive root 'WaterLogger/dataTest': Running all checks before starting transfers
2021/02/13 14:57:39 INFO  : Google drive root 'WaterLogger/dataTest': Transfer session deadline: 2021/02/13 14:57:44
2021/02/13 14:57:39 DEBUG : Google drive root 'WaterLogger/dataTest': Waiting for checks to finish
2021/02/13 14:57:39 DEBUG : 2021/20210213.dat: Sizes differ (src 1517 vs dst 1405)
2021/02/13 14:57:39 INFO  : Google drive root 'WaterLogger/dataTest': Checks finished, now starting transfers
2021/02/13 14:57:39 DEBUG : Google drive root 'WaterLogger/dataTest': Waiting for transfers to finish
2021/02/13 14:57:40 DEBUG : 2021/20210213.dat: MD5 = 8709a05124b8101f749626ea4ade3efb OK
2021/02/13 14:57:40 INFO  : 2021/20210213.dat: Copied (replaced existing)
2021/02/13 14:57:40 INFO  : 2021/20210213.dat: Deleted
2021/02/13 14:57:40 DEBUG : 2021: Removing directory
2021/02/13 14:57:40 DEBUG : Local file system at /home/pi/WaterLogger/moveTest: deleted 1 directories
2021/02/13 14:57:40 INFO  :
Transferred:        1.481k / 1.481 kBytes, 100%, 1.424 kBytes/s, ETA 0s
Checks:                 3 / 3, 100%
Deleted:                1 (files), 1 (dirs)
Renamed:                1
Transferred:            1 / 1, 100%
Elapsed time:         4.5s

2021/02/13 14:57:40 DEBUG : 4 go routines active
RClone to GDrive return code:%d:%x exit code:%d:%x sig num:%d:%x 0 0 0 0 0 0


That looks like a bug!

Can you make a GitHub issue and we'll fix it - thank you.

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