Welcome to iraf.net Tuesday, April 16 2024 @ 04:12 AM GMT


 Forum Index > Help Desk > General IRAF New Topic Post Reply
 2.15a : able to run old binaries?
   
Mark S.
 03/08/2010 07:27PM (Read 2045 times)  
+----
Newbie

Status: offline


Registered: 08/03/2009
Posts: 10
Should I expect IRAF 2.15 to be able to communicate with binaries compiled by IRAF 2.14 ?When I try:cl
stsdas
iminfo dev$pixit looks like this:stsdas> iminfo dev$pix
ERROR: Cannot open connected subprocess (./x_headers.e)
stsdas> dir stsdas$bin/x_headers.e
xb-rwr--- iraf 2104282 Mar 7 21:44 stsdas$bin/x_headers.e
stsdas> but if I run the same task out of the same directory in iraf 2.14, it works. Is this related to a change in the communication protocol between iraf and the tasks?Mark S.

 
Profile Email
 Quote
fitz
 03/08/2010 07:27PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
A 'cannot open connected subprocess' means that either the binary isn't in the right place, or it cannot be executed for some reason. Verify there is an x_headers.e file in the stsdas$bin.linux64 directory and that it has execute permissions. (Note you may need to create a 'bin.linux64' symlink that points to the directory with the old binaries so this path can be resolved.) If so, try starting it from outside iraf, e.g. % /iraf/extern/stsdas/bin.linux64/x_headers.eYou'll either see a host error message (e.g. a missing 32-bit shared library or incompatible version) that may explain things, or the '> ' prompt meaning it started okay (type 'bye' to quit).The communication between processes hasn't actually changed per se, although with the change in the size of INT there may be something I overlooked. In this case though I think it's a simple problem in finding binaries in a bin.linux64 directory.-Mike

 
Profile Email
 Quote
Mark S.
 03/08/2010 07:27PM  
+----
Newbie

Status: offline


Registered: 08/03/2009
Posts: 10
That helped. Now it says[code:1:0646fc11d6]
stsdas> iminfo dev$pixPANIC in `/usr/stsci/iraf-2.15a/stsdas/bin.linux64/x_headers.e': Memory has been corrupted
stsdas>
[/code:1:0646fc11d6]I'm going to try to debug that, but already it leads to my first suggested patch:In unix/os/zpanic.c in the function ZPANIC, it says:[code:1:0646fc11d6]
/* Terminate process with a core dump if the debug_sig flag is set.
*/
if (debug_sig) {
#ifdef LINUX
signal (SIGABRT, SIG_DFL);
kill (getpid(), SIGABRT);
[/code:1:0646fc11d6]The definition of debug_sig is in unix/os/zxwhen.c, but it is just
[code:1:0646fc11d6]
int debug_sig = 0;
[/code:1:0646fc11d6]There are no other assignments anywhere. If I were making the change, I would change ZPANIC to say[code:1:0646fc11d6]
if (debug_sig || getenv("IRAF_ALLOW_CORE_DUMP") ) {
[/code:1:0646fc11d6]so that I could flip between normal operation and allowing the core dump without compiling the entire IRAF kernel.I suspect there is a better place to put it (like maybe in some initialization code somwehere), but I am not familiar enough with IRAF internals to know where it should go.I realize the implications, of course: My old executable compiled with the old iraf would not have that capability. Still, I think this is a useful feature going forward.Mark S.

 
Profile Email
 Quote
fitz
 03/08/2010 07:27PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
I dont' think this has anything to do with v2.15, using the STScI-supplied binary on a 64-bit machine fails with an "Out of memory" error for me. This basically just means the libc malloc() call either failed or more likely returned a 64-bit pointer value that was seen as a failed request. This is one of the known issues with 32-bit binaries on 64-bit systems so unless you trace it to something else I'm not sure there's much to debug here.As for the core dump: Normally we'd set the 'debug_sig' in a debugger or else simply set a break in 'zpanic_' and get the stack trace then. It's easy enough to add a method to dump a core file, the reason we don't do it by default is that error recovery allows tasks to continue to run so more manual methods are better to trap the error. Thanks for the suggestion.-Mike

 
Profile Email
 Quote
   
Content generated in: 0.25 seconds
New Topic Post Reply

Normal Topic Normal Topic
Sticky Topic Sticky Topic
Locked Topic Locked Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
Filtered HTML Allowed 
Censored Content 
dog allergies remedies cialis 20 mg chilblain remedies


Privacy Policy
Terms of Use

User Functions

Login