mono.git
9 years agoMerge pull request #960 from ermshiperete/ShowHelp
Miguel de Icaza [Fri, 31 Oct 2014 15:20:20 +0000 (11:20 -0400)]
Merge pull request #960 from ermshiperete/ShowHelp

[MWF] Partially implement Help.ShowHelp

9 years agoMerge pull request #1360 from madewokherd/winuncpath
João Matos [Fri, 31 Oct 2014 13:52:33 +0000 (13:52 +0000)]
Merge pull request #1360 from madewokherd/winuncpath

File URI's without a host are not UNC paths on Windows.

9 years ago[sgen] Add an explanatory comment about OOM.
Mark Probst [Thu, 30 Oct 2014 23:28:03 +0000 (16:28 -0700)]
[sgen] Add an explanatory comment about OOM.

9 years ago[runtime] Fix the android build with ndk r10c.
Zoltan Varga [Thu, 30 Oct 2014 22:44:01 +0000 (18:44 -0400)]
[runtime] Fix the android build with ndk r10c.

9 years agoMerge pull request #1381 from schani/fix-23401
Rodrigo Kumpera [Thu, 30 Oct 2014 22:43:36 +0000 (18:43 -0400)]
Merge pull request #1381 from schani/fix-23401

Fix 23401

9 years ago[aot] Remove some obsolete TODOs.
Zoltan Varga [Thu, 30 Oct 2014 21:56:19 +0000 (17:56 -0400)]
[aot] Remove some obsolete TODOs.

9 years ago[aot] Use the info->tramp_page_code_offsets array on arm as well.
Zoltan Varga [Thu, 30 Oct 2014 21:52:33 +0000 (17:52 -0400)]
[aot] Use the info->tramp_page_code_offsets array on arm as well.

9 years agoFix a warning.
Zoltan Varga [Thu, 30 Oct 2014 21:28:31 +0000 (17:28 -0400)]
Fix a warning.

9 years agoAdd the -Qunused-arguments warning to CPPFLAGS too.
Zoltan Varga [Thu, 30 Oct 2014 21:28:22 +0000 (17:28 -0400)]
Add the -Qunused-arguments warning to CPPFLAGS too.

9 years ago[llvm] Remove the unused LLVM_MAJOR_VERSION/LLVM_MINOR_VERSION defines.
Zoltan Varga [Thu, 30 Oct 2014 21:23:13 +0000 (17:23 -0400)]
[llvm] Remove the unused LLVM_MAJOR_VERSION/LLVM_MINOR_VERSION defines.

9 years agoAdd files that were forgotten in 6af798962810054fcf68f8e597de56b6490271a2, which...
Alexander Köplinger [Thu, 30 Oct 2014 21:16:20 +0000 (22:16 +0100)]
Add files that were forgotten in 6af798962810054fcf68f8e597de56b6490271a2, which is the re-apply of 950d9c8a567273c3363f43cee454f2b95a9f5da7

9 years ago[sgen] Don't store pin queue addresses, only indexes. Fixes #24084.
Mark Probst [Wed, 29 Oct 2014 23:36:02 +0000 (16:36 -0700)]
[sgen] Don't store pin queue addresses, only indexes.  Fixes #24084.

The pin queue can get relocated as a side-effect of resizing when late
pinning happens, so we can't count on pointers into it to remain valid.

9 years ago[sgen] Fix crash in late pinning.
Mark Probst [Wed, 29 Oct 2014 18:50:51 +0000 (11:50 -0700)]
[sgen] Fix crash in late pinning.

Our code assumed that late-pinned objects don't have a tag, but they
obviously have the pin tag, so use the safe function.

9 years ago[sgen] Don't loop endlessly when out of memory.
Mark Probst [Wed, 29 Oct 2014 18:48:09 +0000 (11:48 -0700)]
[sgen] Don't loop endlessly when out of memory.

9 years agoRevert incorrect changes from commit 950d9c8a567273c3363f43cee454f2b95a9f5da7
Ryan J. Melena [Thu, 30 Oct 2014 16:47:56 +0000 (11:47 -0500)]
Revert incorrect changes from commit 950d9c8a567273c3363f43cee454f2b95a9f5da7

Correctly handle null value deserialization in non-generic Deserialize(string, Type) method.

9 years agoRe-apply the patch, there isa fix for it
Miguel de Icaza [Thu, 30 Oct 2014 20:18:59 +0000 (16:18 -0400)]
Re-apply the patch, there isa  fix for it

9 years ago[Mono.Data.Tds] Allow sending of text data longer than 4000 characters by using a...
Zoltan Varga [Thu, 30 Oct 2014 18:39:38 +0000 (14:39 -0400)]
[Mono.Data.Tds] Allow sending of text data longer than 4000 characters by using a different column type. Fixes #21172.

