BOINC / boinc

Open-source software for volunteer computing and grid computing.
https://boinc.berkeley.edu
GNU Lesser General Public License v3.0
2.03k stars 449 forks source link

command "boinc" deletes everything under ./projects #5911

Closed Dad0u closed 22 hours ago

Dad0u commented 22 hours ago

Describe the bug Installing boinc with pacman -S boinc then running the command boinc deletes everything under ./projects.

My understanding of what happened : i just opened a terminal and typed boinc. It assumed that boinc's data_dir is the current dir ($HOME in this case). boinc therefore removes the "invalid" project dirs under ./projects.

I am not sure if this is related but in my case, the boinc gui could not read the files in /var/lib/boinc since my user was not yet in the boinc group (this showed the permission error described in this page).

Steps To Reproduce

  1. Make a fresh install of boinc on a Manjaro system (not tested on Arch but could possibly have the same issue).
  2. run boinc from a terminal and wait for it to start
  3. Everything in ./projects is happily being removed

Expected behavior boinc should not be irreversibly deleting user files without warnings in such a seemingly harmless configuration. I believe that assuming that the data dir is ./ without any further check is dangerous.

Logs

21-Nov-2024 20:34:24 [---] cc_config.xml not found - using defaults
21-Nov-2024 20:34:34 [---] Starting BOINC client version 8.0.2 for x86_64-pc-linux-gnu
21-Nov-2024 20:34:34 [---] log flags: file_xfer, sched_ops, task
21-Nov-2024 20:34:34 [---] Libraries: libcurl/8.10.1 OpenSSL/3.3.2 zlib/1.3.1 brotli/1.1.0 zstd/1.5.6 libidn2/2.3.7 libpsl/0.21.5 libssh2/1.11.0 nghttp2/1.63.0 nghttp3/1.5.0
21-Nov-2024 20:34:34 [---] Data directory: /home/vic
21-Nov-2024 20:34:35 [---] OpenCL: AMD/ATI GPU 0: AMD Radeon RX 6750 XT (driver version 3602.0 (HSA1.1,LC), device version OpenCL 2.0, 12272MB, 12272MB available, 14746 GFLOPS peak)
21-Nov-2024 20:34:35 [---] OpenCL CPU: AMD Ryzen 7 5800X 8-Core Processor (OpenCL driver vendor: Intel(R) Corporation, driver version 2024.17.3.0.08_160000, device version OpenCL 3.0 (Build 0))
21-Nov-2024 20:34:35 [---] libc:  version 2.40
21-Nov-2024 20:34:35 [---] Host name: B550
21-Nov-2024 20:34:35 [---] Processor: 16 AuthenticAMD AMD Ryzen 7 5800X 8-Core Processor [Family 25 Model 33 Stepping 0]
21-Nov-2024 20:34:35 [---] Processor features: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc cpuid extd_apicid aperfmperf rapl pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 hw_pstate ssbd mba ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local user_shstk clzero irperf xsaveerptr rdpru wbnoinvd arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif v_spec_ctrl umip pku ospke vaes vpclmulqdq rdpid overflow_recov succor smca fsrm debug_swap
21-Nov-2024 20:34:35 [---] OS: Linux ManjaroLinux: Manjaro Linux [6.11.2-4-MANJARO|libc 2.40]
21-Nov-2024 20:34:35 [---] Memory: 31.25 GB physical, 0 bytes virtual
21-Nov-2024 20:34:35 [---] Disk: 931.22 GB total, 251.48 GB free
21-Nov-2024 20:34:35 [---] Local time is UTC +1 hours
21-Nov-2024 20:34:35 [---] VirtualBox version: 7.1.2r164945
21-Nov-2024 20:34:35 [---] No general preferences found - using defaults
21-Nov-2024 20:34:35 [---] Preferences:
[...]
21-Nov-2024 20:34:35 [---] Setting up project and slot directories
21-Nov-2024 20:34:35 [---] projects/<One of my personal projects> is not a project dir - removing
21-Nov-2024 20:34:35 [---] projects/<Another of my personal projects> is not a project dir - removing
...

I immediately stopped execution to prevent further removing of my personal projects but many were already removed.

System Information

I lost many projects i was working on by simply typing "boinc" in the terminal. Luckily i have backups so i ended up recovering almost everything but this kind of event is stressful, time consuming and frustrating. Can you consider adding a security to avoid this ?

AenBleidd commented 22 hours ago

Do you have this issue if you are using the official 'vanilla' boinc packages? You can find the instructions of their installations on this page: https://boinc.berkeley.edu/linux_install.php

AenBleidd commented 22 hours ago

And looking now at the mentioned OS, I found out that we have no packages for it. I would like to highlight here, that we (BOINC maintainers) are not the authors of the Manjaro packages, and thus we do not know what was the configuration of that package, and why you have this behavior. I will add a ticket to provide 'vanilla' packages for Arch Linux