text:
Enforce that compilers are single-use

Add logic to enforce that compilers are single-use by implementing a flag that gets set after first use.
Throw a new type of exception if reuse is detected.

Could you be a bit more precise about that? I think i could help. What classes need to be modified?

Hey! Sure thing!
This one is pretty simple. There just needs to be a boolean flag in SimpleCompiler that gets set when the compile call is made. An exception type that extends CompilerException can then be thrown when that boolean is already set and compile is called!
A couple of unit tests for the exception type itself and to ensure the call to compile throws if the flag is already set then should be good to make sure it works!
Sorry for the vague issues. Didn't expect anyone would spot this repo, so I kind of just left issues as notes to myself. I will go through and make sure everything is detailed correctly though.
Thanks for wanting to help out!

I've written some code and sent some pull requests. As I said, I'm just starting so I'm sorry if I've done something wrong, I haven't figured out how collaborating works. Also, I would love some feedback on my code even though it's very simple. Let me know what you think.

Hey, all good! Might be worth keeping those together in a single pull request since they are all related, though :-)
that way we can verify all the tests work before we merge it

authors: adolfo-trocoli ascopes

repo: ascopes/jct


text:
Release request

Could you release new version with #to_html feature?

Done.
Commit: aa1bab67c1ae2b3c06a3caad5f3ade6f46cc2c25

source: gharchive/issue

license: mit

license_type: permissive

license_source: bigquery


text:
Install Bug in python3.8+cuda11.3+torch1.12.0

I run pip install git+https://github.com/ashawkey/cubvh to install cubvh.
I have updated eigen to 3.3.7 by running sudo apt install libeigen3-dev.
I successfully install cubvh in virtual environment (python3.8+cuda11.7+torch2.0.0).
However, I fail to install cubvh in virtual environment (python3.8+cuda11.3+torch1.12.0).
Error message:
pip install git+https://github.com/ashawkey/cubvh
Collecting git+https://github.com/ashawkey/cubvh
  Cloning https://github.com/ashawkey/cubvh to /tmp/pip-req-build-0bzjdsmk
  Running command git clone --filter=blob:none --quiet https://github.com/ashawkey/cubvh /tmp/pip-req-build-0bzjdsmk
  Resolved https://github.com/ashawkey/cubvh to commit 7f935a0fd3d8168c45b671f3e9cff9b206fdf32b
  Running command git submodule update --init --recursive -q
  Preparing metadata (setup.py) ... done
Requirement already satisfied: ninja in ./Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages (from cubvh==0.1.0) (1.11.1.1)
Requirement already satisfied: pybind11 in ./Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages (from cubvh==0.1.0) (2.13.5)
Requirement already satisfied: trimesh in ./Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages (from cubvh==0.1.0) (4.4.0)
Requirement already satisfied: torch in ./Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages (from cubvh==0.1.0) (1.12.0+cu113)
Requirement already satisfied: numpy in ./Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages (from cubvh==0.1.0) (1.24.4)
Requirement already satisfied: typing-extensions in ./Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages (from torch->cubvh==0.1.0) (4.11.0)
Building wheels for collected packages: cubvh
  Building wheel for cubvh (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [117 lines of output]
      nvcc: NVIDIA (R) Cuda compiler driver
      Copyright (c) 2005-2021 NVIDIA Corporation
      Built on Sun_Mar_21_19:15:46_PDT_2021
      Cuda compilation tools, release 11.3, V11.3.58
      Build cuda_11.3.r11.3/compiler.29745058_0
      Detected CUDA version 11.3
      Targeting C++ standard 17
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-3.8
      creating build/lib.linux-x86_64-3.8/cubvh
      copying cubvh/__init__.py -> build/lib.linux-x86_64-3.8/cubvh
      copying cubvh/api.py -> build/lib.linux-x86_64-3.8/cubvh
      running build_ext
      creating /tmp/pip-req-build-0bzjdsmk/build/temp.linux-x86_64-3.8
      creating /tmp/pip-req-build-0bzjdsmk/build/temp.linux-x86_64-3.8/tmp
      creating /tmp/pip-req-build-0bzjdsmk/build/temp.linux-x86_64-3.8/tmp/pip-req-build-0bzjdsmk
      creating /tmp/pip-req-build-0bzjdsmk/build/temp.linux-x86_64-3.8/tmp/pip-req-build-0bzjdsmk/src
      Emitting ninja build file /tmp/pip-req-build-0bzjdsmk/build/temp.linux-x86_64-3.8/build.ninja...
      Compiling objects...
      Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
      [1/3] /usr/local/cuda-11.3/bin/nvcc  -I/tmp/pip-req-build-0bzjdsmk/include -I/tmp/pip-req-build-0bzjdsmk/third_party/eigen -I/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/torch/include -I/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/torch/include/TH -I/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/torch/include/THC -I/usr/local/cuda-11.3/include -I/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/include/python3.8 -c -c /tmp/pip-req-build-0bzjdsmk/src/bvh.cu -o /tmp/pip-req-build-0bzjdsmk/build/temp.linux-x86_64-3.8/tmp/pip-req-build-0bzjdsmk/src/bvh.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -std=c++17 --extended-lambda --expt-relaxed-constexpr -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_HALF2_OPERATORS__ -Xcompiler=-Wno-float-conversion -Xcompiler=-fno-strict-aliasing -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1013"' -DTORCH_EXTENSION_NAME=_cubvh -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86
      /tmp/pip-req-build-0bzjdsmk/third_party/eigen/Eigen/src/Core/RandomImpl.h(142): warning: 'long double' is treated as 'double' in device code

      /tmp/pip-req-build-0bzjdsmk/third_party/eigen/Eigen/src/Core/RandomImpl.h(144): warning: 'long double' is treated as 'double' in device code

      [2/3] c++ -MMD -MF /tmp/pip-req-build-0bzjdsmk/build/temp.linux-x86_64-3.8/tmp/pip-req-build-0bzjdsmk/src/bindings.o.d -pthread -B /data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/tmp/pip-req-build-0bzjdsmk/include -I/tmp/pip-req-build-0bzjdsmk/third_party/eigen -I/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/torch/include -I/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/torch/include/TH -I/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/torch/include/THC -I/usr/local/cuda-11.3/include -I/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/include/python3.8 -c -c /tmp/pip-req-build-0bzjdsmk/src/bindings.cpp -o /tmp/pip-req-build-0bzjdsmk/build/temp.linux-x86_64-3.8/tmp/pip-req-build-0bzjdsmk/src/bindings.o -std=c++17 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1013"' -DTORCH_EXTENSION_NAME=_cubvh -D_GLIBCXX_USE_CXX11_ABI=0
      FAILED: /tmp/pip-req-build-0bzjdsmk/build/temp.linux-x86_64-3.8/tmp/pip-req-build-0bzjdsmk/src/bindings.o
      c++ -MMD -MF /tmp/pip-req-build-0bzjdsmk/build/temp.linux-x86_64-3.8/tmp/pip-req-build-0bzjdsmk/src/bindings.o.d -pthread -B /data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/tmp/pip-req-build-0bzjdsmk/include -I/tmp/pip-req-build-0bzjdsmk/third_party/eigen -I/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/torch/include -I/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/torch/include/TH -I/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/torch/include/THC -I/usr/local/cuda-11.3/include -I/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/include/python3.8 -c -c /tmp/pip-req-build-0bzjdsmk/src/bindings.cpp -o /tmp/pip-req-build-0bzjdsmk/build/temp.linux-x86_64-3.8/tmp/pip-req-build-0bzjdsmk/src/bindings.o -std=c++17 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1013"' -DTORCH_EXTENSION_NAME=_cubvh -D_GLIBCXX_USE_CXX11_ABI=0
      cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
      In file included from /tmp/pip-req-build-0bzjdsmk/src/bindings.cpp:5:
      /data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/torch/include/pybind11/eigen.h: In member function ‘bool pybind11::detail::type_caster<Type, typename std::enable_if<decltype (pybind11::detail::is_template_base_of_impl<Eigen::SparseMatrixBase>::check((typename pybind11::detail::intrinsic_type<T>::type*)(nullptr)))::value, void>::type>::load(pybind11::handle, bool)’:
      /data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/torch/include/pybind11/eigen.h:573:24: error: ‘MappedSparseMatrix’ is not a member of ‘Eigen’; did you mean ‘SparseMatrix’?
        573 |         value = Eigen::MappedSparseMatrix<Scalar, Type::Flags, StorageIndex>(
            |                        ^~~~~~~~~~~~~~~~~~
            |                        SparseMatrix
      /data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/torch/include/pybind11/eigen.h:573:49: error: expected primary-expression before ‘,’ token
        573 |         value = Eigen::MappedSparseMatrix<Scalar, Type::Flags, StorageIndex>(
            |                                                 ^
      /data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/torch/include/pybind11/eigen.h:573:76: error: expected primary-expression before ‘>’ token
        573 |         value = Eigen::MappedSparseMatrix<Scalar, Type::Flags, StorageIndex>(
            |                                                                            ^
      [3/3] /usr/local/cuda-11.3/bin/nvcc  -I/tmp/pip-req-build-0bzjdsmk/include -I/tmp/pip-req-build-0bzjdsmk/third_party/eigen -I/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/torch/include -I/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/torch/include/TH -I/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/torch/include/THC -I/usr/local/cuda-11.3/include -I/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/include/python3.8 -c -c /tmp/pip-req-build-0bzjdsmk/src/api.cu -o /tmp/pip-req-build-0bzjdsmk/build/temp.linux-x86_64-3.8/tmp/pip-req-build-0bzjdsmk/src/api.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -std=c++17 --extended-lambda --expt-relaxed-constexpr -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_HALF2_OPERATORS__ -Xcompiler=-Wno-float-conversion -Xcompiler=-fno-strict-aliasing -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1013"' -DTORCH_EXTENSION_NAME=_cubvh -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86
      /tmp/pip-req-build-0bzjdsmk/src/api.cu:1:9: warning: #pragma once in main file
          1 | #pragma once
            |         ^~~~
      /tmp/pip-req-build-0bzjdsmk/third_party/eigen/Eigen/src/Core/RandomImpl.h(142): warning: 'long double' is treated as 'double' in device code

      /tmp/pip-req-build-0bzjdsmk/third_party/eigen/Eigen/src/Core/RandomImpl.h(144): warning: 'long double' is treated as 'double' in device code

      /data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/torch/include/c10/core/SymInt.h(84): warning: integer conversion resulted in a change of sign

      /tmp/pip-req-build-0bzjdsmk/src/api.cu:1:9: warning: #pragma once in main file
          1 | #pragma once
            |         ^~~~
      /data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/torch/include/c10/core/SymInt.h(84): warning: integer conversion resulted in a change of sign

      ninja: build stopped: subcommand failed.
      Traceback (most recent call last):
        File "/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1808, in _run_ninja_build
          subprocess.run(
        File "/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/subprocess.py", line 516, in run
          raise CalledProcessError(retcode, process.args,
      subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

      The above exception was the direct cause of the following exception:

      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-req-build-0bzjdsmk/setup.py", line 77, in <module>
          setup(
        File "/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/setuptools/__init__.py", line 155, in setup
          return distutils.core.setup(**attrs)
        File "/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 148, in setup
          return run_commands(dist)
        File "/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 163, in run_commands
          dist.run_commands()
        File "/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands
          self.run_command(cmd)
        File "/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
          cmd_obj.run()
        File "/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 368, in run
          self.run_command("build")
        File "/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
          self.distribution.run_command(command)
        File "/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
          cmd_obj.run()
        File "/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/setuptools/_distutils/command/build.py", line 135, in run
          self.run_command(cmd_name)
        File "/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
          self.distribution.run_command(command)
        File "/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
          cmd_obj.run()
        File "/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 79, in run
          _build_ext.run(self)
        File "/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 339, in run
          self.build_extensions()
        File "/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 765, in build_extensions
          build_ext.build_extensions(self)
        File "/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 448, in build_extensions
          self._build_extensions_serial()
        File "/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 473, in _build_extensions_serial
          self.build_extension(ext)
        File "/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 202, in build_extension
          _build_ext.build_extension(self, ext)
        File "/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 528, in build_extension
          objects = self.compiler.compile(sources,
        File "/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 586, in unix_wrap_ninja_compile
          _write_ninja_file_and_compile_objects(
        File "/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1487, in _write_ninja_file_and_compile_objects
          _run_ninja_build(
        File "/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1824, in _run_ninja_build
          raise RuntimeError(message) from e
      RuntimeError: Error compiling objects for extension
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for cubvh
  Running setup.py clean for cubvh
Failed to build cubvh
ERROR: Could not build wheels for cubvh, which is required to install pyproject.toml-based projects

Why? Looking forward to your reply！

I also found this problem

Similar problem encoutered. But I am using Cuda12.1, and python 3.8. It also upgraded numpy, which also conflicts with my another package also installed.

authors: Eamon-UCAS XiaokunSun YUYueke-003

repo: ashawkey/cubvh

license: MIT

license_source: github-api


text:
LNK1181

:\LeStoreDownload\anaconda\envs\Radnerf\lib\site-packages\torch\utils\cpp_extension.py:813: UserWarning: The detected CUDA version (11.6) has a minor version mismatch with the version that was used to compile PyTorch (11.3). Most likely this shouldn't be a problem.
        warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda))
      building '_freqencoder' extension
      Emitting ninja build file D:\github\RAD-NeRF\freqencoder\build\temp.win-amd64-cpython-39\Release\build.ninja...
      Compiling objects...
      Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
      1.11.1.git.kitware.jobserver-1
      "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\link.exe" /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:D:\LeStoreDownload\anaconda\envs\Radnerf\lib\site-packages\torch\lib "/LIBPATH:C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.6\lib/x64" /LIBPATH:D:\LeStoreDownload\anaconda\envs\Radnerf\libs /LIBPATH:D:\LeStoreDownload\anaconda\envs\Radnerf /LIBPATH:D:\LeStoreDownload\anaconda\envs\Radnerf\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\ATLMFC\lib\x64" "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\lib\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\lib\um\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64" c10.lib torch.lib torch_cpu.lib torch_python.lib cudart.lib c10_cuda.lib torch_cuda_cu.lib torch_cuda_cpp.lib /EXPORT:PyInit__freqencoder D:\github\RAD-NeRF\freqencoder\build\temp.win-amd64-cpython-39\Release\github\RAD-NeRF\freqencoder\src\bindings.obj D:\github\RAD-NeRF\freqencoder\build\temp.win-amd64-cpython-39\Release\github\RAD-NeRF\freqencoder\src\freqencoder.obj /OUT:build\lib.win-amd64-cpython-39\_freqencoder.cp39-win_amd64.pyd /IMPLIB:D:\github\RAD-NeRF\freqencoder\build\temp.win-amd64-cpython-39\Release\github\RAD-NeRF\freqencoder\src\_freqencoder.cp39-win_amd64.lib
      LINK : fatal error LNK1181: 无法打开输入文件“D:\github\RAD-NeRF\freqencoder\build\temp.win-amd64-cpython-39\Release\github\RAD-NeRF\freqencoder\src\bindings.obj”
      error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\link.exe' failed with exit code 1181

how can i fix it?

我也是，所以你现在解决了吗

我也遇到了这个问题，请问是怎么解决的？

authors: Benton-J sunmingyang666 vfdh

repo: ashawkey/torch-ngp


text:
More informative notifcations

Notifications would be more helpful if details about the trade were also sent such exactly how much ends up being traded.
This is possible if the trader module is running before the notifying modules such as mailer.
Is it? If so, is it worth exploring how the trader module could log the exact details of the trade to be retrieved a few moments later by the notifying modules?

Yes! Exactly this is being worked in in #737. How it works is that the "roundtrips" visible in the UI (right now for backtesting and paper trading only) will hold information regarding the execution price.
Note that this requires quite a few changes (per exchange as well as through the codebase).

I am closing this as it's functionality that is coming soon.

repo: askmike/gekko


text:
feat: shellcheck apply fixes

Type of change

New feature or functionality (change which adds functionality)

For changes visible to end-users

Relevant documentation has been updated? We don't document which linters have fixes auto-applied, but I'm not sure that we should, since it will be hard to keep that updated.

Test plan

Manual testing; please provide instructions so we can reproduce:

example% ./lint.sh --fix src:hello_shell
From bazel-out/darwin_arm64-fastbuild/bin/src/shellcheck.hello_shell.aspect_rules_lint.report:

In src/hello.sh line 3:
[ -z $THING ] && echo "hello world"
     ^----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean:
[ -z "$THING" ] && echo "hello world"

For more information:
  https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...

patching file 'src/hello.sh'

example % git diff src
diff --git a/example/src/hello.sh b/example/src/hello.sh
index 51afcbc..64b7956 100644
--- a/example/src/hello.sh
+++ b/example/src/hello.sh
@@ -1,6 +1,6 @@
 #!/bin/bash

-[ -z $THING ] && echo "hello world"
+[ -z "$THING" ] && echo "hello world"

 # Note, we should not get a lint here because the .shellcheckrc excludes it
 [ ! -z "$foo" ] && echo "foo"

You'll get a chance to try it when we dogfood in silo!

source: gharchive/pull-request


text:
Determine if the antiforgery cookie is considered essential

RE: aspnet/Security#1561
When this new policy is applied all non-essential cookies will be suppressed. We need to determine if anti-forgery is considered essential by default. I expect yes as it's a security feature.
@blowdart

I also expect yes.

Yup, essential

Thanks guys. Agree, this should be marked as essential. I'm updating the title and assigning to someone to make the actual change.

Hi @kichalla. Can you please mark the antiforgery cookie as "essential"?

Preview2? @blowdart isn't the rest of this feature going into preview1?

I believe so, but it's a question for @DamianEdwards though

This issue was moved to aspnet/Home#2408

authors: Tratcher aspnet-hello blowdart mkArtakMSFT rynowak

repo: aspnet/Antiforgery


text:
Microsoft Security Advisory CVE-2019-1075: ASP.NET Core Spoofing Vulnerability

Microsoft Security Advisory CVE-2019-1075: ASP.NET Core Spoofing Vulnerability
Executive summary
Microsoft is releasing this security advisory to provide information about a vulnerability in ASP.NET Core 2.1 and 2.2. This advisory also provides guidance on what developers can do to update their applications to remove this vulnerability.
Microsoft is aware of a spoofing vulnerability that exists in ASP.NET Core that could lead to an open redirect. An attacker who successfully exploited the vulnerability could redirect a targeted user to a malicious website.
To exploit the vulnerability, an attacker could send a link that has a specially crafted URL and convince the user to click the link.
The update addresses the vulnerability by correcting how ASP.NET Core parses URLs.
Original Announcement
The original announcement for this issue can be found at https://github.com/aspnet/Announcements/issues/373
Mitigation factors
Microsoft has not identified any mitigating factors for this vulnerability.
Affected software
Any ASP.NET Core based application that uses any of following vulnerable packages:

Package name
Vulnerable versions
Secure versions

Microsoft.AspNetCore.Server.HttpSys
2.1.0, 2.1.12.2.0
2.1.122.2.6

Microsoft.AspNetCore.Server.IIS
2.2.0, 2.2.1, 2.2.2
2.2.6

Microsoft.AspNetCore.All
2.1.0 - 2.1.112.2.0 - 2.2.5
2.1.122.2.6

Microsoft.AspNetCore.App
2.1.0 - 2.1.112.2.0 - 2.2.5
2.1.122.2.6

Advisory FAQ
How do I know if I am affected?
The affected assemblies are part of .NET Core. If you are running a vulnerable version of .NET Core you may be affected.
How do I fix the issue?
To fix the issue please install the latest version of .NET Core. If you have multiple versions of .NET Core installed you will need to install multiple runtimes, or SDKs depending on what you have installed.
If you have .NET Core 2.0 or greater installed, you can list the versions you have installed by running the dotnet --info command. You will see output like the following;
.NET Core SDK (reflecting any global.json):
 Version:   3.0.100-preview3-010431
 Commit:    d72abce213

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.18362
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\3.0.100-preview3-010431\

Host (useful for support):
  Version: 3.0.0-preview3-27503-5
  Commit:  3844df9537

.NET Core SDKs installed:
  2.1.604 [C:\Program Files\dotnet\sdk]
  2.2.202 [C:\Program Files\dotnet\sdk]
  3.0.100-preview3-010431 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.1.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]\
  Microsoft.AspNetCore.All 2.2.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.2.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.0.0-preview3-19153-02 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.1.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.2.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.0.0-preview3-27503-5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 3.0.0-preview3-27504-2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download

For machines running .NET 2.1 you should download Runtime 2.1.12 or SDK 2.1.508 for Visual Studio 2017 or SDK 2.1.605 for Visual Studio 2019 (v16.0) or SDK 2.1.701 for Visual Studio 2019 (v16.1) from https://dotnet.microsoft.com/download/dotnet-core/2.1
For machines running .NET 2.2 you should download Runtime 2.2.6 or SDK 2.2.108 for Visual Studio 2017 or SDK 2.2.205 for Visual Studio 2019 (v16.0) or SDK 2.2.301 for Visual Studio 2019 (v16.1) from https://dotnet.microsoft.com/download/dotnet-core/2.2

If you have both 2.1 and 2.2, you need to install updates for both versions.
Once you have installed the updated runtime or SDK, restart your apps for the update to take effect.
If you have pinned your application to a specific version of the runtime, you must update your app, recompile and redeploy it for the update to take effect.
Other Information
Reporting Security Issues
If you have found a potential security issue in .NET Core, please email details to secure@microsoft.com. Reports may qualify for the .NET Core Bug Bounty. Details of the .NET Core Bug Bounty including terms and conditions are at https://aka.ms/corebounty.
Support
You can ask questions about this issue on GitHub in the .NET Core or ASP.NET Core organizations. These are located at https://github.com/dotnet/ and https://github.com/aspnet/, respectively. The Announcements repo for each product (https://github.com/dotnet/Announcements and https://github.com/aspnet/Announcements) will contain this bulletin as an issue and will include a link to a discussion issue. You can ask questions in the discussion issue.
Disclaimer
The information provided in this advisory is provided "as is" without warranty of any kind. Microsoft disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. In no event shall Microsoft Corporation or its suppliers be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages, even if Microsoft Corporation or its suppliers have been advised of the possibility of such damages. Some states do not allow the exclusion or limitation of liability for consequential or incidental damages so the foregoing limitation may not apply.
Acknowledgements
Reported through Datalust
External Links
CVE-2019-1075
Revisions
V1.0 (July 9, 2019): Advisory published.
Version 1.0
Last Updated 2019-07-09

How does this apply to Azure WebApps? What is the recommended way to protect an app running on Azure WebApp. The latest runtime I see installed is 2.2.5.

The way Azure web apps proxies requests is different to how IIS and Windows hosting does it, and the issue shouldn't arise.

@blowdart If that is the case, could you update the advisory to include this as a mitigating factor?

I'll do some more investigation first to be 100% sure.

Is there any information whether Kestrel in ASP.NET Core 2.1 hosted behind NginX or AWS ALB affected (on Linux, no Windows/IIS)?

authors: blowdart corneliutusnea fadamsen markusschaber

repo: aspnet/AspNetCore


text:
AspNet Core 2.2.7 memory leak on alpine 3.9 docker image

Describe the bug
We recently updated our aspnet core application to use the mcr.microsoft.com/dotnet/core/aspnet:2.2.7-alpine3.9 docker image. We let it soak on 2 separate staging & test environments and noted that both steadily consumed more and more memory.
We continued to monitor for several days expecting the memory usage to flatten out at some point, but it just kept growing.
I updated the docker image to use mcr.microsoft.com/dotnet/core/aspnet:2.2.7-alpine and the memory usage growth disappeared entirely.
The growing memory usage was observed regardless of traffic or load of the container, even an idle container has exhibited the pattern.
The growing memory usage was observed on both container metrics as well as the reported WorkingSetSize from the application itself. GC Memory remained stable, so the growth does not stem from managed objects.
To Reproduce
Steps to reproduce the behavior: ( I have not yet been able to test if any aspnet core project will exhibit this behavior or if it has to do with any of the code in our application )

Using this docker image mcr.microsoft.com/dotnet/core/aspnet:2.2.7-alpine3.9
Wait roughly ~10 hours+
Observe memory usage of the container instance over time.

Expected behavior
Memory usage should stabilize at a reasonable value and not continue to grow.
Screenshots from Idle Instance
Data reported by ECS Metrics:

Working set size reported by application:

GC Memory size reported by application:

The spike at 9/13 is when we deployed mcr.microsoft.com/dotnet/core/aspnet:2.2.7-alpine3.9
The spike at 9/17 is when we deployed mcr.microsoft.com/dotnet/core/aspnet:2.2.7-alpine
Screenshots from instance with moderate daytime load
Data reported by ECS Metrics:

Working set size reported by application:

GC Memory size reported by application:

The spike at 9/13 is when we deployed mcr.microsoft.com/dotnet/core/aspnet:2.2.7-alpine3.9
Additional context

The docker containers are hosted on AWS EC2 Linux instances using ECS.
No special configurations or flags are used, as in we are not setting a specific GC mode or anything of that nature.
The containers have a defined hard memory limit set, but no CPU Units or Ulimits.

/cc @sebastienros

@Bio2hazard what leads you to believe this is a memory leak in ASP.NET Core? Can you share a memory profile/dump?

Hi @anurse ,
I do not know if the memory leak is specifically in ASP.NET Core, or stems from corefx or coreclr. I filed the ticket here because the memory growth was observed specifically with the mcr.microsoft.com/dotnet/core/aspnet:2.2.7-alpine3.9 docker image.
Getting a memory dump will be a bit challenging, since our environments mirror our production environment, and as such do not have any dev tools installed. However, I will see what I can do.

Thanks @Bio2hazard ! Without more information here we don't have much to go on. As far as I know, we're not aware of any framework/platform memory leaks specific to that image, so we'd need to have quite a bit more detail to investigate further.
Please note that, in general, we don't have the capacity to throughly investigate customer applications (Microsoft Support is better equipped for that), so without more data indicating that this is a memory leak in the platform, we can't commit to diagnosing this kind of issue. We're happy to help where can and provide some guidance to help track down the problem though! I just want to set expectations appropriately :).

Hi @anurse ,
I understand your position, but I can not think of any defect on our end / in the customer application that would work fine on the mcr.microsoft.com/dotnet/core/aspnet:2.2.7-alpine image, but leak memory on the mcr.microsoft.com/dotnet/core/aspnet:2.2.7-alpine3.9 docker image.
To validate that this is an issue with the image, I deployed our service again on the -alpine3.9 image and observed memory growth:

Same story, showing the working set growth with -alpine3.9 and then the steady working set with the -alpine image.
I also deployed 2 additional microservices ( with different application code ) with -alpine3.9:

As you can see, they also exhibit this problem.
All 3 services have a BackgroundService implementation that polls files on S3. I deployed one service with a shorter interval to see if the rate at which the memory grows corresponds with the frequency of S3 requests, but I was unable to find a correlation.
I'm still trying some things out and will report back if I can find anything that influences the rate at which memory grows, but it would be very helpful if you could deploy a mcr.microsoft.com/dotnet/core/aspnet:2.2.7-alpine3.9 imaged container on your end and run tests against it.

I'm still trying some things out and will report back if I can find anything that influences the rate at which memory grows, but it would be very helpful if you could deploy a mcr.microsoft.com/dotnet/core/aspnet:2.2.7-alpine3.9 imaged container on your end and run tests against it.

We have tests that run on a variety of platforms and they don't currently indicate any platform-specific issues. We're always evaluating exactly which platforms we test on but that has to be prioritized against all the other work we have in front of us. It really doesn't matter what our apps show in the lab for diagnosing this issue though, we need to know what's happening with this app.
The most important thing when diagnosing an issue like this is to do some memory profiling to find out which objects are taking up all this extra space. Without that we don't have anything to go on.

Hello @anurse ,
I was able to run one of our containers locally and reproduce the issue.
Since it runs on alpine, lldb does not work ( https://github.com/dotnet/diagnostics/blob/master/documentation/lldb/linux-instructions.md#alpine-36 ), however I was able to use the dotnet-dump tool ( https://github.com/dotnet/diagnostics/blob/master/documentation/dotnet-dump-instructions.md ) to create a full core dump.
I can open the dump using dotnet-dump analyze, but it seems it can only be used to check managed resources, not native ones. So I am a bit stuck on how I can get meaningful information about the growing working set size.
Attempts to debug the dump on windows has failed as no tool I have is capable of opening it ( I have tried the new WinDbg preview, PerfView and VS2019 ).
Please advise how I can get information from the dump that will aid your debugging efforts.

You are correct that the dotnet dump analyze command is for managed memory only. If there's no managed objects taking up significant space, then this is likely to be a runtime issue which is beyond my expertise. Do you know for sure that the managed memory isn't the cause of the leak?
For analyzing native memory, I believe you'd need to use lldb, either by finding one that works on Alpine or by taking the dump to a different machine. It appears that the lldb included in Alpine 3.9 may work: https://github.com/joe-elliott/netcore-kubernetes-profiling/issues/4#issuecomment-502326934
It might be worth taking this to a forum like https://github.com/dotnet/core since we don't have much expertise in debugging native memory issues like this. It's certainly possible that there's some kind of interaction between the managed runtime and a native component that changed in Alpine 3.9 which is causing a native leak like this, but we don't have much experience there. If you have memory dumps you can share, there are likely people on that forum that could help better than we could.

Thank you for the guidance, @anurse .
I tried to move the dump to my host windows system but was unable to debug it.
I might have a lead though. So far I took a snapshot 2 days ago and one yesterday, and when comparing dumpheap I noticed that "Free" - which I believe is space reclaimed by the GC but not released to the OS ( and please correct me if I am wrong ). So I think it might be an issue where the application chooses to allocate more rather than re-using reclaimed space, and not releasing the reclaimed space back to the OS.
I will take a third snapshot today and verify if Free has continued to grow. I will report back shortly.
Here is some data from the dump:
dumpheap 10/6/2019:
00007f5b7a16e950     2114       395824 System.Object[]
00007f5b7a189660     8952       429696 System.Text.StringBuilder
00007f5b7a18ef70     4950       514800 System.Reflection.RuntimeMethodInfo
00007f5b7d538128     8366       535424 System.Text.RegularExpressions.RegexNode
00007f5b7a175e70    10647      1058760 System.Int32[]
00007f5b7a148ba0    10414      3547526 System.Char[]
00007f5b7a1583a0     5776      3939040 System.SByte[]
00007f5b7a188a68    51798      4190570 System.String
0000560feeddc9e0     4326      5751492      Free
00007f5b7a178cb8    10643      8010632 System.Byte[]
Total 306200 objects

dumpheap 10/7/2019:
00007f5b7d56fb28     3221       257680 System.Collections.Generic.Dictionary`2[[System.String, System.Private.CoreLib],[ThirdParty.Json.LitJson.JsonData, AWSSDK.Core]]
00007f5b7d5669b0     4106       328480 ThirdParty.Json.LitJson.JsonData
00007f5b7a16e950     1255       337984 System.Object[]
00007f5b7a175e70     4744       475552 System.Int32[]
00007f5b7a18ef70     4962       516048 System.Reflection.RuntimeMethodInfo
00007f5b7a1583a0     1569      1079368 System.SByte[]
00007f5b7a148ba0     2824      1294736 System.Char[]
00007f5b7a188a68    25598      1968536 System.String
00007f5b7a178cb8     6061      4984582 System.Byte[]
0000560feeddc9e0     4136      8631206      Free
Total 157717 objects

eeheap 10/6/2019:
Total LoaderHeap size:   Size: 0xd91000 (14225408) bytes.
=======================================
Number of GC Heaps: 2
------------------------------
Heap 0 (0000560FEEE75B40)
generation 0 starts at 0x00007F595999FE58
generation 1 starts at 0x00007F59598E61B0
generation 2 starts at 0x00007F5959703000
ephemeral segment allocation context: none
         segment             begin         allocated              size
00007F5959702000  00007F5959703000  00007F595A2A0D50  0xb9dd50(12180816)
Large object heap starts at 0x00007F5B59703000
         segment             begin         allocated              size
00007F5B59702000  00007F5B59703000  00007F5B59A8B230  0x388230(3703344)
Heap Size:       Size: 0xf25f80 (15884160) bytes.
------------------------------
Heap 1 (0000560FEEE7D0E0)
generation 0 starts at 0x00007F5A59E43058
generation 1 starts at 0x00007F5A59DA3A60
generation 2 starts at 0x00007F5A59703000
ephemeral segment allocation context: none
         segment             begin         allocated              size
00007F5A59702000  00007F5A59703000  00007F5A5A8BE168  0x11bb168(18592104)
Large object heap starts at 0x00007F5B69703000
         segment             begin         allocated              size
00007F5B69702000  00007F5B69703000  00007F5B69CDAEB0  0x5d7eb0(6127280)
Heap Size:       Size: 0x1793018 (24719384) bytes.
------------------------------
GC Heap Size:    Size: 0x26b8f98 (40603544) bytes.

eeheap 10/7/2019:
Total LoaderHeap size:   Size: 0xd91000 (14225408) bytes.
=======================================
Number of GC Heaps: 2
------------------------------
Heap 0 (0000560FEEE75B40)
generation 0 starts at 0x00007F5959946290
generation 1 starts at 0x00007F59598E61B0
generation 2 starts at 0x00007F5959703000
ephemeral segment allocation context: none
         segment             begin         allocated              size
00007F5959702000  00007F5959703000  00007F5959B34570  0x431570(4396400)
Large object heap starts at 0x00007F5B59703000
         segment             begin         allocated              size
00007F5B59702000  00007F5B59703000  00007F5B59B4B380  0x448380(4490112)
Heap Size:       Size: 0x8798f0 (8886512) bytes.
------------------------------
Heap 1 (0000560FEEE7D0E0)
generation 0 starts at 0x00007F5A59E44960
generation 1 starts at 0x00007F5A59DA3A60
generation 2 starts at 0x00007F5A59703000
ephemeral segment allocation context: none
         segment             begin         allocated              size
00007F5A59702000  00007F5A59703000  00007F5A5A1A6F60  0xaa3f60(11157344)
Large object heap starts at 0x00007F5B69703000
         segment             begin         allocated              size
00007F5B69702000  00007F5B69703000  00007F5B69CDAEB0  0x5d7eb0(6127280)
Heap Size:       Size: 0x107be10 (17284624) bytes.
------------------------------
GC Heap Size:    Size: 0x18f5700 (26171136) bytes.

I tried installing lldb from the link you posted, but it does not seem to work. It does not seem to be able to find the lldb package:
bash-4.4# apk add lldb
fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/community/x86_64/APKINDEX.tar.gz
ERROR: unsatisfiable constraints:
  lldb (missing):
    required by: world[lldb]

Unfortunately, the theory about Free does not seem to hold up with the third memory dump, taken today:
dumpheap 10/8/2019:
00007f5b7a189660     7574       363552 System.Text.StringBuilder
00007f5b7d538128     5918       378752 System.Text.RegularExpressions.RegexNode
00007f5b7a16e950     1926       382864 System.Object[]
00007f5b7a18ef70     4962       516048 System.Reflection.RuntimeMethodInfo
00007f5b7a175e70     8698       842860 System.Int32[]
00007f5b7a1583a0     4097      2803336 System.SByte[]
00007f5b7a148ba0     8909      3236124 System.Char[]
00007f5b7a188a68    43156      3843900 System.String
0000560feeddc9e0     4626      3902226      Free
00007f5b7a178cb8     9096     11160633 System.Byte[]
Total 259816 objects

eeheap 10/8/2019:
Total LoaderHeap size:   Size: 0xd91000 (14225408) bytes.
=======================================
Number of GC Heaps: 2
------------------------------
Heap 0 (0000560FEEE75B40)
generation 0 starts at 0x00007F59599AB078
generation 1 starts at 0x00007F59598FFF60
generation 2 starts at 0x00007F5959703000
ephemeral segment allocation context: none
         segment             begin         allocated              size
00007F5959702000  00007F5959703000  00007F5959E433B8  0x7403b8(7603128)
Large object heap starts at 0x00007F5B59703000
         segment             begin         allocated              size
00007F5B59702000  00007F5B59703000  00007F5B59B8B3F0  0x4883f0(4752368)
Heap Size:       Size: 0xbc87a8 (12355496) bytes.
------------------------------
Heap 1 (0000560FEEE7D0E0)
generation 0 starts at 0x00007F5A59F106E8
generation 1 starts at 0x00007F5A59DC8D98
generation 2 starts at 0x00007F5A59703000
ephemeral segment allocation context: none
         segment             begin         allocated              size
00007F5A59702000  00007F5A59703000  00007F5A5A98F818  0x128c818(19449880)
Large object heap starts at 0x00007F5B69703000
         segment             begin         allocated              size
00007F5B69702000  00007F5B69703000  00007F5B69CDAEB0  0x5d7eb0(6127280)
Heap Size:       Size: 0x18646c8 (25577160) bytes.
------------------------------
GC Heap Size:    Size: 0x242ce70 (37932656) bytes.

When I started the container on 10/3/2019, it reported GC Memory between 20 to 45 MB ( depending on when it last collected ), and reported a working set size of  135.4 MB.
Now, 5 days later, it is sitting at GC Memory between 20 to 45 MB ( unchanged as the application isn't doing anything other than healthchecks ), and is reporting a working set size of 334.5 MB.
I work for a large company so trying to share this memory dump ( which is 11 GB ) would have to go through a lot of red tape to get legal involved. I will see if I can come up with a minimal reproduction scenario.

cc @davidfowl @halter73 to see if they have any thoughts

We've also noticed a very similar issue when moving from 2.2.6-alpine3.8 to 3.0.0-alpine3.9. The process leaks unmanaged memory at a constant rate (regardless of load) while the managed heaps all stay very small and the GC is mostly idle. At first we thought it was upgrading to .NET Core 3.0, but it does appear to be related to the base image OS.

(averaged over 5 container instances per image, same DLLs copied to each image, 128Mb limit)
Here is a detailed look at an individual container instance over 26 hours, from start until it was OOM killed at 128Mb (the limit set on the container). The total heap size never exceeds 10Mb. Only 140 GC events occur over the 26 hours, with a few more gen 1 collections as the memory pressure increases above 90%:

We've failed to pin down the exact cause of the leak so far as most tools just give us information on the managed heap which has stable / reasonable object counts.
The issue occurs in both AWS ECS and Azure Kubernetes Service resulting in the container being OOM Killed. Confusingly, when using docker-compose locally the process will leak, but then stabilise at ~98% memory usage and never be killed.
The minimal repro we've been working on didn't leak until we added AWS SQS long polling. Not all of our leaking services use SQS so we're digging into that to work out what exactly in SQS polling might be triggering the leak - maybe outbound HTTPS requests?
Next, I'll be looking at building a 3.0.0-alpine3.8 image to see if the OS downgrade fixes the issue while keeping the same 3.0.0 runtime and also try out the recently released 3.1.0-preview1-alpine3.10.
While we work on a minimal repro, if anyone has any ideas on dumps we could run or other avenues of investigation, I'd be very grateful!

Hi @gnjack ,
It's unfortunate that this issue is also affecting you, but I am also glad that it's not just me.
I have been working on a minimal repro myself, at first I tested just memory allocations, then I tested Console output ( since we log a decent amount of information to the console ), but neither of those yielded any results.
The next test I planned was outbound requests using HttpClient, and while it's too early to say with 100% confidence, I think we have a winner!
@anurse Here is a solution that exhibits the the growing working set size:
Alpine39MemoryRepro.zip
After 4 hours of runtime:
Alpine 3.8's working set size remains between 98-101MB
Alpine 3.9's working set size started at ~98 MB, and is now at 107 MB.
GC Generations 0, 1 and 2 are all being collected and the managed memory has remained stable.
Usage for the repro:

Navigate to the root of the extracted zip file
Build 3.9 Image via: docker build -t alpinememory -f .\Dockerfile-localtest .
(Optional) Build 3.8 Image via: docker build -t alpinememory38 -f .\Dockerfile-localtest38 .
Run 3.9 Image via: docker run -p 5001:8080 --name alpinememory -d alpinememory ( alter host port if you wish )
(Optional) Run 3.8 Image via: docker run -p 5002:8080 --name alpinememory38 -d alpinememory38
Wait at least 3 hours for trends to emerge
Grab a report of working set size via docker cp alpinememory:/tmp/report.csv ./report_39.csv
(Optional) Grab a report of alpine 3.8 for comparison via docker cp alpinememory38:/tmp/report.csv ./report_38.csv

What the repro solution does:

Relatively standard aspnet core 2.27 web api style project, with nginx reverse proxy.
Starts 2 IHostedServices that inherit from BackgroundWorker.
Worker/ReportingWorker.cs runs every minute and dumps memory-related information from Process. and GC. namespaces to a text file, and only exists to conveniently observe memory behavior over time without requiring any additional dependencies
Worker/WebRequestWorker.cs runs every second and sends a HTTPS Get to one out of 16 pre-configured URLs. It then logs the number of A or a chars in the response, pretty sure that's unnecessary but I wanted to make sure the response content was used in some manner and nothing was optimized out.

The URLs were chosen from the Alexa page ranks since I wanted to make sure to only send GETs to big, established sites. 1 request every 16 seconds probably does not bother them. 👍
The requests are made using the recommended pattern of using services.AddHttpClient(); in Startup.cs, injecting IHttpClientFactory and using CreateClient on-demand.

Here are my results after 4 hours:
Alpine 3.9: report_39.txt
Alpine 3.8: report_38.txt

the managed heaps all stay very small and the GC is mostly idle

GC Generations 0, 1 and 2 are all being collected and the managed memory has remained stable.

Sounds like this isn't really something in the scope of the ASP.NET Core team then. It think we'll need some deeper investigation from .NET Core folks here (cc @davidfowl @jkotas). Perhaps this issue should be moved to dotnet/core since it sounds like the problem runs much deeper than our stack.

As an update to @gnjack's earlier comment:
We ran our repro app on 3.0.0-alpine3.8, 3.1.0-preview1-alpine3.10, and 3.0.0-alpine3.10 (from the nighty docker image) - and none of them exhibited the same memory leak we've seen on 3.0.0-alpine3.9!

So the good news is that even if we don't manage to diagnose the root cause of the leak, it looks like it can be avoided by sticking to alpine 3.8 for now, and rolling forward to the alpine 3.10 image (as soon as it's stable and released).
Even though we've been focusing on .net core 3, I would expect .net core 2.2 would have the same behaviour.

Copied issue to https://github.com/dotnet/corefx/issues/41875 👍

It looks like the corefx issue is getting a little more traction. I'll subscribe to it to make sure we follow along. For now I'm going to close this one and if we get back to an ASP.NET Core issue we can revive it later.

authors: Bio2hazard GREsau anurse gnjack pranavkm


text:
 description of the BlazorOptions class in Razor Components is wrong...

In the  tag for the BlazorOptions class

should be

Note: I've previously posted issues about similar mistakes, to which the Asp.Net team responded with the suggestion that I should post a Pull request. Unfortunately, I can't post Pull requests. You guys should do it yourselves.

In the <summary> tag for the BlazorOptions class
<see cref="ComponentsApplicationBuilderExtensions.UseBlazor(IApplicationBuilder, BlazorOptions)"/>
should be
<see cref="BlazorApplicationBuilderExtensions.UseBlazor(IApplicationBuilder, BlazorOptions)"/>
Note: I've previously posted issues about similar mistakes, to which the Asp.Net team responded with the suggestion that I should post a Pull request. Unfortunately, I can't post Pull requests. You guys should do it yourselves.

Thanks for contacting us, @enetstudio.
Sure, we'll fix it.

authors: enetstudio mkArtakMSFT


text:
Optional parameter is not cleared when navigating to same page with a different set of parameters

When navigating to a page which has two @page directives with one or two parameters, the optional one is not always cleared when navigating to this page when the optional parameter should have be set to its default.
In the documentation it is said to use two @page directives for support for optional parameters.
To Reproduce:
Start with the sample app of Razor Components, and add a new page:
@page "/node/{Id:int}"
@page "/node/{ParentId:int}/{Id:int}"

@functions {
    [Parameter]
    private int? ParentId { get; set; } = null;

    [Parameter]
    private int Id { get; set; }
}

update NavMenu.cshtml to include:
<NavLink href="node/1">First click me</NavLink>
<NavLink href="node/2/3">Then click me</NavLink>
<NavLink href="node/4">And finally click me</NavLink>

Start the app.
Navigating to node/1 works: ParentId is null and Id is 1.
Navigating to node/2/3 works: ParentId is 2 and Id is 3.
Navigating to node/4 works but gives: ParentId stays 2, and Id is 4.
Expected behavior
When navigating to node/4 I expect ParentId to be null again and Id to be 4. ParentId is a Parameter, and should be set to null when the route does not provide the information.
Additional context
 Version:   3.0.100-preview-010184
 Commit:    c57bde4593

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.17134
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\3.0.100-preview-010184\

Host (useful for support):
  Version: 3.0.0-preview-27324-5
  Commit:  63a01b08e5

.NET Core SDKs installed:
  1.0.0-preview2-003121 [C:\Program Files\dotnet\sdk]
  1.0.0-preview2-003131 [C:\Program Files\dotnet\sdk]
  1.0.0 [C:\Program Files\dotnet\sdk]
  1.0.4 [C:\Program Files\dotnet\sdk]
  1.1.0 [C:\Program Files\dotnet\sdk]
  2.0.0 [C:\Program Files\dotnet\sdk]
  2.0.3 [C:\Program Files\dotnet\sdk]
  2.1.2 [C:\Program Files\dotnet\sdk]
  2.1.4 [C:\Program Files\dotnet\sdk]
  2.1.100 [C:\Program Files\dotnet\sdk]
  2.1.200 [C:\Program Files\dotnet\sdk]
  2.1.201 [C:\Program Files\dotnet\sdk]
  2.1.202 [C:\Program Files\dotnet\sdk]
  2.1.300-preview1-008174 [C:\Program Files\dotnet\sdk]
  2.1.300-rc1-008673 [C:\Program Files\dotnet\sdk]
  2.1.300 [C:\Program Files\dotnet\sdk]
  2.1.302 [C:\Program Files\dotnet\sdk]
  2.1.400 [C:\Program Files\dotnet\sdk]
  2.1.401 [C:\Program Files\dotnet\sdk]
  2.1.403 [C:\Program Files\dotnet\sdk]
  2.1.500 [C:\Program Files\dotnet\sdk]
  2.1.503 [C:\Program Files\dotnet\sdk]
  2.1.600-preview-009472 [C:\Program Files\dotnet\sdk]
  3.0.100-preview-010184 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.1.0-preview1-final [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.0-rc1-final [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.0-preview1-final [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.0-rc1-final [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.0.0-preview-19075-0444 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 1.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 1.0.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 1.0.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 1.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 1.1.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 1.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.0.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.0.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.0-preview1-26216-03 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.0-rc1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.3-servicing-26724-03 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.0.0-preview-27324-5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 3.0.0-preview-27325-3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]```

This is very old bug and it was tracked somewhere. It was fixed but then reverted. See this #6864. Hopefully both problems will be solved in preview 3.

@SteveSandersonMS, is this fixed already?

@mkArtakMSFT We fixed it in 0.7.0, but then we had to revert the fix just prior to the 0.7.0 release because it caused a bad regression elsewhere. We don't yet have a design for what the replacement fix should be. It should remain on the backlog, but it's not at the top of the priority list in my opinion.

Thanks @SteveSandersonMS. Can you please dupe this one with that one you reference and close this issue?

@SteveSandersonMS, I assume you meant 0.8.0 there, did you?

Yes, 0.8.0. Thanks!
The change where we originally fixed this was #4797, but then we reverted it in #6931.
I've searched and can't find another issue on the backlog tracking making a further long-term fix, so perhaps this issue can be that one for us now :)
Putting on backlog.

Plan following offline discussion:

Make Router figure out the union of all the route parameter names across all the route templates for each component. Then when supplying parameters, supply null for any not in the current route.
Check that components can receive null for value-type parameters and they get treated as default(T).

@SteveSandersonMS I might be mistaken, but this won't take into account properties default value and will erase them right (OP problem) ?

It will only erase parameters that match route tokens, not others.

In case anyone else stumbles upon this, I solved an issue where I thought the page wouldn't reload data based upon the parameters in the URL / Querystring changing.  What worked for me was overriding the "OnParametersSetAsync()" event handler (instead of code I had in the "OnAfterRenderAsync(bool firstRender)" event handler.  For example:
private readonly object _synclock = new object();

protected override async Task OnParametersSetAsync()
{
	IList<Model.MyModelClass> myModelClasses = await MyService.GetByStartUtcDateAsync(MinStartUtcDate);
	lock (_synclock)
	{
	ClearMyCollections();
	...ReloadMyCollections...
	}
}

Note, I added the locking code because I was originally observing some inconsistent behavior where sometimes the collections I was loading contained up to three times the number of expected data records.  The OnParametersSetAsync() method seems to fire multiple times and I figured it was a threading issue; haven't dug too deep there.

authors: Andrzej-W Paul-Schroeder RemiBou SteveSandersonMS ThomasBleijendaal mkArtakMSFT


text:
Put request trailers in a separate collection

#4771 Having request headers and trailers in the same collection creates some ambiguity and potential spoofing concerns (e.g. headers changing after validation). In the HTTP/2 scenario there are also concurrency issues where all headers and trailers are processed on the connection thread, not the request thread. This PR adds a new feature and collection for trailers to keep them isolated.
I ended up using a bool Available to track state rather than returning a null connection because it let me use the main collection property to store incomplete trailers without worrying if anyone would access them (e.g. HTTP/2 concurrency issues). It also simplified re-using the collection across requests, it can just be cleared out.
The most interesting detail is that Http/2 trailers aren't processed as part of the request body like HTTP/1.1. The connection loop reads them as soon as they arrive. That means you may not have to read all the way to the end of the request body before they're available, only far enough that the remainder fit in the buffer and the client's window size unblocked the sending of trailers. Consistency with HTTP/1.1 is maintained by ensuring that the trailers are always available if you have read to the end of the request body.

@halter73 updated to always support request trailers.


text:
Configuration.AzureKeyVault 2.0.0 incompatible with Microsoft.IdentityModel.Clients.ActiveDiretory 3.17

Current version of Configuration.AzureKeyVault is incompatible with Microsoft.IdentityModel.Clients.ActiveDirectory 3.17.0 package.
Attempt to build config fails with
System.MissingMethodException: Method not found: 'System.Threading.Tasks.Task`1<Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationResult>
Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext.AcquireTokenAsync(System.String, Microsoft.IdentityModel.Clients.ActiveDirectory.ClientCredential)'.
   at Microsoft.Extensions.Configuration.AzureKeyVaultConfigurationExtensions.<GetTokenFromClientSecret>d__2.MoveNext()
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)
   at Microsoft.Extensions.Configuration.AzureKeyVaultConfigurationExtensions.GetTokenFromClientSecret(String authority, String resource, String clientId, String clientSecret)
   at Microsoft.Azure.KeyVault.KeyVaultCredential.<PostAuthenticate>d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Azure.KeyVault.KeyVaultCredential.<ProcessHttpRequestAsync>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Azure.KeyVault.KeyVaultClient.<GetSecretsWithHttpMessagesAsync>d__66.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Azure.KeyVault.KeyVaultClientExtensions.<GetSecretsAsync>d__49.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Extensions.Configuration.AzureKeyVault.AzureKeyVaultConfigurationProvider.<LoadAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Extensions.Configuration.AzureKeyVault.AzureKeyVaultConfigurationProvider.Load()
   at Microsoft.Extensions.Configuration.ConfigurationRoot..ctor(IList`1 providers)
   at Microsoft.Extensions.Configuration.ConfigurationBuilder.Build()

FYI, the issue is happening due to the fact that the aforementioned method was moved to a separate class and now is an extension method. The simple re-compile targeting Microsoft.IdentityModel.Clients.ActiveDiretory 3.17 library should fix the issue.

I don't think that will entirely work. The AuthenticationContext class in ActiveDirectory 3.17 doesn't have an overload for acquiring a token with client credentials - see issue linked above

@pakrym

@lvanderbijl In my case the only way to go was to get rid of this Configuration.AzureKeyVault extension:
in fact I had to upgrade Microsoft.IdentityModel.Clients.ActiveDiretory to 3.17 due to the fix https://github.com/AzureAD/azure-activedirectory-library-for-dotnet/issues/511 (where they removed *.Platform.dll library).
In fact, the currently release version does contain the mentioned method (not as overload, but extension method - https://github.com/AzureAD/azure-activedirectory-library-for-dotnet/blob/master/src/Microsoft.IdentityModel.Clients.ActiveDirectory/Features/WinCommon/AuthenticationContextConfidentialClientExtensions.cs).
However, as far as I see they're moving back to using overloads in 3.17.1, so likely the compatibility will be resurrected in the future versions.
https://github.com/AzureAD/azure-activedirectory-library-for-dotnet/blob/release/3.17.1/src/Microsoft.IdentityModel.Clients.ActiveDirectory/Features/WinCommon/AuthenticationContext.cs

Fixed in ADAL 3.17.2

@ig-sinicyn Feel free to re-open if this repros with the newer ADAL.

authors: ArtyomBaranovskiy andrewvk glennc ig-sinicyn lvanderbijl shirhatti

repo: aspnet/Configuration


text:
未能加载文件或程序集“System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a

未能加载文件或程序集“System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”或它的某一个依赖项。找到的程序集清单定义与程序集引用不匹配。 (异常来自 HRESULT:0x80131040)
说明: 执行当前 Web 请求期间，出现未经处理的异常。请检查堆栈跟踪信息，以了解有关该错误以及代码中导致错误的出处的详细信息。
异常详细信息: System.IO.FileLoadException: 未能加载文件或程序集“System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”或它的某一个依赖项。找到的程序集清单定义与程序集引用不匹配。 (异常来自 HRESULT:0x80131040)

Took the liberty to translate this one :)
Failed to load file or assembly "System.Net.Http, Version = 4.0.0.0, Culture = neutral, PublicKeyToken = b03f5f7f11d50a3a" or one of its dependencies. The assembly list definition found does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Explanation: An unhandled exception occurred during the execution of the current web request. Please check the stack trace information for more information on the error and the source of the error in the code.
Exception Details: System.IO.FileLoadException: Failed to load file or assembly "System.Net.Http, Version = 4.0.0.0, Culture = neutral, PublicKeyToken = b03f5f7f11d50a3a" or one of its dependencies. The assembly list definition found does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Still you might need to provide a little more context :)

行 14:             var thisAssembly = typeof(SwaggerConfig).Assembly; 行 15:  行 16:             GlobalConfiguration.Configuration 行 17:                 .EnableSwagger(c => 行 18:                     {

[FileLoadException: 未能加载文件或程序集“System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”或它的某一个依赖项。找到的程序集清单定义与程序集引用不匹配。 (异常来自 HRESULT:0x80131040)]
System.Web.Http.GlobalConfiguration..cctor() +0
[TypeInitializationException: “System.Web.Http.GlobalConfiguration”的类型初始值设定项引发异常。]
System.Web.Http.GlobalConfiguration.get_Configuration() +24
VOCs.WebAPI.SwaggerConfig.Register() in J:\VOCs\03_Code\00_SourceCode\VOCsV2\06_Web\WebAPI\App_Start\SwaggerConfig.cs:16
[TargetInvocationException: 调用的目标发生了异常。]
System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +114
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +146
WebActivatorEx.BaseActivationMethodAttribute.InvokeMethod() +81
WebActivatorEx.ActivationManager.RunActivationMethods(Boolean designerMode) +699
WebActivatorEx.ActivationManager.Run() +123
[InvalidOperationException: 针对类型 WebActivatorEx.ActivationManager 的应用程序预启动初始化方法 Run 引发了异常，显示下列错误消息: 调用的目标发生了异常。。]
System.Web.Compilation.BuildManager.InvokePreStartInitMethodsCore(ICollection1 methods, Func1 setHostingEnvironmentCultures) +902
System.Web.Compilation.BuildManager.InvokePreStartInitMethods(ICollection`1 methods) +169
System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded) +173
System.Web.Compilation.BuildManager.ExecutePreAppStart() +172
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +912
[HttpException (0x80004005): 针对类型 WebActivatorEx.ActivationManager 的应用程序预启动初始化方法 Run 引发了异常，显示下列错误消息: 调用的目标发生了异常。。]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +534
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +111
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +718

System.Net.Http.dll 这个版本4.6.25220.1 以及以上版本无法使用 比兼容

System.Net.Http.dll 这个版本4.6.25220.1 以及以上版本无法使用 不兼容

与System.Net.Http.dll 这个版本4.6.25220.1及 以上版本不兼容，如果不引用会自动增加 System.Net.Http.dll 4.6.25514.4这个版本，但是在NuGet就没有4.6.25514.4这个版本号；引用了System.Net.Http.dll 这个版本4.6.25220.1及 以上版本会把项目的引用Dll变为感叹号

@ghd258 我能知道为什么把这个问题拿到这个repository吗？
@ghd258 May I know why posting this question here?

已解决

authors: ghd258 rayao seesharper

repo: aspnet/DependencyInjection


text:
Searchstring not displayed after search

With the implementation for the search textbox, after searching the search results are correctly displayed, but the search textbox is blank.  Recommend:

Add public string SearchString { get; set; } to class MovieGenreViewModel
Populate value in Index controller (movieGenreVM.SearchString = searchString;)
Change title search textbox on Index view to <input asp-for="SearchString">

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: f9b9859c-b83c-5fc3-41d5-15531232185f
Version Independent ID: 5438de31-8562-3747-d1a5-2a4622252fc1
Content: Add search to an ASP.NET Core MVC app
Content Source: aspnetcore/tutorials/first-mvc-app/search.md
Product: aspnet-core
GitHub Login: @Rick-Anderson
Microsoft Alias: riande

@aarongoldenthal  great suggestion. I'll do that next doc update.

authors: Rick-Anderson aarongoldenthal

repo: aspnet/Docs


text:
Broken code samples in introduction-to-aspnet-identity

!!!! IMPORTANT - I haven't fixed anything here. Don't merge it. This is my first PR here so I'm not sure how the code sample referencing works.
Two of the samples here are broken and not rendering on docs.microsoft.com. I've added comments in the PR to show which.
How can I fix these code samples?

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. We will now review your pull request.
Thanks,
.NET Foundation Pull Request Bot

@glcheetham  Thanks for pointing this out. If you want to fix it you'd need to

read the https://github.com/aspnet/Docs/blob/master/CONTRIBUTING.md
clone the repro
Fix the markup
Run DocFX to test
Submit a PR

You're welcome to do that, especially if you'd like to start making significant changes you can't easily do with edit in browser. I'd be happy to fix this if you'd like. Thanks for letting us know.
BTW, normally you report problems in the https://github.com/aspnet/Docs/issues tab, but in this case a PR was handy because you can easily point out the problematic markup.

@glcheetham  I'm looking at https://docs.microsoft.com/en-us/aspnet/identity/overview/getting-started/introduction-to-aspnet-identity and I don't see the problem.

authors: Rick-Anderson dnfclas glcheetham


text:
Middleware topic+sample update

Addresses #5495
Fixes #8071
Internal Review Topic
UE pass includes ...

xref API links.
Topic links updated to xref format.
Gerunds removed from section headings.
💐 Table Beautification 🌷

Samples converted to snapshots because ...

There are only a couple of examples here.
The examples are trivial.
The code hasn't changed 1.x to 2.x, nor is it likely to change going forward (e.g., 3.0).
The current samples are 🤦♂ project.json/xproj-based 🙈, and we haven't heard a peep out of the community on these samps not working. AFAICT nobody is using these trivial samples.

I don't see any changes to ASP.NET Core Middleware

authors: Rick-Anderson guardrex


text:
Be more explicit about platforms

The binary versions of DNX that we provide for RC1 and RC1 Update one
have tightly coupled dependencies with versions of the libraries that
ship in Ubuntu 14.04 and CentOS 7. Other distros (or even other versions
of CentOS and Ubuntu) are unlikely to work out of the box.
Update the wording to be a little more clear about this.

Hi @ellismg, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!
The agreement was validated by .NET Foundation and real humans are currently evaluating your PR.
TTYL, DNFBOT;

@danroth27.  A co-worker was following these instructions but picked up Ubuntu 15.10 instead of 14.04 because he believed it would be compatible with DNX.
I've clarified the documentation a little to make it clear that if you aren't using Ubuntu 14.04 or CentOS 7 things are unlikely to work.

:shipit:

@shirhatti Please merge

Merged in 343d9d7721eaafcd418fb295cb08c4afe61f0e61

authors: danroth27 dnfclas ellismg shirhatti


text:
Query: Optimize predicate on discriminator

Current visiting FromClause adds predicate on discriminator column. If WhereClause (or any other way) another predicate on discriminator column is added then we should combine them in some way to improve readability.
Can_use_is_kiwi test
Generated SQL:
SELECT [a].[Species], [a].[CountryId], [a].[Discriminator], [a].[Name], [a].[EagleId], [a].[IsFlightless], [a].[Group], [a].[FoundOn]
FROM [Animal] AS [a]
WHERE [a].[Discriminator] IN (N'Kiwi', N'Eagle') AND ([a].[Discriminator] = N'Kiwi')

This is just readability improvement. Sql Server optimize the predicate by self for perf.

@smitpatel FYI I think I've addressed this, will have to double check if everything is ok and the submit a PR for evaluation.

I have a problem building from build.cmd and everything works just fine using visual studio.
The build command output is here
Note that I didn't change anything in the project Microsoft.EntityFrameworkCore.Tools so I think I'm missing something basic. Can someone please point me to the right direction for executing all tests?
Thank you

@ilmax I haven't come across that one, but I did run into a number of other problems myself if I didn't remember to run build initialize the first time out before eventually running build.

I've run build initialize, but that didn't seems to solve the problem.
I noted also that the fix is a little bit more complicate than I initially expected because if we would like to eliminate the redundant clause always (i.e. in every possible query), I have to make a little bit more work and I'm not sure the gain is worth the effort especially because we can potentially visit a very complicate query expression so all that work can slow down the perf without generating a better performing sql.
I will try to push a PR on this to gather a little bit of feedback soon

Pretty sure I covered this in #7543

Scratch that ❌ I did not cover this

@maumar to de-dupe.

dupe of #11050

authors: ajcvickers ilmax maumar rdefreitas smitpatel tuespetre

repo: aspnet/EntityFramework


text:
Composite keys causes crash in releasemode [UWP]

Steps to reproduce
The following fluent mapping causes my UWP app to crash when in release mode and compiled with .Net Native.
modelBuilder.Entity<OrderLine>().HasKey(x => new { x.OrderGuid, x.LineNo });
The issue
Application crashes when the datacontext is configuring its model.
Works perfectly fine in debug mode.
Access violation reading location 0x00000001.

 	[External Code]
 	Microsoft.EntityFrameworkCore.dll!System.SharedTypeExtensions.GetGenericTypeImplementations(System.Type type, System.Type interfaceOrBaseType)	Unknown
 	Microsoft.EntityFrameworkCore.dll!System.SharedTypeExtensions.TryGetElementType(System.Type type, System.Type interfaceOrBaseType)	Unknown
 	Microsoft.EntityFrameworkCore.dll!System.SharedTypeExtensions.TryGetSequenceType(System.Type type)	Unknown
 	Microsoft.EntityFrameworkCore.dll!Microsoft.EntityFrameworkCore.Metadata.Internal.Navigation.IsCompatible(System.Reflection.PropertyInfo navigationProperty, System.Type sourceClrType, System.Type targetClrType, bool? shouldBeCollection, bool shouldThrow)	Unknown
 	Microsoft.EntityFrameworkCore.dll!Microsoft.EntityFrameworkCore.Metadata.Internal.InternalRelationshipBuilder.IsCompatible(System.Reflection.PropertyInfo navigationProperty, bool pointsToPrincipal, System.Type dependentType, System.Type principalType, bool shouldThrow, out bool? shouldBeUnique)	Unknown
 	Microsoft.EntityFrameworkCore.dll!Microsoft.EntityFrameworkCore.Metadata.Internal.InternalRelationshipBuilder.CanSetNavigations(Microsoft.EntityFrameworkCore.Metadata.Internal.PropertyIdentity? navigationToPrincipal, Microsoft.EntityFrameworkCore.Metadata.Internal.PropertyIdentity? navigationToDependent, Microsoft.EntityFrameworkCore.Metadata.Internal.ConfigurationSource? configurationSource, bool shouldThrow, bool overrideSameSource, out bool? shouldInvert, out bool? shouldBeUnique, out bool removeOppositeNavigation)	Unknown
 	Microsoft.EntityFrameworkCore.dll!Microsoft.EntityFrameworkCore.Metadata.Internal.InternalRelationshipBuilder.Navigations(Microsoft.EntityFrameworkCore.Metadata.Internal.PropertyIdentity? navigationToPrincipal, Microsoft.EntityFrameworkCore.Metadata.Internal.PropertyIdentity? navigationToDependent, Microsoft.EntityFrameworkCore.Metadata.Internal.ConfigurationSource? configurationSource, bool runConventions)	Unknown
 	Microsoft.EntityFrameworkCore.dll!Microsoft.EntityFrameworkCore.Metadata.Internal.InternalRelationshipBuilder.ReplaceForeignKey(Microsoft.EntityFrameworkCore.Metadata.Internal.InternalEntityTypeBuilder principalEntityTypeBuilder, Microsoft.EntityFrameworkCore.Metadata.Internal.InternalEntityTypeBuilder dependentEntityTypeBuilder, Microsoft.EntityFrameworkCore.Metadata.Internal.PropertyIdentity? navigationToPrincipal, Microsoft.EntityFrameworkCore.Metadata.Internal.PropertyIdentity? navigationToDependent, System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.Internal.Property> dependentProperties, System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.Internal.Property> principalProperties, bool? isUnique, bool? isRequired, Microsoft.EntityFrameworkCore.Metadata.DeleteBehavior? deleteBehavior, bool oldRelationshipInverted, Microsoft.EntityFrameworkCore.Metadata.Internal.ConfigurationSource? principalEndConfigurationSource, Microsoft.EntityFrameworkCore.Metadata.Internal.ConfigurationSource? configurationSource, bool runConventions)	Unknown
 	Microsoft.EntityFrameworkCore.dll!Microsoft.EntityFrameworkCore.Metadata.Internal.InternalRelationshipBuilder.ReplaceForeignKey(Microsoft.EntityFrameworkCore.Metadata.Internal.ConfigurationSource? configurationSource, Microsoft.EntityFrameworkCore.Metadata.Internal.InternalEntityTypeBuilder principalEntityTypeBuilder, Microsoft.EntityFrameworkCore.Metadata.Internal.InternalEntityTypeBuilder dependentEntityTypeBuilder, Microsoft.EntityFrameworkCore.Metadata.Internal.PropertyIdentity? navigationToPrincipal, Microsoft.EntityFrameworkCore.Metadata.Internal.PropertyIdentity? navigationToDependent, System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.Internal.Property> dependentProperties, System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.Internal.Property> principalProperties, bool? isUnique, bool? isRequired, Microsoft.EntityFrameworkCore.Metadata.DeleteBehavior? deleteBehavior, Microsoft.EntityFrameworkCore.Metadata.Internal.ConfigurationSource? principalEndConfigurationSource, bool oldRelationshipInverted, bool runConventions)	Unknown
 	Microsoft.EntityFrameworkCore.dll!Microsoft.EntityFrameworkCore.Metadata.Internal.InternalRelationshipBuilder.Navigations(Microsoft.EntityFrameworkCore.Metadata.Internal.PropertyIdentity? navigationToPrincipal, Microsoft.EntityFrameworkCore.Metadata.Internal.PropertyIdentity? navigationToDependent, Microsoft.EntityFrameworkCore.Metadata.Internal.ConfigurationSource? configurationSource, bool runConventions)	Unknown
 	Microsoft.EntityFrameworkCore.dll!Microsoft.EntityFrameworkCore.Metadata.Internal.InternalRelationshipBuilder.Navigations(Microsoft.EntityFrameworkCore.Metadata.Internal.PropertyIdentity? navigationToPrincipal, Microsoft.EntityFrameworkCore.Metadata.Internal.PropertyIdentity? navigationToDependent, Microsoft.EntityFrameworkCore.Metadata.Internal.ConfigurationSource? configurationSource)	Unknown
 	Microsoft.EntityFrameworkCore.dll!Microsoft.EntityFrameworkCore.Metadata.Internal.InternalRelationshipBuilder.DependentToPrincipal(System.Reflection.PropertyInfo property, Microsoft.EntityFrameworkCore.Metadata.Internal.ConfigurationSource configurationSource)	Unknown
 	Microsoft.EntityFrameworkCore.dll!Microsoft.EntityFrameworkCore.Metadata.Builders.CollectionNavigationBuilder.WithOneBuilder(Microsoft.EntityFrameworkCore.Metadata.Internal.PropertyIdentity reference)	Unknown
 	Microsoft.EntityFrameworkCore.dll!Microsoft.EntityFrameworkCore.Metadata.Builders.CollectionNavigationBuilder<object,object>.WithOne(System.Linq.Expressions.Expression<System.Func<object,object>> navigationExpression)	Unknown
>	Future.Clients.Universal.Core.dll!Future.Clients.Universal.Services.Core.Data.OnFieldContext.ConfigureOrders(Microsoft.EntityFrameworkCore.ModelBuilder modelBuilder) Line 338	C#
 	Future.Clients.Universal.Core.dll!Future.Clients.Universal.Services.Core.Data.OnFieldContext.OnModelCreating(Microsoft.EntityFrameworkCore.ModelBuilder modelBuilder) Line 112	C#
 	[External Code]
 	Future.Clients.Universal.Core.dll!Future.Clients.Universal.Services.Core.Data.SqliteDataService.InitializeAsync() Line 66	C#
 	[Resuming Async Method]
 	[External Code]

Further technical details
Installed packages:
Microsoft.Data.Sqlite 1.0.0
Microsoft.EntityFrameworkCore.Sqlite 1.0.0
Microsoft.NETCore.UniversalWindowsPlatform 5.2.0
UWP Tools : 1.4
Visual Studio 2015 Update 3
Operating system: Windows 10 14383

I could not reproduce just using composite keys.
The stack trace shows the bug is comming from a ".WithOne" call inside your method Future.Clients.Universal.Services.Core.Data.OnFieldContext.ConfigureOrders. Can you share more of your code or share a standalone, minimal repro project?

@natemcmaster Making a repro was harder than I thought, but I'll hope to have it done today.
Sure the trace says the bug is coming from .WithOne but Visual Studio breaks on the next line after the .WithOne call, could just be VS playing me tricks however.

could just be VS playing me tricks however.

The debugger for .NET Native is known to mess up lines when "Optimize code" is turned on.
I'm going to close for now but I can reopen for more investigation once we have a repro.

Finally managed to make copy of the project with as little "noise" I could get rid off...
To reproduce the issue please run it in Release mode on ARM.
efrepro.zip

Reopening.
@ViktorBergman no error on .NET Native x86. I don't have an ARM device. Does the error only occur on ARM? If so, the .NET Native team is currently investigating issues that are ARM-only. See https://github.com/aspnet/EntityFramework/issues/6183#issuecomment-237594868
cc @MattWhilden

Thanks for taking the time to cut this down. I'll find a phone and pull this down later today but if you have it handy, does this still reproduce if you uncheck "optimize code" in the build properties for RELEASE+ARM?

@MattWhilden Works just fine without the "Optimize code" (But I guess I would want to have that enabled?). Also tried DEBUG+"Net Native"+"Optimize code" and the issue still occurs with same exception.

Thanks for running that experiment. With that knowledge, it's VERY likely to be an issues inside of or optimizer. We're currently investigating a few other reports of similar issues on ARM devices. I'll add this case to that list.
You can work around this issue by disabling the optimizer pass for chunks of your code until the issue disappears. This is accomplished by adding some directives to a file in your project at Properties\Default.rd.xml. A typical directive is something like:
<Assembly Name="SomeAssemblyNameWithoutExtension" DoNotOptimize="true" DoNotInline="true" />
You can see me recommending something similar here: https://github.com/Azure/azure-mobile-services/issues/890#issuecomment-230610187. This kind of directive can be scoped all the way down to the exact type that is causing the issue but it's effectively a binary search which can be somewhat painful. Most folks are able to disable optimizations at the assembly/namespace level and still get the performance their app needs.
If you do end up heading down that path, please let me know what directives ended up working out. I'll keep you posted similarly.

This issue has been reported multiple times to EF. Although you were the first to report, I've opened https://github.com/aspnet/EntityFramework/issues/6253 to consolidate the tracking the issue. I'm closing this as a duplicate for now, but feel free to continue discussion of issues specific to your app.

Well adding the directive to my production app did not help so I am once again back at square one. I even added DoNotOptimize for all internal referenced projects for the app.

Most unfortunate. One last stab in the dark to get you on your feet. Adjust your Default.rd.xml file to have this directive:
<Assembly Name="*Application*" Dynamic="Required All" DoNotOptimize="true" DoNotInline="true"/>
If that still doesn't work, please send me a mail at dotnetnative@microsoft.com. The optimizer folks aren't all of GitHub so that's the fastest way to get a bunch of eyes on this. It's most helpful if you can send along an ilcRepro file as per:
https://github.com/dotnet/core/blob/master/Documentation/ilcRepro.md

@MattWhilden That directive works but isn't that essentially the same as unchecking "Optimize code" in the project properties?

It's almost the same. It will instruct the compiler to disable optimization on all code that isn't specifically part of the .NET Framework (signed by our key, on a special list etc). So all of your code, nuget libs etc will avoid any issues there but you'll still get optimizations for the Framework.
Perhaps more importantly, that file will flow with you application when it is submitted to the Windows Store, there's not another good way to disable opts for your application as it comes through that pipeline.
All that said, it's quite broad and only meant to get you back on your feet while we chase down the actual issue. I admit I've lost track of exactly where we're at with you specific repro... Have you been able to send us an ilcRepro pack? https://github.com/dotnet/core/blob/master/Documentation/ilcRepro.md

Sorry it's take a while. These kinds of issues are rather difficult to track down. So the crash you see is caused when the .NET garbage collector is attempting to do a full scan of all the objects in the heap. It's trying to chase what it thinks is a pointer to other object on the heap but it's actually just a null.
Good news: I've narrowed this down to a chunk of bad code gen for Nullable<Ms.Ef.Metadata.Internal.PropertyIdentity>.get_Value.
Bad news: There currently isn't a good way to disable optimizations for just this method. We'll have to disable opts for all Nullables... hopefully that's not a disaster... if it is we'll have to come up with something else but it will greatly depend on your feedback. Please do let us know.
New workaround instructions
Because nullable lives in a special chunk of the framework we need to disable the use of SharedLibrary by adding this to your csproj:
<UseDotNetNativeSharedAssemblyFrameworkPackage>false</UseDotNetNativeSharedAssemblyFrameworkPackage>
Then add this to your Properties\Defaul.rd.xml:
<Type Name="System.Nullable{T}" DoNotInline="true" DoNotOptimize="true"/>

@MattWhilden : Too bad this directive directly conflicts with another .NET native bug that comes up in Automapper in IEnumerable:
https://github.com/AutoMapper/AutoMapper/issues/1633
Any hints on how to proceed?

@jspuij Dont use AutoMapper ? :smile:

@ErikEJ That would be an option too. However writing thousands of lines of boilerplate code because of .NET native issues does not seem like a very attractive proposition. I'm going to try and add some runtime directives to my app for IEnumerable because it looks like automapper reflects on the "Current" Property of IEnumerable and it does not seem to be available when <UseDotNetNativeSharedAssemblyFrameworkPackage>false</UseDotNetNativeSharedAssemblyFrameworkPackage>
is added to the project file.

Oh goodness. I hadn't seen AutoMapper/AutoMapper#1633. There should be a set of directives that force the compiler into doing the right thing here. I'm happy to fight with it if someone has a repro case they can share.
Presumably it's just: Add automapper to the blank template, remove shared library, call this that and the other apis, hit failure at runtime?

@MattWhilden I've sent you an email with a link to the ilrepro and a sample project that triggers the issue described in 1633.

Thanks. I'll take a look today. Really appreciate you taking the time to send it in.

Likewise, thank you for devoting some time to it.

authors: ErikEJ MattWhilden ViktorBergman jspuij natemcmaster


text:
Fix to #1251 - join + orderby + count produces invalid sql

Problem was that we would procude queries like:
SELECT COUNT(*)
FROM [Customer] AS [c]
ORDER BY [c].[Id]
which were invalid, because column on which you order should be projected, and we project COUNT(*) instead. However, ordering is redundant when querying for count and could be removed.
Fix is to remove any orderings when querying for count, just like we already do for some other result operators (e.g. Any)

@anpete

:shipit:

authors: anpete maumar