9 years agoRevert this patch, as it broke the test suite
Miguel de Icaza [Thu, 30 Oct 2014 17:54:33 +0000 (13:54 -0400)]
Revert this patch, as it broke the test suite

9 years ago[System.Core/Android] Update TimeZone database self test.
Jonathan Pryor [Thu, 30 Oct 2014 16:33:33 +0000 (12:33 -0400)]
[System.Core/Android] Update TimeZone database self test.

Add Makefile rules to automagically download the TimeZone database
from the Android target $(ADB_TARGET), and build the tzi.exe app.

$ make android-dump-tzdata ADB_TARGET=-d
# downloads timezone data into ./android/tzdb.
# dumps timezone data into ./android/tzdata
# builds ./tzi.exe

# Show adjustment rules for a given timezone dump
$ mono tzi.exe -i=tzdata/Asia/Amman

Add `tzi.exe -R` option to show the TimeZoneInfo.GetAdjustmentRules()
output for all encountered timezones.

Add `tzi.exe -o=PATH` option to dump the TimeZone data to disk for
interrogation.

Add `tzi.exe -i=PATH` option to read in the specified TimeZone data
file and dump the rules contained therein.

Update usage comments.

9 years agoMerge pull request #944 from ermshiperete/bug-novell-496138
Zoltan Varga [Wed, 29 Oct 2014 23:06:05 +0000 (19:06 -0400)]
Merge pull request #944 from ermshiperete/bug-novell-496138

Improve COM error handling

9 years ago[corlib] Add some missing memory barriers to the ConcurrentQueue methods to order...
Zoltan Varga [Wed, 29 Oct 2014 21:08:42 +0000 (17:08 -0400)]
[corlib] Add some missing memory barriers to the ConcurrentQueue methods to order memory operations. Fixes #22788.

9 years agoMerge pull request #1378 from DynamicDevices/ajl/warnings
Zoltan Varga [Wed, 29 Oct 2014 19:03:31 +0000 (15:03 -0400)]
Merge pull request #1378 from DynamicDevices/ajl/warnings

[libgc] Eliminate warning about redefinition of GC_WIN32_THREADS

9 years agoMerge pull request #1337 from RyanMelenaNoesis/master
Miguel de Icaza [Wed, 29 Oct 2014 19:02:30 +0000 (15:02 -0400)]
Merge pull request #1337 from RyanMelenaNoesis/master

Additional JWT Security Token Support

9 years agoBump Mono version -> 3.12.1
Alexis Christoforides [Wed, 29 Oct 2014 17:16:04 +0000 (13:16 -0400)]
Bump Mono version -> 3.12.1

9 years ago[llvm] Disable the extension of i8/i16 arguments to i32 on arm64, since the ios calli...
Zoltan Varga [Wed, 29 Oct 2014 16:55:31 +0000 (12:55 -0400)]
[llvm] Disable the extension of i8/i16 arguments to i32 on arm64, since the ios calling convention passes them differently than i32. Fixes #22800.

9 years ago[libgc] Eliminate warning about redefinition of GC_WIN32_THREADS
Alex J Lennon [Wed, 29 Oct 2014 13:27:01 +0000 (14:27 +0100)]
[libgc] Eliminate warning about redefinition of GC_WIN32_THREADS

Makefile defines GC_WIN32_THREADS as 1 but gc_config_macros was
redefining as defined but with no value.

Signed-off-by: Alex J Lennon <ajlennon@dynamicdevices.co.uk>
9 years ago[llvm] Fix a regression caused by 6ec1ebf99078a996ca16fd0c56cbd4e96e32ed41. Do the...
Zoltan Varga [Wed, 29 Oct 2014 03:30:44 +0000 (23:30 -0400)]
[llvm] Fix a regression caused by 6ec1ebf99078a996ca16fd0c56cbd4e96e32ed41. Do the direct call rewrite only if the caller and callee signature matches.

9 years ago[runtime] Disable the check for overlapping reference and non-reference fields, too...
Zoltan Varga [Tue, 28 Oct 2014 21:07:11 +0000 (17:07 -0400)]
[runtime] Disable the check for overlapping reference and non-reference fields, too much code depends on this to work.

9 years agoAdd OP_LREM_IMM support;Add implementation of mono_arch_get_delegate_virtual_invoke_impl
Neale Ferguson [Tue, 28 Oct 2014 18:48:45 +0000 (14:48 -0400)]
Add OP_LREM_IMM support;Add implementation of mono_arch_get_delegate_virtual_invoke_impl

9 years agoMerge pull request #1298 from esdrubal/uploadfileasync
Marcos Henrich [Tue, 28 Oct 2014 18:21:22 +0000 (18:21 +0000)]
Merge pull request #1298 from esdrubal/uploadfileasync

Fixes missing ContentType on WebClient.UploadFileTaskAsync

9 years agoMerge pull request #1321 from esdrubal/currentsystemtimezone
Marcos Henrich [Tue, 28 Oct 2014 18:18:54 +0000 (18:18 +0000)]
Merge pull request #1321 from esdrubal/currentsystemtimezone

CurrentSystemTimeZone.GetUtcOffset now supports multiple DST periods.

9 years agoMerge pull request #1376 from StephenMcConnel/bug-24109
Zoltan Varga [Tue, 28 Oct 2014 17:40:28 +0000 (13:40 -0400)]
Merge pull request #1376 from StephenMcConnel/bug-24109

Zero out pointers to freed memory in AudioDevice

9 years agoZero out pointers to freed memory in AudioDevice
Stephen McConnel [Tue, 28 Oct 2014 17:10:43 +0000 (12:10 -0500)]
Zero out pointers to freed memory in AudioDevice

This fixes https://bugzilla.xamarin.com/show_bug.cgi?id=24109.

9 years agoMerge pull request #1373 from michaldobrodenka/master
Alexis Christoforides [Tue, 28 Oct 2014 16:48:14 +0000 (12:48 -0400)]
Merge pull request #1373 from michaldobrodenka/master

Fix for random ObjectDiposedException in DispatcherCB class when connecting

9 years agoMerge pull request #1369 from DynamicDevices/ajl/appveyor
João Matos [Tue, 28 Oct 2014 16:47:19 +0000 (16:47 +0000)]
Merge pull request #1369 from DynamicDevices/ajl/appveyor

[CI] Add appveyor.yml configuration file to support Windows build

9 years agoMerge pull request #1374 from directhex/master
Zoltan Varga [Tue, 28 Oct 2014 05:08:37 +0000 (01:08 -0400)]
Merge pull request #1374 from directhex/master

Add missing header file to s390x_sources

9 years ago[System.IO] Phase 2 of revamping KeventWatcher (FileSystemWatcher implementation...
Alexis Christoforides [Thu, 9 Oct 2014 05:16:40 +0000 (22:16 -0700)]
[System.IO] Phase 2 of revamping KeventWatcher (FileSystemWatcher implementation for OS X/kqueue). Dozens of bugs and reliability issues fixed.

FileSystemWatcher.cs: Fixed multicast events.
SearchPattern.cs :  Fixed issue where case insensitivity was not being honored.
KeventWatcher.cs:
* Fixed several race conditions
* Fixed file descriptor duplication & leaks
* thread-safe/cleaner state transitions for watcher, and much cleaner stopping
* Now uses fsw.Filter parameter and respects IncludeSubdirectories = false. Use fsw.Filter to watch very large trees
* Added more error handling + OnError event
* Lots of behavior/reliability fixes and optimizations for Monitor() loop
* Fixed kevent/timespec struct definitions (for 64-bit build)

9 years ago[System.IO] Reimplemented much of the kqueue-based file watcher so that watching...
Cody Russell [Sun, 8 Jun 2014 21:46:18 +0000 (16:46 -0500)]
[System.IO] Reimplemented much of the kqueue-based file watcher so that watching subdirectories works.
Reworked a lot of the internals of the kqueue FileSystemWatcher. There
is now a separate thread and a separate kqueue for each FileSystemWatcher
object.

https://bugzilla.xamarin.com/show_bug.cgi?id=16259

9 years ago[jit] Fix the decomposition of OP_IREM_IMM on arm64.
Zoltan Varga [Tue, 28 Oct 2014 00:55:48 +0000 (20:55 -0400)]
[jit] Fix the decomposition of OP_IREM_IMM on arm64.

9 years agoAdd missing header file to s390x_sources, otherwise a required header file for s390x...
Jo Shields [Mon, 27 Oct 2014 22:51:47 +0000 (22:51 +0000)]
Add missing header file to s390x_sources, otherwise a required header file for s390x builds is missing from tarball builds.

9 years ago[threadpool] Fix race condition on threads variable cleanup
Ludovic Henry [Mon, 27 Oct 2014 16:28:19 +0000 (12:28 -0400)]
[threadpool] Fix race condition on threads variable cleanup

9 years agoFix for ObjectDiposedException in DispatcherCB class
michaldobrodenka [Mon, 27 Oct 2014 12:28:59 +0000 (13:28 +0100)]
Fix for ObjectDiposedException in DispatcherCB class

https://bugzilla.xamarin.com/show_bug.cgi?id=23700

9 years agoMerge pull request #1368 from martinjt/SuppressFormsAuthRedirect
Miguel de Icaza [Sun, 26 Oct 2014 22:53:05 +0000 (18:53 -0400)]
Merge pull request #1368 from martinjt/SuppressFormsAuthRedirect

Implement the SuppressFormsAuthenticationRedirect properties

9 years agoMerge pull request #1366 from DynamicDevices/ajl/win32build
Zoltan Varga [Sun, 26 Oct 2014 15:17:39 +0000 (11:17 -0400)]
Merge pull request #1366 from DynamicDevices/ajl/win32build

Fix Windows build by including wstcpip.h before winsock.h is included

9 years agoImplement the SuppressFormsAuthenticationRedirect properties
Martin Thwaites [Sun, 26 Oct 2014 14:29:45 +0000 (14:29 +0000)]
Implement the SuppressFormsAuthenticationRedirect properties

9 years agoMerge pull request #1367 from kornelpal/dolt-mingw32
Zoltan Varga [Sun, 26 Oct 2014 14:07:51 +0000 (10:07 -0400)]
Merge pull request #1367 from kornelpal/dolt-mingw32

[build] Enable dolt on mingw32

9 years ago[build] Enable dolt on mingw32
Kornel Pal [Sun, 26 Oct 2014 13:49:45 +0000 (14:49 +0100)]
[build] Enable dolt on mingw32

9 years ago[CI] Add appveyor.yml configuration file to support Windows build
Alex J Lennon [Sun, 26 Oct 2014 13:06:08 +0000 (14:06 +0100)]
[CI] Add appveyor.yml configuration file to support Windows build

Adds a configuration file to facilitate build of Mono with Cygwin
on Appveyor Windows-based build workers.

Dependencies are installed on a clean Appveyor build image for
each build and the result of the 'make install' step is stored
as a build output 'artifact' for further testing or deployment.

Signed-off-by: Alex J Lennon <ajlennon@dynamicdevices.co.uk>
9 years agoFix Windows build by including wstcpip.h before winsock.h is included
Alex J Lennon [Sun, 26 Oct 2014 11:40:01 +0000 (12:40 +0100)]
Fix Windows build by including wstcpip.h before winsock.h is included

Error generated by socket-io.c was:

/usr/i686-pc-mingw32/sys-root/mingw/include/ws2tcpip.h:38:2:
error: #error "ws2tcpip.h is not compatible with winsock.h.
Include winsock2.h instead."

Signed-off-by: Alex J Lennon <ajlennon@dynamicdevices.co.uk>
9 years agoMerge pull request #1364 from muojp/addDotNet45_SocketCtor
Zoltan Varga [Sat, 25 Oct 2014 21:24:53 +0000 (17:24 -0400)]
Merge pull request #1364 from muojp/addDotNet45_SocketCtor

[System] Added missing ctor to Socket for initializing dual-mode socket

9 years ago[System] Added missing ctor to Socket for initializing dual-mode socket
Kei Nakazawa [Sat, 25 Oct 2014 12:58:29 +0000 (21:58 +0900)]
[System] Added missing ctor to Socket for initializing dual-mode socket
 - Ref: https://bugzilla.xamarin.com/show_bug.cgi?id=20048
 - Mono currently doesn't support 2-args Socket ctor added in .NET 4.5
 - Absence of this ctor prevents KestrelHttpServer (web server for
   ASP.NET vNext: https://github.com/aspnet/KestrelHttpServer ) test
   code from working
 - I hesitated to put IPv4 only implementation, but full dual stack
   (IPv4/v6) support would need bunch of works to be done. So, I pinned
   supported protocol of new ctor to IPv4. Also, I filed v4/v6 support
   issue as a MonoTODO entry inside the source code.

9 years ago[mscorlib/Android] TimeZoneInfo.Local.Id should be "Local".
Jonathan Pryor [Fri, 24 Oct 2014 19:41:20 +0000 (15:41 -0400)]
[mscorlib/Android] TimeZoneInfo.Local.Id should be "Local".

On Mono/.NET, TimeZoneInfo.Local has a TimeZoneInfo.Id value of
"Local" and a TimeZoneInfo.DisplayName value of "Local":

$ csharp
csharp> TimeZoneInfo.Local.Id;
"Local"
csharp> TimeZoneInfo.Local.DisplayName;
"Local"

That isn't the case on Xamarin.Android, which returns the timezoneinfo
ID value from both DisplayName and Id, e.g. TimeZoneInfo.Local could
have Id and DisplayName values of "Australia/Sydney".

Rework things so that the TimeZoneInfo.Id and TimeZoneInfo.DisplayName
properties return "Local" on Xamarin.Android for the instance returned
from TimeZoneInfo.Local, just like normal Mono/.NET does.

9 years agoMerge pull request #1348 from ermshiperete/ImproveButtonTextLayout
Miguel de Icaza [Fri, 24 Oct 2014 18:44:29 +0000 (14:44 -0400)]
Merge pull request #1348 from ermshiperete/ImproveButtonTextLayout

[MWF] Improve button text layout

9 years agoMerge pull request #1357 from emergent-design/master
Miguel de Icaza [Fri, 24 Oct 2014 18:43:49 +0000 (14:43 -0400)]
Merge pull request #1357 from emergent-design/master

Include /dev/ttyACM in the search for serial port devices

9 years agoMerge pull request #1362 from echampet/dupfix
Miguel de Icaza [Fri, 24 Oct 2014 18:43:00 +0000 (14:43 -0400)]
Merge pull request #1362 from echampet/dupfix

Webapp stuck with "Key duplication when adding: httpModules"

9 years agoHttpApplication: if there is an exception in InitOnce, output it on the Console
Etienne CHAMPETIER [Fri, 24 Oct 2014 11:39:35 +0000 (13:39 +0200)]
HttpApplication: if there is an exception in InitOnce, output it on the Console

Signed-off-by: Etienne CHAMPETIER <etienne.champetier@fiducial.net>
9 years agoWebConfigurationManager: simplify call to ConfigurationSection.GetRuntimeObject ()
Etienne CHAMPETIER [Fri, 24 Oct 2014 10:45:01 +0000 (12:45 +0200)]
WebConfigurationManager: simplify call to ConfigurationSection.GetRuntimeObject ()

this call come from an obfuscation contest :) ?

Signed-off-by: Etienne CHAMPETIER <etienne.champetier@fiducial.net>
9 years agoWebConfigurationManager: protect GetSection
Etienne CHAMPETIER [Fri, 24 Oct 2014 07:35:12 +0000 (09:35 +0200)]
WebConfigurationManager: protect GetSection

all public static should be thread-safe

Signed-off-by: Etienne CHAMPETIER <etienne.champetier@fiducial.net>
9 years agoHttpApplication: set StatusCode = 500 when we send an exception to the client
Etienne CHAMPETIER [Thu, 23 Oct 2014 15:44:36 +0000 (17:44 +0200)]
HttpApplication: set StatusCode = 500 when we send an exception to the client

Signed-off-by: Etienne CHAMPETIER <etienne.champetier@fiducial.net>
9 years agoMerge pull request #1361 from akoeplinger/fix-forms
Jo Shields [Fri, 24 Oct 2014 12:23:15 +0000 (13:23 +0100)]
Merge pull request #1361 from akoeplinger/fix-forms

[MWF] Use overload of Marshal.PtrToStringUni that reads up until the first null instead of explicitly specifying length

9 years ago[xml] XmlTextReader: Value was wrong after ReadAttributeValue() on xml declaration.
Atsushi Eno [Fri, 24 Oct 2014 04:20:09 +0000 (12:20 +0800)]
[xml] XmlTextReader: Value was wrong after ReadAttributeValue() on xml declaration.

9 years ago[runtime] Remove build system support for the interpreter.
Zoltan Varga [Fri, 24 Oct 2014 03:01:22 +0000 (23:01 -0400)]
[runtime] Remove build system support for the interpreter.

9 years ago[relaxng] fix default namespace handling in compact syntax.
Atsushi Eno [Thu, 23 Oct 2014 23:14:58 +0000 (07:14 +0800)]
[relaxng] fix default namespace handling in compact syntax.

Also had to disable RNC tests that depended on vanished web resource...

9 years ago[MWF] Use overload of Marshal.PtrToStringUni that reads up until the first null inste...
Alexander Köplinger [Thu, 23 Oct 2014 22:11:03 +0000 (00:11 +0200)]
[MWF] Use overload of Marshal.PtrToStringUni that reads up until the first null instead of explicitly specifying length

This fixes the two tests broken by 0ac61b03fcd9baf75739d3c567b36647bde08025

9 years agoFile URI's without a host are not UNC paths on Windows.
Vincent Povirk [Thu, 11 Sep 2014 21:50:00 +0000 (16:50 -0500)]
File URI's without a host are not UNC paths on Windows.

NUnit breaks when these URI's are treated as UNC paths, so I have no way of
running the tests on Windows without this change to see if it broke anything.
Not all URI tests pass, but the ones that fail seem unrelated to my change.

On Unix, the tests all work, but of course on Unix this is a no-op.

This commit licensed as MIT/X11.

9 years ago[jit] Use NULLIFY_INS () to nullify instructions and use MONO_INST_NEW to create...
Zoltan Varga [Thu, 23 Oct 2014 18:47:19 +0000 (14:47 -0400)]
[jit] Use NULLIFY_INS () to nullify instructions and use MONO_INST_NEW to create phi node instructions to avoid asserts in the spill pass. Fixes #24006.

9 years ago[runtime] Fix a regression introduced by 8d9f05ea9a943ff1a36bb0ef3dd0521853d3a489...
Zoltan Varga [Thu, 23 Oct 2014 18:04:32 +0000 (14:04 -0400)]
[runtime] Fix a regression introduced by 8d9f05ea9a943ff1a36bb0ef3dd0521853d3a489. Only do the check for overlapping fields when the size of the type is known.

9 years ago[jit] Print out methods which failed to JIT when using --regression.
Zoltan Varga [Thu, 23 Oct 2014 17:56:33 +0000 (13:56 -0400)]
[jit] Print out methods which failed to JIT when using --regression.

9 years ago[bcl] Restore ThreadPool number of threads configuration after each test
Ludovic Henry [Thu, 23 Oct 2014 15:00:12 +0000 (11:00 -0400)]
[bcl] Restore ThreadPool number of threads configuration after each test

9 years ago[runtime] Add checks for overlapping reference and non-reference fields when using...
Zoltan Varga [Wed, 22 Oct 2014 22:20:34 +0000 (18:20 -0400)]
[runtime] Add checks for overlapping reference and non-reference fields when using explicit layout. Fixes #23954.

9 years agoMerge pull request #1358 from madewokherd/win32build
Zoltan Varga [Wed, 22 Oct 2014 21:47:48 +0000 (17:47 -0400)]
Merge pull request #1358 from madewokherd/win32build

Fix win32 build.

9 years ago[llvm] Rewrite the way direct calls are made between llvm methods. Previously all...
Zoltan Varga [Wed, 22 Oct 2014 21:13:27 +0000 (17:13 -0400)]
[llvm] Rewrite the way direct calls are made between llvm methods. Previously all calls were made to plt entries and the plt entry symbols were aliased to point to the corresponding method if the method was directly callable using the .set assembler directive. This doesn't seem to work with newer LLVM/CLANG versions, so do this completely on the LLVM side using Value::replaceAllUsesWith (). Fixes #23976.

9 years ago[threadpool] Fix deadlock/starvation of the thread pool
Ludovic Henry [Wed, 22 Oct 2014 21:08:08 +0000 (17:08 -0400)]
[threadpool] Fix deadlock/starvation of the thread pool

The issue was with the new heuristic of the thread pool which would not create new threads, leading to deadlock between dependent tasks.
The fix is to check if every worker threads are sleeping, waiting or joining, and if that's the case, then we create a new thread because we might be in the case where the tasks being currently run depends on one still being enqueued in the cq or one of the wsq.

The following tests would previously fail :

1) MonoTests.System.Threading.Tasks.TaskTests.DoubleWaitTest :   #1
  Expected: True
  But was:  False

