Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Segmentation fault if token is expired #2034

Closed
centic9 opened this issue Jul 6, 2022 · 3 comments
Closed

Bug: Segmentation fault if token is expired #2034

centic9 opened this issue Jul 6, 2022 · 3 comments

Comments

@centic9
Copy link

centic9 commented Jul 6, 2022

Describe the bug

When the refresh_token is expired, onedrive reports a "Segmentation fault":

...


ERROR: Check your configuration as your refresh_token may be empty or invalid. You may need to issue a --reauth and re-authorise this client.


Thread 1 "onedrive" received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) where
#0  0x0000000000000000 in ?? ()
#1  0x00007ffff7b89347 in std.net.curl.HTTP.Impl.~this() () from /usr/lib/x86_64-linux-gnu/libphobos2-ldc-shared.so.90
#2  0x00007ffff7ac2629 in _D6object__T7destroyVbi1TS3std3net4curl4HTTP4ImplZQBmFKQBeZv () from /usr/lib/x86_64-linux-gnu/libphobos2-ldc-shared.so.90
#3  0x00007ffff7bd6570 in _D3std8typecons__T10RefCountedTSQBe3net4curl4HTTP4ImplVEQCcQCb24RefCountedAutoInitializei1ZQCv6__dtorMFZv () from /usr/lib/x86_64-linux-gnu/libphobos2-ldc-shared.so.90
#4  0x00007ffff78a1757 in rt_finalize2 () from /usr/lib/x86_64-linux-gnu/libdruntime-ldc-shared.so.90
#5  0x00007ffff7888e75 in _D2gc4impl12conservativeQw15SmallObjectPool13runFinalizersMFNbMxAvZv () from /usr/lib/x86_64-linux-gnu/libdruntime-ldc-shared.so.90
#6  0x00007ffff788720b in _D2gc4impl12conservativeQw3Gcx13runFinalizersMFNbMxAvZv () from /usr/lib/x86_64-linux-gnu/libdruntime-ldc-shared.so.90
#7  0x00007ffff78872d1 in _D2gc4impl12conservativeQw14ConservativeGC__T9runLockedS_DQCeQCeQCcQCnQBs13runFinalizersMFNbMxAvZ2goFNbPSQDzQDzQDxQEi3GcxMxQBdZvS_DQEzQEzQExQFi9otherTimelS_DQFzQFzQFxQGi9numOtherslTQDaTxQDoZQFpMFNbKQDrKxQEfZv
    () from /usr/lib/x86_64-linux-gnu/libdruntime-ldc-shared.so.90
#8  0x00007ffff7888513 in _DThn16_2gc4impl12conservativeQw14ConservativeGC13runFinalizersMFNbMxAvZv () from /usr/lib/x86_64-linux-gnu/libdruntime-ldc-shared.so.90
#9  0x00007ffff78a88ac in _d_dso_registry () from /usr/lib/x86_64-linux-gnu/libdruntime-ldc-shared.so.90
#10 0x00005555555d5ceb in ?? ()
#11 0x00007ffff7fe0f6b in _dl_fini () at dl-fini.c:138
#12 0x00007ffff74a88a7 in __run_exit_handlers (status=-1, listp=0x7ffff764e718 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true, run_dtors=run_dtors@entry=true) at exit.c:108
#13 0x00007ffff74a8a60 in __GI_exit (status=<optimized out>) at exit.c:139
#14 0x00005555555fb60b in ?? ()
#15 0x0000555555643a67 in ?? ()
#16 0x00007ffff789d9dc in _D2rt6dmain212_d_run_main2UAAamPUQgZiZ6runAllMFZv () from /usr/lib/x86_64-linux-gnu/libdruntime-ldc-shared.so.90
#17 0x00007ffff789d7ef in _d_run_main2 () from /usr/lib/x86_64-linux-gnu/libdruntime-ldc-shared.so.90
#18 0x00007ffff789d65e in _d_run_main () from /usr/lib/x86_64-linux-gnu/libdruntime-ldc-shared.so.90
#19 0x00007ffff7486083 in __libc_start_main (main=0x55555564fda0, argc=3, argv=0x7fffffffdac8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdab8) at ../csu/libc-start.c:308
#20 0x00005555555d42ee in ?? ()

Please let me know if this is rather a bug in libphobos2

Operating System Details

Ubuntu 20.04.4 LTS

LSB Version:    core-11.1.0ubuntu2-noarch:security-11.1.0ubuntu2-noarch
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.4 LTS
Release:        20.04
Codename:       focal

kernel: 5.4.0-117-generic

onedrive:
  Installiert:           2.4.19-ppa

libphobos2-ldc-shared90:
  Installiert:           1:1.20.1-1

Client Installation Method

From 3rd Party Source (PPA, OpenSuSE Build Service etc)

OneDrive Account Type

Business | Office365

What is your OneDrive Application Version

2.4.19

What is your OneDrive Application Configuration

