abraunegg / onedrive

OneDrive Client for Linux
https://abraunegg.github.io
GNU General Public License v3.0
10.17k stars 864 forks source link

Bug: Uploading files using fragments stuck at 0% #2747

Closed pagratios closed 4 months ago

pagratios commented 4 months ago

Describe the bug

I have a folder with a lot of files some of them are .mp4 files and some of those .mp4 files are bigger than 100MB when I start a synchronize the first .mp4 will be uploaded to onedrive, the second one will be stuck at 0% and an CurlException occurs.

If I terminate the onedrive and run it again the new second file will be uploaded and the third will stuck. I have minimized threads to 1, increase timeouts to 180sec

Operating System Details

Linux nas 6.8.8-1-pve #1 SMP PREEMPT_DYNAMIC PMX 6.8.8-1 (2024-06-10T11:42Z) x86_64 GNU/Linux

Client Installation Method

From Source

OneDrive Account Type

Personal

What is your OneDrive Application Version

onedrive v2.5.0-rc2-24-gfb77411

What is your OneDrive Application Configuration

Reading configuration file: /home/goutsoulospitoonedrivesync/.config/onedrive/config
Configuration file successfully loaded
Disabling GUI notifications as per user configuration
onedrive version                             = onedrive v2.5.0-rc2-24-gfb77411
Config path                                  = /home/goutsoulospitoonedrivesync/.config/onedrive
Config file found in config path             = true
Config option 'drive_id'                     =
Config option 'sync_dir'                     = /home/goutsoulospitoonedrivesync/onedrive/data/
Config option 'enable_logging'               = true
Config option 'log_dir'                      = /home/goutsoulospitoonedrivesync/onedrive/log/
Config option 'disable_notifications'        = true
Config option 'skip_dir'                     =
Config option 'skip_dir_strict_match'        = false
Config option 'skip_file'                    = ~*|.~*|*.tmp|*.swp|*.partial
Config option 'skip_dotfiles'                = false
Config option 'skip_symlinks'                = false
Config option 'monitor_interval'             = 7200
Config option 'monitor_log_frequency'        = 12
Config option 'monitor_fullscan_frequency'   = 12
Config option 'read_only_auth_scope'         = false
Config option 'dry_run'                      = false
Config option 'upload_only'                  = false
Config option 'download_only'                = false
Config option 'local_first'                  = true
Config option 'check_nosync'                 = false
Config option 'check_nomount'                = false
Config option 'resync'                       = false
Config option 'resync_auth'                  = false
Config option 'cleanup_local_files'          = false
Config option 'classify_as_big_delete'       = 100000
Config option 'disable_upload_validation'    = false
Config option 'disable_download_validation'  = false
Config option 'bypass_data_preservation'     = false
Config option 'no_remote_delete'             = false
Config option 'remove_source_files'          = false
Config option 'sync_dir_permissions'         = 775
Config option 'sync_file_permissions'        = 664
Config option 'space_reservation'            = 52428800
Config option 'application_id'               = d50ca740-c83f-4d1b-b616-12c519384f0c
Config option 'azure_ad_endpoint'            =
Config option 'azure_tenant_id'              =
Config option 'user_agent'                   = ISV|abraunegg|OneDrive Client for Linux/v2.5.0-rc2-24-gfb77411
Config option 'force_http_11'                = false
Config option 'debug_https'                  = false
Config option 'rate_limit'                   = 0
Config option 'operation_timeout'            = 3600
Config option 'dns_timeout'                  = 180
Config option 'connect_timeout'              = 10
Config option 'data_timeout'                 = 180
Config option 'ip_protocol_version'          = 0
Config option 'threads'                      = 1

Selective sync 'sync_list' configured        = true
sync_list config option 'sync_root_files'    = false
sync_list contents:
# sync_list supports comments
#
# The ordering of entries is highly recommended - exclusions before inclusions
#

!@Recycle/*

/PublicShare/
/Camera/

Config option 'sync_business_shared_items'   = false

Config option 'webhook_enabled'              = false

What is your 'curl' version

curl 7.88.1 (x86_64-pc-linux-gnu) libcurl/7.88.1 OpenSSL/3.0.13 zlib/1.2.13 brotli/1.0.9 zstd/1.5.4 libidn2/2.3.3 libpsl/0.21.2 (+libidn2/2.3.3) libssh2/1.10.0 nghttp2/1.52.0 librtmp/2.3 OpenLDAP/2.5.13
Release-Date: 2023-02-20, security patched: 7.88.1-10+deb12u6
Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS brotli GSS-API HSTS HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM NTLM_WB PSL SPNEGO SSL threadsafe TLS-SRP UnixSockets zstd

Where is your 'sync_dir' located

Local

What are all your system 'mount points'

rpool/data/subvol-105-disk-0 on / type zfs (rw,relatime,xattr,posixacl,casesensitive)
tank/shares on /zfs/shares type zfs (rw,noatime,xattr,posixacl,casesensitive)
tank/media on /zfs/media type zfs (rw,noatime,xattr,posixacl,casesensitive)
tank/logotherapeia on /zfs/logotherapeia type zfs (rw,noatime,xattr,posixacl,casesensitive)
tank/camera on /zfs/camera type zfs (rw,noatime,xattr,posixacl,casesensitive)
tank/backups on /zfs/backups type zfs (rw,noatime,xattr,posixacl,casesensitive)
none on /dev type tmpfs (rw,relatime,size=492k,mode=755,inode64)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
proc on /proc/sys/net type proc (rw,nosuid,nodev,noexec,relatime)
proc on /proc/sys type proc (ro,relatime)
proc on /proc/sysrq-trigger type proc (ro,relatime)
sysfs on /sys type sysfs (ro,nosuid,nodev,noexec,relatime)
sysfs on /sys/devices/virtual/net type sysfs (rw,nosuid,nodev,noexec,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
proc on /dev/.lxc/proc type proc (rw,relatime)
sys on /dev/.lxc/sys type sysfs (rw,relatime)
none on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime)
lxcfs on /proc/cpuinfo type fuse.lxcfs (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)
lxcfs on /proc/diskstats type fuse.lxcfs (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)
lxcfs on /proc/loadavg type fuse.lxcfs (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)
lxcfs on /proc/meminfo type fuse.lxcfs (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)
lxcfs on /proc/slabinfo type fuse.lxcfs (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)
lxcfs on /proc/stat type fuse.lxcfs (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)
lxcfs on /proc/swaps type fuse.lxcfs (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)
lxcfs on /proc/uptime type fuse.lxcfs (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)
lxcfs on /sys/devices/system/cpu type fuse.lxcfs (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=666,max=1026)
devpts on /dev/ptmx type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=666,max=1026)
devpts on /dev/console type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=666,max=1026)
devpts on /dev/tty1 type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=666,max=1026)
devpts on /dev/tty2 type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=666,max=1026)
none on /proc/sys/kernel/random/boot_id type tmpfs (ro,nosuid,nodev,noexec,relatime,size=492k,mode=755,inode64)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,inode64)
tmpfs on /run type tmpfs (rw,nosuid,nodev,size=6519928k,nr_inodes=819200,mode=755,inode64)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k,inode64)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
ramfs on /run/credentials/systemd-sysctl.service type ramfs (ro,nosuid,nodev,noexec,relatime,mode=700)
ramfs on /run/credentials/systemd-sysusers.service type ramfs (ro,nosuid,nodev,noexec,relatime,mode=700)
nfsd on /proc/fs/nfsd type nfsd (rw,relatime)
ramfs on /run/credentials/systemd-tmpfiles-setup-dev.service type ramfs (ro,nosuid,nodev,noexec,relatime,mode=700)
tank/camera on /export/camera type zfs (rw,noatime,xattr,posixacl,casesensitive)
tank/media on /export/media type zfs (rw,noatime,xattr,posixacl,casesensitive)
tank/shares on /export/public_share type zfs (rw,noatime,xattr,posixacl,casesensitive)
tank/media on /export/video type zfs (rw,noatime,xattr,posixacl,casesensitive)
tank/media on /export/torrent type zfs (rw,noatime,xattr,posixacl,casesensitive)
ramfs on /run/credentials/systemd-tmpfiles-setup.service type ramfs (ro,nosuid,nodev,noexec,relatime,mode=700)
sunrpc on /run/rpc_pipefs type rpc_pipefs (rw,relatime)
tmpfs on /run/user/0 type tmpfs (rw,nosuid,nodev,relatime,size=3259960k,nr_inodes=814990,mode=700,inode64)

What are all your local file system partition types

NAME        FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
sda
├─sda1
└─sda9
sdb
├─sdb1
└─sdb9
sdc
├─sdc1
└─sdc9
sdd
├─sdd1
└─sdd9
sde
sdf
├─sdf1
└─sdf9
zd0
zd16
zd32
zd48
├─zd48p1
├─zd48p2
└─zd48p3
zd64
├─zd64p1
├─zd64p2
└─zd64p3
zd80
├─zd80p1
├─zd80p2
└─zd80p3
zd96
zd112
├─zd112p1
├─zd112p2
├─zd112p3
├─zd112p4
├─zd112p5
├─zd112p6
├─zd112p7
└─zd112p8
nvme1n1
├─nvme1n1p1
├─nvme1n1p2
└─nvme1n1p3
nvme0n1
├─nvme0n1p1
├─nvme0n1p2
└─nvme0n1p3

How do you use 'onedrive'

I have an onedrive personal account to sync data between my VM and Onedrive

Steps to reproduce the behaviour

I do not have any specific steps, just run sync and stuck

Complete Verbose Log Output

send via email

Screenshots

No response

Other Log Information or Details

No response

Additional context

No response

abraunegg commented 4 months ago

@pagratios Some basic troubleshooting steps for you:

  1. Due to your 'old' curl version, (please review https://curl.se/docs/releases.html) you are 100% most likely hitting a HTTP/2 bug in your curl version. To work around this, please re-configure the application to use HTTP/1.1. Please read https://github.com/abraunegg/onedrive/blob/onedrive-v2.5.0-release-candidate-2/docs/application-config-options.md#force_http_11 on how to do this
  2. If this does not resolve your issue, with HTTP/1.1 configured, force the client to use IPv4 only. Please read https://github.com/abraunegg/onedrive/blob/onedrive-v2.5.0-release-candidate-2/docs/application-config-options.md#ip_protocol_version on how to do this

Failing these first 2 steps:

  1. Upgrade your client to use PR #2728 - this is the latest branch with a significant number of RC2 issues fixed, and I am currently going through 350+ test cases. This branch will formulate the basis of RC3 when I complete the test case review.
  2. Upgrade your curl version to 8.8.0 or get your distribution to provide you with an updated package to install. Please read https://github.com/abraunegg/onedrive/blob/onedrive-v2.5.0-release-candidate-2/docs/client-architecture.md to understand why having a current 'curl' version is critically important.
abraunegg commented 4 months ago

@pagratios Looking at the log file:

DEBUG: Internet connectivity to Microsoft OneDrive service has been interrupted .. re-trying in the background
DEBUG: A libcurl timeout has been triggered - data transfer too slow, no DNS resolution response, no server response
DEBUG:  - IPv6 DNS resolution issues may be causing timeouts. Consider setting 'ip_protocol_version' to IPv4 to potentially avoid this
DEBUG:  - HTTP/2 compatibility issues might also be interfering with your system. Use 'force_http_11' to switch to HTTP/1.1 to potentially avoid this
DEBUG:  - If these options do not resolve this timeout issue, please use --debug-https to diagnose this issue further.

So this certainly points to your old curl version being a culprit here, together with HTTP/2.

In addition to this, the client did not have the 416 error listed in the response code, which has been rectified with 53aa334

If you rebuild your client from #2728 this issue potentially will be resolved.

Steps for resolution:

  1. Downgrade to use HTTP/1.1 and IPv4 or upgrade your 'curl' version to 8.8.0 or greater
  2. Upgrade your client to use PR #2728 ensuring you are running onedrive v2.5.0-rc2-74-gcea7137 or greater.
pagratios commented 4 months ago

Update curl to greater than version 8.8.0 and building from specific branch solved the issue

abraunegg commented 4 months ago

Thanks for the update - glad this is now resolved for you

abraunegg commented 4 months ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.