at MonoTests.System.Threading.Tasks.TaskTests.<DoubleWaitTest>m__27 () [0x00077] in /Users/ludovic/Xamarin/mono/mcs/class/corlib/Test/System.Threading.Tasks/TaskTest.cs:800
at MonoTests.System.Threading.Tasks.ParallelTestHelper.Repeat (System.Action action, Int32 numRun) [0x00007] in /Users/ludovic/Xamarin/mono/mcs/class/corlib/Test/System.Threading.Tasks/ParallelTestHelper.cs:48
at MonoTests.System.Threading.Tasks.TaskTests.DoubleWaitTest () [0x00000] in /Users/ludovic/Xamarin/mono/mcs/class/corlib/Test/System.Threading.Tasks/TaskTest.cs:790
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00054] in /Users/ludovic/Xamarin/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:230

2) MonoTests.System.Threading.Tasks.TaskTests.HideSchedulerTest :   #1
  Expected: True
  But was:  False

at MonoTests.System.Threading.Tasks.TaskTests.HideSchedulerTest () [0x0003d] in /Users/ludovic/Xamarin/mono/mcs/class/corlib/Test/System.Threading.Tasks/TaskTest.cs:1914
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00054] in /Users/ludovic/Xamarin/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:230

3) MonoTests.System.Threading.Tasks.TaskTests.WaitAll_TimeoutWithExceptionsAfter :   #1
  Expected: True
  But was:  False

at MonoTests.System.Threading.Tasks.TaskTests.WaitAll_TimeoutWithExceptionsAfter () [0x00070] in /Users/ludovic/Xamarin/mono/mcs/class/corlib/Test/System.Threading.Tasks/TaskTest.cs:317
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00054] in /Users/ludovic/Xamarin/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:230

4) MonoTests.System.Threading.Tasks.TaskTests.WaitAll_TimeoutWithExceptionsBefore :   #1
  Expected: True
  But was:  False

at MonoTests.System.Threading.Tasks.TaskTests.WaitAll_TimeoutWithExceptionsBefore () [0x00070] in /Users/ludovic/Xamarin/mono/mcs/class/corlib/Test/System.Threading.Tasks/TaskTest.cs:341
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00054] in /Users/ludovic/Xamarin/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:230

5) MonoTests.System.Threading.Tasks.TaskTests.WaitAnyTest :   #3
  Expected: not -1
  But was:  -1

at MonoTests.System.Threading.Tasks.TaskTests.<WaitAnyTest>m__0 () [0x00026] in /Users/ludovic/Xamarin/mono/mcs/class/corlib/Test/System.Threading.Tasks/TaskTest.cs:142
at MonoTests.System.Threading.Tasks.ParallelTestHelper.Repeat (System.Action action, Int32 numRun) [0x00007] in /Users/ludovic/Xamarin/mono/mcs/class/corlib/Test/System.Threading.Tasks/ParallelTestHelper.cs:48
at MonoTests.System.Threading.Tasks.ParallelTestHelper.Repeat (System.Action action) [0x00000] in /Users/ludovic/Xamarin/mono/mcs/class/corlib/Test/System.Threading.Tasks/ParallelTestHelper.cs:42
at MonoTests.System.Threading.Tasks.TaskTests.WaitAnyTest () [0x00000] in /Users/ludovic/Xamarin/mono/mcs/class/corlib/Test/System.Threading.Tasks/TaskTest.cs:128
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00054] in /Users/ludovic/Xamarin/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:230

