Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NativeAOT] ObjectWriter for MacOS should be built and published from the Main branch #87644

Closed
VSadov opened this issue Jun 15, 2023 · 11 comments

Comments

@VSadov
Copy link
Member

VSadov commented Jun 15, 2023

While working on adding TLS support it was discovered that we may be omitting building/publishing ObjectWriter for MacOS.
The libobjwriter.dylib in the nuget that is used by the runtime build is old - from February 6.
That is before merging ObjectWriter into dotnet/llvm-project/main

Also there could be that we accumulated a few issues/bugs in the main branch as a part of the merge or since then.
The binary that is built from main causes dsymutil to OOM which breaks the smoketests build. There are also warnings like:

EXEC : warning : DWARF unit from offset 0x00000000 incl. to offset 0x00133e38 excl. tries to read DIEs at offset 0x00133e38 [/Users/vs/aot01/runtime/src/tests/nativeaot/SmokeTests/UnitTests/UnitTests.csproj] [/Users/vs/aot01/runtime/src/tests/build.proj]
EXEC : warning : DWARF unit from offset 0x00000000 incl. to offset 0x001ce1c2 excl. tries to read DIEs at offset 0x001ce1c2 [/Users/vs/aot01/runtime/src/tests/nativeaot/SmokeTests/Reflection/Reflection_FromUsage.csproj] [/Users/vs/aot01/runtime/src/tests/build.proj]
EXEC : warning : DWARF unit from offset 0x00000000 incl. to offset 0x00129592 excl. tries to read DIEs at offset 0x00129592 [/Users/vs/aot01/runtime/src/tests/nativeaot/SmokeTests/Reflection/Reflection.csproj] [/Users/vs/aot01/runtime/src/tests/build.proj]

This might be happening only on some scenarios and hopefully due to some simple issue, but it prevents using Main branch for further development/testing on MacOS.

Re: dotnet/llvm-project#425

@ghost ghost added the untriaged New issue has not been triaged by the area owner label Jun 15, 2023
@ghost
Copy link

ghost commented Jun 15, 2023

Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas
See info in area-owners.md if you want to be subscribed.

Issue Details

While working on adding TLS support it was discovered that we may be omitting building/publishing ObjectWriter for MacOS.
The libobjwriter.dylib in the nuget that is used by the runtime build is old - from February 6.
That is before merging ObjectWriter into dotnet/llvm-project/main

Also there could be that we accumulated a few issues/bugs in the main branch as a part of the merge or since then.
The binary that is built from main causes dsymutil to OOM which breaks the smoketests build. There are also warnings like:

EXEC : warning : DWARF unit from offset 0x00000000 incl. to offset 0x00133e38 excl. tries to read DIEs at offset 0x00133e38 [/Users/vs/aot01/runtime/src/tests/nativeaot/SmokeTests/UnitTests/UnitTests.csproj] [/Users/vs/aot01/runtime/src/tests/build.proj]
EXEC : warning : DWARF unit from offset 0x00000000 incl. to offset 0x001ce1c2 excl. tries to read DIEs at offset 0x001ce1c2 [/Users/vs/aot01/runtime/src/tests/nativeaot/SmokeTests/Reflection/Reflection_FromUsage.csproj] [/Users/vs/aot01/runtime/src/tests/build.proj]
EXEC : warning : DWARF unit from offset 0x00000000 incl. to offset 0x00129592 excl. tries to read DIEs at offset 0x00129592 [/Users/vs/aot01/runtime/src/tests/nativeaot/SmokeTests/Reflection/Reflection.csproj] [/Users/vs/aot01/runtime/src/tests/build.proj]

This might be happening only on some scenarios and hopefully due to some simple issue, but it prevents using Main branch for further development/testing on MacOS.

Re: dotnet/llvm-project#425

Author: VSadov
Assignees: -
Labels:

area-NativeAOT-coreclr

Milestone: -

@filipnavara
Copy link
Member

I plan to look into it.

@filipnavara
Copy link
Member

filipnavara commented Jun 16, 2023

I can reproduce it. The DWARF info in the .o file has unbalanced nesting and ends with missing NULL terminator.

@filipnavara
Copy link
Member

The unbalanced nesting happens here:

-0x00001e06:   DW_TAG_enumeration_type
-                DW_AT_name	("Reflection_ReflectionTest_TestAttributeExpressions_MyEnum")
-                DW_AT_type	(0x000000c0 "int")
-                DW_AT_byte_size	(0x04)
-
-0x00001e10:     NULL
+0x00001e01:   DW_TAG_enumeration_type
+                DW_AT_name	("Reflection_ReflectionTest_TestAttributeExpressions_MyEnum")
+                DW_AT_type	(0x000000bb "int")
+                DW_AT_byte_size	(0x04)

@filipnavara
Copy link
Member

I submitted the ObjWriter fix. Someone else will have to fix up DARC once that is merged.

@VSadov
Copy link
Member Author

VSadov commented Jun 19, 2023

I just want to confirm the ObjWriter fix. I am able to build it on MacOS and then build/run tests with that ObjWriter.

@directhex
Copy link
Contributor

@filipnavara you're a hero. This has been a problem for me.

@filipnavara
Copy link
Member

Happy to help! Are you going to take care of the DARC changes as part of the LLVM 16 retargeting? Should I open PR against the LLVM 16 branch as well?

@directhex
Copy link
Contributor

Yeah, I already made the DARC changes in my LLVM 16 branch, hence running into this

@marek-safar marek-safar added this to the 8.0.0 milestone Jun 20, 2023
@ghost ghost removed the untriaged New issue has not been triaged by the area owner label Jun 20, 2023
@agocke agocke added this to AppModel Jun 21, 2023
@akoeplinger
Copy link
Member

We might want to make the DARC changes separately so we don't depend on the LLVM 16 work in case that one gets delayed.

@agocke
Copy link
Member

agocke commented Jul 10, 2023

This should be done.

@agocke agocke closed this as completed Jul 10, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Aug 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Archived in project
Development

No branches or pull requests

6 participants