LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-04-2005, 11:31 AM   #1
arinjay
LQ Newbie
 
Registered: Jul 2005
Posts: 1

Rep: Reputation: 0
Problems using libpthread-0.10.so library on Montavista Professional edition 3.1


Hi,
I have written an application which creates a main thread and spawns some 10 child threads. The main thread after spawning all threads does a sigwait for certain signals which I want to handle.
I am using the following calls before creating all the child threads
- pthread_attr_setschedpolicy (Sched policy used is SCHED_RR)
- pthread_attr_setschedparam
- pthread_attr_setinheritsched (this is used to set the PTHREAD_EXPLICIT_SCHED attribute for the thread)

Of all the child threads , most of the threads use a pthread_cond_timedwait() call to sleep for some time and then wake up to do some work.

The application works fine but generates SIGSEGV in one or the other thread sometimes and the stack trace shows the following:

# Fault occurred in thread 'Main Thread' [id=16384]
# Faulty address is 0x7fa3, from 0x4036d8cc
#0 /lib/libc.so.6(__sigsuspend+0x6c) [0x4036d8cc]
#1 /lib/libpthread.so.0(sigwait+0x134) [0x40206ce4]
#2 MyApp [0x80c6df0]
#3 MyApp [0x80c7078]
#4 MyApp [0x80be3c6]
#5 MyApp [0x80bf11b]
#6 MyApp [0x80c74cf]

# Fault occurred in thread 'ACS Processor' [id=131081]
# Faulty address is 0x00007fa3, from 0x4020ac76
#0 /lib/libpthread.so.0(nanosleep+0x46) [0x4020ac76]
#1 /lib/libpthread.so.0 [0x40203174]
#2 MyApp [0x80bf32c]
#3 MyApp [0x81ddac5]
#4 MyApp [0x80be3c6]

The libc that I am using is libc-2.3.2.so and the pthread library version is libpthread-0.10.so. Has anyone faced a similar problem ? Or the way I am using pthreads is wrong ?

Any inputs will be of great help.

Cheers,
Arinjay
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
what's the difference between libpthread.so and libpthread.a? mmiglia Linux - Software 1 09-16-2004 08:53 AM
windows xp professional sp2 for home edition melinda_sayang General 1 09-14-2004 08:45 PM
Differences between the Student Edition and Professional edition of Suse insainiac Linux - Newbie 6 08-01-2004 01:36 PM
SuSE 9.1 Professional Edition!!!??? Honoriu Linux - Distributions 2 06-30-2004 02:51 AM
Mandrake 9.2 differences between Download Edition and PowerPack edition piratu Mandriva 7 10-21-2003 09:10 AM


All times are GMT -5. The time now is 06:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration