Bug 51150 - Using a lot of memory and not using CPU much...
Summary: Using a lot of memory and not using CPU much...
Status: NEW
Alias: None
Product: Runtime
Classification: Mono
Component: JIT (show other bugs)
Version: 4.6.0 (C8)
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-12-29 18:50 UTC by Hin-Tak Leung
Modified: 2017-01-04 03:19 UTC (History)
3 users (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments

Description Hin-Tak Leung 2016-12-29 18:50:20 UTC
I don't know how to characterize this properly so I'll just try. I run mono occasionally on CPU-intensive long tasks for many years. Once in a while it would get into a state where it uses a lot of memory (6GB virtual 3GB resident vs 2464912, 2.109g; for example) and don't seem to be using the CPU at all. This seems to just go away if I kill the process and re-run with the same work load, but rather annoying. It has happened twice now in a few days so I am filing. Under JIT just because that's what seems to be running when I poked inside with gdb most recently, while it did that.

If there is any advice on poking while it does that next time, I would appreciate.


0x000055ff7c39b62c in monoeg_g_hash_table_lookup_extended (hash=<optimized out>, key=0x5600724a5c70, orig_key=0x7ffe54a4fbf8, 
    value=0x7ffe54a4fc00) at ghashtable.c:331
331			if ((*equal)(s->key, key)){
(gdb) bt
#0  0x000055ff7c39b62c in monoeg_g_hash_table_lookup_extended (hash=<optimized out>, key=0x5600724a5c70, orig_key=0x7ffe54a4fbf8, 
    value=0x7ffe54a4fc00) at ghashtable.c:331
#1  0x000055ff7c39b6d3 in monoeg_g_hash_table_lookup (hash=<optimized out>, key=<optimized out>) at ghashtable.c:311
#2  0x000055ff7c243da4 in mono_save_seq_point_info (cfg=cfg@entry=0x560073fbfa50) at seq-points.c:181
#3  0x000055ff7c241332 in mini_method_compile (method=method@entry=0x5600724a5c70, opts=opts@entry=370239999, 
    domain=domain@entry=0x55ff7d31b240, flags=flags@entry=JIT_FLAG_RUN_CCTORS, parts=parts@entry=0, aot_method_index=aot_method_index@entry=-1)
    at mini.c:3920
#4  0x000055ff7c242e99 in mono_jit_compile_method_inner (method=method@entry=0x5600724a5c70, target_domain=target_domain@entry=0x55ff7d31b240, 
    opt=opt@entry=370239999, error=error@entry=0x7ffe54a4fed0) at mini.c:4197
#5  0x000055ff7c1511b0 in mono_jit_compile_method_with_opt (method=0x5600724a5c70, opt=370239999, error=0x7ffe54a4fed0) at mini-runtime.c:1910
#6  0x000055ff7c2a6b50 in mono_delegate_to_ftnptr (delegate=0x7f14c8d6a618) at marshal.c:412
#7  0x00000000418edd0a in ?? ()
#8  0x00007f14c4fd4d90 in ?? ()
#9  0x00007f14c8c3d180 in ?? ()
#10 0x00007f14d0b44850 in ?? ()
#11 0x00007f14c4fcc2c8 in ?? ()
#12 0x00007f14c8d6a618 in ?? ()
#13 0x00007ffe54a4ffe8 in ?? ()
#14 0x0000000000000001 in ?? ()
#15 0x00007ffe54a504c0 in ?? ()
#16 0x00007ffe54a4ff70 in ?? ()
#17 0x00000000418edc28 in ?? ()
#18 0x00007f14c4fd4d90 in ?? ()
#19 0x00007f14c8c3d180 in ?? ()
#20 0x00007f14d0b44850 in ?? ()
#21 0x00007f14c4fcc2c8 in ?? ()
#22 0x0000000000000001 in ?? ()
#23 0x000055ff7d369200 in ?? ()
#24 0x00007f14c4fcc2c8 in ?? ()
#25 0x00007ffe54a504c0 in ?? ()
#26 0x00007ffe54a4ffc0 in ?? ()
#27 0x00000000418ebf04 in ?? ()
---Type <return> to continue, or q <return> to quit---
#28 0x0000000000010000 in ?? ()
#29 0x0000000000000000 in ?? ()
(gdb) 





$ mono --version
Mono JIT compiler version 4.6.2 (Stable 4.6.2.7/08fd525 Sat Dec 24 18:35:56 GMT 2016)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
	TLS:           __thread
	SIGSEGV:       altstack
	Notifications: epoll
	Architecture:  amd64
	Disabled:      none
	Misc:          softdebug 
	LLVM:          supported, not enabled.
	GC:            sgen
Comment 1 Zoltan Varga 2017-01-04 03:19:58 UTC
That stack trace is from the JIT, and the jit should not be running during a steady state app, except if the app is using dynamic methods etc.

Note You need to log in before you can comment on or make changes to this bug.