Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Very odd 'bash' problem in RH7.1 - What!?!!



On Tue, May 29, 2001 at 12:55:35PM +0900, Dennis McMurchy wrote:
>   Interesting, eh?  I should add here before I forget again, that the
> only two files that have shown this behaviour (so far) are old
> executables that I added myself to a fresh "Everything" installation of
> RedHat 7.1 (I would have assumed that this had all the appropriate
> older libraries that I might need, but it apparently doesn't include
> the 'ld-linux.so.1' that 'pppcosts' probably needs).
> 
>   Now, I could try recompiling these things, but, surely, this new fact
> that ldd, for example, reports that these files don't exist suggests that
> the problem lies elsewhere, perhaps where Thomas O'Dowd suggests.  Also,
> I just checked another old executable I've added in, and there seems to
> be no problem running it, or getting e.g. ldd to see it:

I would try recompiling. Since it doesn't work for tcsh it is not a 
shell specific problem, but rather looks like a missing ld-linux.so.1
library as someone else pointed out. 

> > Another trick I would try is running strace on your current shell
> > process from another terminal. ie $ strace -p <PID_OF_OTHER_SHELL>
> > then try the command and see if you can see what might be failing...
> > you might want to use the -f option if it manages to fork and exec
> > successfully hitting on the problem in the sub shell.
> 
>   I'm afraid that I couldn't understand the last two lines here, but
> I did manage to try the 'strace -p <PID_OF_OTHER_SHELL>' that you
> suggested (took a couple of tries to realize that I couldn't capture
> the output without 2>&1 redirection).  This means nothing to me, but
> here's the output for a run of the following command:
> 
> fork()                                  = 2103
> setpgid(2103, 2103)                     = 0
> rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
> --- SIGCHLD (Child exited) ---
> wait4(-1, [WIFEXITED(s) && WEXITSTATUS(s) == 127], WNOHANG|WUNTRACED, NULL) = 2103

Bash forked which means it found your command. The child would then have done
a exec and hit some problem as the child then exited, hence the signchld and
the call to wait in the parent (bash). If you had used the command
$ strace -f -p <PID>
then it would have also shown you what the child was doing. It probably
will show it failing to load the ld-linux.so.1 library if you try it. This
will look like an "open(....)" with a minus int returned instead of 
a positive int. Not all open failures matter, as it will search the library
path as it goes, but you'll see it give up.

Tom.
-- 
Thomas O'Dowd. - Nooping - http://nooper.com
tom@example.com - Testing - http://nooper.co.jp/labs


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links