Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


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

Rep: Reputation: 0
Problems using library on Montavista Professional edition 3.1

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/ [0x4036d8cc]
#1 /lib/ [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/ [0x4020ac76]
#1 /lib/ [0x40203174]
#2 MyApp [0x80bf32c]
#3 MyApp [0x81ddac5]
#4 MyApp [0x80be3c6]

The libc that I am using is and the pthread library version is Has anyone faced a similar problem ? Or the way I am using pthreads is wrong ?

Any inputs will be of great help.



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 and libpthread.a? mmiglia Linux - Software 1 09-16-2004 07:53 AM
windows xp professional sp2 for home edition melinda_sayang General 1 09-14-2004 07:45 PM
Differences between the Student Edition and Professional edition of Suse insainiac Linux - Newbie 6 08-01-2004 12:36 PM
SuSE 9.1 Professional Edition!!!??? Honoriu Linux - Distributions 2 06-30-2004 01:51 AM
Mandrake 9.2 differences between Download Edition and PowerPack edition piratu Mandriva 7 10-21-2003 08:10 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:57 PM.

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