Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

"Input/output error" when running shell script

465 views
Skip to first unread message

Joerg Morbitzer

unread,
Jun 19, 2003, 2:19:00 AM6/19/03
to

Hi all,

I have a really strange problem since a couple of days: I am running Debian
Sid, compiling my software every night using a small shell script (/bin/sh)
via crontab. Now, since a few days, for some reason, the shell script exits
with this error message:

/bin/sh: /home/sol3/bin/full-pull: /bin/sh: bad interpreter: Input/output
error


Now, when I log into my computer in the morning and fire the crontab command
in my xterm window, I first get the same error message again, but when I
run the same(!) command straight away again, my shell script suddenly works
as expected!! Look at this:

---------------------------------- cut ------------------------------------
titan:~$ sh -x /home/sol3/bin/full-pull
/home/sol3/bin/full-pull: /home/sol3/bin/full-pull: Input/output error
titan:~$ sh -x /home/sol3/bin/full-pull
+ '[' -z sol3 ']'
+ exec

etc. etc.
---------------------------------- cut ------------------------------------

???


The beginning of my script looks like this:


---------------------------------- cut ------------------------------------
titan:~$ more /home/sol3/bin/full-pull
#!/bin/sh
# $Id: full-pull,v 1.27 2003/06/13 17:52:15 duz Exp $

# Compile *everything* on the system that runs this script.

if [ -z "$USER" ]
then
USER=`cd; pwd`
USER=`basename $USER`
export USER
fi
exec >/tmp/full-pull-${USER}.out 2>&1
set -x

etc. etc.
---------------------------------- cut ------------------------------------

Any ideas what this can be?

Thanks in advance,

Joerg.

Message has been deleted

Joerg Morbitzer

unread,
Jun 19, 2003, 2:47:41 AM6/19/03
to

>
> JM> Any ideas what this can be?
>
> What output does strace /home/sol3/bin/full-pull generate?
> Does it get the I/O error, too?
>

I think I have a general operating system problem, look at this (wanted to
do some further testings):

titan:~$ cp /home/sol3/bin/full-pull /tmp
cp: reading `/home/sol3/bin/full-pull': Input/output error
titan:~$ cp /home/sol3/bin/full-pull /tmp
titan:~$


Perhaps it is a NFS problem as /home/sol3/ is mounted from a FreeBSD-4.8 NFS
server. Unfortunately neither my Linux box nor the FreeBSD machine show
anything in /var/log/ :-(

Tonight I try to run my compile-script from the local harddisk.

Kind regards, Joerg.

Joerg Morbitzer

unread,
Jun 19, 2003, 4:11:58 AM6/19/03
to

>
> What output does strace /home/sol3/bin/full-pull generate?
> Does it get the I/O error, too?
>

Me again, I now have a strace from "cp /home/sol3/bin/full-pull /tmp" :

...
brk(0) = 0x80524a8
brk(0x80534a8) = 0x80534a8
brk(0) = 0x80534a8
brk(0x8054000) = 0x8054000
geteuid32() = 1000
umask(0) = 07
lstat64("/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=32768, ...}) = 0
stat64("/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=32768, ...}) = 0
stat64("/home/sol3/bin/full-pull", {st_mode=S_IFREG|0770, st_size=4094,...})
= 0
stat64("/tmp/full-pull", {st_mode=S_IFREG|0770, st_size=4094, ...}) = 0
open("/home/sol3/bin/full-pull", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0770, st_size=4094, ...}) = 0
open("/tmp/full-pull", O_WRONLY|O_TRUNC|O_LARGEFILE) = 4
fstat64(4, {st_mode=S_IFREG|0770, st_size=0, ...}) = 0
fstat64(3, {st_mode=S_IFREG|0770, st_size=4094, ...}) = 0
read(3, 0xbfffe0f0, 4096) = -1 EIO (Input/output error)
write(2, "cp: ", 4cp: ) = 4
write(2, "reading `/home/sol3/bin/full-pul"..., 34reading
`/home/sol3/bin/full-pull') = 34
write(2, ": Input/output error", 20: Input/output error) = 20
write(2, "\n", 1) = 1
close(4) = 0
close(3) = 0
exit_group(1) = ?
titan:/tmp$


What does it mean?

0 new messages