11-04-2008
pthread_join hang on glibc2.5
Hello All,
The problem i'm experiencing is with the following code:
#include <pthread.h>
#include <stdio.h>
int main(void)
{
(void) pthread_join(155555, NULL);
printf("done");
return 0;
}
I'm getting on terminal segmentation fault .
System used: CentOS release 5 (Final)
Kernel: 2.6.18-53.1.4.el5
GCC : gcc (GCC) 4.1.1 20070105 (Red Hat 4.1.1-52)
GLIBC:GNU C Library stable release version 2.5, by Roland McGrath et al.
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 4.1.1 20061011 (Red Hat 4.1.1-30).
Compiled on a Linux 2.6.9 system on 2007-03-14.
pthread_join according to the man should return ERROR in case the thread doesn't exist.
I checked the same code on Red Hat 9 ,2.4.20-31.9, gcc 3.4.3 and GLIBC 2.3.2 and the code returns Error code as expected.
This looks to me as very common use of pthread_join and yet i can't find reference on the web about this error, nor bug listed.
Can someone help ?
10 More Discussions You Might Find Interesting
1. Linux
Hi everybody, i need help regarding my Linux start up.I was trying to configure internet connection with my Red Hat in order to use for Internet,but of no avail and I think I have changed one parameter to activate device during computer start up.
Now the problem is during start up and... (1 Reply)
Discussion started by: andysastre
1 Replies
2. UNIX for Dummies Questions & Answers
I would like to write my own version of pthread_join and some of the other pthread function. Does some know any pages that have som examples of doing this?? (1 Reply)
Discussion started by: bigblop
1 Replies
3. Red Hat
Hello,
I am having a HP proliant 350 G3 sever installed wih RedHat linux 9.0
when I enterd using any user(Except root) the server hanged after few seconds, also the folder icons are blacked out and the names of the folder icons are disapper.
can any body help me.
Ajay (1 Reply)
Discussion started by: ajay234
1 Replies
4. Shell Programming and Scripting
Im making a script that goes out to about 200 servers and grabs log files daily and need to make sure the script gets all the servers it can even if one is out. I am ftp'ing the files over but if i cant connect to the server the process looks like it dies and the script is finished. (4 Replies)
Discussion started by: rcunn87
4 Replies
5. AIX
Why is one of my blade hanging and does nothing after trying to boot from CD???
==================
I tried to press 1....JS20 does not support SMS menu
Here's what I see after 30 minutes...
-------------------------------------------------------------------------------
... (0 Replies)
Discussion started by: mifch
0 Replies
6. UNIX for Advanced & Expert Users
Hi,
I would like to know if the call
of pthread_join( thread,&status) for a thread already created
in main function will free the memory allocated to thread after the pthread_join retruns or should I wait the
termination of main function?
Is there any need to cancel or exit the thread if I... (0 Replies)
Discussion started by: Behnaz
0 Replies
7. Programming
Main function creates Thread0 and Thread1 by using pthread_create systemcall.
In Thread0() {
we are calling pthread_exit(0) ;
}
and in Thread1() {
status= pthread_join(tid,NULL);
sprintf(ebuf,"timer6: can't join with thread0, status: %d",status);
Assert(status==0,ebuf);
}
... (4 Replies)
Discussion started by: mansa
4 Replies
8. Programming
Hi...
this simple code has warning messages but it work..
void *th(void *g){
int y = 10;
pthread_exit((void*)y);
}
int main(int argn, char ** argp){
void * ret;
pthread_t thread;
pthread_create(&thread, NULL, th, NULL);
pthread_join(thread,... (10 Replies)
Discussion started by: prompt
10 Replies
9. IP Networking
Hi, on our Solaris 10 servers, one day 'netstat -a' command return very slow after TCP output, wait 5 minute on this line -
SCTP:
Local Address Remote Address Swind Send-Q Rwind Recv-Q StrsI/O State
------------------------------- ------------------------------- ------ ------ ------ ------... (6 Replies)
Discussion started by: ora_dba
6 Replies
10. Solaris
Hi guys,
I'm new with solaris.
I just received sunfire T2000 server.
Problem:
ALOM keep hang/stuck/jammed.
Steps do before it hang :
1. Connect to T2000 (using RJ45 - DB9 cable)
2. Open putty, connect via serial.
3. Power on the server.
4. Its loading.
5. then, hang.
... (1 Reply)
Discussion started by: rajasraf
1 Replies
LEARN ABOUT CENTOS
rhn_check
RHN_CHECK(8) Red Hat, Inc. RHN_CHECK(8)
NAME
rhn_check - Check for and execute queued actions on RHN.
SYNOPSIS
rhn_check [options]
DESCRIPTION
rhn_check is a client program that connects to "Spacewalk Server", "Red Hat Satellite" or "Red Hat Network Classic" and receives queued
actions for this particular system. After receiving the actions, rhn_check will then process them, and return the results to Spacewalk.
OPTIONS
-v, --verbose
Increase the debugging output.
--proxy=PROXY
Specify an http proxy to use.
--proxyUser=PROXYUSER
Specify a username to use for an authenticated proxy. This option must be used in conjunction with proxyPassword.
--proxyPassword=PROXYPASSWORD
Specify a password to use for an authenticated proxy. This option must be used in conjunction with proxyUser.
--version
Show the program's version number and exit.
-h, --help
Show a help message and exit.
FILES
/etc/sysconfig/rhn/systemid
The digital server ID for this machine if the system has been registered onto "Spacewalk Server", "Red Hat Satellite" or "Red Hat
Network Classic". This file does not exist otherwise.
/etc/sysconfig/rhn/up2date
The common configuration file used by RHN client programs.
SEE ALSO
rhn_register(8), rhnreg_ks(8), rhnsd(8), rhn-profile-sync(8), rhnplugin(8), up2date(5).
AUTHORS
See the AUTHORS file included with this software.
This manual page was written by James Bowes <jbowes@redhat.com>
BUGS
Report bugs to <http://bugzilla.redhat.com>.
COPYRIGHT
Copyright (C) 1999-2010 Red Hat, Inc.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICU-
LAR PURPOSE.
Linux 2010 August 30 RHN_CHECK(8)