Skip to content

Fix debugpy apiscan errors #1547

Closed

Description

This tracks the private bugs at https://devdiv.visualstudio.com/DevDiv/_queries/query/?tempQueryId=5fd51e20-b632-4e73-bd76-d79663947d27

ApiScan is showing invalid executable errors on some debugpy binaries. I enabled verbose logging and the errors say that symbols can't be found, but the pdbs are right next to the dlls. When I run symchk locally, it finds symbols just fine. So I've reached out to the ApiScan PM group for assistance because I'm not sure why it's failing.

Activity

  1. AdamYoblick commented on Apr 17, 2024

    @AdamYoblick
    ContributorAuthor

    I added the following argument to the APIScan call:

    symbolsFolder: $(Build.SourcesDirectory)\debugpy\src\debugpy\_vendored\pydevd\pydevd_attach_to_process

    And we got past the "did not find symbols file" errors.

    We have two new errors now:

    2024-04-16 21:23:45.779Z,Dependencies1,ERROR,Run,MpdReader,MpdReaderBadImageMessage,2406574,MpdReader,35d08315-5513-47f8-a7e2-67217599d95c,,,d:\a\_work\1\.gdn\.r\apiscan\001\logs\api0000_debugpy_20240_9427092\temp\x\]5\inject_dll_x86.exe,,,,,,,,,,The executable image d:\a\_work\1\.gdn\.r\apiscan\001\logs\api0000_debugpy_20240_9427092\temp\x\]5\inject_dll_x86.exe or its symbol file is incorrect.
    ENDMESSAGE
    2024-04-16 21:23:45.811Z,Dependencies0,ERROR,Run,MpdReader,MpdReaderBadImageMessage,2406574,MpdReader,0d16d5b5-6cdd-4e0f-b70d-e7d72d48d65b,,,d:\a\_work\1\.gdn\.r\apiscan\001\logs\api0000_debugpy_20240_9427092\temp\x\]5\inject_dll_amd64.exe,,,,,,,,,,The executable image d:\a\_work\1\.gdn\.r\apiscan\001\logs\api0000_debugpy_20240_9427092\temp\x\]5\inject_dll_amd64.exe or its symbol file is incorrect.
    ENDMESSAGE
    

    These are because we don't have all the required linker flags for these binaries that allow apiscan to analyze them. I'm adding the /PROFILE flag and working on rebuilding these.

  2. AdamYoblick commented on Apr 19, 2024

    @AdamYoblick
    ContributorAuthor

    This was closed prematurely. The PR to recompile these binaries with the /PROFILE flag is merged. Now I need to run the debugpy compliance pipeline to make sure apiscan gets past these errors.

  3. AdamYoblick commented on Apr 19, 2024

    @AdamYoblick
    ContributorAuthor

    Most recent compliance run is at https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=9449788&view=results.

    Good news: We have gotten past all the missing symbol and invalid binary errors.
    Bad news: We have real errors now.

    Looking at the summary in the pipeline artifacts, we have 3 unpublished dependencies and 64 duplicate function names defined. I've attached the csv files for more details.
    Duplicate Function Names Defined.csv
    Unpublished Dependency.csv

    We don't need to fix these now, we can fix them with the devdiv bugs come in. But at least we're getting actual results now. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions