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

dotnet application crash with segfault libcoreclr.so (debian 8, centos 7) #1245

Closed
OleksiiChuiko opened this issue Jan 30, 2018 · 4 comments
Closed

Comments

@OleksiiChuiko
Copy link

I have dotnet core 2 application that works fine on Windows. But when I start it on Linux debian 8 or centos 7 the application crashes after a while and see the following messages in the logs:

Jan 30 06:50:21 sche-deb8 kernel: [337980.955257] dotnet[27371]: segfault at 18 ip 00007f5fe6427fd0 sp 00007f5fde4817e0 error 4 in libcoreclr.so[7f5fe6297000+257000]
Jan 30 06:51:51 sche-deb8 kernel: [338071.509981] dotnet[27384]: segfault at 18 ip 00007fe420948fd0 sp 00007fe41cca87e0 error 4 in libcoreclr.so[7fe4207b8000+257000]
Jan 30 06:53:22 sche-deb8 kernel: [338162.074164] dotnet[27396]: segfault at 18 ip 00007fd187f15fd0 sp 00007fd10e1927e0 error 4 in libcoreclr.so[7fd187d85000+257000]
Jan 30 06:54:52 sche-deb8 kernel: [338252.624206] dotnet[27409]: segfault at 18 ip 00007f9f12abefd0 sp 00007f9f0ac827e0 error 4 in libcoreclr.so[7f9f1292e000+257000]
Jan 30 06:56:23 sche-deb8 kernel: [338343.178361] dotnet[27423]: segfault at 18 ip 00007f6ac33abfd0 sp 00007f6a496287e0 error 4 in libcoreclr.so[7f6ac321b000+257000]
Jan 30 06:57:53 sche-deb8 kernel: [338433.733429] dotnet[27436]: segfault at 18 ip 00007f3ddcfdafd0 sp 00007f3dd933a7e0 error 4 in libcoreclr.so[7f3ddce4a000+257000]
Jan 30 06:59:24 sche-deb8 kernel: [338524.291006] dotnet[27449]: segfault at 18 ip 00007fc9bb37dfd0 sp 00007fc9415fa7e0 error 4 in libcoreclr.so[7fc9bb1ed000+257000]
Jan 30 07:00:54 sche-deb8 kernel: [338614.844676] dotnet[27463]: segfault at 18 ip 00007f71e91dbfd0 sp 00007f71e553b7e0 error 4 in libcoreclr.so[7f71e904b000+257000]

Is it problem with .net system? How to fix this?

root@sche-deb8:/sorcerer/publish# dotnet --info
.NET Command Line Tools (2.1.4)

Product Information:
Version: 2.1.4
Commit SHA-1 hash: 5e8add2190

Runtime Environment:
OS Name: debian
OS Version: 8
OS Platform: Linux
RID: debian.8-x64
Base Path: /usr/share/dotnet/sdk/2.1.4/

Microsoft .NET Core Shared Framework Host

Version : 2.0.5
Build : 17373eb129b3b05aa18ece963f8795d65ef8ea54

root@sche-deb8:/sorcerer/publish#

@OleksiiChuiko
Copy link
Author

Want to note that the dotnet application is started as a service using systemctl.

@wfurt
Copy link
Member

wfurt commented Jan 30, 2018

can you come up with some simplified repro app?
Does it crash when you start it from shell?
Did you get core file after the crash?

@OleksiiChuiko
Copy link
Author

When I attached with gdb I get the following dump:

(gdb) c
Continuing.
[New Thread 0x7f9d04b1a700 (LWP 31807)]
[New Thread 0x7f9d0c072700 (LWP 31808)]
[Thread 0x7f9d0c072700 (LWP 31808) exited]
[Thread 0x7f9d04b1a700 (LWP 31807) exited]

Program received signal SIGCONT, Continued.
[Switching to Thread 0x7f9d10144700 (LWP 31720)]
0x00007f9d11709a3d in poll () from /lib64/libc.so.6
(gdb) bt
#0 0x00007f9d11709a3d in poll () from /lib64/libc.so.6
#1 0x00007f9d10e682f4 in CorUnix::CPalSynchronizationManager::ReadBytesFromProcessPipe(int, unsigned char*, int) ()
from /usr/share/dotnet/shared/Microsoft.NETCore.App/2.0.5/libcoreclr.so
#2 0x00007f9d10e678c4 in CorUnix::CPalSynchronizationManager::WorkerThread(void*) () from /usr/share/dotnet/shared/Microsoft.NETCore.App/2.0.5/libcoreclr.so
#3 0x00007f9d10e70982 in CorUnix::CPalThread::ThreadEntry(void*) () from /usr/share/dotnet/shared/Microsoft.NETCore.App/2.0.5/libcoreclr.so
#4 0x00007f9d12206e25 in start_thread () from /lib64/libpthread.so.0
#5 0x00007f9d1171434d in clone () from /lib64/libc.so.6
(gdb) c
Continuing.

Program received signal SIGTERM, Terminated.
[Switching to Thread 0x7f9d12835740 (LWP 31719)]
0x00007f9d1220a945 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
(gdb) bt
#0 0x00007f9d1220a945 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1 0x00007f9d10e65c52 in CorUnix::CPalSynchronizationManager::ThreadNativeWait(CorUnix::_ThreadNativeWaitData*, unsigned int, CorUnix::ThreadWakeupReason*, unsigned int*) ()
from /usr/share/dotnet/shared/Microsoft.NETCore.App/2.0.5/libcoreclr.so
#2 0x00007f9d10e65894 in CorUnix::CPalSynchronizationManager::BlockThread(CorUnix::CPalThread*, unsigned int, bool, bool, CorUnix::ThreadWakeupReason*, unsigned int*) ()
from /usr/share/dotnet/shared/Microsoft.NETCore.App/2.0.5/libcoreclr.so
#3 0x00007f9d10e6a6b1 in CorUnix::InternalWaitForMultipleObjectsEx(CorUnix::CPalThread*, unsigned int, void* const*, int, unsigned int, int) ()
from /usr/share/dotnet/shared/Microsoft.NETCore.App/2.0.5/libcoreclr.so
#4 0x00007f9d10abe8dc in Thread::DoAppropriateWaitWorker(int, void**, int, unsigned int, WaitMode) () from /usr/share/dotnet/shared/Microsoft.NETCore.App/2.0.5/libcoreclr.so
#5 0x00007f9d10ab9560 in Thread::DoAppropriateWait(int, void**, int, unsigned int, WaitMode, PendingSync*) ()
from /usr/share/dotnet/shared/Microsoft.NETCore.App/2.0.5/libcoreclr.so
#6 0x00007f9d10baaa6f in CLREventBase::WaitEx(unsigned int, WaitMode, PendingSync*) () from /usr/share/dotnet/shared/Microsoft.NETCore.App/2.0.5/libcoreclr.so
#7 0x00007f9d10ac0f4d in CLREventWaitWithTry(CLREventBase*, unsigned int, int, unsigned int*) () from /usr/share/dotnet/shared/Microsoft.NETCore.App/2.0.5/libcoreclr.so
#8 0x00007f9d10ac1175 in ThreadStore::WaitForOtherThreads() () from /usr/share/dotnet/shared/Microsoft.NETCore.App/2.0.5/libcoreclr.so
#9 0x00007f9d10c05113 in Assembly::ExecuteMainMethod(PtrArray**, int) () from /usr/share/dotnet/shared/Microsoft.NETCore.App/2.0.5/libcoreclr.so
#10 0x00007f9d10a3653b in CorHost2::ExecuteAssembly(unsigned int, char16_t const*, int, char16_t const**, unsigned int*) ()
from /usr/share/dotnet/shared/Microsoft.NETCore.App/2.0.5/libcoreclr.so
#11 0x00007f9d10a10e86 in coreclr_execute_assembly () from /usr/share/dotnet/shared/Microsoft.NETCore.App/2.0.5/libcoreclr.so
#12 0x00007f9d1112f433 in coreclr::execute_assembly(void*, unsigned int, int, char const**, char const*, unsigned int*) ()
from /usr/share/dotnet/shared/Microsoft.NETCore.App/2.0.5/libhostpolicy.so
#13 0x00007f9d111240d8 in run(arguments_t const&) () from /usr/share/dotnet/shared/Microsoft.NETCore.App/2.0.5/libhostpolicy.so
#14 0x00007f9d11124772 in corehost_main () from /usr/share/dotnet/shared/Microsoft.NETCore.App/2.0.5/libhostpolicy.so
#15 0x00007f9d113e48f4 in execute_app(std::string const&, corehost_init_t*, int, char const**) () from /usr/share/dotnet/host/fxr/2.0.5/libhostfxr.so
#16 0x00007f9d113ee978 in fx_muxer_t::read_config_and_execute(std::string const&, std::string const&, std::unordered_map<std::string, std::vector<std::string, std::allocatorstd::string >, std::hashstd::string, std::equal_tostd::string, std::allocator<std::pair<std::string const, std::vector<std::string, std::allocatorstd::string > > > > const&, int, char const**, host_mode_t) () from /usr/share/dotnet/host/fxr/2.0.5/libhostfxr.so
#17 0x00007f9d113ed8f7 in fx_muxer_t::parse_args_and_execute(std::string const&, std::string const&, int, int, char const**, bool, host_mode_t, bool*) ()
from /usr/share/dotnet/host/fxr/2.0.5/libhostfxr.so
#18 0x00007f9d113eeffc in fx_muxer_t::execute(int, char const**) () from /usr/share/dotnet/host/fxr/2.0.5/libhostfxr.so
#19 0x00007f9d113e4975 in hostfxr_main () from /usr/share/dotnet/host/fxr/2.0.5/libhostfxr.so
#20 0x000000000040c42a in run(int, char const**) ()
#21 0x000000000040c597 in main ()
(gdb)

@OleksiiChuiko
Copy link
Author

Sorry, problem was with service settings - Type must be simple and no restart

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

2 participants