Segfault when running a console app using the dotnet-cli

Hello,

for a while now I am receiving a segfault-error when executing a console-application using dotnet run. I honestly can’t tell you what caused it but from one moment to the other it has been like that.

The script being executed looks like this:

#!/usr/bin/env bash
export scaffold_path=src/Etdb.UserService.Scaffolder/Etdb.UserService.Scaffolder.csproj
echo running context scaffold
dotnet run --project ${scaffold_path}

The source-code can be found here and that is one recent job.

I tried everything in my power, it works fine locally but always fails with error-code 139 when running in travis-ci. The console-app currently just prints hello-world. I changed the project being called to this simple app to make sure it was not related to the initial application I had been calling.

Any help would be appreciated.

@Joshua-Anderson

For anyone finding this thread.

The solution was simple but I can’t explain why it works locally but not during CI.

Rather than calling

dotnet run --project MyProject.csproj

I just run the following

dotnet build MyProject.csproj
dotnet bin/Debug/MyProject.dll

That did the trick.

(You can mark your post as a solution to mark this topic resolved)

This looks like a bug in dotnet. Most probably, it doesn’t find something that’s present on your system and terminates ungracefully. Getting Core Dumps of Failed TravisCI Builds - J@ArangoDB can help in obtaining the core dump. There’s also interactive debug mode.

First, try upgrading to Bionic – it’s very probable that they dropped official support for Xenial and it now uses some newer APIs under some circumstances and gets a null pointer if it’s not present.

1 Like

I’ve only switched to xenial because it started failing on bionic. Even with bionic the behavior still persists. I will try running a pipeline with a core-dump and see if I’ll receive any relevant details that way.

Imprint