[uClibc] Fw: Pthread problem in pthread_create()

Manuel Novoa III mjn3 at codepoet.org
Tue Aug 16 04:59:08 UTC 2005


There were some issues with mips ldso code in uClibc 0.9.27.  Do you see
problems when staticly linked?  Do you see problems with current svn
code?

Manuel

On Tue, Aug 16, 2005 at 11:41:39AM +0800, colin wrote:
> 
> Hi there,
> We have temporarily solve the problem. Our original code is as bellow:
>     pthread_attr_init(&attr);
>     int err = pthread_create(&pThis->handle, &attr, posix_start_address,
> (void*)pThis);
> 
> If we add memset, the problem will disappear:
>     memset(&attr, 0, sizeof(pthread_attr_t));
>     pthread_attr_init(&attr);
>     int err = pthread_create(&pThis->handle, &attr, posix_start_address,
> (void*)pThis);
> 
> Is there any problem of pthread_attr_init()?
> 
> And if we use gdb to trace the problem, the first pthread_create will be ok,
> but the second pthread_create will have the same problem with before.
> I donot know if we really solve the pthread_create problem.
> 
> Regards,
> Colin
> 
> 
> 
> 
> ----- Original Message ----- 
> From: "colin" <colin at realtek.com.tw>
> To: <uclibc at uclibc.org>
> Sent: Monday, August 15, 2005 7:22 PM
> Subject: Pthread problem in pthread_create()
> 
> 
> >
> > Hi there,
> > We have encountered a pthread problem in pthread_create().
> > When calling pthread_create(), it will fail at the line "suspend(self);".
> > We are using MIPS Linux kernel 2.6.11 with uClibc 0.9.27.
> > I found that many people have encounter the same problem, but I havn't
> seen
> > any solution.
> >     http://www.uclibc.org/lists/uclibc/2003-April/006031.html
> >     http://www.uclibc.org/lists/uclibc/2004-June/009271.html
> >     http://www.uclibc.org/lists/uclibc/2003-July/006570.html
> >
> > Here is the error message when I use gdbserver to debug it:
> >     "Cannot access memory at address 0x411104"
> >
> > Are there any solution for this, or to avoid this problem?
> > And, what's the cause of this problem? uClibc, or Linux Kernel?
> >
> > Regards,
> > Colin
> >
> >
> 

> _______________________________________________
> uClibc mailing list
> uClibc at uclibc.org
> http://uclibc.org/mailman/listinfo/uclibc




More information about the uClibc mailing list