2011-08-06 4 views
1

내 애플리케이션이 관리되는 스택 트레이스를 표시하지 않고 갑자기 중단됩니다. 콘솔에 다음 메시지를 표시합니다.버그, 디버깅하는 방법?

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 드라이버에 문제가있는 것 같습니다. 어떻게 문제를 추적하고 해결할 수 있습니까?

답변

0

이 상호 운용성에 메모리 누수에 문제가 있었고, 그것이 추락 2기가바이트 넘어 갔을 때 가능한 모든 메모리를 suckout 원인 CALayer 컨텍스트에서 방대한 메모리 할당이 필요하므로보기를 변경할 때마다 레이어를 해제해야합니다. 그것은 나에게 일어 났고, 어떻게 해결했는지, 특정 컨텍스트를 그리는 페이지를 변경할 때마다 메모리를 해제해야합니다.

0

OpenCL에서는 더 이상 보이지만 ('C'는 OpenGL이 아니지만 관계가 있음) 나타납니다. 아마도 여러분의 프로그램은 GPU 메모리를 주소 공간에 매핑하려고 시도하지만, 주소 공간이 없기 때문에 실패합니다. 충분히 크고 적절한 정렬을 가지고 있습니다. 그리고 낮은 loevel 코드의 어딘가에서 mmap에 의해 반환 된 포인터는 체크되지 않았으므로 segfault가 발생합니다.

이것은 Mono 또는 OpenCL/OpenGL 드라이버 또는 해당 바인딩에 대한 버그입니다. 위의 추적을 개발자 중 한 명에게 보내서 버그 문제를 제기하십시오. 감사합니다 모든 사람, 내 잘못 ...

+0

프로그램이 약 10 분 동안 작동 한 다음 충돌이 발생하기 때문에 흥미 롭습니다. 모든 메모리 할당은 초기화 과정에서 이루어지며 처리 중에는 메모리 할당이 없으며 계산 중에 GPU 메모리도 할당되지 않습니다. – Lu4

+0

@ Lu4 : 메모리 할당이 없다고 생각하는 이유는 무엇입니까? Mono/.net은 가비지 수집 시스템입니다. 메모리는 항상 무대 뒤에서 할당되고 폐기됩니다. Mono 내에서 발생하는 한, 메모리 관리는 발생하는 주소 공간 조각화에 대처할 수 있습니다 (가비지 수집기는 매 순간 메모리 레이아웃을 다시 정렬합니다). 그러나 깨끗한 주소 공간, OpenGL, OpenCL 등을 기대하는 시스템을 소개하고 모든 종류의 이상한 상호 작용이 일어나려고합니다. – datenwolf

+0

나는 윈도우에서 같은 문제를 겪었지만 clmequeueAcquireGLObjects의 문제점 인 스택 추적을 주었다. 나중에 적절한 clEnqueueReleaseGLObjects를 호출하기 때문에 이상합니다. 새 스레드를 시작합니다. – Lu4

0

는 그것은의 문제 SA 그래서 ...

관련 문제