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

Interop\StringMarshalling\UTF8\UTF8Test failing in outerloop #69349

Closed
jakobbotsch opened this issue May 14, 2022 · 3 comments · Fixed by #69360
Closed

Interop\StringMarshalling\UTF8\UTF8Test failing in outerloop #69349

jakobbotsch opened this issue May 14, 2022 · 3 comments · Fixed by #69360
Labels
Milestone

Comments

@jakobbotsch
Copy link
Member

Pipeline run: https://dev.azure.com/dnceng/public/_build/results?buildId=1771054
Example failure:

  Starting:    Interop.StringMarshalling.XUnitWrapper (parallel test collections = on, max threads = 2)
    Interop/StringMarshalling/UTF8/UTF8Test/UTF8Test.sh [FAIL]
      free(): invalid pointer
      /datadisks/disk1/work/B90F09CF/w/B12609F6/e/Interop/StringMarshalling/UTF8/UTF8Test/UTF8Test.sh: line 382:  8806 Aborted                 (core dumped) $LAUNCHER $ExePath "${CLRTestExecutionArguments[@]}"
      
      Return code:      1
      Raw output file:      /datadisks/disk1/work/B90F09CF/w/B12609F6/uploads/Reports/Interop.StringMarshalling/UTF8/UTF8Test/UTF8Test.output.txt
      Raw output:
      BEGIN EXECUTION
      /datadisks/disk1/work/B90F09CF/p/corerun -p System.Reflection.Metadata.MetadataUpdater.IsSupported=false UTF8Test.dll ''
      [createdump] Gathering state for process 8806 corerun
      [createdump] Crashing thread 00002266 signal 00000006
      [createdump] Writing minidump with heap to file /home/helixbot/dotnetbuild/dumps/coredump.8806.dmp
      [createdump] Written 129400832 bytes (31592 pages) to core file
      [createdump] Dump successfully written
      Expected: 100
      Actual: 134
      END EXECUTION - FAILED
      Test Harness Exitcode is : 1
      To run the test:
      > set CORE_ROOT=/datadisks/disk1/work/B90F09CF/p
      > /datadisks/disk1/work/B90F09CF/w/B12609F6/e/Interop/StringMarshalling/UTF8/UTF8Test/UTF8Test.sh
      Expected: True
      Actual:   False
      Stack Trace:
           at Interop_StringMarshalling._UTF8_UTF8Test_UTF8Test_._UTF8_UTF8Test_UTF8Test_sh()
@ghost ghost added the untriaged New issue has not been triaged by the area owner label May 14, 2022
@jakobbotsch jakobbotsch added the blocking-clean-ci-optional Blocking optional rolling runs label May 14, 2022
@AaronRobinsonMSFT AaronRobinsonMSFT added area-System.Runtime.InteropServices source-generator Indicates an issue with a source generator feature and removed area-Interop-coreclr labels May 14, 2022
@ghost
Copy link

ghost commented May 14, 2022

Tagging subscribers to this area: @dotnet/interop-contrib
See info in area-owners.md if you want to be subscribed.

Issue Details

Pipeline run: https://dev.azure.com/dnceng/public/_build/results?buildId=1771054
Example failure:

  Starting:    Interop.StringMarshalling.XUnitWrapper (parallel test collections = on, max threads = 2)
    Interop/StringMarshalling/UTF8/UTF8Test/UTF8Test.sh [FAIL]
      free(): invalid pointer
      /datadisks/disk1/work/B90F09CF/w/B12609F6/e/Interop/StringMarshalling/UTF8/UTF8Test/UTF8Test.sh: line 382:  8806 Aborted                 (core dumped) $LAUNCHER $ExePath "${CLRTestExecutionArguments[@]}"
      
      Return code:      1
      Raw output file:      /datadisks/disk1/work/B90F09CF/w/B12609F6/uploads/Reports/Interop.StringMarshalling/UTF8/UTF8Test/UTF8Test.output.txt
      Raw output:
      BEGIN EXECUTION
      /datadisks/disk1/work/B90F09CF/p/corerun -p System.Reflection.Metadata.MetadataUpdater.IsSupported=false UTF8Test.dll ''
      [createdump] Gathering state for process 8806 corerun
      [createdump] Crashing thread 00002266 signal 00000006
      [createdump] Writing minidump with heap to file /home/helixbot/dotnetbuild/dumps/coredump.8806.dmp
      [createdump] Written 129400832 bytes (31592 pages) to core file
      [createdump] Dump successfully written
      Expected: 100
      Actual: 134
      END EXECUTION - FAILED
      Test Harness Exitcode is : 1
      To run the test:
      > set CORE_ROOT=/datadisks/disk1/work/B90F09CF/p
      > /datadisks/disk1/work/B90F09CF/w/B12609F6/e/Interop/StringMarshalling/UTF8/UTF8Test/UTF8Test.sh
      Expected: True
      Actual:   False
      Stack Trace:
           at Interop_StringMarshalling._UTF8_UTF8Test_UTF8Test_._UTF8_UTF8Test_UTF8Test_sh()
Author: jakobbotsch
Assignees: -
Labels:

area-System.Runtime.InteropServices, untriaged, blocking-clean-ci-optional, source-generator

Milestone: -

@AaronRobinsonMSFT AaronRobinsonMSFT added this to the 7.0.0 milestone May 14, 2022
@ghost ghost removed the untriaged New issue has not been triaged by the area owner label May 14, 2022
@AaronRobinsonMSFT AaronRobinsonMSFT removed the source-generator Indicates an issue with a source generator feature label May 14, 2022
@AaronRobinsonMSFT
Copy link
Member

@jkotas Seems like #69043 might have caused a regression.

@jkotas
Copy link
Member

jkotas commented May 14, 2022

I will take a look

jkotas added a commit to jkotas/runtime that referenced this issue May 14, 2022
We need to compensate for the differences in lifetime management patterns used by built-in marshalling system vs. the publicly explosed marshallers.

Fixes dotnet#69349
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label May 14, 2022
jkotas added a commit that referenced this issue May 15, 2022
* Fix UTF8 string marshalling regression

We need to compensate for the differences in lifetime management patterns used by built-in marshalling system vs. the publicly explosed marshallers.

Fixes #69349

* Call Marshal.FreeCoTaskMem in the AOT compiler built-in marshalling

* Use Marshal.StringToCoTaskMemUni in Utf16StringMarshaller implementation
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label May 15, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Jun 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants