Hi!

I am trying to run 'testman' to get SawMan up and running but I get a segfault 
from testman. Using GDB I found out that a SIGBUS error is generated in the mm 
parts of the kernel. Enabling all debug flags, I get this for the mmap parts (I 
have added trace for the call to mmap):

(-) [Main Thread       0.011] ( 1382) Fusion/SHMPool:                init_pool( 
0x41410c, 0x414118, 0x2000006c, 'Fusion Main Pool', 1048576, non-debug )
(-) [Main Thread       0.023] ( 1382) Fusion/SHMHeap:                    
__shmalloc_init_heap( 0x41410c, '/dev/shm/fusion.0.0', 0x20010000, 0x7bd5abd0 )
(-) [Main Thread       0.023] ( 1382) Fusion/SHMHeap:                      -> 
opening shared memory file '/dev/shm/fusion.0.0'...
(-) [Main Thread       0.025] ( 1382) Fusion/SHMHeap:                      -> 
mmaping shared memory file... (8192 bytes)
-> about to mmap: addr_base=0x20010000, size=8192, space=1048576, fd=4
-> mmap done!
.
.
.
(-) [Main Thread       0.073] ( 1382) Fusion/SHMPool:                init_pool( 
0x41410c, 0x414134, 0x200000b0, 'DirectFB Main Pool', 4194304, non-debug )
(-) [Main Thread       0.085] ( 1382) Fusion/SHMHeap:                    
__shmalloc_init_heap( 0x41410c, '/dev/shm/fusion.0.1', 0x20113000, 0x7bd5abe0 )
(-) [Main Thread       0.085] ( 1382) Fusion/SHMHeap:                      -> 
opening shared memory file '/dev/shm/fusion.0.1'...
(-) [Main Thread       0.087] ( 1382) Fusion/SHMHeap:                      -> 
mmaping shared memory file... (16384 bytes)
-> about to mmap: addr_base=0x20113000, size=16384, space=4194304, fd=5
-> mmap done!
.
.
.
(-) [Main Thread       0.110] ( 1382) Fusion/SHMPool:                init_pool( 
0x41410c, 0x414150, 0x200000f4, 'DirectFB Surface Pool', 134217728, non-debug )
(-) [Main Thread       0.121] ( 1382) Fusion/SHMHeap:                    
__shmalloc_init_heap( 0x41410c, '/dev/shm/fusion.0.2', 0x20518000, 0x7bd5abc0 )
(-) [Main Thread       0.122] ( 1382) Fusion/SHMHeap:                      -> 
opening shared memory file '/dev/shm/fusion.0.2'...
(-) [Main Thread       0.123] ( 1382) Fusion/SHMHeap:                      -> 
mmaping shared memory file... (397312 bytes)
-> about to mmap: addr_base=0x20518000, size=397312, space=134217728, fd=6
-> mmap done!
.
.
.
(-) [Main Thread       0.651] ( 1382) Fusion/SHMPool:                    
init_pool( 0x41410c, 0x41416c, 0x20000138, 'SaWMan Pool', 16777216, debug )
(-) [Main Thread       0.662] ( 1382) Fusion/SHMHeap:                        
__shmalloc_init_heap( 0x41410c, '/dev/shm/fusion.0.3', 0x2857a000, 0x7bd5aa78 )
(-) [Main Thread       0.663] ( 1382) Fusion/SHMHeap:                          
-> opening shared memory file '/dev/shm/fusion.0.3'...
(-) [Main Thread       0.664] ( 1382) Fusion/SHMHeap:                          
-> mmaping shared memory file... (53248 bytes)
-> about to mmap: addr_base=0x2857a000, size=53248, space=16777216, fd=10
Segmentation fault


The mmap call in /directfb/lib/fusion/shm/heap.c looks like this:

     heap = mmap( addr_base, size + space, PROT_READ | PROT_WRITE, MAP_SHARED | 
MAP_FIXED, fd, 0 );

So these are the memory pools that are mmap'ed:

Fusion Main Pool ~ 1 MB
DirectFB Main Pool ~ 4 MB
DirectFB Surface Pool ~ 132 MB
SaWMan Pool ~ 16 MB 

Why is the DirectFB Surface Pool so big?

My target does not have this amount of free memory. I don't really know why it 
is crashing, could it be the page tables that overflow or something? Tracing 
the mm functions in the kernel can see that shmem_nopage() and do_no_page() are 
failing:

NOPAGE_SIGBUS in shmem_nopage!!!
VM_FAULT_SIGBUS in do_no_page!!!
NOPAGE_SIGBUS in shmem_nopage!!!
VM_FAULT_SIGBUS in do_no_page!!!
NOPAGE_SIGBUS in shmem_nopage!!!
VM_FAULT_SIGBUS in do_no_page!!!
NOPAGE_SIGBUS in shmem_nopage!!!
VM_FAULT_SIGBUS in do_no_page!!!

... etc thousands of lines until it finally stop

Race condition?

I tried to lower the 'space' variable for DirectFB Surface Pool to 32 MB and 
then I don't get any segfault. Will this destroy anything else?
_______________________________________________
directfb-users mailing list
directfb-users@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users

Reply via email to