Commit Graph

5625 Commits

Author SHA1 Message Date
David Anderson c75d81f4c4 client: prioritize network (including GUI RPC) over async file ops
This is an effort to make the Manager responsive even when
lots of VM jobs are starting up.
2016-08-27 00:44:10 -07:00
David Anderson 8c44b2f165 client: fix bug that could cause idle CPUs/GPUs.
Review: job scheduling has 2 phases:
1) Make a list of jobs to run.  Add enough jobs to use all resources.
2) Actually run the jobs and preempt existing jobs.

The problem: checking for RAM usage limits
(i.e. making sure the sum of working sets is < RAM usage prefs)
is done in 2) but not 1).
So on a 1 CPU machine we might make a run list consisting of a single job,
which turns out not to fit in available RAM,
and we end up running nothing.

Solution: when we add a job to the run list that previously
exceeded RAM limits, don't count its resource usage.
That way we'll add more jobs to the run list,
and we'll have something to run in the end.
2016-08-15 11:48:39 -07:00
David Anderson a60f0bdb49 client: win compile fix 2016-07-26 13:44:07 -07:00
David Anderson 51257b9f61 client (Win): add config option to not do proxy autodetect 2016-07-25 15:41:43 -07:00
David Anderson 1fa9f485c0 client: Win typo fix 2016-07-17 00:24:44 -07:00
David Anderson 7056f49eed client: fix problems w/ tempfile generation for async file operations
Turns out tempnam() can't be used;
it gives priority to the env var TMPDIR in deciding where to
put the temp file (overriding the prefix arg)
and this could be on a different volume.
Instead, use msktemp (Unix) and GetTempFileName (Win).
And factor this out into a util function, boinc_temp_file().
2016-07-17 00:15:09 -07:00
David Anderson d0fd0aabbf client: change temp file prefixes to 5 chars 2016-07-15 13:50:26 -07:00
David Anderson 263c1506c2 Merge branch 'master' of github.com:BOINC/boinc 2016-07-15 00:14:45 -07:00
David Anderson 2609d10163 client: fix minor memory leak 2016-07-15 00:14:23 -07:00
David Anderson ce5bf10e04 Win compile fix 2016-07-14 15:32:26 -07:00
David Anderson d7f4551f6f client: fix bug where concurrent async file operations use same temp file
For situations where there are multiple big input or app_version files,
this could lead to MD5 errors and/or garbled file contents.
2016-07-14 14:56:31 -07:00
Rom Walton 5d31a75b7c Android: Create an ANDROID_64 preprocessor define to deal with changes between Android API 9 and Android API 21 in the native development kit.
Ideally we would upgrade all platforms en mass, but forcing ARM, MIPS, and x86 to API 21 might introduce compatibility problems with our existing install base.
2016-06-19 17:58:07 -07:00
Rom Walton 3765e54e4c client: Check for a new process initialization error code when the user session is being logged off.
Microsoft decided to add a new status code for Win10.

See: https://github.com/BOINC/boinc/issues/1553
2016-06-01 22:48:44 -07:00
David Anderson 4312c6c3bc client: fix memory accounting for VM apps
At some point we decided that OS reporting of mem usage for VM apps
was wrong, and we use wu.rsc_mem_usage instead.
Fix: use this only for running VM apps; for non-running, use zero.

Also, in mem usage print (mem_usage_debug) show whether the job is running.
2016-06-01 13:09:43 -07:00
David Anderson 2be7238174 client: in mem_usage_debug msgs, show whether the job is running 2016-05-23 14:02:27 -07:00
Preston Maness 8416d8a1a4
Fix #1530 (null pointer dereference) 2016-04-26 23:06:57 -05:00
David Anderson 2581ac688d Add <no_opencl/> option in cc_config.xml 2016-04-23 20:47:31 -07:00
David Anderson 1fe02c9d4f GUI RPC: enclose message bodies in CDATA to avoid XML parse errors
for messages containing "<".

Also strip off <?xml tag from project config
to make GUI RPC reply valid.
2016-04-05 13:14:21 -07:00
Rom Walton 377c8448b2 Merge pull request #1509 from skybon/patch-1
Work around invalid XML in logs
2016-04-05 11:09:14 -04:00
Christian Beer dcd9eb3c2e Client: fix nvidia_driver_version dlopen()
On Debian only the versioned object can be opened. It usually is a symlink to the actual file.
2016-04-05 07:43:22 +02:00
Artem Vorotnikov 7a6b5ee204 Work around invalid XML in logs
Ironically, should the user specify invalid XML tag in cc_config.xml, BOINC will write log message containing that tag unescaped and unclosed. Needless to say, it breaks XML parsing instantly. This patch auto-closes this tag in the log message.
2016-03-23 15:26:52 +03:00
Christian Beer 51ead6fd21 Client: select next download url if the current one fails
Try all download servers when multiple URLs are supplied by the project. This is needed because the first download server may be unreachable or out of sync which produces a permanent error. Uploads are handled differently and always use the transient_failure() function.
2016-03-21 15:06:40 +01:00
Charlie Fenton 3dc198a292 client sandbox: In switcher, satisfy an error / warning from rpmlint: ensure that we drop any supplementary groups associated with root 2016-02-26 01:45:54 -08:00
Rom Walton 9542bc9b1b client & MGR: Unify the language around the setup cookie feature. 2016-02-19 10:40:49 -05:00
Charlie Fenton 55efe2444d client: fix build break on Mac introduced by commit 2cc9a0b, 2016-02-18 01:41:38 -08:00
Rom Walton 2cc9a0b6c4 client: Cleanup low hanging fruit with regards to cleaning up sprintf.
Use snprintf instead.
2016-02-18 00:59:13 -05:00
Rom Walton cb9158a863 client: Remove hack for a unsupported version of Windows. 2016-02-17 22:17:37 -05:00
Rom Walton ba0412ce96 client: Cleanup low hanging fruit with regards to cleaning up strcpy and strcat use.
Use safe_strcpy and safe_strcat when dealing with non-pointer data types.
2016-02-16 21:38:32 -05:00
Rom Walton 2997944822 client: Let strlcat handle dealing with the buffer size and suppress the security warnings again. 2016-02-16 08:48:08 -05:00
Rom Walton dbf5a9b253 client: Cleanup low hanging fruit with regards to cleaning up strcpy and strcat use.
Use safe_strcpy and safe_strcat when dealing with non-pointer data types.
2016-02-16 00:18:05 -05:00
Rom Walton 20a4275937 client: Cleanup low hanging fruit with regards to cleaning up strcpy and strcat use.
Use safe_strcpy and safe_strcat when dealing with non-pointer data types.
2016-02-16 00:14:52 -05:00
Rom Walton 59b5bf2f71 client: Cleanup low hanging fruit with regards to cleaning up strcpy and strcat use.
Use safe_strcpy and safe_strcat when dealing with non-pointer data types.
2016-02-15 23:34:18 -05:00
Rom Walton 56da6b11fb client: Cleanup low hanging fruit with regards to cleaning up strcpy and strcat use.
Use safe_strcpy and safe_strcat when dealing with non-pointer data types.
2016-02-15 21:53:07 -05:00
Rom Walton 1d19815bbe client: Cleanup low hanging fruit with regards to cleaning up strcpy and strcat use.
Use safe_strcpy and safe_strcat when dealing with non-pointer data types.
2016-02-15 19:43:05 -05:00
Rom Walton b69d29d2dc client: Cleanup some dangerous function usage in boinclog. 2016-02-14 20:29:03 -05:00
David Anderson 71832f73dc Merge branch 'master' of github.com:BOINC/boinc 2016-02-10 14:55:21 -08:00
David Anderson e658092255 Add ops script for creating account and team
This is for my own use in BOINC-wide teams.
It must work even if account/team creation are disabled
(as they are in the BOINC-wide teams site).
To do this, I moved the <disable_team_creation> check out of make_team()
and moved it to the existing places that call make_team().
The logic now matches that of make_user().
2016-02-10 14:51:34 -08:00
Rom Walton eab1dd6f84 MGR and client: Add more missing code from the cookieless install merge. 2016-02-10 17:37:52 -05:00
Rom Walton 4d2e6a041f MGR: Fix for converting std::string to wxString for Mac and Linux.
MGR: Add missing commit from previous merge for the cookieless install scenario.
2016-02-10 10:46:48 -05:00
Rom Walton 6beafff693 WCG: New feature 'cookieless installs'
See: http://boinc.berkeley.edu/trac/wiki/SimpleAttach#CookielessInstalls

Signed-off-by: Rom Walton <romw@romwnet.org>
2016-02-08 15:51:33 -05:00
David Anderson b544c31d37 Merge branch 'master' of github.com:BOINC/boinc
Conflicts:
	client/gpu_opencl.cpp
2016-02-01 20:27:43 -08:00
David Anderson d5f5918111 Replace strncpy() with strlcpy() various places.
Except for very specific cases, strncpy() should never be used.
It can result in a non-terminated string.

Also replace strncat() with strlcat(); the latter is simpler
because you don't have to calculate remaining buffer space.
2016-02-01 20:23:18 -08:00
Rom Walton 1885ee3638 client: Replace a strncpy with strlcpy.
Fixes: CID 122367
2016-02-01 18:45:46 -05:00
David Anderson f5784c0881 client: if suspending because we're on batteries, don't suspend NCI tasks
(which don't use significant power)
2016-01-29 13:50:06 -08:00
David Anderson 056baff691 client: reduce delay restarting tasks after exclusize app exits
There was a 20-30 second delay between exclusive app exit
and resuming tasks.  This was excessive.
Reduce it to 5-15 sec (uncertainty is because we
check exclusive apps every 10 sec)
2016-01-28 19:58:18 -08:00
David Anderson 5ade036b3a Merge pull request #1478 from aggroskater/reinstate_xss_idle_detection_linux
XSS Idle Detection Bugfix (XCloseDisplay)
2016-01-27 20:50:17 -08:00
Preston Maness 85c8d0d85c
XSS Idle Detection Bugfix (XCloseDisplay)
Apologies. My initial code didn't close the connections to the X
displays after opening them. I had thought that falling out of scope
would close the connection automatically. However, thanks to a bug
report by Dan Merillat that I was able to replicate, I now know better:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=812835

This simple adjustment closes the connection to the display (if a
connection succeeded in the first place; if XOpenDisplay() failed, it
returns NULL and there is no connection). Testing on my end shows that
this resolves the issue of the boinc client piling up new connections to
X servers.
2016-01-26 23:24:36 -06:00
Charlie Fenton 31446d1cb9 client: Update commits 5c1fa20 & 5e984c0: when Mac is booted, it can take over 120 seconds before system extension CUDA.kext is loaded (fix occasional failure to recognize CUDA devices when BOINC is launched automatically at login before CUDA has initialized at system boot.) 2016-01-20 04:23:57 -08:00
David Anderson e0e6d0703e client, Win: fix problem if ^Z appears in user-defined fields
A user had entered a string in one of the project prefs image URL
fields containing ^Z.  Windows treats this as EOF and the parse
of the scheduler reply fails.

Soluation: open the scheduler reply file in "rb" mode rather than "r"
2016-01-11 22:35:18 -08:00
Rom Walton 5fb370f651 client: Add compute capability detection for Nvidia OpenCL devices 2016-01-07 19:33:28 -05:00