[uClibc] uClibc, pthreads, and mmap

Gregory Nutt spudmonkey at racsa.co.cr
Mon Aug 9 13:10:04 UTC 2004


Hello, list,

I am working with someone remotely who is having a problem with mmap'ed 
addresses.  Since I am writing this on behalf of someone else and since 
I do not have the source code, I do not have all of the details.  But I 
want to ask the list this question before I try to get more information 
the hard way.

Is anyone aware of any general issues involving mmap() and pthreads? 
Specifically, this person that I am trying to help claims the following 
behavior:

1. A device driver is opened and a buffer managed by the device
    driver is mmap'ed into user space.  I do not know what mmap
    flags were used.

2. A new thread is created using pthread_create().

3. The new thread tries to access the mmap'ed buffer and crashes.

The OS is Linux 2.4.20, the processor is an ARM926EJ, and the uClibc 
version is 0.9.20.  At the crash, the following is printed:

 > Unhandled fault: external abort on non-linefetch (0x008) at
0x40006c1c
 > pgd = c3e90000
 > *pgd = c3e96001, *pmd = c3e96001, *pte = 10026033, *ppte =10026aa2
 > Bus error

My (shaky) interpretation of this data suggests that the mapping is not 
supported by the page table.

Apparently, this problem does not occur if glibc is used.

Any ideas?  Sorry that I have so little detailed information.

Thanks in advance,

Gregory Nutt




More information about the uClibc mailing list