This is the mail archive of the libc-alpha@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[Various] libc/1400: Programs using pthreads just hang. (on Sparc IPX)



Hi,

Michael reported a problem with pthreads on his Sparc IPX.  Anybody
here who can help him?

The problem doesn't exist on my ix86.

Andreas



Topics:
   libc/1400: Programs using pthreads just hang.
   Re: libc/1400: Programs using pthreads just hang.
   Re: libc/1400: Programs using pthreads just hang.


----------------------------------------------------------------------

Date: Mon, 18 Oct 1999 02:35:14 -0400
From: mfaurot@atww.net
To: bugs@gnu.org
Subject: libc/1400: Programs using pthreads just hang.
Message-Id: <199910180635.CAA10116@delysid.gnu.org>


>Number:         1400
>Category:       libc
>Synopsis:       Programs using pthreads just hang.
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    libc-gnats
>State:          open
>Class:          sw-bug
>Submitter-Id:   unknown
>Arrival-Date:   Mon Oct 18 02:40:01 EDT 1999
>Last-Modified:
>Originator:     mfaurot@atww.net
>Organization:
net
>Release:        2.1.1
>Environment:
RedHat Linux v6.0 Sparc running on an IPX w/64M memory.  Kernel 2.2.12.  egcs version info "gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)"
>Description:
I've been trying to build MySQL on my IPX for several weeks, but have been unsuccesful.  When running the configure program for MySQL it will hang while it tests for restartable system calls.  This program is normally linked against -lpthreads, but when it is not linked against -lpthread it runs okay.  Here is sample output from gdb of where this program hangs:

$ gdb ./save 3542

Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "sparc-redhat-linux"...

/tmp/3633: No such file or directory.
Attaching to program `/tmp/./save', process 3633
Reading symbols from /lib/libdl.so.2...done.
Reading symbols from /lib/libnsl.so.1...done.
Reading symbols from /lib/libm.so.6...done.
Reading symbols from /usr/lib/libz.so.1...done.
Reading symbols from /lib/libcrypt.so.1...done.
Reading symbols from /lib/libpthread.so.0...done.
Reading symbols from /lib/libc.so.6...done.
Reading symbols from /lib/ld-linux.so.2...done.
__pthread_compare_and_swap (ptr=0xe021dbdc, oldval=0, newval=1,
    spinlock=0xe021dbe0)
    at ../linuxthreads/sysdeps/sparc/sparc32/pt-machine.h:32
../linuxthreads/sysdeps/sparc/sparc32/pt-machine.h:32: No such file or directory
>How-To-Repeat:
I believe this only affects IPX and possibly other sun4c architecture machines.  Build the following sources:

save.h
- ---------------------------------------------------------------------
#define PACKAGE "mysql"
#define VERSION "3.22.26a"
#define PROTOCOL_VERSION 10
#define DOT_FRM_VERSION 6
#define SYSTEM_TYPE "unknown-linux-gnu"
#define MACHINE_TYPE "sparc"
#define HAVE_DIRENT_H 1
#define STDC_HEADERS 1
#define HAVE_SYS_WAIT_H 1
#define HAVE_FCNTL_H 1
#define HAVE_FLOAT_H 1
#define HAVE_LIMITS_H 1
#define HAVE_MEMORY_H 1
#define HAVE_PWD_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STDDEF_H 1
#define HAVE_STRINGS_H 1
#define HAVE_STRING_H 1
#define HAVE_SYS_MMAN_H 1
#define HAVE_SYS_TIMEB_H 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_SYS_UN_H 1   
#define HAVE_SYS_WAIT_H 1
#define HAVE_TERM_H 1
#define HAVE_UNISTD_H 1
#define HAVE_UTIME_H 1
#define HAVE_TERMIO_H 1
#define HAVE_TERMIOS_H 1
#define HAVE_SCHED_H 1
#define HAVE_CRYPT_H 1
#define HAVE_ALLOCA_H 1
#define HAVE_LIBM 1
#define HAVE_LIBNSL 1
#define HAVE_LIBCRYPT 1
#define HAVE_LIBZ 1
#define HAVE_LINUXTHREADS 1
#define HAVE_LIBPTHREAD 1
#define HAVE_STRTOK_R 1
#define HAVE_LIBDL 1 

save.c
- ----------------------------------------------------------------------
#include "save.h"
/* Exit 0 (true) if wait returns something other than -1,
   i.e. the pid of the child, which means that wait was restarted
   after getting the signal.  */
#include <sys/types.h>
#include <signal.h>
ucatch (isig) { }
main () {
  int i = fork (), status;
  if (i == 0) { sleep (3); kill (getppid (), SIGINT); sleep (3); exit (0); }
  signal (SIGINT, ucatch);
  status = wait(&i);
  if (status == -1) wait(&i);
  exit (status == -1);
}
     

- ---------------------------------------------------------------------
Use this command line:

	gcc save.c -o save -lpthread
%0
>Fix:
>Audit-Trail:
>Unformatted:



------------------------------

Date: Mon, 18 Oct 1999 03:10:03 -0400
From: Andreas Jaeger <aj@suse.de>
To: libc-gnats@gnu.org
Cc: gnats-admin@gnu.org
Subject: Re: libc/1400: Programs using pthreads just hang.
Message-Id: <199910180710.DAA06601@mescaline.gnu.org>

The following reply was made to PR libc/1400; it has been noted by GNATS.

From: Andreas Jaeger <aj@suse.de>
To: mfaurot@atww.net
Cc: bugs@gnu.org
Subject: Re: libc/1400: Programs using pthreads just hang.
Date: 18 Oct 1999 08:53:28 +0200

 >>>>> mfaurot  writes:
 
 >> Number:         1400
 >> Category:       libc
 >> Synopsis:       Programs using pthreads just hang.
 
 >> Release:        2.1.1
 >> Environment:
  > RedHat Linux v6.0 Sparc running on an IPX w/64M memory.  Kernel 2.2.12.  egcs version info "gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)"
 >> Description:
 
  > I've been trying to build MySQL on my IPX for several weeks, but
  > have been unsuccesful.  When running the configure program for
  > MySQL it will hang while it tests for restartable system calls.
  > This program is normally linked against -lpthreads, but when it is
  > not linked against -lpthread it runs okay.  Here is sample output
  > from gdb of where this program hangs:
 
  > $ gdb ./save 3542
 
  > Copyright 1998 Free Software Foundation, Inc.
  > GDB is free software, covered by the GNU General Public License, and you are
  > welcome to change it and/or distribute copies of it under certain conditions.
  > Type "show copying" to see the conditions.
  > There is absolutely no warranty for GDB.  Type "show warranty" for details.
  > This GDB was configured as "sparc-redhat-linux"...
 
  > /tmp/3633: No such file or directory.
  > Attaching to program `/tmp/./save', process 3633
  > Reading symbols from /lib/libdl.so.2...done.
  > Reading symbols from /lib/libnsl.so.1...done.
  > Reading symbols from /lib/libm.so.6...done.
  > Reading symbols from /usr/lib/libz.so.1...done.
  > Reading symbols from /lib/libcrypt.so.1...done.
  > Reading symbols from /lib/libpthread.so.0...done.
  > Reading symbols from /lib/libc.so.6...done.
  > Reading symbols from /lib/ld-linux.so.2...done.
  > __pthread_compare_and_swap (ptr=0xe021dbdc, oldval=0, newval=1,
  >     spinlock=0xe021dbe0)
  >     at ../linuxthreads/sysdeps/sparc/sparc32/pt-machine.h:32
  > ../linuxthreads/sysdeps/sparc/sparc32/pt-machine.h:32: No such file or directory
 >> How-To-Repeat:
 
  > I believe this only affects IPX and possibly other sun4c
  > architecture machines.  Build the following sources:
 
 This doesn't happen on ix86 with glibc 2.1.2.  Since you're using an
 older glibc, I advise to first try the latest released sources: 2.1.2.
 
 I don't know if any of the glibc developers has a IPX.  If the problem
 persists with 2.1.2, you might need to debug this yourself.
 
 Please inform me, whether 2.1.2 works for you.
 
 Andreas
 -- 
  Andreas Jaeger   
   SuSE Labs aj@suse.de	
    private aj@arthur.rhein-neckar.de



------------------------------

Date: Mon, 18 Oct 1999 11:12:00 -0400
From: Michael Faurot <mfaurot@atww.net>
To: Andreas Jaeger <aj@suse.de>
Cc: bugs@gnu.org
Subject: Re: libc/1400: Programs using pthreads just hang.
Message-ID: <19991018111200.F19246@atww.net>
References: <199910180635.CAA10116@delysid.gnu.org> <u8zoxhjh1z.fsf@gromit.rhein-neckar.de>
Content-Type: text/plain; charset=us-ascii

On Mon, Oct 18, 1999 at 08:53:28AM +0200, Andreas Jaeger wrote:
> >>>>> mfaurot  writes:
> 
> >> Number:         1400
> >> Category:       libc
> >> Synopsis:       Programs using pthreads just hang.
> 
> >> Release: 2.1.1 >> Environment: > RedHat Linux v6.0 Sparc running
> on an IPX w/64M memory. Kernel 2.2.12. egcs version info "gcc version
> egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)" >> Description:
[...]
> 
> This doesn't happen on ix86 with glibc 2.1.2.  Since you're using an
> older glibc, I advise to first try the latest released sources: 2.1.2.

Actually I did try that, with the same results.

> I don't know if any of the glibc developers has a IPX.  If the problem
> persists with 2.1.2, you might need to debug this yourself.

Affraid I'm not a C programmer.  Sun IPX systems can be had very
inexpensively though.  This site has them for $65:

	http://www.workstation.net/

I could also provide someone a login on my IPX.

> Please inform me, whether 2.1.2 works for you.





------------------------------

End of forwardAFAtWT Digest
***************************



-- 
 Andreas Jaeger   
  SuSE Labs aj@suse.de	
   private aj@arthur.rhein-neckar.de

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]