Re: A thread nightmare...Please help.
> -----Original Message-----
> From: email@example.com
> Sent: Fri, 23 Mar 2007 07:53:27 -0400
> To: firstname.lastname@example.org
> Subject: Re: A thread nightmare...Please help.
> As this isn't embedded debian specific, you'll probably not get much help
> here. Look for a more appropriate list.
> I can't help you much. You don't tell us what programming language
> using, which thread library, or how you're calling and closing your
> A created thread doesn't "stop" until it returns. How do you know that
> thread has stopped? Could it merely be stalled? Did it return or error
> What's different about the way you call the second thread? Are you
> into resource problems - ie, are the threads fighting for a shared
> Do example threading programs that can find on the internet show the same
> problem? If not, what is different about how they are called, stopped,
> Multi-threaded applications are non-trivial. Make sure you understand
> threads, resource sharing, etc inside and out or you'll run into similar
> problems later that are much harder to debug.
Thanks for your suggestions.
I know these are not easy problems to diagnose but I was hoping someone may have run across it before. Or perhaps someone could point me to the pthread source I can look at. I've been looking for it but not successfull so far.
I've narrowed the problem to reallocation of some memory when they have been freed.
I have three main memory mallocs' which were freed then reallocated. For some strange reason, malloc is failing. Although free() does not return a value, I assume the memory have been freed. However, when I reallocate the memory using the same pointer it's failing.
Any ideas there?
> On 3/22/07, Junior <email@example.com> wrote:
>> Hi All,
>> I have a wierd problem thak came back to bite me in the you know where
>> I would appreciate any help.
>> A while ago I noticed that if I have two thread in a program (i.e the
>> routine and a second thread created from the main) the second thread
>> runs or runs only once. I got around this by creating another thread and
>> everything was going well. That is, until I forgot about it.
>> I've been fighting with the problem since It bit me again and I'm not
>> why this happens and I'm really lost in how to fix it.
>> Does anyone have any ideas?
>> Much thanks,
ONE-CLICK WEBMAIL ACCESS - Easily monitor & access your email accounts!
Visit http://www.inbox.com/notifier and check it out!