$ onedrive --display-config
onedrive version                             = v2.4.19-ppa
Config path                                  = /.../.config/onedrive
Config file found in config path             = false
Config option 'sync_dir'                     = /.../OneDrive
Config option 'enable_logging'               = false
Config option 'log_dir'                      = /var/log/onedrive/
Config option 'disable_notifications'        = false
Config option 'min_notify_changes'           = 5
Config option 'skip_dir'                     =
Config option 'skip_dir_strict_match'        = false
Config option 'skip_file'                    = ~*|.~*|*.tmp
Config option 'skip_dotfiles'                = false
Config option 'skip_symlinks'                = false
Config option 'monitor_interval'             = 300
Config option 'monitor_log_frequency'        = 5
Config option 'monitor_fullscan_frequency'   = 12
Config option 'dry_run'                      = false
Config option 'upload_only'                  = false
Config option 'download_only'                = false
Config option 'local_first'                  = false
Config option 'check_nosync'                 = false
Config option 'check_nomount'                = false
Config option 'resync'                       = false
Config option 'resync_auth'                  = false
Config option 'classify_as_big_delete'       = 1000
Config option 'disable_upload_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'         = 700
Config option 'sync_file_permissions'        = 600
Config option 'space_reservation'            = 52428800
Config option 'application_id'               =
Config option 'azure_ad_endpoint'            =
Config option 'azure_tenant_id'              = common
Config option 'user_agent'                   =
Config option 'force_http_2'                 = false
Config option 'debug_https'                  = false
Config option 'rate_limit'                   = 0
Config option 'operation_timeout'            = 3600
Config option 'sync_root_files'              = false
Selective sync 'sync_list' configured        = false
Config option 'sync_business_shared_folders' = false
Business Shared Folders configured           = false
Config option 'webhook_enabled'              = false

What is your 'curl' version

$ curl --version
curl 7.68.0 (x86_64-pc-linux-gnu) libcurl/7.68.0 OpenSSL/1.1.1f zlib/1.2.11 brotli/1.0.7 libidn2/2.2.0 libpsl/0.21.0 (+libidn2/2.2.0) libssh/0.9.3/openssl/zlib nghttp2/1.40.0 librtmp/2.3
Release-Date: 2020-01-08
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: AsynchDNS brotli GSS-API HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM NTLM_WB PSL SPNEGO SSL TLS-SRP UnixSockets

Where is your 'sync_dir' located

Local

What are all your system 'mount points'

N/A

What are all your local file system partition types

N/A

How do you use 'onedrive'

just sync

Steps to reproduce the behaviour

Try to synchronize with an expired token

Complete Verbose Log Output

Using 'user' Config Dir: /.../.config/onedrive
Using 'system' Config Dir: /etc/onedrive
No user or system config file found, using application defaults
Checking Application Version ...
Initializing the OneDrive API ...
Configuring Global Azure AD Endpoints
Opening the item database ...
All operations will be performed in: /.../OneDrive

ERROR: Microsoft OneDrive API returned an error with the following message:
  Error Message:    HTTP request returned status code 400 (Bad Request)
  Error Reason:     AADSTS50078: Presented multi-factor authentication has expired due to policies configured by your administrator, you must refresh your multi-factor authentication to access '00000003-0000-0000-c000-000000000000'.
Trace ID: ...
Correlation ID: ...
Timestamp: 2022-07-06 05:30:44Z
  Calling Function: acquireToken()


ERROR: Microsoft OneDrive API returned an error with the following message:
  Error Message:    HTTP request returned status code 401 (Unauthorized)
  Error Reason:     Access token is empty.
  Error Timestamp:  2022-07-06T05:30:44
  API Request ID:   ...
  Calling Function: init()


ERROR: Check your configuration as your refresh_token may be empty or invalid. You may need to issue a --reauth and re-authorise this client.

Segmentation fault

Screenshots

No response

Other Log Information or Details

No response

Additional context

No response

@centic9 centic9 added the Bug Something isn't working label Jul 6, 2022
@abraunegg
Copy link
Owner

@centic9
Whilst a segmentation fault is not good - this is not an issue or bug with this client. Additionally, please note the following:

  1. Your application version v2.4.19-ppa does not correspond with the supported packages installed from the OpenSuSE Build Service. Please uninstall that package and repository and follow https://github.com/abraunegg/onedrive/blob/master/docs/ubuntu-package-install.md to install the client correctly, which for your version of Ubuntu is onedrive v2.4.19-1+np1
  2. The segfault is a known issue as detailed here https://github.com/abraunegg/onedrive/blob/master/docs/ubuntu-package-install.md#known-issues-with-installing-from-the-above-packages. The only fix to this is for you to complain to the Debian|Ubuntu maintainer for the LDC package and have them fix the the compiler as this is a compiler issue. However, if you build the 'onedrive' client from source using LDC or DMD installed without using a Debian|Ubuntu package, the client does not segfault.

Actions for you:

  • Use the correct package repository and client package
  • Build the client from source

@abraunegg abraunegg added Not a bug Compiler Issue Packaging and removed Bug Something isn't working labels Jul 6, 2022
@centic9
Copy link
Author

centic9 commented Jul 6, 2022

Thanks for the quick response! Sorry for not searching for pre-existing information on the segfault.

@abraunegg
Copy link
Owner

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.

Repository owner locked as resolved and limited conversation to collaborators Jul 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants