Re: rsync 2.5.5 segmentation fault on Linux x86.

2002-10-02 Thread tim . conway

stdin may be closed, or may appear to be a socket, fifo, pipe, or file, 
probably some stuff i don't know about.  I remember rsync used to look at 
something in stdio, and act as if it were invoked with --daemon, even 
without that flag.  Somebody'll correct the details.  I just know that I 
have had, in the past, applications that didn't run in cron without   
and 2.

Tim Conway
[EMAIL PROTECTED] reorder name and reverse domain
303.682.4917 office, 303.921.0301 cell
Philips Semiconductor - Longmont TC
1880 Industrial Circle, Suite D
Longmont, CO 80501
Available via SameTime Connect within Philips, caesupport2 on AIM
There are some who call me Tim?




Erik Enge [EMAIL PROTECTED]
Sent by: [EMAIL PROTECTED]
10/01/2002 02:10 PM

 
To: Tim Conway/LMT/SC/PHILIPS@AMEC
cc: [EMAIL PROTECTED]
Subject:Re: rsync 2.5.5 segmentation fault on Linux x86.
Classification: 



[EMAIL PROTECTED] writes:

 Erik: One more thing to try: redirect in /dev/null to the rsync
 command. At one time, at least, its behaviour was different based on
 the nature of its STDIN.  Make sure STDERR and STDIN are redirected
 somewhere, too... either a file or null.

All our output are redirected to a file.  What would STDIN for a cronjob
be?  Somehow that doesn't seem to make sense.

Thanks for your response,

Erik.
-- 
To unsubscribe or change options: 
http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html



-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html



rsync 2.5.5 segmentation fault on Linux x86.

2002-10-01 Thread Erik Enge

Hi all.

I have a script which I call from cron.  It basically does some stopping
of a few services, rsyncs all files to a remote server and then starts
the services again.  However, rsync segfaults:

  /share/bin/cron.root.backup.sh: line 28: 18453 Segmentation fault  rsync -acx 
--delete ${_backup_dirs} backup-server::backup-client

If I run rsync from the command-line everything works as expected and no
segmentation fault.

I'm really lost where to start debugging this problem, has anybody else
seen this before and would be able to give me a hint?

It's rsync 2.5.5 compiled from source with gcc 2.96 on RedHat Linux 7.2.

Thanks for any pointers,

Erik Enge.
-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html



Re: rsync 2.5.5 segmentation fault on Linux x86.

2002-10-01 Thread Paul Haas

On 1 Oct 2002, Erik Enge wrote:

 Hi all.

 I have a script which I call from cron.  It basically does some stopping
 of a few services, rsyncs all files to a remote server and then starts
 the services again.  However, rsync segfaults:

   /share/bin/cron.root.backup.sh: line 28: 18453 Segmentation fault  rsync -acx 
--delete ${_backup_dirs} backup-server::backup-client

 If I run rsync from the command-line everything works as expected and no
 segmentation fault.

This isn't specific to rsync.  When I've had cron jobs that fail, but wrk
interactively, I add something like this to the script:


  echo this is try 1 of cron.root.backup.sh on  /tmp/backup.sh.$$.debug
  date  /tmp/backup.sh.$$.debug
  printenv  /tmp/backup.sh.$$.debug
  ulimit -a  /tmp/backup.sh.$$.debug
  echo the rsync I'll get is  /tmp/backup.sh.$$.debug
  type rsync  /tmp/backup.sh.$$.debug
  whoami  /tmp/backup.sh.$$.debug

Then I run it once interactively and once through cron and compare stuff.

Usually it's pretty obvious which environment variable is the problem.


 I'm really lost where to start debugging this problem, has anybody else
 seen this before and would be able to give me a hint?

 It's rsync 2.5.5 compiled from source with gcc 2.96 on RedHat Linux 7.2.

 Thanks for any pointers,

 Erik Enge.
 --
 To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
 Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html


-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html



Re: rsync 2.5.5 segmentation fault on Linux x86.

2002-10-01 Thread Erik Enge

Paul Haas [EMAIL PROTECTED] writes:

 This isn't specific to rsync.  

I must be missing something.  The fact that rsync segfaults isn't
specific to rsync?

We run tens of thousands of cronjobs a week and none of them have so far
segfaulted.

However, since I can't make it segfault on the command-line, I agree
that something else is probably affecting it.  I've also tried
reproducing it, but it doesn't seem to want to segfault.

I am going to add bunches of debug information to the real cronjob that
runs this night to see if that will reveal anything.

 Then I run it once interactively and once through cron and compare
 stuff.
 
 Usually it's pretty obvious which environment variable is the problem.

Thanks for the tip.

I did that, but couldn't find anything that was very different.  It
seems like you are saying that you can make rsync segfault depending on
what environment variables you have set; which ones would these be?

Erik.
-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html



Re: rsync 2.5.5 segmentation fault on Linux x86.

2002-10-01 Thread Erik Enge

Paul Haas [EMAIL PROTECTED] writes:

 Then I run it once interactively and once through cron and compare stuff.
 
 Usually it's pretty obvious which environment variable is the problem.

I also noticed in the logs that rsync exists with exit code 12:

  Oct  1 01:31:59 backup-server inetd[1282]: pid 1935: exit status 12
  Oct  1 02:06:37 backup-server rsyncd[1936]: wrote 32 bytes  read 831588069 bytes  
total
   size 36516321121 

Does that tell us anything more of what might be the problem?

Erik.
-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html



Re: rsync 2.5.5 segmentation fault on Linux x86.

2002-10-01 Thread tim . conway

Erik:  One more thing to try:  redirect in /dev/null to the rsync command. 
 At one time, at least, its behaviour was different based on the nature of 
its STDIN.  Make sure STDERR and STDIN are redirected somewhere, too... 
either a file or null.
Some programs test their STDIO to see what environment they're running in, 
and may do something unexpected if they see what appears to be a socket, 
for instance(as is the case with some implementations of cron).
I've run into a few other things that didn't want to run from cron until I 
overrode STDIO. 

Tim Conway
[EMAIL PROTECTED] reorder name and reverse domain
303.682.4917 office, 303.921.0301 cell
Philips Semiconductor - Longmont TC
1880 Industrial Circle, Suite D
Longmont, CO 80501
Available via SameTime Connect within Philips, caesupport2 on AIM
There are some who call me Tim?




Erik Enge [EMAIL PROTECTED]
Sent by: [EMAIL PROTECTED]
10/01/2002 12:49 PM

 
To: [EMAIL PROTECTED]
cc: (bcc: Tim Conway/LMT/SC/PHILIPS)
Subject:Re: rsync 2.5.5 segmentation fault on Linux x86.
Classification: 



Paul Haas [EMAIL PROTECTED] writes:

 Then I run it once interactively and once through cron and compare 
stuff.
 
 Usually it's pretty obvious which environment variable is the problem.

I also noticed in the logs that rsync exists with exit code 12:

  Oct  1 01:31:59 backup-server inetd[1282]: pid 1935: exit status 12
  Oct  1 02:06:37 backup-server rsyncd[1936]: wrote 32 bytes  read 
831588069 bytes  total
   size 36516321121 

Does that tell us anything more of what might be the problem?

Erik.
-- 
To unsubscribe or change options: 
http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html



-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html



Re: rsync 2.5.5 segmentation fault on Linux x86.

2002-10-01 Thread Erik Enge

[EMAIL PROTECTED] writes:

 Erik: One more thing to try: redirect in /dev/null to the rsync
 command. At one time, at least, its behaviour was different based on
 the nature of its STDIN.  Make sure STDERR and STDIN are redirected
 somewhere, too... either a file or null.

All our output are redirected to a file.  What would STDIN for a cronjob
be?  Somehow that doesn't seem to make sense.

Thanks for your response,

Erik.
-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html



Re: rsync 2.5.5 segmentation fault on Linux x86.

2002-10-01 Thread David Bigagli -Bokis-


Did you have a look at the core file? Building unstripped rsycn and then
debug the core should give you some ideas. The large number you are
getting may be caused by memory corruption.

 Usually it's pretty obvious which environment variable is the problem.

I think that you really mean process limits rather then environment
variables. That could be. Some applications do not like having some of
their limit being unlimited especially stack and datasize. The cron job
has its limits most likely different from your interactive shell. So one
thing to try is to set the limits in the cron job the same as your shell
environment.

I would first type 'limit' under csh or tcsh. Then in a simple uu.sh
script set the same limits, all of them, just before the rsync command
itself and submit the script to cron.

 Cheers,
David

On 1 Oct 2002, Erik Enge wrote:

 Paul Haas [EMAIL PROTECTED] writes:
 
  Then I run it once interactively and once through cron and compare stuff.
  
  Usually it's pretty obvious which environment variable is the problem.
 
 I also noticed in the logs that rsync exists with exit code 12:
 
   Oct  1 01:31:59 backup-server inetd[1282]: pid 1935: exit status 12
   Oct  1 02:06:37 backup-server rsyncd[1936]: wrote 32 bytes  read 831588069 bytes  
total
size 36516321121 
 
 Does that tell us anything more of what might be the problem?
 
 Erik.
 -- 
 To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
 Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
 

-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html