Skip to content
This repository has been archived by the owner on Sep 21, 2024. It is now read-only.

Ambrosia RegisterInstance catches exceptions and returns without error code #4

Open
rrnewton opened this issue Dec 7, 2018 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@rrnewton
Copy link
Contributor

rrnewton commented Dec 7, 2018

This is me running a script locally on WSL under Windows:

[rrnewton@t-rynewt-Z4 ~/work/AMBROSIA/InternalImmortals/NativeService (ryan/temp)]
$ ./run_test_in_one_container.sh
Using AZURE_STORAGE_CONN_STRING = DefaultEndpointsProtocol=xxxxxxxx
+ PORT1=50001
+ PORT2=50002
+ PORT3=50003
+ PORT4=50004
+ CLIENTNAME=native1
+ SERVERNAME=native2
+ Ambrosia RegisterInstance -i native1 --rp 50001 --sp 50002 -l /ambrosia_logs/
Error trying to upload service. Exception: Method not found: 'Remote.Linq.Expressions.Expression Remote.Linq.ExpressionTranslator.ToRemoteLinqExpression(System.Linq.Expressions.Expression, Aqua.TypeSystem.ITypeInfoProvider, System.Func`2<System.Linq.Expressions.Expression,Boolean>)'.
+ Ambrosia RegisterInstance -i native2 --rp 50003 --sp 50004 -l /ambrosia_logs/
Error trying to upload service. Exception: Method not found: 'Remote.Linq.Expressions.Expression Remote.Linq.ExpressionTranslator.ToRemoteLinqExpression(System.Linq.Expressions.Expression, Aqua.TypeSystem.ITypeInfoProvider, System.Func`2<System.Linq.Expressions.Expression,Boolean>)'.
+ AMBROSIA_INSTANCE_NAME=native1
+ AMBROSIA_IMMORTALCOORDINATOR_PORT=1500
+ runAmbrosiaService.sh ./service_v4.exe 0 native2 50001 50002 24 1 20

I have installed the dotnet CLI in this Linux environment, and I have built the AMBROSIA binary distribution in that same environment (dotnet publish). And nevertheless the above "Method not found" error occurs at runtime.

The second problem is that the error is non-fatal. Ambrosia RegisterInstance hits the exception but then the process returns 0 so that the calling script keeps going, when it shouldn't!

System Info

$ dotnet --version
2.1.403
$ bash --version
GNU bash, version 4.4.19(1)-release (x86_64-pc-linux-gnu)
...
$ uname -a
Linux t-rynewt-Z4 4.4.0-17763-Microsoft #55-Microsoft Sat Oct 06 18:05:00 PST 2018 x86_64 x86_64 x86_64 GNU/Linux

To Reproduce

git clone [email protected]:Microsoft/AMBROSIA.git
cd AMBROSIA
git checkout 821ae2b3dba78714de5d9e9f8d4b16b1ba717b78
./build_dotnetcore_bindist.sh
export PATH=$PATH:`pwd`/bin
cd InternalImmortals/NativeService
make
./run_test_in_one_container.sh
@rrnewton rrnewton added the bug Something isn't working label Dec 7, 2018
@rrnewton rrnewton changed the title RegisterInstance produces errors and then incorrectly returns 0 error code RegisterInstance produces errors missing method errors and then incorrectly returns 0 error code Dec 7, 2018
@rrnewton rrnewton added the linux label Dec 7, 2018
@rrnewton rrnewton changed the title RegisterInstance produces errors missing method errors and then incorrectly returns 0 error code RegisterInstance produces "missing method" error and then incorrectly returns 0 error code Dec 7, 2018
@rrnewton
Copy link
Contributor Author

rrnewton commented Dec 9, 2018

This was related to the underlying problem of collisions between the output of different "dotnet publish" calls, resulting in incorrect versions of shared libraries from the perspective of the executables like Ambrosia. (Specifically the downstream UnsafeDeregisterInstance build was clobbering Remote.Linq.dll, resulting in the above error.)

It is fixed on Mac OS and Linux currently.

@rrnewton rrnewton removed the linux label Dec 9, 2018
@rrnewton rrnewton changed the title RegisterInstance produces "missing method" error and then incorrectly returns 0 error code Ambrosia RegisterInstance catches exceptions and returns without error code Dec 10, 2018
@rrnewton
Copy link
Contributor Author

Changing the name of this issue to reflect what is still a problem. The cause of that exception is gone, but it is still the case that when RegisterInstance got an exception, it returned with exit code 0, which is wrong.

Throwing this your way @TalZaccai because I think it's part of the new "Ambrosia" multi-verb CLI that you put together.

@darrenge darrenge assigned jongoldDB and unassigned TalZaccai Mar 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants