Skip to content

Malformed PDB file for a few runtime tests on Mono AOT after ilasm bump #46124

Closed

Description

@akoeplinger

After the ilasm bump in #45387 a few runtime tests abort on Mono when AOTing with the following message:

 Mono Ahead of Time compiler - compiling assembly /__w/1/s/artifacts/tests/coreclr/Linux.x64.Release/JIT/Generics/ConstrainedCall/vt2_il_r/vt2_il_r.dll
  AOTID 09753CD7-3621-A83E-77F7-915CEF440934
  Method idx 10 is greater than number of rows (10) in PPDB MethodDebugInformation table, for method test:.ctor in '/__w/1/s/artifacts/tests/coreclr/Linux.x64.Release/JIT/Generics/ConstrainedCall/vt2_il_r/vt2_il_r.pdb'. Likely a malformed PDB file.

Affected tests:

JIT/Generics/ConstrainedCall/vt2_il_r/vt2_il_r.dll
JIT/Generics/ConstrainedCall/vt2_il_d/vt2_il_d.dll
JIT/Methodical/Boxing/callconv/_dbginstance_il/_dbginstance_il.dll
JIT/Methodical/Boxing/callconv/_relinstance_il/_relinstance_il.dll
JIT/Methodical/casts/iface/_il_reliface2/_il_reliface2.dll
JIT/Methodical/casts/iface/_il_dbgiface2/_il_dbgiface2.dll
JIT/Methodical/nonvirtualcall/tailcall_r/tailcall_r.dll
JIT/Methodical/nonvirtualcall/tailcall_d/tailcall_d.dll
JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b415164/b415164/b415164.dll
Loader/classloader/MethodImpl/generics_override1/generics_override1.dll

@jkotas would you mind checking whether these PDBs are really malformed or if it is a mono issue?

Activity

  1. Dotnet-GitSync-Bot commented on Dec 16, 2020

    @Dotnet-GitSync-Bot
    Collaborator

    I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

  2. added
    untriaged
    on Dec 16, 2020
  3. jkotas commented on Dec 16, 2020

    @jkotas
    Member

    Yes, these PDBs are corrupted.

    I have used the Pdb2Xml tool from https://github.com/dotnet/symreader-converter to verify it.

    For example, the dump for vt2 test above includes:

        <method containingType="test" name="Main">
          <sequencePoints>
            <entry offset="0x0" startLine="282" startColumn="1" endLine="282" endColumn="2" document="1" />
            <entry offset="0x1" startLine="283" startColumn="1" endLine="283" endColumn="2" document="1" />
            <entry offset="0x6" startLine="284" startColumn="1" endLine="284" endColumn="2" document="1" />
          </sequencePoints>
          <scope startOffset="0x0" endOffset="0xda">
            <local name="V_0" il_index="0" il_start="0x0" il_end="0xda" attributes="0" />
            <local name="V_1" il_index="1" il_start="0x0" il_end="0xda" attributes="0" />
            <local name="V_2" il_index="2" il_start="0x0" il_end="0xda" attributes="0" />
          </scope>
        </method>
    

    However, the Main method is not at lines 282-284 in the sources. The actual method at lines 282-284 in the sources is test::.ctor.

  4. jkotas commented on Dec 16, 2020

    @jkotas
    Member

    @ivanpovazan Are you interested in this bug?

  5. ivanpovazan commented on Dec 17, 2020

    @ivanpovazan
    Member

    @jkotas Sure, I can take a look later today

  6. ghost added
    in-pr
    on Dec 19, 2020
  7. ghost removed
    in-pr
    on Dec 20, 2020
  8. jkotas commented on Dec 20, 2020

    @jkotas
    Member

    Keeping this open to re-enable disabled test once the ilasm is updated in the toolset.

  9. 1 remaining item

  10. reopened this on Dec 20, 2020
  11. added
    disabled-test
    on Dec 20, 2020
  12. ghost removed
    in-pr
    on Dec 20, 2020
  13. ghost added
    in-pr
    on Dec 20, 2020
  14. jkotas commented on Dec 20, 2020

    @jkotas
    Member

    @ivanpovazan Unfortunately, the fix does not seem to be complete. Would you mind taking another look?

    Here is how you can reproduce the problem (substitute ... with paths on your system):

    git clone https://github.com/dotnet/symreader-converter
    cd  symreader-converter
    rem This will build pdb2xml tool used below
    build.cmd
    
    rem run this in dotnet/runtime clone
    cd src\tests\JIT\Generics\ConstrainedCall
    ...\ilasm /DEBUG vt2.il
    ...\symreader-converter\artifacts\bin\Pdb2Xml\Debug\net472\Pdb2Xml.exe vt2.exe
    

    The Pdb2Xml.exe tool will fail with Invalid compressed integer. error. The problem happens at this callstack:

    System_Reflection_Metadata!System.Reflection.Throw.InvalidCompressedInteger()+0x48 [/_/src/libraries/System.Reflection.Metadata/src/System/Reflection/Throw.cs @ 222] 
    System_Reflection_Metadata!System.Reflection.Metadata.BlobReader.ReadCompressedInteger()+0x19 [/_/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/BlobReader.cs @ 484] 
    System_Reflection_Metadata!System.Reflection.Metadata.SequencePointCollection+Enumerator.MoveNext()+0x70 [/_/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/PortablePdb/SequencePointCollection.cs @ 60] 
    
  15. ivanpovazan commented on Dec 20, 2020

    @ivanpovazan
    Member

    @jkotas ah too bad.. I will take a look tomorrow.
    Thanks for the explanation of how to reproduce the problem.

  16. ghost removed
    in-pr
    on Dec 20, 2020
  17. reopened this on Dec 20, 2020
  18. ghost added
    in-pr
    on Dec 21, 2020
  19. ghost removed
    in-pr
    on Dec 21, 2020
  20. ghost locked as resolved and limited conversation to collaborators on Jan 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-ILTools-coreclrdisabled-testuntriaged

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions