Quantcast

/bin/ gets deleted on error

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

/bin/ gets deleted on error

Felipe Vieira
Dear cygwin mailing list,

For the second time this week my /bin/ folder gets obliterated on an
error during normal usage. It is equivalent of doing the infamous "rm
-rf  /bin" .

1) I would like to know if there is a log for cygwin somewhere so I
can be more useful in specifying what happened.

2) My 'specs' are: windows 7 64 bits with cygwin64 . I wonder if
cygwin64 is considered 'stable'.

From what I recall the terminal was spamming messages containing the
words "fork" , "-1" and some others which I don't recall. And what I
did was trying to run a normal zsh script.

I am not able to tell exactly what I did on both occasions to trigger
this behavior.

Nevertheless thanks for the great software. If it were not for you
guys I don't know how I could cope with Windows.

Best,

Felipe Vieira.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: /bin/ gets deleted on error

Adam Dinwoodie-2
Hi Felipe,

On 13 April 2017 at 14:13, Felipe Vieira wrote:
> For the second time this week my /bin/ folder gets obliterated on an
> error during normal usage. It is equivalent of doing the infamous "rm
> -rf  /bin" .
>
> 1) I would like to know if there is a log for cygwin somewhere so I
> can be more useful in specifying what happened.

There is no general "log for cygwin"; it's up to individual applications to log
useful information.  In this case it'd be your zsh script logging the commands
it's running and/or the output it's producing.

>
> 2) My 'specs' are: windows 7 64 bits with cygwin64 . I wonder if
> cygwin64 is considered 'stable'.

Yes, Cygwin64 is stable.

> From what I recall the terminal was spamming messages containing the
> words "fork" , "-1" and some others which I don't recall. And what I
> did was trying to run a normal zsh script.

Sadly that doesn't tell us much.  You could take a look at the FAQ entry on
fork failures, and see if that gets you anywhere.

https://cygwin.com/faq.html#faq.using.fixing-fork-failures

> I am not able to tell exactly what I did on both occasions to trigger
> this behavior.

Can you provide something to narrow down the search?  Actually giving us the
zsh script you're trying to run would be a good start!

Adam

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: /bin/ gets deleted on error

marco atzeri-4
In reply to this post by Felipe Vieira


On 13/04/2017 15:13, Felipe Vieira wrote:

> Dear cygwin mailing list,
>
> For the second time this week my /bin/ folder gets obliterated on an
> error during normal usage. It is equivalent of doing the infamous "rm
> -rf  /bin" .
>
> 1) I would like to know if there is a log for cygwin somewhere so I
> can be more useful in specifying what happened.
>
> 2) My 'specs' are: windows 7 64 bits with cygwin64 . I wonder if
> cygwin64 is considered 'stable'.

extremely stable


> From what I recall the terminal was spamming messages containing the
> words "fork" , "-1" and some others which I don't recall. And what I
> did was trying to run a normal zsh script.
>
> I am not able to tell exactly what I did on both occasions to trigger
> this behavior.

any history file on your home directory ?



>
> Nevertheless thanks for the great software. If it were not for you
> guys I don't know how I could cope with Windows.
>
> Best,
>
> Felipe Vieira.
>

Regards
Marco


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: /bin/ gets deleted on error

cyg Simple

attachment0 (12 bytes) Download Attachment
encrypted.asc (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: /bin/ gets deleted on error

cyg Simple
Decrypted message -

On 4/13/2017 10:02 AM, cyg Simple wrote:

> On 4/13/2017 9:29 AM, Marco Atzeri wrote:
>>
>>
>> On 13/04/2017 15:13, Felipe Vieira wrote:
>>> Dear cygwin mailing list,
>>>
>>> For the second time this week my /bin/ folder gets obliterated on an
>>> error during normal usage. It is equivalent of doing the infamous "rm
>>> -rf  /bin" .
>>>
>>> 1) I would like to know if there is a log for cygwin somewhere so I
>>> can be more useful in specifying what happened.
>>>
>>> 2) My 'specs' are: windows 7 64 bits with cygwin64 . I wonder if
>>> cygwin64 is considered 'stable'.
>>
>> extremely stable
>>
>
> Yes, all that I use.
>
>>
>>> From what I recall the terminal was spamming messages containing the
>>> words "fork" , "-1" and some others which I don't recall. And what I
>>> did was trying to run a normal zsh script.
>>>
>>> I am not able to tell exactly what I did on both occasions to trigger
>>> this behavior.
>>
>> any history file on your home directory ?
>>
>
> Don't forget to check the BLODA on your system, e.g. virus protection
> software.
>

--
cyg Simple

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: /bin/ gets deleted on error

L A Walsh
In reply to this post by Felipe Vieira
Felipe Vieira wrote:
> Dear cygwin mailing list,
>
> For the second time this week my /bin/ folder gets obliterated on an
> error during normal usage. It is equivalent of doing the infamous "rm
> -rf  /bin" .
>  
----
    That's different.  I take it trying to restore previous copies
from the windows menu was "greyed out" and nothing was in the
recyclebin?  While it isn't likely that files deleted by
cygwin would be in the Recyclebin, you might find it in the
previous versions unless you have system protection turned off
for the disk it was on (its on a tab under "System Properties"
called "System Protection").


    (i.e.) in explorer browse to root & right click on /bin (if
it isn't there, create it first, either in explorer or in cmd.exe).

    If you're lucky you should see "Restore previous versions"
as an option -- which can easily allow you to restore entire
directories. (my cygwin bin is < 1GB, so it would easily fit in my
protection-space setting of 3% (~28G).

    Even if restoring from a restore point doesn't work due to
Winbugs, the "previous versions" feature often will, as it only
targets the directories or files that you've selected and not
all system files.

    A way of, perhaps, saving some grief in the future --
create a 2nd dir "/.bin" and in it create hard-links to all of your
files in /bin.  Only downside is to keep it updated, but if it
happens again, should make restoring /bin easier...(and doesn't
use extra disk space!)






--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: /bin/ gets deleted on error

Dan Kegel-2
>> For the second time this week my /bin/ folder gets obliterated on an
>> error during normal usage. It is equivalent of doing the infamous "rm
>> -rf  /bin" .

What were you doing immediately before the directory disappeared?

I have only had things like this happen from user error,
e.g. scripting mistakes.

(The first time I saw somebody rm -rf / was in 1980 :-) )

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: /bin/ gets deleted on error

Brian Inglis
On 2017-04-13 12:01, Dan Kegel wrote:

>>> For the second time this week my /bin/ folder gets obliterated on an
>>> error during normal usage. It is equivalent of doing the infamous "rm
>>> -rf  /bin" .
>
> What were you doing immediately before the directory disappeared?
>
> I have only had things like this happen from user error,
> e.g. scripting mistakes.
>
> (The first time I saw somebody rm -rf / was in 1980 :-) )

BTDT a few times!
Easy to do with a typo in a script variable name e.g.
        rm -fR $fopdir/
or running a script with a typo that leaves a variable undefined;
defensive coding is your friend to avoid disasters:
        if [ -n "$foodir" ] && [ -d $foodir/ ]; then
          /bin/rm -fR -- $foodir || exit
        else
          echo "Can't find directory '$foodir'"
          exit 2
        fi

--
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: /bin/ gets deleted on error

cyg Simple
On 4/13/2017 2:43 PM, Brian Inglis wrote:

> defensive coding is your friend to avoid disasters:
> if [ -n "$foodir" ] && [ -d $foodir/ ]; then
>  /bin/rm -fR -- $foodir || exit
> else
>  echo "Can't find directory '$foodir'"
>  exit 2
> fi
>

And even this can be troublesome if you mistype a variable name anywhere
in this code.

--
cyg Simple

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: /bin/ gets deleted on error

Norton Allen
On 4/14/2017 8:42 AM, cyg Simple wrote:

> On 4/13/2017 2:43 PM, Brian Inglis wrote:
>
>> defensive coding is your friend to avoid disasters:
>> if [ -n "$foodir" ] && [ -d $foodir/ ]; then
>>  /bin/rm -fR -- $foodir || exit
>> else
>>  echo "Can't find directory '$foodir'"
>>  exit 2
>> fi
>>
> And even this can be troublesome if you mistype a variable name anywhere
> in this code.
>
Or there are spaces in $foodir


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: /bin/ gets deleted on error

Felipe Vieira
In reply to this post by Felipe Vieira
On Thu, Apr 13, 2017 at 10:13 AM, Felipe Vieira <[hidden email]> wrote:

> Dear cygwin mailing list,
>
> For the second time this week my /bin/ folder gets obliterated on an
> error during normal usage. It is equivalent of doing the infamous "rm
> -rf  /bin" .
>
> 1) I would like to know if there is a log for cygwin somewhere so I
> can be more useful in specifying what happened.
>
> 2) My 'specs' are: windows 7 64 bits with cygwin64 . I wonder if
> cygwin64 is considered 'stable'.
>
> From what I recall the terminal was spamming messages containing the
> words "fork" , "-1" and some others which I don't recall. And what I
> did was trying to run a normal zsh script.
>
> I am not able to tell exactly what I did on both occasions to trigger
> this behavior.
>
> Nevertheless thanks for the great software. If it were not for you
> guys I don't know how I could cope with Windows.
>
> Best,
>
> Felipe Vieira.

Guys I am not able to provide more information on this issue.

I'll be more cautious in copying the exact error message next time
this happens. Thanks for all of your help!

Best,

Felipe Vieira.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: /bin/ gets deleted on error

Gerrit Haase
In reply to this post by Felipe Vieira
2017-04-13 15:13 GMT+02:00 Felipe Vieira says:
>
> For the second time this week my /bin/ folder gets obliterated on an
> error during normal usage. It is equivalent of doing the infamous "rm
> -rf  /bin" .
>
...
> From what I recall the terminal was spamming messages containing the
> words "fork" , "-1" and some others which I don't recall. And what I
> did was trying to run a normal zsh script.

Define "normal".


Regards,
Gerrit

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Loading...