- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- pthread_kill(threadid, sigusr2) dumps core with SI...
Operating System - Linux
1820879
Members
5294
Online
109628
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-29-2008 10:31 PM
тАО08-29-2008 10:31 PM
pthread_kill(threadid, sigusr2) dumps core 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*
libpthread-0.10.so libpthread.so.0
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/libpthread.so.0
(gdb) bt
#0 0x20000000000ffef0 in pthread_kill () from /lib/tls/libpthread.so.0
==============================
ls -lrt /lib/tls/libpthread.so.0
lrwxrwxrwx 1 root root 18 Aug 29 11:18 /lib/tls/libpthread.so.0 -> libpthread-0.60.so
Advance thanks for the help
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*
libpthread-0.10.so libpthread.so.0
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/libpthread.so.0
(gdb) bt
#0 0x20000000000ffef0 in pthread_kill () from /lib/tls/libpthread.so.0
==============================
ls -lrt /lib/tls/libpthread.so.0
lrwxrwxrwx 1 root root 18 Aug 29 11:18 /lib/tls/libpthread.so.0 -> libpthread-0.60.so
Advance thanks for the help
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-02-2008 02:52 AM
тАО11-02-2008 02:52 AM
Re: pthread_kill(threadid, sigusr2) dumps core with SIGSEGV
I seriously doubt you can do that. thread_t is private to the process. On HP-UX pthread_kill(3) says:
The signal is asynchronously directed to thread in the calling process.
The signal is asynchronously directed to thread in the calling process.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-02-2008 08:51 AM
тАО11-02-2008 08:51 AM
Re: pthread_kill(threadid, sigusr2) dumps core with SIGSEGV
You are right..
In fact , its one process and has multiple threads. I got the root cause for this issue.
When you pass on invalid thread ID to pthread_kill, it dumps core.
int main (int argc, char* const argv [])
{
int iRet = 0;
iRet = pthread_kill (123, 0); /* 123 is invalid thread ID */
printf("iRet = %d\n", iRet);
return 0;
}
{MM4}root@Node2:/tmp# cc invalidthread.c -lpthread
{MM4}root@Node2:/tmp# ./a.out
Segmentation fault (core dumped)
I confirmed it. But I am baffled why would we get core dump instead of ESRCH error code.
As par man page of pthread_kill
!ESRCH!
the thread |thread| does not exist (e.g. it has already
terminated)
In fact , its one process and has multiple threads. I got the root cause for this issue.
When you pass on invalid thread ID to pthread_kill, it dumps core.
int main (int argc, char* const argv [])
{
int iRet = 0;
iRet = pthread_kill (123, 0); /* 123 is invalid thread ID */
printf("iRet = %d\n", iRet);
return 0;
}
{MM4}root@Node2:/tmp# cc invalidthread.c -lpthread
{MM4}root@Node2:/tmp# ./a.out
Segmentation fault (core dumped)
I confirmed it. But I am baffled why would we get core dump instead of ESRCH error code.
As par man page of pthread_kill
!ESRCH!
the thread |thread| does not exist (e.g. it has already
terminated)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-02-2008 01:08 PM
тАО11-02-2008 01:08 PM
Re: pthread_kill(threadid, sigusr2) dumps core with SIGSEGV
>But I am baffled why would we get core dump instead of ESRCH error code.
Because exhaustively checking is costly and probably not required. And you don't have anything remotely like a valid pthread_t as you show in your other thread:
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1284229
Because exhaustively checking is costly and probably not required. And you don't have anything remotely like a valid pthread_t as you show in your other thread:
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1284229
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP