mono.git
8 years agoMerge pull request #2323 from esdrubal/servicemodel
Marcos Henrich [Mon, 15 Feb 2016 12:08:21 +0000 (12:08 +0000)]
Merge pull request #2323 from esdrubal/servicemodel

[System.ServiceModel] Fixes missing xsi xsd attributes

8 years agoMerge pull request #2613 from knocte/crypto-refsource
Marek Safar [Mon, 15 Feb 2016 11:39:28 +0000 (12:39 +0100)]
Merge pull request #2613 from knocte/crypto-refsource

[Crypto] Include CngKeyBlobFormat from reference sources (rm old)

8 years ago[mcs] Populate ProductVersion from all valid sources. Fixes #38553
Marek Safar [Mon, 15 Feb 2016 11:31:59 +0000 (12:31 +0100)]
[mcs] Populate ProductVersion from all valid sources. Fixes #38553

8 years ago[corlib] Add missing semicolon in StringTest
Alexander Köplinger [Sat, 13 Feb 2016 23:33:34 +0000 (00:33 +0100)]
[corlib] Add missing semicolon in StringTest

8 years agoMerge pull request #2608 from ludovic-henry/monoerror-icall
monojenkins [Sat, 13 Feb 2016 11:50:17 +0000 (11:50 +0000)]
Merge pull request #2608 from ludovic-henry/monoerror-icall

[runtime] Use MonoError for icall.c functions

8 years agoMerge pull request #2611 from akoeplinger/cleanup
Alexander Köplinger [Sat, 13 Feb 2016 11:45:56 +0000 (12:45 +0100)]
Merge pull request #2611 from akoeplinger/cleanup

[corlib] Remove FIXME_CORLIB_CMP section from Makefile

8 years agoMerge pull request #2612 from xmcclure/largestring
monojenkins [Sat, 13 Feb 2016 06:05:32 +0000 (06:05 +0000)]
Merge pull request #2612 from xmcclure/largestring

Do not run 4GB string tests on low memory systems (fixes #38392)

"Low memory" here is defined as 32-bit, less than 6GB of physical RAM, or mobile (since mobile lacks the class for querying physical RAM).

Without this patch, one of the corlib tests allocates 4 GB of RAM, which causes OOM crashes on low-memory Jenkins instances and also mobile phones.

8 years agoMerge pull request #2442 from schani/fix-larger-tlab-size
monojenkins [Sat, 13 Feb 2016 01:06:05 +0000 (01:06 +0000)]
Merge pull request #2442 from schani/fix-larger-tlab-size

[automerge] Fix larger tlab size

8 years ago[jit] Add a checked version to mono_resolve_patch_target () so exceptions are thrown...
Zoltan Varga [Sat, 13 Feb 2016 00:58:41 +0000 (19:58 -0500)]
[jit] Add a checked version to mono_resolve_patch_target () so exceptions are thrown in upper level code.

8 years agoRevert "[Process] Add stress tests"
Alexander Köplinger [Sat, 13 Feb 2016 00:15:55 +0000 (01:15 +0100)]
Revert "[Process] Add stress tests"

This reverts commit a7955a93f5d063feadb4198d8a6f142d81373b79.

The Process import commit was reverted in f74f7037195fe81396edde11c57cea3ec16f03fd,
this reverts the added tests as well since they fail on Jenkins now.

8 years agoMerge pull request #2573 from BrzVlad/fix-conc-memusage
Mark Probst [Fri, 12 Feb 2016 21:09:38 +0000 (15:09 -0600)]
Merge pull request #2573 from BrzVlad/fix-conc-memusage

[sgen] Improve memory usage with the concurrent collector

8 years agoMerge pull request #2589 from gofman/master
monojenkins [Fri, 12 Feb 2016 20:25:20 +0000 (20:25 +0000)]
Merge pull request #2589 from gofman/master

sgen: fix bit counting in mword

Fixes GC crashe for 64-bit architecture when using libmono.
http://lists.ximian.com/pipermail/mono-devel-list/2016-February/043507.html

8 years agoMerge pull request #2585 from lambdageek/dev/bug-38222
monojenkins [Fri, 12 Feb 2016 19:46:20 +0000 (19:46 +0000)]
Merge pull request #2585 from lambdageek/dev/bug-38222

[reflection] Signal pending loader error in mono_reflection_get_custom_attrs_data

Fixes [Bugzilla 38222](https://bugzilla.xamarin.com/show_bug.cgi?id=38222)

While we're at it, convert `mono_reflection_get_custom_attrs_data` to use
`MonoError` and mark it external only.  Runtime should use
`mono_reflection_get_custom_attrs_data_checked`

8 years agoUse Assert.Ignore for insufficient-memory test skips
Andi McClure [Fri, 12 Feb 2016 19:26:50 +0000 (14:26 -0500)]
Use Assert.Ignore for insufficient-memory test skips

8 years ago[Crypto] Include CngKeyBlobFormat from reference sources (rm old)
Andrés G. Aragoneses [Fri, 12 Feb 2016 19:11:16 +0000 (03:11 +0800)]
[Crypto] Include CngKeyBlobFormat from reference sources (rm old)

CngKeyBlobFormat was never included in the build, but anyway
we can include the one from referencesource now.

Detected by a user of Npgsql 3.0.5 which reported the problem
in stackoverflow:
http://stackoverflow.com/questions/35016066/failure-to-resolve-system-security-cryptography-cngkeyblobformat-when-using-npgs

8 years agoDo not run 4GB string tests on low memory systems (fixes #38392)
Andi McClure [Fri, 12 Feb 2016 18:56:20 +0000 (13:56 -0500)]
Do not run 4GB string tests on low memory systems (fixes #38392)

"Low memory" here is defined as 32-bit, less than 6GB of physical RAM,
or mobile (since mobile lacks the class for querying physical RAM).

8 years ago[corlib] Remove FIXME_CORLIB_CMP section from Makefile
Alexander Köplinger [Fri, 12 Feb 2016 18:34:54 +0000 (19:34 +0100)]
[corlib] Remove FIXME_CORLIB_CMP section from Makefile

Looks like this isn't needed anymore.

8 years agoMerge pull request #2605 from lambdageek/dev/bug-38408
Aleksey Kliger (λgeek) [Fri, 12 Feb 2016 18:16:44 +0000 (13:16 -0500)]
Merge pull request #2605 from lambdageek/dev/bug-38408

[io] Release Pipe and Console shared handles

8 years agoRevert "[System] Import System.Diagnostics.Process"
Ludovic Henry [Fri, 12 Feb 2016 18:14:02 +0000 (18:14 +0000)]
Revert "[System] Import System.Diagnostics.Process"

This reverts commit d30e99d172ec5074ce6deb44bc37f9a9ecaef7fe.

8 years ago[sgen] Allow TLABs larger than MAX_SMALL_OBJ_SIZE.
Mark Probst [Fri, 15 Jan 2016 02:05:14 +0000 (18:05 -0800)]
[sgen] Allow TLABs larger than MAX_SMALL_OBJ_SIZE.

`sgen_ensure_free_space()` assumed that if `size` was larger than
`SGEN_MAX_SMALL_OBJ_SIZE`, it should find free space on the major
heap, so it wouldn't consider triggering a nursery allocation.  Making
TLABs larger than that would thus never trigger nursery collections
anymore.

Now we pass in the generation that says where we want space.

8 years ago[sgen] Add necessary type cast.
Mark Probst [Fri, 15 Jan 2016 01:52:41 +0000 (17:52 -0800)]
[sgen] Add necessary type cast.

8 years ago[runtime] Use MonoError for mono_module_get_types
Ludovic Henry [Fri, 12 Feb 2016 15:49:51 +0000 (15:49 +0000)]
[runtime] Use MonoError for mono_module_get_types

8 years ago[runtime] Use MonoError for fill_reflection_assembly_name
Ludovic Henry [Fri, 12 Feb 2016 15:31:32 +0000 (15:31 +0000)]
[runtime] Use MonoError for fill_reflection_assembly_name

8 years ago[runtime] Use MonoError for create_version
Ludovic Henry [Fri, 12 Feb 2016 15:22:59 +0000 (15:22 +0000)]
[runtime] Use MonoError for create_version

8 years ago[runtime] Use MonoError for type_from_parsed_name
Ludovic Henry [Fri, 12 Feb 2016 15:15:46 +0000 (15:15 +0000)]
[runtime] Use MonoError for type_from_parsed_name

8 years agoMerge pull request #2576 from ludovic-henry/referencesource-process
monojenkins [Fri, 12 Feb 2016 16:20:44 +0000 (16:20 +0000)]
Merge pull request #2576 from ludovic-henry/referencesource-process

[System] Import System.Diagnostics.Process

8 years agoMerge pull request #2604 from mattleibow/pcl-mono.dataconverter
Alexander Köplinger [Fri, 12 Feb 2016 15:38:32 +0000 (16:38 +0100)]
Merge pull request #2604 from mattleibow/pcl-mono.dataconverter

[corlib] Ensure PCL compatibility with Mono.DataConverter

8 years ago[io] Don't leak Pipe filename
Aleksey Kliger [Thu, 11 Feb 2016 22:56:53 +0000 (17:56 -0500)]
[io] Don't leak Pipe filename

Named FIFOs do indeed have names, but pipe_close doesn't free
it.  (Because CreatePipe doesn't set a filename).

8 years ago[io] Release Pipe and Console shared handles
Aleksey Kliger [Thu, 11 Feb 2016 22:55:24 +0000 (17:55 -0500)]
[io] Release Pipe and Console shared handles

Allows opening a character device or named fifo more than once with code like:

  using (var f = new FileStream ("/dev/zero", FileMode.Open))
  {
    ...
  }
  using (var f = new FileStream ("/dev/zero", FileMode.Open))
  {
    ...
  }

8 years ago[io] Test repeatedly opening a character device
Aleksey Kliger [Thu, 11 Feb 2016 23:11:16 +0000 (18:11 -0500)]
[io] Test repeatedly opening a character device

Regression test for https://bugzilla.xamarin.com/show_bug.cgi?id=38408

8 years agoMerge pull request #2606 from akoeplinger/fix-hardcoded-testports
monojenkins [Fri, 12 Feb 2016 15:10:24 +0000 (15:10 +0000)]
Merge pull request #2606 from akoeplinger/fix-hardcoded-testports

[System] Fix a few more hardcoded ports in tests

They'd cause "address already in use" errors when two builds are running concurrently on the same machine on Jenkins.

@monojenkins merge

8 years agoAdd link to the updated location for the utf8 test file
Miguel de Icaza [Fri, 12 Feb 2016 14:31:11 +0000 (09:31 -0500)]
Add link to the updated location for the utf8 test file

8 years ago[Process] Add stress tests
Ludovic Henry [Thu, 11 Feb 2016 15:55:21 +0000 (15:55 +0000)]
[Process] Add stress tests

That's to ensure we do not have regression in the Process implementation.

8 years ago[System] Import System.Diagnostics.Process
Ludovic Henry [Mon, 8 Feb 2016 18:56:29 +0000 (18:56 +0000)]
[System] Import System.Diagnostics.Process

8 years ago[System] Fix a few more hardcoded ports in tests
Alexander Köplinger [Fri, 12 Feb 2016 13:33:57 +0000 (14:33 +0100)]
[System] Fix a few more hardcoded ports in tests

They'd cause "address already in use" errors when two builds are running concurrently on the same machine on Jenkins.

8 years ago[jit] Fix the bblock linking in c5512c0d3e2b102ed16158ce8c599c8203ccd510.
Zoltan Varga [Fri, 12 Feb 2016 04:05:21 +0000 (23:05 -0500)]
[jit] Fix the bblock linking in c5512c0d3e2b102ed16158ce8c599c8203ccd510.

8 years ago[Mono.Security]: Make 'Mono.Security.Protocol.Ntlm' public and include in System...
Martin Baulig [Thu, 11 Feb 2016 22:50:31 +0000 (17:50 -0500)]
[Mono.Security]: Make 'Mono.Security.Protocol.Ntlm' public and include in System.dll on mobile.

(cherry picked from commit 2026a0b408d122cf3eb2f25cb7355215aa100291)

8 years agoRemove old, unused code
Miguel de Icaza [Thu, 11 Feb 2016 21:15:22 +0000 (16:15 -0500)]
Remove old, unused code

8 years ago[corlib] Ensure PCL compatibility with Mono.DataConverter
Matthew Leibowitz [Thu, 11 Feb 2016 20:55:02 +0000 (22:55 +0200)]
[corlib] Ensure PCL compatibility with Mono.DataConverter

8 years agoMerge pull request #2560 from ludovic-henry/coop-threads-cleanup
Ludovic Henry [Thu, 11 Feb 2016 18:47:49 +0000 (18:47 +0000)]
Merge pull request #2560 from ludovic-henry/coop-threads-cleanup

[threads] Split abort/suspend into self and async cases

8 years agoMerge pull request #2587 from lambdageek/monoerror-api-cleanup-mistakes
Aleksey Kliger (λgeek) [Thu, 11 Feb 2016 17:29:59 +0000 (12:29 -0500)]
Merge pull request #2587 from lambdageek/monoerror-api-cleanup-mistakes

[runtime] Better error handling in mono_{assembly,module_file}_get_object

8 years agoMerge pull request #2590 from esdrubal/wcf_req
Marcos Henrich [Thu, 11 Feb 2016 17:19:25 +0000 (17:19 +0000)]
Merge pull request #2590 from esdrubal/wcf_req

BCL changes required by dotnet/wcf

8 years agoMerge pull request #2595 from ludovic-henry/tests-sgen
Ludovic Henry [Thu, 11 Feb 2016 16:20:45 +0000 (16:20 +0000)]
Merge pull request #2595 from ludovic-henry/tests-sgen

[tests] Remove manual for loop to run sgen tests and use different make targets

8 years ago[reflection] Better error behavior for API functions
Aleksey Kliger [Wed, 10 Feb 2016 00:35:11 +0000 (19:35 -0500)]
[reflection] Better error behavior for API functions

mono_assembly_get_object and mono_module_file_get_object should return
NULL on failure without raising an exception.

8 years ago[tests] Remove manual for loop to run sgen tests and use different make targets
Ludovic Henry [Wed, 10 Feb 2016 18:06:27 +0000 (18:06 +0000)]
[tests] Remove manual for loop to run sgen tests and use different make targets

8 years ago[threads] Split abort/suspend into self and async cases
Ludovic Henry [Tue, 2 Feb 2016 11:27:15 +0000 (11:27 +0000)]
[threads] Split abort/suspend into self and async cases

Separate the code path for async and self abort/suspend. This make the code intention more clear. It also allows us to remove some unused parameters (can_raise_excetpion which is always TRUE). Add some comments and harmonise locking behaviours : async_suspend_internal and self_suspend_internal now both call UNLOCK_THREAD.

8 years agoMerge pull request #2598 from dellis1972/master
Marek Safar [Thu, 11 Feb 2016 10:27:51 +0000 (11:27 +0100)]
Merge pull request #2598 from dellis1972/master

[msbuild] Registered the XmlPeek Build Task in the Microsoft.Common.tasks

8 years ago[msbuild] Registered the XmlPeek Build Task in the Microsoft.Common.tasks
Dean Ellis [Thu, 11 Feb 2016 10:09:57 +0000 (10:09 +0000)]
[msbuild] Registered the XmlPeek Build Task in the Microsoft.Common.tasks

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=36183
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=38638

The previous commit () was incomplete, while it added the source
file for XmlPeek it did not register them in the appropriate
MSBuild tasks files. As a result the XmlPeek task cannot be used.

8 years ago[aot] Fix the check in mono_aot_get_plt_entry () for thumb code, use 'code-4' instead...
Zoltan Varga [Thu, 11 Feb 2016 06:14:29 +0000 (01:14 -0500)]
[aot] Fix the check in mono_aot_get_plt_entry () for thumb code, use 'code-4' instead of 'code', since the latter points to after a call, so it could point outside the range of llvm code. Fixes #36723.

8 years ago[jit] Add a fastpath to Monitor.Enter () which doesn't have a wrapper, and add a...
Zoltan Varga [Thu, 11 Feb 2016 02:27:23 +0000 (21:27 -0500)]
[jit] Add a fastpath to Monitor.Enter () which doesn't have a wrapper, and add a slowpath which has a wrapper, so async stack traces work for threads blocked on monitors. Fixes #38525.

8 years agoFix a warning.
Zoltan Varga [Thu, 11 Feb 2016 02:26:06 +0000 (21:26 -0500)]
Fix a warning.

8 years ago[jit] Fix the peephole optimization added by 9fc7c1de3a2f7d42c732b20e272d9d6693720012...
Zoltan Varga [Thu, 11 Feb 2016 01:09:07 +0000 (20:09 -0500)]
[jit] Fix the peephole optimization added by 9fc7c1de3a2f7d42c732b20e272d9d6693720012, compare_imm+cond_exc_imm can only be eliminated if the comparison is false.

8 years agoRemove table that was not licensed under MIT
Miguel de Icaza [Wed, 10 Feb 2016 23:15:23 +0000 (18:15 -0500)]
Remove table that was not licensed under MIT

8 years ago[Mono.Security]: MonoTlsProviderFactory.GetProvider(string) now returns null on error.
Martin Baulig [Wed, 10 Feb 2016 23:13:01 +0000 (18:13 -0500)]
[Mono.Security]: MonoTlsProviderFactory.GetProvider(string) now returns null on error.

(cherry picked from commit 7f965e8220a67f3d806fb410e99ad453bddbe3bc)

8 years agoMerge pull request #2591 from gofman/cherry-branch
Alexander Köplinger [Wed, 10 Feb 2016 23:10:55 +0000 (00:10 +0100)]
Merge pull request #2591 from gofman/cherry-branch

[System.Windows.Forms] Recreate FosterWindow when required in XplatUIWin32

8 years agoMerge pull request #2594 from akoeplinger/fix-facade-lookup-when-mono-path-overriden
Alexander Köplinger [Wed, 10 Feb 2016 22:50:44 +0000 (23:50 +0100)]
Merge pull request #2594 from akoeplinger/fix-facade-lookup-when-mono-path-overriden

[metadata] Fix Facades lookup in assembly.c when MONO_PATH is set

8 years ago[profiler] Remove perf_event.h from EXTRA_DIST, too.
Alex Rønne Petersen [Wed, 10 Feb 2016 22:08:39 +0000 (23:08 +0100)]
[profiler] Remove perf_event.h from EXTRA_DIST, too.

8 years ago[profiler] Only include perf_event.h when actually needed, and use the system header.
Alex Rønne Petersen [Wed, 10 Feb 2016 21:34:09 +0000 (22:34 +0100)]
[profiler] Only include perf_event.h when actually needed, and use the system header.

8 years ago[profiler] Remove the bundled perf_event.h header.
Alex Rønne Petersen [Wed, 10 Feb 2016 21:22:45 +0000 (22:22 +0100)]
[profiler] Remove the bundled perf_event.h header.

Bundling this in Mono is technically a GPL violation. We need to switch to the
system <linux/perf_event.h> header.

8 years ago[Mono.Security]: Add 'MonoTlsProviderFactory.GetProvider(string)'.
Martin Baulig [Wed, 10 Feb 2016 00:01:09 +0000 (19:01 -0500)]
[Mono.Security]: Add 'MonoTlsProviderFactory.GetProvider(string)'.

Similar to 'SetDefaultProvider(string)', but return the provider instead
of installing it.

(cherry picked from commit 024241f424062a41f35061cd851f0923e25f16c7)

8 years ago[llvmonly] Remove some leftover debugging code.
Zoltan Varga [Wed, 10 Feb 2016 20:29:29 +0000 (15:29 -0500)]
[llvmonly] Remove some leftover debugging code.

8 years ago[swf] Flow SynchronizationContext through ExecutionContext. Fixes #38599
Marek Safar [Wed, 10 Feb 2016 19:24:13 +0000 (20:24 +0100)]
[swf] Flow SynchronizationContext through ExecutionContext. Fixes #38599

8 years ago[metadata] Fix Facades lookup in assembly.c when MONO_PATH is set
Alexander Köplinger [Wed, 10 Feb 2016 18:03:31 +0000 (19:03 +0100)]
[metadata] Fix Facades lookup in assembly.c when MONO_PATH is set

When MONO_PATH is set, the corlib lookup returns early on in mono_assembly_load_corlib (),
without adding the Facades dir to default_path.

This causes any app/library that relies on the facades to fail at runtime.

Fixing this by always doing the Facades lookup when returning the found corlib image.

8 years ago[corlib] Adds property AccessToken to WindowsIdentity
Marcos Henrich [Mon, 21 Dec 2015 18:36:02 +0000 (18:36 +0000)]
[corlib] Adds property AccessToken to WindowsIdentity

System.Security.Principal.WindowsIdentity.AccessToken is required for
dornet/wcf to compile.

8 years agoImpelements IDisposable in X509Store
Marcos Henrich [Mon, 21 Dec 2015 18:31:29 +0000 (18:31 +0000)]
Impelements IDisposable in X509Store

This class implement IDisposable in .NET and dotnet/wcf depends on this
to compile.

8 years ago[System.Windows.Forms] Recreate FosterWindow when required in XplatUIWin32
Paul Gofman [Wed, 10 Feb 2016 14:15:43 +0000 (17:15 +0300)]
[System.Windows.Forms] Recreate FosterWindow when required in XplatUIWin32

Fixes #38614

8 years ago[System.Net.Security] Adds NegotiateStream methods
Marcos Henrich [Mon, 21 Dec 2015 18:26:31 +0000 (18:26 +0000)]
[System.Net.Security] Adds NegotiateStream methods

System.Net.Security was missing some methods that are used by
dotnet/wcf.

8 years ago[corlib] Added missing properties to EventAttribute
Marcos Henrich [Mon, 21 Dec 2015 18:23:22 +0000 (18:23 +0000)]
[corlib] Added missing properties to EventAttribute

8 years agosgen: fix bit counting in mword
Paul Gofman [Tue, 9 Feb 2016 16:06:22 +0000 (19:06 +0300)]
sgen: fix bit counting in mword

Fixes GC crashe for 64-bit architecture when using libmono.
http://lists.ximian.com/pipermail/mono-devel-list/2016-February/043507.html

8 years ago[corlib] Use correct max/min value for DateTime overflows. Fixes #35876
Marek Safar [Wed, 10 Feb 2016 09:21:38 +0000 (03:21 -0600)]
[corlib] Use correct max/min value for DateTime overflows. Fixes #35876

8 years ago[System] Simple readability changes to SimpleAsyncResult
Marek Safar [Tue, 9 Feb 2016 19:09:33 +0000 (20:09 +0100)]
[System] Simple readability changes to SimpleAsyncResult

8 years ago[jit] Add a peephole optimization to remove the ldaddr+compare_imm 0+cond_exc checks...
Zoltan Varga [Wed, 10 Feb 2016 06:59:22 +0000 (01:59 -0500)]
[jit] Add a peephole optimization to remove the ldaddr+compare_imm 0+cond_exc checks inserted when using explicit null checks.

8 years ago[llvmonly] Disable the 'overriding the module target triple with' clang warning when...
Zoltan Varga [Wed, 10 Feb 2016 06:10:38 +0000 (01:10 -0500)]
[llvmonly] Disable the 'overriding the module target triple with' clang warning when compiling the bitcode files.

8 years ago[llvmonly] Fix a few issues passing and returning vtypes smaller than one machine...
Zoltan Varga [Wed, 10 Feb 2016 05:46:57 +0000 (00:46 -0500)]
[llvmonly] Fix a few issues passing and returning vtypes smaller than one machine word.

8 years ago[llvmonly] Fix the locking in the gsharedvt wrapper creation functions.
Zoltan Varga [Wed, 10 Feb 2016 02:55:37 +0000 (21:55 -0500)]
[llvmonly] Fix the locking in the gsharedvt wrapper creation functions.

8 years agoMerge pull request #2584 from lewurm/fix-mobile-compilation
monojenkins [Wed, 10 Feb 2016 02:20:32 +0000 (02:20 +0000)]
Merge pull request #2584 from lewurm/fix-mobile-compilation

[bcl] fix compilation of test on mobile

although a nunit category is specified, the compilation still failed on mobile.

8 years ago[reflection] Set pending loader exception in mono_reflection_get_custom_attrs_data
Aleksey Kliger [Tue, 9 Feb 2016 23:16:24 +0000 (18:16 -0500)]
[reflection] Set pending loader exception in mono_reflection_get_custom_attrs_data

Fixes [Bugzilla 38222](https://bugzilla.xamarin.com/show_bug.cgi?id=38222)

While we're at it, convert mono_reflection_get_custom_attrs_data to use
MonoError and mark it external only.  Runtime should use
mono_reflection_get_custom_attrs_data_checked

8 years ago[bcl] fix compilation of test on mobile
Bernhard Urban [Tue, 9 Feb 2016 23:07:19 +0000 (15:07 -0800)]
[bcl] fix compilation of test on mobile

fix for the following problem:
> [13:33:37] src/System/Test/System.Diagnostics/ProcessTest.cs(1048,19): error CS0103: The name `GetCrossPlatformStartInfo' does not exist in the current context

8 years agoMerge pull request #2582 from ludovic-henry/fix-threadpool-starvation
monojenkins [Tue, 9 Feb 2016 23:00:32 +0000 (23:00 +0000)]
Merge pull request #2582 from ludovic-henry/fix-threadpool-starvation

[threadpool] Improve the monitor thread heuristic

Because the ThreadPool heuristic is optimized for short lived work item, it has more difficulty when executing long lived work item. That case can lead to a starvation of the worker threads: they are all doing work, while there is outstanding request, and these requests are not satisfied because we reached the max number of working thread.

To fix that issue, we have the monitor thread, whose sole job is to unstuck this kind of starvation cases. Unfortunately, it only works when all the worker threads are in the ThreadState.WaitSleepJoin state, which excludes the case of calling an IO operation in a Task. That includes the case of FileStream.BeginRead/Write/... which implementation can be simplified as follows: FileStream.BeginRead(...) -> Task.Run(() => FileStream.Read(...)).

The way we implement it in this commit is: every MONITOR_INTERVAL (500ms here), we check if there is any outstanding request, and if so, we assume that we are in the starvation case, and we simply increase the max number of working thread. Also to reduce the number of false positives, we do that only if there has been no completed work item for more than at least MONITOR_INTERVAL (in case of low CPU usage, more otherwise, see monitor_sufficient_delay_since_last_dequeue). This case is typically the case where we have all working thread stuck in long running work items.

Finally we increase the monitor interval from 100ms to 500ms so we guarantee we do not create more than 2 threads per second in the monitor thread. That is the value used by the old threadpool.

8 years ago[Docs] handle code-markdown with dots on the names
Miguel de Icaza [Tue, 9 Feb 2016 22:05:34 +0000 (17:05 -0500)]
[Docs] handle code-markdown with dots on the names

8 years ago[Docs] Continue to improve the Mono runtime documentation
Miguel de Icaza [Tue, 9 Feb 2016 20:52:53 +0000 (15:52 -0500)]
[Docs] Continue to improve the Mono runtime documentation

8 years agoMerge pull request #2570 from lambdageek/monoerror-reflection-bubble-2
Aleksey Kliger (λgeek) [Tue, 9 Feb 2016 20:52:52 +0000 (15:52 -0500)]
Merge pull request #2570 from lambdageek/monoerror-reflection-bubble-2

[reflection] Grab bag of MonoError commits

8 years ago[threadpool] Improve the monitor thread heuristic
Ludovic Henry [Tue, 9 Feb 2016 19:17:14 +0000 (19:17 +0000)]
[threadpool] Improve the monitor thread heuristic

Because the ThreadPool heuristic is optimized for short lived work item, it has more difficulty when executing long lived work item. That case can lead to a starvation of the worker threads: they are all doing work, while there is outstanding request, and these requests are not satisfied because we reached the max number of working thread.

To fix that issue, we have the monitor thread, whose sole job is to unstuck this kind of starvation cases. Unfortunately, it only works when all the worker threads are in the ThreadState.WaitSleepJoin state, which excludes the case of calling an IO operation in a Task. That includes the case of FileStream.BeginRead/Write/... which implementation can be simplified as follows: FileStream.BeginRead(...) -> Task.Run(() => FileStream.Read(...)).

The way we implement it in this commit is: every MONITOR_INTERVAL (500ms here), we check if there is any outstanding request, and if so, we assume that we are in the starvation case, and we simply increase the max number of working thread. Also to reduce the number of false positives, we do that only if there has been no completed work item for more than at least MONITOR_INTERVAL (in case of low CPU usage, more otherwise, see monitor_sufficient_delay_since_last_dequeue). This case is typically the case where we have all working thread stuck in long running work items.

Finally we increase the monitor interval from 100ms to 500ms so we guarantee we do not create more than 2 threads per second in the monitor thread. That is the value used by the old threadpool.

8 years ago[reflection] Fix decl of mono_image_create_token
Aleksey Kliger [Tue, 9 Feb 2016 18:34:39 +0000 (13:34 -0500)]
[reflection] Fix decl of mono_image_create_token

For the DISABLE_REFLECTION_EMIT case

8 years ago[reflection] Mark mono_custom_attrs_construct external only
Aleksey Kliger [Thu, 4 Feb 2016 00:24:01 +0000 (19:24 -0500)]
[reflection] Mark mono_custom_attrs_construct external only

The function mono_custom_attrs_construct_by_type is available for the
runtime (though currently static) and uses MonoError for error handling.

8 years ago[reflection] Use MonoError in mono_reflection_marshal_as_attribute_from_marshal_spec
Aleksey Kliger [Wed, 3 Feb 2016 23:56:59 +0000 (18:56 -0500)]
[reflection] Use MonoError in mono_reflection_marshal_as_attribute_from_marshal_spec

8 years ago[runtime] Use MonoError for mono_event_get_object
Aleksey Kliger [Wed, 3 Feb 2016 23:07:53 +0000 (18:07 -0500)]
[runtime] Use MonoError for mono_event_get_object

Mark mono_event_get_object external only.
Runtime should use mono_event_get_object_checked.

8 years ago[runtime] Use MonoError for mono_property_get_object
Aleksey Kliger [Wed, 3 Feb 2016 22:58:21 +0000 (17:58 -0500)]
[runtime] Use MonoError for mono_property_get_object

Mark mono_property_get_object external only.
Runtime should use mono_property_get_object_checked.

8 years ago[reflection] Push MonoError through some static functions
Aleksey Kliger [Wed, 3 Feb 2016 22:21:24 +0000 (17:21 -0500)]
[reflection] Push MonoError through some static functions

8 years ago[debugger] Don't call buffer_add_objid with NULL
Aleksey Kliger [Tue, 9 Feb 2016 16:39:08 +0000 (11:39 -0500)]
[debugger] Don't call buffer_add_objid with NULL

Fixup 64778857e4652ccac18c6fbf990f3e7cc69fa275

8 years ago[runtime] Cleanup MonoError after mono_runtime_try_invoke
Aleksey Kliger [Tue, 9 Feb 2016 17:10:26 +0000 (12:10 -0500)]
[runtime] Cleanup MonoError after mono_runtime_try_invoke

If both an exception exc is set and the MonoError is not ok, we could
leak the MonoError memory.  Explicitly cleanup.

8 years ago[mini] Use catchExcInMonoError to decide if exc should be embedded in MonoError
Aleksey Kliger [Tue, 9 Feb 2016 16:59:24 +0000 (11:59 -0500)]
[mini] Use catchExcInMonoError to decide if exc should be embedded in MonoError

Do the dyn_runtime_invoke decision the same way as other invokes.

Fixup to 45bd9bb5d50e6cbd806a5e95696656eedad3bb78

8 years ago[runtime] Don't raise MonoError when unloading appdomain
Aleksey Kliger [Tue, 9 Feb 2016 16:45:43 +0000 (11:45 -0500)]
[runtime] Don't raise MonoError when unloading appdomain

There's no managed code calling mono_domain_try_unload, so raising was
wrong.  Thread the error out through exc which gets checked by callers.

Fixup for 45bd9bb5d50e6cbd806a5e95696656eedad3bb78

8 years ago[Docs] document one of our most key APIs: mono_add_internal_call
Miguel de Icaza [Tue, 9 Feb 2016 17:05:24 +0000 (12:05 -0500)]
[Docs] document one of our most key APIs: mono_add_internal_call

8 years ago[Docs] Improved the rendering, added some docs
Miguel de Icaza [Tue, 9 Feb 2016 16:46:46 +0000 (11:46 -0500)]
[Docs] Improved the rendering, added some docs

8 years agoMerge pull request #2579 from ludovic-henry/fix-asyncresult-unhandledexception
monojenkins [Tue, 9 Feb 2016 12:25:36 +0000 (12:25 +0000)]
Merge pull request #2579 from ludovic-henry/fix-asyncresult-unhandledexception

[AsyncResult] Fix unhandled exception behaviour in AsyncCallback

The AsyncCallback is called after the BeginInvoke has completed. In all cases, this AsyncCallback is called on the ThreadPool, meaning that an unhandled exception would lead to a process crash.

The correct behaviour, after verification on .NET, is to not swallow the exception, and to properly crash the process.

@monojenkins merge

8 years ago[AsyncResult] Fix unhandled exception behaviour in AsyncCallback
Ludovic Henry [Tue, 9 Feb 2016 10:31:33 +0000 (10:31 +0000)]
[AsyncResult] Fix unhandled exception behaviour in AsyncCallback

The AsyncCallback is called after the BeginInvoke has completed. In all cases, this AsyncCallback is called on the ThreadPool, meaning that an unhandled exception would lead to a process crash.

The correct behaviour, after verification on .NET, is to not swallow the exception, and to properly crash the process.

8 years ago[corlib] AppContext from reference source
Marek Safar [Tue, 9 Feb 2016 10:34:35 +0000 (11:34 +0100)]
[corlib] AppContext from reference source

8 years ago[Docs] Use an external style sheet, prefix the css classes with mapi to isolate,...
Miguel de Icaza [Tue, 9 Feb 2016 03:00:13 +0000 (22:00 -0500)]
[Docs] Use an external style sheet, prefix the css classes with mapi to isolate, fix various processing problems

8 years agoMerge pull request #2578 from akoeplinger/fix-hardcoded-mono-2.0-path
Alexander Köplinger [Tue, 9 Feb 2016 01:31:21 +0000 (02:31 +0100)]
Merge pull request #2578 from akoeplinger/fix-hardcoded-mono-2.0-path

[metadata] Fix hardcoded mono/2.0 path in assembly.c