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

SIGSEGV ( and than Illegal instruction) on Debian 9.0 x64 Celeron #1285

Closed
sherlock1982 opened this issue Feb 26, 2018 · 1 comment
Closed

Comments

@sherlock1982
Copy link

sherlock1982 commented Feb 26, 2018

SIGSEGV (and than Illegal instruction) on Debian 9.0 x64 Celeron

Core: .NET Core 2.0.5
Kernel: Linux 4.9.0-6-amd64 #1 SMP Debian 4.9.82-1+deb9u2 (2018-02-21) x86_64 GNU/Linux
CPU: Intel(R) Celeron(R) CPU J3455 @ 1.50GHz, 4GB RAM, 25GB
(Mini PC)

Self contained package produced with "dotnet publish -r linux-x64" finishes with illegal instruction after exception.

Code to review:

using System;

namespace App1
{
    class Program
    {
        static void Main(string[] args)
        {
            try {
                String a = null;
                Console.WriteLine(a.Length);
            }
            catch(Exception ex){
                Console.WriteLine(ex);
            }
            Console.WriteLine("Bye");
        }
    }
}

Expected behavior: Print exception and Bye.

Actual behavior:

System.NullReferenceException: Object reference not set to an instance of an object.
   at App1.Program.Main(String[] args) in /home/repomaster/App1/Program.cs:line 11
Illegal instruction

Faulting stacktrace:

* thread #1: tid = 32628, 0x00007fff7d1704c7, name = 'myApp', stop reason = signal SIGSEGV: invalid address (fault address: 0x0)
    frame #0: 0x00007fff7d1704c7
->  0x7fff7d1704c7: cmpl   %edi, (%rdi)
    0x7fff7d1704c9: callq  0x7ffff654f740            ; COMString::Length(StringObject*)
    0x7fff7d1704ce: movl   %eax, -0x24(%rbp)
    0x7fff7d1704d1: movl   -0x24(%rbp), %edi
(lldb) bt
* thread #1: tid = 32628, 0x00007fff7d1704c7, name = 'myApp', stop reason = signal SIGSEGV: invalid address (fault address: 0x0)
  * frame #0: 0x00007fff7d1704c7
    frame #1: 0x00007ffff6344f07 libcoreclr.so`CallDescrWorkerInternal + 124
    frame #2: 0x00007ffff6255ce0 libcoreclr.so`MethodDescCallSite::CallTargetWorker(unsigned long const*, unsigned long*, int) + 1264
    frame #3: 0x00007ffff6366c03 libcoreclr.so`RunMain(MethodDesc*, short, int*, PtrArray**) + 755
    frame #4: 0x00007ffff6366ea3 libcoreclr.so`Assembly::ExecuteMainMethod(PtrArray**, int) + 227
    frame #5: 0x00007ffff61983fb libcoreclr.so`CorHost2::ExecuteAssembly(unsigned int, char16_t const*, int, char16_t const**, unsigned int*) + 475
    frame #6: 0x00007ffff6172dd6 libcoreclr.so`coreclr_execute_assembly + 262
    frame #7: 0x00007ffff6890433 libhostpolicy.so`coreclr::execute_assembly(void*, unsigned int, int, char const**, char const*, unsigned int*) + 131
    frame #8: 0x00007ffff68850d8 libhostpolicy.so`run(arguments_t const&) + 5976
    frame #9: 0x00007ffff6885772 libhostpolicy.so`corehost_main + 610
    frame #10: 0x00007ffff6b458f4 libhostfxr.so`execute_app(std::string const&, corehost_init_t*, int, char const**) + 212
    frame #11: 0x00007ffff6b4f978 libhostfxr.so`fx_muxer_t::read_config_and_execute(std::string const&, std::string const&, std::unordered_map<std::string, std::vector<std::string, std::allocator<std::string> >, std::hash<std::string>, std::equal_to<std::string>, std::allocator<std::pair<std::string const, std::vector<std::string, std::allocator<std::string> > > > > const&, int, char const**, host_mode_t) + 4024
    frame #12: 0x00007ffff6b4e8f7 libhostfxr.so`fx_muxer_t::parse_args_and_execute(std::string const&, std::string const&, int, int, char const**, bool, host_mode_t, bool*) + 1975
    frame #13: 0x00007ffff6b4feb9 libhostfxr.so`fx_muxer_t::execute(int, char const**) + 713
    frame #14: 0x00007ffff6b45975 libhostfxr.so`hostfxr_main + 53
    frame #15: 0x000000000040a2bf myApp`run(int, char const**) + 623
    frame #16: 0x000000000040a407 myApp`main + 167
    frame #17: 0x00007ffff6d9c2b1 libc.so.6`__libc_start_main + 241
    frame #18: 0x0000000000409a95 myApp`_start + 41

@sherlock1982 sherlock1982 changed the title Illegal instruction on Debian 9.0 x64 Celeron SIGSEGV ( and than Illegal instruction) on Debian 9.0 x64 Celeron Feb 26, 2018
@sherlock1982
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant