scsh-users
[Top] [All Lists]

Re: scsh 0.6.0 (possible) bug

To: Sriram Thaiyar <sri@asu.edu>
Subject: Re: scsh 0.6.0 (possible) bug
From: Martin Gasbichler <gasbichl@informatik.uni-tuebingen.de>
Date: 23 Oct 2001 10:23:00 +0200
Cc: scsh-bugs@zurich.ai.mit.edu
Sender: gasbichl@informatik.uni-tuebingen.de
>>>>> "Sriram" == Sriram Thaiyar <sri@asu.edu> writes:

Sriram> I have a small script which deletes all my temporary files under /tmp
Sriram> (Something similar what Olin has in the Scsh Manual).  This works under
Sriram> Scsh 0.5.3, but doesn't under Scsh 0.6.0, which I picked up from the
Sriram> CVS on Friday, October 19.  I am running it under SunOS 5.7.

Sriram> This is the core of the script, which returns all files belonging to
Sriram> me under /tmp:

Sriram>   (with-cwd "/tmp"
>> (filter (lambda (file) (= (file-owner file) me)) ; me = (user-uid)
Sriram>             (directory-files)))

Sriram> Under Scsh 0.6.0 this error message is printed:

Sriram>   Error: exception
Sriram>          wrong-type-argument
Sriram>          (return-from-callback "scheme_stat" '#{Random object})

Sriram> Sometimes this is printed:

Sriram>   Error: exception
Sriram>          wrong-type-argument
Sriram>          (return-from-callback "scheme_stat" <Error while displaying 
condition.>

Sriram> And at other times, it crashes:

Sriram>   Process scheme segmentation Fault (core dumped)

I used SunOS 5.7 , but I cannot reproduce this at all.

Do you get this error if you just enter

(with-cwd "/tmp"
 (filter (lambda (file) (= (file-owner file) (user-uid)))
            (directory-files)))

directly after the start of scsh 0.6?


Sriram> The script works fine under Scsh 0.5.3 and I have used it at least two
Sriram> to three times a week since 0.5.3's release.

Sriram> I found out that certain files aren't readable under /tmp.  Maybe this
Sriram> is causing the problem:

>> (define a)
>> (with-cwd "/tmp/"
>> (filter (lambda (f)
Sriram>                 ;; Find out the file that causes the problem
Sriram>                 (set! a f)
Sriram>                 (= (file-owner f) (user-uid)))
Sriram>               (directory-files)))

>> a
Sriram>   "krb5cc_109161"

Can you mail me the exact permissions and owner/group information of this file?

>> (file-readable? "/tmp/krb5cc_109161")
Sriram>   Error: exception
>> gc-protection-mismatch
>> (return-from-callback "scheme_stat")

This gc-protection-mismatch is probably only an outcome of the error
above. I guess you don't get it if you enter the expression directly
after the start of scsh?

Sriram> Under Scsh 0.5.3:
  
>> (file-readable? "/tmp/krb5cc_109161")  ;; The above file
Sriram>   #f

Sriram> Hopefully this is kinda clear.  If not please email me.  I did read
Sriram> the source code, but it wasn't of any help.


-- 
Martin

<Prev in Thread] Current Thread [Next in Thread>