Skip to content

[wasm] gpath.c:115: assertion 'filename != NULL' failed #60392

Closed

Description

@pavelsavara

Description

Assertion failure during System.Net.Http.Functional.Tests unit test execution.

"most likely it's trying to build a path from an assembly location (which is null in single-file apps). but there are a bunch of places where it would do that."

Reproduction Steps

dotnet.cmd build /p:TargetOS=Browser /p:TargetArchitecture=wasm /p:Configuration=Debug /t:Test src/libraries/System.Net.Http/tests/FunctionalTests

Expected behavior

No assert

Actual behavior

fail: C:/Dev/runtime/src/mono/mono/eglib/gpath.c:115: assertion 'filename != NULL' in the console log

Regression?

No response

Known Workarounds

No response

Configuration

Debug, wasm, chrome

Other information

No response

Activity

  1. added
    arch-wasm
    on Oct 14, 2021
  2. added this to the 7.0.0 milestone on Oct 14, 2021
  3. ghost added
    untriaged
    on Oct 14, 2021
  4. removed
    untriaged
    on Oct 14, 2021
  5. lambdageek commented on Oct 14, 2021

    @lambdageek
    Member

    First step would be to get a stack trace. It might also be helpful to run with MONO_LOG_LEVEL=debug, MONO_LOG_MASK=all and check if anything useful gets dumped to the console log

  6. lambdageek commented on Oct 14, 2021

    @lambdageek
    Member

    @pavelsavara does the app actually fail after printing that?
    It's coming from g_return_val_if_fail (filename != NULL, NULL);
    which is a macro like this:

    #define g_return_val_if_fail(x,e)  G_STMT_START { if (!(x)) { g_critical ("%s:%d: assertion '%s' failed\n", __FILE__, __LINE__, #x); return (e); } } G_STMT_END
    

    is g_critical fatal on WebAssembly? Or does it just print a scary message to the console and then keep running?

  7. lambdageek commented on Oct 14, 2021

    @lambdageek
    Member

    I guess what might be happening is that the g_return_val_if_failed is making some real issue. ie: someone calls g_path_get_dirname and passes in null, then the function prints that message and returns null. and then that null causes a problem down the line. So there's no stack trace from the "assertion" message because it's not fatal.

  8. pavelsavara commented on Oct 15, 2021

    @pavelsavara
    MemberAuthor

    is g_critical fatal on WebAssembly? Or does it just print a scary message to the console and then keep running?

    Keeps running. I didn't see any consequences of it.

  9. lambdageek commented on Oct 18, 2021

    @lambdageek
    Member

    Ok, in that case, this is fixed by #60445

  10. ghost locked as resolved and limited conversation to collaborators on Nov 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

arch-wasmarea-VM-meta-mono

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions