Skip to content

Proton Drive: segfault caused by sha1 digest missing? #9377

Closed

Description

@courtiol

I experience a segfault using a Proton Drive remote using:

- os/version: debian 13.4 (64 bit)
- os/kernel: 6.19.11+deb13-amd64 (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.25.9
- go/linking: static
- go/tags: none
rclone copy protondrive: ./protondrive/ -P
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1c57e66]

goroutine 83 [running]:
github.com/rclone/rclone/backend/protondrive.(*Object).Open(0xc000d8e5a0, {0x3369e78, 0xc000b945f0}, {0xc000cce130, 0x1, 0xc00006a0a0?})
        github.com/rclone/rclone/backend/protondrive/protondrive.go:907 +0x46
github.com/rclone/rclone/fs/operations.(*ReOpen).open(0xc000e020f0)
        github.com/rclone/rclone/fs/operations/reopen.go:148 +0x109
github.com/rclone/rclone/fs/operations.NewReOpen({0x3369e78, 0xc000b945f0}, {0x3386e40, 0xc000d8e5a0}, 0xa, {0xc000cce120, 0x1, 0x1})
        github.com/rclone/rclone/fs/operations/reopen.go:103 +0x505
github.com/rclone/rclone/fs/operations.Open({0x3369e78, 0xc000b945f0}, {0x3386e40, 0xc000d8e5a0}, {0xc000cce120, 0x1, 0x1})
        github.com/rclone/rclone/fs/operations/reopen.go:125 +0x6b
github.com/rclone/rclone/fs/operations.(*copy).manualCopy(0xc000174cf0, {0x3369e78, 0xc000b945f0})
        github.com/rclone/rclone/fs/operations/copy.go:265 +0x4da
github.com/rclone/rclone/fs/operations.(*copy).copy(0xc000174cf0, {0x3369e78, 0xc000b945f0})
        github.com/rclone/rclone/fs/operations/copy.go:314 +0x170
github.com/rclone/rclone/fs/operations.Copy({0x3369e78, 0xc000b945f0}, {0x33862e0, 0xc000bec0c0}, {0x0, 0x0}, {0xc0005bfe30, 0x9}, {0x3386e40, 0xc000d8e5a0})
        github.com/rclone/rclone/fs/operations/copy.go:416 +0x4dc
github.com/rclone/rclone/fs/sync.(*syncCopyMove).pairCopyOrMove(0xc000851408, {0x3369e78, 0xc000b945f0}, 0xc000b94550, {0x33862e0, 0xc000bec0c0}, 0x19, 0x0?)
        github.com/rclone/rclone/fs/sync/sync.go:505 +0x1fe
created by github.com/rclone/rclone/fs/sync.(*syncCopyMove).startTransfers in goroutine 1
        github.com/rclone/rclone/fs/sync/sync.go:535 +0x7d

This goes away if instead I call clone copy protondrive: ./protondrive/ -P --min-size 1Ki, but it still occurs if I append min_size = 1Ki to the config file.

Here are some details (replacing private info with XXX):

XXX@XXX:/srv/dev-disk-by-uuid-XXX/XXX$ rclone copy -vv protondrive_: ./protondrive/ -P                            
2026/04/26 08:17:38 DEBUG : rclone: Version "v1.73.5" starting with parameters ["rclone" "copy" "-vv" "protondrive:" "./protondrive/" "-P"]                 
2026/04/26 08:17:38 DEBUG : Creating backend with remote "protondrive:"                                                                                          
2026/04/26 08:17:38 DEBUG : Using config file from "/home/XXX/.config/rclone/rclone.conf"                                                                        
2026/04/26 08:17:38 DEBUG : proton drive root link ID '': Has cached credentials                                                                                      
2026/04/26 08:17:40 DEBUG : proton drive root link ID '': Used cached credential to initialize the ProtonDrive API                                                    
2026/04/26 08:17:40 DEBUG : Creating backend with remote "./protondrive/"                                                                                        
2026/04/26 08:17:40 DEBUG : fs cache: renaming cache item "./protondrive/" to be canonical "/srv/dev-disk-by-uuid-XXX/XXX/XXX"                                                                                                                                                        
2026/04/26 08:17:41 DEBUG : XXX: Original file size missing                                                                                                     
2026/04/26 08:17:41 DEBUG : XXX: Original file size missing                                                                                        
2026/04/26 08:17:41 DEBUG : XXX: Need to transfer - File not found at Destination                                                                  
2026/04/26 08:17:41 DEBUG : XXX: Original file size missing                                                                                        
2026/04/26 08:17:41 DEBUG : XXX: Need to transfer - File not found at Destination                                                                               
2026/04/26 08:17:41 DEBUG : XXX: Original file size missing                                                                                                     
2026/04/26 08:17:41 DEBUG : XXX: Original file size missing                                                                                        
2026/04/26 08:17:41 DEBUG : XXX: Original file size missing                                                                                        
2026/04/26 08:17:41 DEBUG : XXX: Original file size missing                                                                                        
2026/04/26 08:17:41 DEBUG : XXX: file sha1 digest missing                                                                                          
2026/04/26 08:17:41 DEBUG : XXX: Original file size missing                                                                                                     
2026/04/26 08:17:41 DEBUG : XXX: Original file size missing                                                                                        
2026/04/26 08:17:41 DEBUG : XXX: Original file size missing                                                                                                     
2026/04/26 08:17:41 DEBUG : XXX: Original file size missing
2026/04/26 08:17:41 DEBUG : Local file system at /srv/dev-disk-by-uuid-XXX/XXX/protondrive: Waiting for checks to finish
2026/04/26 08:17:41 DEBUG : XXX: file sha1 digest missing
Transferred:              0 B / 0 B, -, 0 B/s, ETA -
Checks:                 0 / 0, -, Listed 2
Transferred:            0 / 2, 0%
Elapsed time:         0.6s
Transferring:
 *                                     XXX: transferringpanic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1c57e66]

goroutine 86 [running]:
github.com/rclone/rclone/backend/protondrive.(*Object).Open(0xc000b70780, {0x3369e78, 0xc000c5c0a0}, {0xc0005aa680, 0x1, 0xc000365020?})
        github.com/rclone/rclone/backend/protondrive/protondrive.go:907 +0x46
github.com/rclone/rclone/fs/operations.(*ReOpen).open(0xc000ada3c0)
        github.com/rclone/rclone/fs/operations/reopen.go:148 +0x109
github.com/rclone/rclone/fs/operations.NewReOpen({0x3369e78, 0xc000c5c0a0}, {0x3386e40, 0xc000b70780}, 0xa, {0xc0005aa2f0, 0x1, 0x1})
        github.com/rclone/rclone/fs/operations/reopen.go:103 +0x505
github.com/rclone/rclone/fs/operations.Open({0x3369e78, 0xc000c5c0a0}, {0x3386e40, 0xc000b70780}, {0xc0005aa2f0, 0x1, 0x1})
        github.com/rclone/rclone/fs/operations/reopen.go:125 +0x6b
github.com/rclone/rclone/fs/operations.(*copy).manualCopy(0xc000259a70, {0x3369e78, 0xc000c5c0a0})
        github.com/rclone/rclone/fs/operations/copy.go:265 +0x4da
github.com/rclone/rclone/fs/operations.(*copy).copy(0xc000259a70, {0x3369e78, 0xc000c5c0a0})
        github.com/rclone/rclone/fs/operations/copy.go:314 +0x170
github.com/rclone/rclone/fs/operations.Copy({0x3369e78, 0xc000c5c0a0}, {0x33862e0, 0xc000768780}, {0x0, 0x0}, {0xc0001469a8, 0x16}, {0x3386e40, 0xc000b70780})
        github.com/rclone/rclone/fs/operations/copy.go:416 +0x4dc
github.com/rclone/rclone/fs/sync.(*syncCopyMove).pairCopyOrMove(0xc000c1d188, {0x3369e78, 0xc000c5c0a0}, 0xc000c5c000, {0x33862e0, 0xc000768780}, 0x19, 0x39?)
        github.com/rclone/rclone/fs/sync/sync.go:505 +0x1fe
created by github.com/rclone/rclone/fs/sync.(*syncCopyMove).startTransfers in goroutine 1
        github.com/rclone/rclone/fs/sync/sync.go:535 +0x7d

Activity

  1. koenieee commented on Apr 27, 2026

    @koenieee

    Same issue for me

  2. ncw commented on Apr 28, 2026

    @ncw
    Member

    Please give this a go

    v1.74.0-beta.9677.45dc27ef3.fix-9377-proton on branch fix-9377-proton (uploaded in 15-30 mins)

  3. ncw commented on Apr 29, 2026

    @ncw
    Member

    Did that work @courtiol @koenieee ? If I know it works I can put it in the v1.74 release. Thanks

  4. courtiol commented on Apr 29, 2026

    @courtiol
    Author

    I am afraid not...

    xx@logos:/srv/dev-disk-by-uuid-xx/backup$ rclone --version
    rclone v1.74.0-beta.9677.45dc27ef3.fix-9377-proton
    - os/version: debian 13.4 (64 bit)
    - os/kernel: 6.19.11+deb13-amd64 (x86_64)
    - os/type: linux
    - os/arch: amd64
    - go/version: go1.26.2
    - go/linking: static
    - go/tags: none
    xx@logos:/srv/dev-disk-by-uuid-xx/backup$ rclone copy protondrive_xx: ./xx_protondrive/ -P
    Transferred:              0 B / 0 B, -, 0 B/s, ETA -
    Checks:                 0 / 0, -, Listed 2
    Transferred:            0 / 2, 0%
    Elapsed time:         2.0s
    Transferring:
     *                        accounting sicily 2025: transferring
     *                                     food_xmas: transferringpanic: runtime error: invalid memory address or nil pointer dereference
    [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1ced736]
    
  5. tycooon33 commented on Apr 30, 2026

    @tycooon33

    What is the problem you are having with rclone?

    I tested the same command mentioned in this issue with Proton Drive and I am not experiencing the problem. The transfer works as expected.


    What is your rclone version (output from rclone version)?

    rclone v1.73.5
    

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

    Linux (Ubuntu-based), 64-bit
    

    Which cloud storage system are you using? (e.g. Google Drive)

    Proton Drive
    

    The command you were trying to run (e.g. rclone copy /tmp remote:tmp)

    rclone copy ./protondrive/ ProtonDrive: -P -vv
    

    A log from the command with the -vv flag

    2026/04/30 20:03:33 DEBUG : rclone: Version "v1.73.5" starting with parameters ["rclone" "copy" "./protondrive/" "ProtonDrive:" "-P" "-vv"]
    2026/04/30 20:03:33 DEBUG : Creating backend with remote "./protondrive/"
    2026/04/30 20:03:33 DEBUG : Using config file from "/home/olivier/.config/rclone/rclone.conf"
    2026/04/30 20:03:33 DEBUG : fs cache: renaming cache item "./protondrive/" to be canonical "/home/olivier/Bureau/protondrive/protondrive"
    2026/04/30 20:03:33 DEBUG : Creating backend with remote "ProtonDrive:"
    2026/04/30 20:03:33 DEBUG : proton drive root link ID '': Has cached credentials
    2026/04/30 20:03:34 DEBUG : proton drive root link ID '': Used cached credential to initialize the ProtonDrive API
    2026/04/30 20:03:34 DEBUG : tests-1.pdf: Need to transfer - File not found at Destination
    2026/04/30 20:03:34 DEBUG : tests-2.pdf: Need to transfer - File not found at Destination
    2026/04/30 20:03:34 DEBUG : tests-3.pdf: Need to transfer - File not found at Destination
    2026/04/30 20:03:34 DEBUG : tests-4.pdf: Need to transfer - File not found at Destination
    2026/04/30 20:03:34 DEBUG : tests-5.odt: Need to transfer - File not found at Destination
    2026/04/30 20:03:34 DEBUG : tests-6.odt: Need to transfer - File not found at Destination
    2026/04/30 20:03:34 DEBUG : tests-7.pdf: Need to transfer - File not found at Destination
    2026/04/30 20:03:36 INFO  : tests-4.pdf: Copied (new)
    2026/04/30 20:03:36 INFO  : tests-3.pdf: Copied (new)
    2026/04/30 20:03:36 INFO  : tests-2.pdf: Copied (new)
    2026/04/30 20:03:36 INFO  : tests-1.pdf: Copied (new)
    2026/04/30 20:03:37 INFO  : tests-7.pdf: Copied (new)
    2026/04/30 20:03:37 INFO  : tests-5.odt: Copied (new)
    2026/04/30 20:03:37 INFO  : tests-6.odt: Copied (new)
    Transferred: 2.475 MiB / 2.475 MiB, 100%
    Transferred: 7 / 7, 100%
    Elapsed time: 3.4s
    

    Additional information

    The upload from local to Proton Drive works correctly.

  6. ncw commented on May 2, 2026

    @ncw
    Member

    @courtiol I wonder what else is wrong. Can you do that test again please, but post the backtrace too and then I can investigate.

  7. courtiol commented on May 4, 2026

    @courtiol
    Author

    (Sorry for the delay, doing 18h-long work days at the moment... and about to disappear for 2 weeks.)

    I am not sure if you want me to run a specific debugging cmd or if you just want to tail of the output.
    If the latter, here it is:

     rclone copy protondrive_alex: ./alex_protondrive/ -P
    2026/05/04 14:39:44.289170 WARN RESTY 401 GET https://drive-api.proton.me/core/v4/users: Invalid access token (Code=401, Status=401), Attempt 1
    2026/05/04 14:39:44.289341 ERROR RESTY 401 GET https://drive-api.proton.me/core/v4/users: Invalid access token (Code=401, Status=401)
    Transferred:              0 B / 0 B, -, 0 B/s, ETA -
    Checks:                 0 / 0, -, Listed 2
    Transferred:            0 / 2, 0%
    Elapsed time:         1.9s
    Transferring:
     *                        XXX XXX: transferring
     *                                     food_xmas: transferringpanic: runtime error: invalid memory address or nil pointer dereference
    [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1ced736]
    
    goroutine 87 [running]:
    github.com/rclone/Proton-API-Bridge.(*ProtonDrive).GetActiveRevisionWithAttrs(0x25d1288acd00, {0x317cff8, 0x25d129500f50}, 0x25d128f222d0)
            github.com/rclone/[email protected]/file.go:126 +0x356
    github.com/rclone/Proton-API-Bridge.(*ProtonDrive).DownloadFile(0x25d1288acd00, {0x317cff8, 0x25d129500f50}, 0x25d128f222d0, 0x0)
            github.com/rclone/[email protected]/file_download.go:122 +0x2bd
    github.com/rclone/Proton-API-Bridge.(*ProtonDrive).DownloadFileByID(0x25d1288acd00, {0x317cff8, 0x25d129500f50}, {0x25d128cd9ce0?, 0x58?}, 0x0)
            github.com/rclone/[email protected]/file_download.go:95 +0xa5
    github.com/rclone/rclone/backend/protondrive.(*Object).Open.func1()
            github.com/rclone/rclone/backend/protondrive/protondrive.go:1023 +0x65
    github.com/rclone/rclone/fs.pacerInvoker(0x1, 0xa, 0x50?)
            github.com/rclone/rclone/fs/pacer.go:86 +0x32
    github.com/rclone/rclone/lib/pacer.(*Pacer).call(0x25d12925c300, 0x25d1294a6000, 0xa)
            github.com/rclone/rclone/lib/pacer/pacer.go:228 +0xd2
    github.com/rclone/rclone/lib/pacer.(*Pacer).Call(0x25d12925c300, 0x25d1294a6000)
            github.com/rclone/rclone/lib/pacer/pacer.go:247 +0x92
    github.com/rclone/rclone/backend/protondrive.(*Object).Open(0x25d1296960a0, {0x317cff8, 0x25d129500f50}, {0x25d129608040, 0x1, 0x1})
            github.com/rclone/rclone/backend/protondrive/protondrive.go:1022 +0x35b
    github.com/rclone/rclone/fs/operations.(*ReOpen).open(0x25d128b06870)
            github.com/rclone/rclone/fs/operations/reopen.go:148 +0x109
    github.com/rclone/rclone/fs/operations.NewReOpen({0x317cff8, 0x25d129500f50}, {0x319e000, 0x25d1296960a0}, 0xa, {0x25d129608030, 0x1, 0x1})
            github.com/rclone/rclone/fs/operations/reopen.go:103 +0x505
    github.com/rclone/rclone/fs/operations.Open({0x317cff8, 0x25d129500f50}, {0x319e000, 0x25d1296960a0}, {0x25d129608030, 0x1, 0x1})
            github.com/rclone/rclone/fs/operations/reopen.go:125 +0x6b
    github.com/rclone/rclone/fs/operations.(*copy).manualCopy(0x25d129698000, {0x317cff8, 0x25d129500f50})
            github.com/rclone/rclone/fs/operations/copy.go:273 +0x4c7
    github.com/rclone/rclone/fs/operations.(*copy).copy(0x25d129698000, {0x317cff8, 0x25d129500f50})
            github.com/rclone/rclone/fs/operations/copy.go:322 +0x170
    github.com/rclone/rclone/fs/operations.Copy({0x317cff8, 0x25d129500f50}, {0x319d4a0, 0x25d129522540}, {0x0, 0x0}, {0x25d128ebe1b0, 0x16}, {0x319e000, 0x25d1296960a0})
            github.com/rclone/rclone/fs/operations/copy.go:424 +0x4dc
    github.com/rclone/rclone/fs/sync.(*syncCopyMove).pairCopyOrMove(0x25d1295b9188, {0x317cff8, 0x25d129500f50}, 0x25d129500eb0, {0x319d4a0, 0x25d129522540}, 0x4b, 0x0?)
            github.com/rclone/rclone/fs/sync/sync.go:505 +0x1fe
    created by github.com/rclone/rclone/fs/sync.(*syncCopyMove).startTransfers in goroutine 1
            github.com/rclone/rclone/fs/sync/sync.go:535 +0x7d

    This time, there seems to be new token related issues, but that should not be the reason for a segfault.

  8. ncw commented on May 4, 2026

    @ncw
    Member

    That is a different segfault in the proton drive library! I've patched that - please give this a go - thanks

    v1.75.0-beta.9690.e19fb98fd.fix-9377-proton on branch fix-9377-proton (uploaded in 15-30 mins)

  9. courtiol commented on May 4, 2026

    @courtiol
    Author

    For some reason, I cannot connect but this probably has nothing to do with this.
    I can report that I no longer see a segfault! Tx a lot.

  10. ncw commented on May 5, 2026

    @ncw
    Member

    I've merged this to master now which means it will be in the latest beta in 15-30 minutes and released in v1.73.1

  11. added a commit that references this issue on May 8, 2026
    23dc9d0
  12. added a commit that references this issue on Oct 6, 2026
    99d67fc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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