Welcome to the most active Linux Forum on the web.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 08-30-2008, 02:40 AM   #1
LQ Newbie
Registered: Aug 2008
Posts: 8

Rep: Reputation: 0
pthread_kill(threadid, SIGUSR2) crashed with SIGSEGV

Hello ,
I have
{MM8}root@Node2:/data/tmp# uname -a
Linux Node2 2.6.10-telco-1.46-mckinley-smp #1 SMP Fri May 30 18:29:43 UTC 2008 ia64 GNU/Linux
# ls /lib/libpthread*

I have 2-processes (lets say p1 and p2)
p1 has about 49 threads
p2 has about 17 threads

If p1 hangs , then p2 sends a signal SIGUSR2 using pthread_kill(threadid_p1, sigusr2)

While doing so , pthread_kill dumped core, stack trace is as below
Program terminated with signal 11, Segmentation fault.
#0 0x20000000000ffef0 in pthread_kill () from /lib/tls/
(gdb) bt
#0 0x20000000000ffef0 in pthread_kill () from /lib/tls/

ls -lrt /lib/tls/
lrwxrwxrwx 1 root root 18 Aug 29 11:18 /lib/tls/ ->

Advance thanks for the help
Old 08-30-2008, 09:45 AM   #2
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,191
Blog Entries: 4

Rep: Reputation: 464Reputation: 464Reputation: 464Reputation: 464Reputation: 464
Moved to programming, your duplicate in Software will soon be closed.
Old 08-30-2008, 11:43 AM   #3
Senior Member
Registered: Sep 2004
Distribution: FreeBSD 9.1, Kubuntu 12.10
Posts: 3,078

Rep: Reputation: Disabled
I'm guessing that if p1 hangs then it's on a blocking function call. Is that the case? I can't think of any other reason a thread would hang. If it is a blocking function call, the signal should release the block but something might be incomplete. This can happen if you expect a pointer to be assigned during the call and that pointer hadn't contained a valid value before the call.

Does the signal handler call pthread_cancel on p1? If so, I've always had problems using that on threads I didn't specifically set up to be canceled well.


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
pthread_kill(threadid, SIGUSR2) crashed with SIGSEGV kspradhan Linux - Software 1 08-30-2008 03:54 AM
sigsegv ve1drg Slackware 1 12-29-2006 06:48 PM
where does SIGSEGV come from? hsupoyang Linux - Software 8 10-27-2006 01:33 AM
How to use SIGUSR1 and SIGUSR2 YaK. Programming 3 12-11-2005 06:18 PM
Konqueror crashed and caused the signal 11 (SIGSEGV) bill.692 Linux - Software 1 04-29-2004 12:15 PM

All times are GMT -5. The time now is 09:20 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration