PARI/GP Bug report logs - #124
handling interrupt

Package: pari; Maintainer for pari is Aurel Page <aurel.page@normalesup.org>; Source for pari is src:pari.

Reported by: igor@txc.com

Date: Fri, 10 Dec 2004 17:18:09 UTC

Severity: normal

Done: Bill Allombert <allomber@math.u-bordeaux.fr>

Bug is archived. No further changes may be made.

Full log


Message #55 received at 124@pari.math.u-bordeaux.fr (full text, mbox, reply):

Received: (at 124) by pari.math.u-bordeaux.fr; 18 Mar 2006 10:44:17 +0000
From igor@txc.com Sat Mar 18 11:44:17 2006
Received: from transfire.transwitch.com ([63.119.242.254] helo=mailproxy2.txc.com)
	by pari with esmtp (Exim 3.35 #1 (Debian))
	id 1FKYuu-0000bw-00
	for <124@pari.math.u-bordeaux.fr>; Sat, 18 Mar 2006 11:44:16 +0100
Received: from [192.168.10.43] (helo=igor.btc.txc.com)
	by mailproxy2.txc.com with esmtp (Exim 4.42)
	id 1FKYuN-0001fB-WF; Sat, 18 Mar 2006 05:43:44 -0500
Received: from igor.btc.txc.com (localhost.localdomain [127.0.0.1])
	by igor.btc.txc.com (Postfix) with ESMTP id E02047980A7;
	Sat, 18 Mar 2006 05:43:43 -0500 (EST)
Received: (from igor@localhost)
	by igor.btc.txc.com (8.13.4/8.13.4/Submit) id k2IAhhUU010316;
	Sat, 18 Mar 2006 05:43:43 -0500
Date: Sat, 18 Mar 2006 05:43:43 -0500
From: Igor Schein <igor@txc.com>
To: Bill Allombert <allomber@math.u-bordeaux.fr>
Cc: 124@pari.math.u-bordeaux.fr
Subject: Re: Bug#124: handling interrupt
Message-ID: <20060318104343.GA8696@txc.com>
Reply-To: igor@txc.com
References: <20041209215919.GV13401@txc.com> <20041210170624.GB13401@txc.com> <20041210175231.GC30613@seventeen> <20041214201724.GM13401@txc.com> <20050904145150.GV10361@seventeen>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20050904145150.GV10361@seventeen>
User-Agent: Mutt/1.4.2.1i
X-TXC-MailScanner-Information: Please contact SysAdmin group (help@txc.com) for more information
X-TXC-MailScanner: Found to be clean
X-MailScanner-From: igor@txc.com
On Sun, Sep 04, 2005 at 04:51:50PM +0200, Bill Allombert wrote:
> On Tue, Dec 14, 2004 at 03:17:24PM -0500, Igor Schein wrote:
> > On Fri, Dec 10, 2004 at 06:52:31PM +0100, Bill Allombert wrote:
> > > > #22 0x00000000005e689a in pari_err (numerr=19) at ../src/language/init.c:989
> > > > #23 <signal handler called>
> > > 
> > > If you have some idea how to reproduce it, you can try them under
> > > valgrind (on a x86). Maybe valgrind will catch a problem that do not
> > > upset the 32bit libc.
> > 
> > Well, since I only have this problem on x86_64, I don't see how I'll
> > be able to run 64bit binaries through valgrind.
> 
> The latest valgrind release (3.0) support x86_64, so maybe you could try it.
> 
> Cheers,
> Bill.
> 
> 

I think I've finally tackled this problem.  The dirty solution was:

chmod 0 /lib*/tls

Now the background.  First of all, I noticed these problems only occur
on CentOS 3 machines (both 32 and 64bit).   Then I noticed gp gets
runtime linking to /lib/tls/libc.so.6, which comes from here:

% ldconfig -p | grep libc.so
        libc.so.6 (libc6, hwcap: 0x8000000000000000, OS ABI: Linux 2.4.20) => /lib/tls/libc.so.6
        libc.so.6 (libc6, hwcap: 0x8000000000000, OS ABI: Linux 2.4.1) => /lib/i686/libc.so.6
        libc.so.6 (libc6, OS ABI: Linux 2.2.5) => /lib/libc.so.6

I couldn't quickly figure out how to change that order, so I just hid
the offending library from the user.  As a result, I can't reproduce
^C problem at will any more.

Here's the link describing the difference between 3 versions of the
library: 

http://people.redhat.com/drepper/assumekernel.html

I'd like to use this workaround for some time to check my theory, but
I have a feeling I nailed it :)

Is there anything in GP signal handling mechanism which would make
NPTL POSIX thread library a bad choice?  I don't like the dirty
solution for obvious reason, but I am not sure how to tell Configure
not to use tls.  So the ideal solution would still be to try to change
something in pari code, as opposed to on the system level, to fix this
problem.  CentOS 4 is most likely clean, but my machines must stay
CentOS 3 for compatibity reasons.

Thanks

Igor

As a reminder, here's a stack of a hanged session (--without-readline):

#0  0x005f1109 in __lll_mutex_lock_wait () from /lib/tls/libc.so.6
#1  0x0057c454 in _L_mutex_lock_2570 () from /lib/tls/libc.so.6
#2  0x00571c5e in new_do_write () from /lib/tls/libc.so.6
#3  0x08223d4c in free_graph () at ../src/graph/plotport.c:220
#4  0x0821eb18 in gp_quit () at ../src/gp/gp.c:786
#5  0x0821f263 in escape0 (tch=0x9b34459 "q") at ../src/gp/gp.c:895
#6  0x0821f559 in escape (tch=0x9b34459 "q") at ../src/gp/gp.c:933
#7  0x0821f9db in check_meta (buf=0x9b34459 "q") at ../src/gp/gp.c:1010
#8  0x08220b8e in gp_main_loop (ismain=1) at ../src/gp/gp.c:1451
#9  0x08221be1 in main (argc=3, argv=0xfeffea54) at ../src/gp/gp.c:1863



Send a report that this bug log contains spam.


Bill Allombert <allomber@math.u-bordeaux.fr>. Last modified: Sat Aug 26 16:38:09 2023; Machine Name: pari

PARI/GP Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.