私のアプリケーションは、管理されたスタックトレースを表示しなくても突然壊れます。コンソールに次のメッセージが表示されます。バグ、デバッグ方法
mono(6417,0xac5ac2c0) malloc: *** mmap(size=16777216) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
mono(6417,0xac5ac2c0) malloc: *** mmap(size=16777216) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
mono(6417,0xac5ac2c0) malloc: *** mmap(size=16777216) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
mono(6417,0xac5ac2c0) malloc: *** mmap(size=16777216) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
mono(6417,0xac5ac2c0) malloc: *** mmap(size=16777216) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
mono(6417,0xac5ac2c0) malloc: *** mmap(size=16777216) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
mono(6417,0xac5ac2c0) malloc: *** mmap(size=16777216) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
mono(6417,0xac5ac2c0) malloc: *** mmap(size=16777216) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
mono(6417,0xac5ac2c0) malloc: *** mmap(size=16777216) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
mono(6417,0xac5ac2c0) malloc: *** mmap(size=16777216) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
mono(6417,0xac5ac2c0) malloc: *** mmap(size=16777216) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
mono(6417,0xac5ac2c0) malloc: *** mmap(size=16777216) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
mono(6417,0xac5ac2c0) malloc: *** mmap(size=16777216) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
mono(6417,0xac5ac2c0) malloc: *** mmap(size=16777216) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
mono(6417,0xac5ac2c0) malloc: *** mmap(size=16777216) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
mono(6417,0xac5ac2c0) malloc: *** mmap(size=16777216) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
mono(6417,0xac5ac2c0) malloc: *** mmap(size=16777216) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
mono(6417,0xac5ac2c0) malloc: *** mmap(size=16777216) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
mono(6417,0xac5ac2c0) malloc: *** mmap(size=16777216) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
mono(6417,0xac5ac2c0) malloc: *** mmap(size=16777216) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
mono(6417,0xac5ac2c0) malloc: *** mmap(size=16777216) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
mono(6417,0xac5ac2c0) malloc: *** mmap(size=16777216) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
mono(6417,0xac5ac2c0) malloc: *** mmap(size=16777216) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
mono(6417,0xac5ac2c0) malloc: *** mmap(size=16777216) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
mono(6417,0xac5ac2c0) malloc: *** mmap(size=16777216) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
mono(6417,0xac5ac2c0) malloc: *** mmap(size=16777216) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
mono(6417,0xac5ac2c0) malloc: *** mmap(size=16777216) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
mono(6417,0xac5ac2c0) malloc: *** mmap(size=16777216) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
mono(6417,0xac5ac2c0) malloc: *** mmap(size=16777216) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
mono(6417,0xac5ac2c0) malloc: *** mmap(size=16777216) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
mono(6417,0xac5ac2c0) malloc: *** mmap(size=16777216) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
mono(6417,0xac5ac2c0) malloc: *** mmap(size=16777216) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
mono(6417,0xac5ac2c0) malloc: *** mmap(size=16777216) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
mono(6417,0xac5ac2c0) malloc: *** mmap(size=16777216) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
mono(6417,0xac5ac2c0) malloc: *** mmap(size=16777216) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
mono(6417,0xac5ac2c0) malloc: *** mmap(size=16777216) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
mono(6417,0xac5ac2c0) malloc: *** mmap(size=16777216) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
mono(6417,0xb0307000) malloc: *** mmap(size=16777216) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
Native stacktrace:
0 mono 0x000b6ea9 mono + 745129
1 mono 0x00006e23 mono + 24099
2 libsystem_c.dylib 0x9487c59b _sigtramp + 43
3 ??? 0xffffffff 0x0 + 4294967295
4 libclh.dylib 0x9776bbbb libclh.dylib + 191419
5 libclh.dylib 0x97773564 libclh.dylib + 222564
6 libclh.dylib 0x977b0456 clhFenceCreate + 38
7 GeForceGLDriver 0x8f0dca23 glrCompExecuteKernel + 5034
8 OpenCL 0x9a691ff1 processExec + 506
9 OpenCL 0x9a696ec6 processWork + 214
10 libdispatch.dylib 0x9282f80b _dispatch_queue_drain + 224
11 libdispatch.dylib 0x9282f6b0 _dispatch_queue_invoke + 47
12 libdispatch.dylib 0x9282eeb8 _dispatch_worker_thread2 + 187
13 libsystem_c.dylib 0x94826b24 _pthread_wqthread + 346
14 libsystem_c.dylib 0x948286fe start_wqthread + 30
Debug info from gdb:
/tmp/mono-gdb-commands.DNbmkH:1: Error in sourced command file:
unable to debug self
=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
OpenCLドライバに問題があるようです。どのようにして問題を追跡して解決できますか?
プログラムが約10分間動作してクラッシュするので面白いです。すべてのメモリ割り当ては初期化中に行われますが、処理中にメモリ割り当てはありません。計算中にGPUメモリも割り当てられません。 – Lu4
@ Lu4:メモリ割り当てがないと思いますか? Mono/.netはガベージコレクションシステムです。メモリはいつも場面の背後に割り当てられ、破棄されます。これがMono内で起こる限り、メモリ管理は発生しているアドレス空間の断片化に対処できます(ガベージコレクタは毎回メモリのレイアウトを並べ替える)。しかし、きれいなアドレス空間、OpenGL、OpenCLなどを期待するシステムを導入し、あらゆる種類の奇妙なやりとりが起きようとしています。 – datenwolf
私は同じ問題をWindows上で実行しましたが、clEnqueueAcquireGLObjectsの問題であるスタックトレースを教えてくれました。適切なclEnqueueReleaseGLObjectsを後で呼び出すので奇妙です。私は新しいスレッドを開始しています – Lu4