6) MonoTests.System.Threading.Tasks.TaskTests.WaitChildTestCase :   #0b
  Expected: True
  But was:  False

at MonoTests.System.Threading.Tasks.TaskTests.<WaitChildTestCase>m__25 () [0x0006d] in /Users/ludovic/Xamarin/mono/mcs/class/corlib/Test/System.Threading.Tasks/TaskTest.cs:705
at MonoTests.System.Threading.Tasks.ParallelTestHelper.Repeat (System.Action action, Int32 numRun) [0x00007] in /Users/ludovic/Xamarin/mono/mcs/class/corlib/Test/System.Threading.Tasks/ParallelTestHelper.cs:48
at MonoTests.System.Threading.Tasks.TaskTests.WaitChildTestCase () [0x00000] in /Users/ludovic/Xamarin/mono/mcs/class/corlib/Test/System.Threading.Tasks/TaskTest.cs:684
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00054] in /Users/ludovic/Xamarin/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:230

7) MonoTests.System.Threading.Tasks.TaskTests.WaitingForChildrenToComplete :   #3
  Expected: True
  But was:  False

at MonoTests.System.Threading.Tasks.TaskTests.WaitingForChildrenToComplete () [0x00048] in /Users/ludovic/Xamarin/mono/mcs/class/corlib/Test/System.Threading.Tasks/TaskTest.cs:734
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00054] in /Users/ludovic/Xamarin/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:230

9 years agoFix win32 build.
Vincent Povirk [Wed, 22 Oct 2014 20:19:10 +0000 (15:19 -0500)]
Fix win32 build.

This commit licensed as MIT/X11.

9 years ago[bcl] Fix races in task tests.
Zoltan Varga [Wed, 22 Oct 2014 18:22:12 +0000 (14:22 -0400)]
[bcl] Fix races in task tests.

9 years agoIncluded /dev/ttyACM in the search for serial port devices, since CDC ACM is a standard
Dan Parnham [Wed, 22 Oct 2014 15:21:20 +0000 (16:21 +0100)]
Included /dev/ttyACM in the search for serial port devices, since CDC ACM is a standard
protocol for emulating serial ports over USB.

9 years ago[sgen] Add GC max collection time counter
Ludovic Henry [Mon, 13 Oct 2014 21:54:03 +0000 (17:54 -0400)]
[sgen] Add GC max collection time counter

9 years ago[sgen] Add memory governor allocated size counter
Ludovic Henry [Mon, 13 Oct 2014 21:09:05 +0000 (17:09 -0400)]
[sgen] Add memory governor allocated size counter

9 years ago[sgen] Fix assertion error on 32bits
Ludovic Henry [Tue, 21 Oct 2014 14:03:31 +0000 (10:03 -0400)]
[sgen] Fix assertion error on 32bits

9 years agoMerge pull request #1356 from martinjt/ReadEntityV2
Jo Shields [Tue, 21 Oct 2014 13:17:36 +0000 (14:17 +0100)]
Merge pull request #1356 from martinjt/ReadEntityV2

Removed erroneously added property to HttpRequestBase in pull #1353

9 years ago[jit] Add some micro-optimizations to speed up the AOT compiler.
Zoltan Varga [Tue, 21 Oct 2014 02:51:49 +0000 (22:51 -0400)]
[jit] Add some micro-optimizations to speed up the AOT compiler.

9 years agoFix a warning.
Zoltan Varga [Tue, 21 Oct 2014 00:48:55 +0000 (20:48 -0400)]
Fix a warning.

9 years ago[sgen] Adjust internal allocator block size to slot size.
Ludovic Henry [Tue, 30 Sep 2014 19:22:42 +0000 (15:22 -0400)]
[sgen] Adjust internal allocator block size to slot size.

The internal allocator used size segregated blocks which were always
16k large.  Since we have quite a few different size classes this led
to a lot of allocation even for very small programs.

We now use block sizes that are determined by the slot size and are as
small as possible.  They're power-of-two multiples of the page size,
so we end up with blocks of 4k, 8k and 16k.

9 years ago[sgen] Add assertion on power of 2 for internal allocator section size
Ludovic Henry [Tue, 30 Sep 2014 22:02:55 +0000 (18:02 -0400)]
[sgen] Add assertion on power of 2 for internal allocator section size

9 years ago[sgen] Add internal allocator default sizes usage statistic
Ludovic Henry [Tue, 30 Sep 2014 21:11:33 +0000 (17:11 -0400)]
[sgen] Add internal allocator default sizes usage statistic

9 years ago[sgen] Utility function to compute number of unfaulted pages.
Ludovic Henry [Tue, 30 Sep 2014 21:09:50 +0000 (17:09 -0400)]
[sgen] Utility function to compute number of unfaulted pages.

9 years ago[sgen] Cleanup some allocation code
Ludovic Henry [Tue, 30 Sep 2014 17:46:47 +0000 (13:46 -0400)]
[sgen] Cleanup some allocation code

9 years agoFix the build after the signals changes.
Zoltan Varga [Mon, 20 Oct 2014 23:19:27 +0000 (19:19 -0400)]
Fix the build after the signals changes.

9 years ago[jit] Remove some unused definitions.
Zoltan Varga [Mon, 20 Oct 2014 22:22:40 +0000 (18:22 -0400)]
[jit] Remove some unused definitions.

9 years agoFix a typo.
Zoltan Varga [Mon, 20 Oct 2014 22:08:19 +0000 (18:08 -0400)]
Fix a typo.

9 years ago[runtime] Clean up the signal handling code by moving the signal handler signature...
Zoltan Varga [Mon, 20 Oct 2014 22:07:13 +0000 (18:07 -0400)]
[runtime] Clean up the signal handling code by moving the signal handler signature definitions to mono-signal-handler.h and using them everywhere.

9 years agoAdditional JWT Security Token Support
Ryan Melena [Tue, 14 Oct 2014 02:03:25 +0000 (21:03 -0500)]
Additional JWT Security Token Support

Fix line endings.  Add test for JavaScriptSerializer.Deserialize(string input, Type targetType).

9 years ago[sgen] Fix allowance calculation.
Mark Probst [Tue, 7 Oct 2014 00:11:20 +0000 (17:11 -0700)]
[sgen] Fix allowance calculation.

The formula for calculating allowance was not only overly complicated
but completely broken, which resulted in the allowance always being the
minimum (4 times the nursery size).  That resulted in too frequent garbage
collections when the heap grew larger.

Now we do something very similar to what Boehm does: Allow the heap
to grow by a third before the next major collection happens.

9 years agoRemoved erroneously added property to HttpRequestBase in pull #1353
Martin Thwaites [Mon, 20 Oct 2014 20:34:27 +0000 (21:34 +0100)]
Removed erroneously added property to HttpRequestBase in pull #1353

9 years agoMerge pull request #1354 from martinjt/RequestAbort
Miguel de Icaza [Mon, 20 Oct 2014 14:04:35 +0000 (10:04 -0400)]
Merge pull request #1354 from martinjt/RequestAbort

Implement Request.Abort()

9 years agoMerge pull request #1353 from martinjt/ReadEntityBodyMode
Miguel de Icaza [Mon, 20 Oct 2014 14:04:00 +0000 (10:04 -0400)]
Merge pull request #1353 from martinjt/ReadEntityBodyMode

Implement the ReadEntityBodyMode properties

9 years agoImplement Request.Abort()
Martin Thwaites [Sat, 18 Oct 2014 21:31:14 +0000 (22:31 +0100)]
Implement Request.Abort()

9 years agoImplement the ReadEntityBodyMode properties
Martin Thwaites [Sat, 18 Oct 2014 20:55:47 +0000 (21:55 +0100)]
Implement the ReadEntityBodyMode properties

9 years ago[runtime] Don't define ucontext_t for android if PLATFORM is not android.
Rodrigo Kumpera [Fri, 17 Oct 2014 19:37:14 +0000 (15:37 -0400)]
[runtime] Don't define ucontext_t for android if PLATFORM is not android.

9 years agoFix a warning.
Zoltan Varga [Fri, 17 Oct 2014 16:14:13 +0000 (12:14 -0400)]
Fix a warning.