unzip : segmentation violation

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

unzip : segmentation violation

Vincent Richomme
Hi,

I am trying to install a web framework using the following script :


wget --no-check-certificate
https://raw.github.com/cappuccino/cappuccino/v0.9.5/bootstrap.sh
change line 139 :
tmp_zip="/tmp/cappuccino.zip" into
tmp_zip="./cappuccino.zip"
because it will be easier to debug

bash bootstrap.sh

Script tries to download a cappuccino.zip file and to unzip it but
unzip crashes with the following error :
error:  zipfile probably corrupt (segmentation violation)
Error: problem running bootstrap.sh. Exiting.

once it failed I tried to run the command manually :

rm -Rf narwhal (clean our half unzipped folder)
unzip cappuccino-.zip -d ./narwhal/

Any idea ?









------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|

Re: unzip : segmentation violation

Earnie Boyd
On Fri, Mar 16, 2012 at 10:59 AM,  <[hidden email]> wrote:

> Hi,
>
> I am trying to install a web framework using the following script :
>
>
> wget --no-check-certificate
> https://raw.github.com/cappuccino/cappuccino/v0.9.5/bootstrap.sh
> change line 139 :
> tmp_zip="/tmp/cappuccino.zip" into
> tmp_zip="./cappuccino.zip"
> because it will be easier to debug
>
> bash bootstrap.sh
>
> Script tries to download a cappuccino.zip file and to unzip it but
> unzip crashes with the following error :
> error:  zipfile probably corrupt (segmentation violation)
> Error: problem running bootstrap.sh. Exiting.
>
> once it failed I tried to run the command manually :
>
> rm -Rf narwhal (clean our half unzipped folder)
> unzip cappuccino-.zip -d ./narwhal/
>
> Any idea ?

The download probably did not fully complete.  Can you open
cappuccino-.zip via the Windows File Explorer?

--
Earnie
-- https://sites.google.com/site/earnieboyd

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|

Re: unzip : segmentation violation

Vincent Richomme
In reply to this post by Vincent Richomme
You can try also to download the bad zip here :

curl  -L -o cappuccino.zip
"http://github.com/cappuccino/cappuccino-base/zipball/0.9.5"
or
wget --no-check-certificate -O "cappuccino.zip"
"http://github.com/cappuccino/cappuccino-base/zipball/0.9.5"


then try :
unzip cappuccino.zip

On the last version of msys/mingw on a Windows 7 64 bits it crashes.


------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|

Re: unzip : segmentation violation

Vincent Richomme
In reply to this post by Earnie Boyd
>> Hi,
>>
>> I am trying to install a web framework using the following script :
>>
>>
>> wget --no-check-certificate
>> https://raw.github.com/cappuccino/cappuccino/v0.9.5/bootstrap.sh
>> change line 139 :
>> tmp_zip="/tmp/cappuccino.zip" into
>> tmp_zip="./cappuccino.zip"
>> because it will be easier to debug
>>
>> bash bootstrap.sh
>>
>> Script tries to download a cappuccino.zip file and to unzip it but
>> unzip crashes with the following error :
>> error:  zipfile probably corrupt (segmentation violation)
>> Error: problem running bootstrap.sh. Exiting.
>>
>> once it failed I tried to run the command manually :
>>
>> rm -Rf narwhal (clean our half unzipped folder)
>> unzip cappuccino-.zip -d ./narwhal/
>>
>> Any idea ?
>
> The download probably did not fully complete.  Can you open
> cappuccino-.zip via the Windows File Explorer?
>


Actually it works when using windows file explorer or 7-zip.


------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|

Re: unzip : segmentation violation

Eli Zaretskii
> Date: Fri, 16 Mar 2012 19:18:08 +0100
> From: [hidden email]
>
> Actually it works when using windows file explorer or 7-zip.

It also works for me with unzip (and bsdtar, FWIW).

Perhaps your unzip is broken?

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|

Re: unzip : segmentation violation

Vincent Richomme
Le 16.03.2012 20:08, Eli Zaretskii a écrit :
>> Date: Fri, 16 Mar 2012 19:18:08 +0100
>> From: [hidden email]
>>
>> Actually it works when using windows file explorer or 7-zip.
>
> It also works for me with unzip (and bsdtar, FWIW).
>
> Perhaps your unzip is broken?
>

Don't think so because I also tried on another computer and I have
exactly the same error.
I am sure the zip is not corrupted because I tried on cygwin and it
works fine, I also
made a diff between the zip fecth with cygwin and the one with msys's
wget and they are the same.

$ wget --no-check-certificate -O "cappuccino.zip"
"http://github.com/cappuccino/cappuccino-base/zipball/0.9.5"

$ which unzip
/bin/unzip.exe

$ unzip -v
UnZip 6.00 of 20 April 2009, by Cygwin. Original by Info-ZIP.

Latest sources and executables are at
ftp://ftp.info-zip.org/pub/infozip/ ;
see ftp://ftp.info-zip.org/pub/infozip/UnZip.html for other sites.

Compiled with gcc 3.4.4 (msys special) for Unix (Cygwin) on Apr 18
2010.

$ unzip cappuccino.zip
...
symlink error: No such file or directory
   
cappuccino-cappuccino-base-80ebdb7/tests/package/_files/test-sea/packages/test-package-1/lib
-> ../../lib
   
cappuccino-cappuccino-base-80ebdb7/tests/package/_files/test-sea/packages/test-package-2/lib
-> ../../lib
   
cappuccino-cappuccino-base-80ebdb7/tests/package/_files/test-sea/using/domain.com/path/to/catalog/package2/lib
-> ../../../../../../lib
   
cappuccino-cappuccino-base-80ebdb7/tests/package/_files/test-sea/using/domain.com/path/to/package1/lib
-> ../../../../../lib
error:  zipfile probably corrupt (segmentation violation)


How can I debug it ?
Cannote believe I am the only one where it doesn't work...








------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|

Re: unzip : segmentation violation

Eli Zaretskii
> Date: Fri, 16 Mar 2012 22:52:30 +0100
> From: [hidden email]
>
> $ unzip cappuccino.zip
> ...
> symlink error: No such file or directory

Ah, symlinks! why didn't you show these message in the first place?

> cappuccino-cappuccino-base-80ebdb7/tests/package/_files/test-sea/packages/test-package-1/lib
> -> ../../lib
>    
> cappuccino-cappuccino-base-80ebdb7/tests/package/_files/test-sea/packages/test-package-2/lib
> -> ../../lib
>    
> cappuccino-cappuccino-base-80ebdb7/tests/package/_files/test-sea/using/domain.com/path/to/catalog/package2/lib
> -> ../../../../../../lib
>    
> cappuccino-cappuccino-base-80ebdb7/tests/package/_files/test-sea/using/domain.com/path/to/package1/lib
> -> ../../../../../lib
> error:  zipfile probably corrupt (segmentation violation)

It sounds like your (Cygwin-compiled) unzip has some trouble with
symlinks in the archive.  Which is mucho strange, because the archive
(at least the one I fetched with wget according to your instructions)
doesn't include symlinks at all.  Specifically, the files you show
above are not symlinks, but rather ordinary files/directories.  This
is part of a listing shown by MinGW-compiled bsdtar (which is quite
able to show symlinks in an archive, even if not to unpack them):

  drwxrwxrwx  0 0      0           0 Nov 16 11:01 cappuccino-cappuccino-base-80ebdb7/tests/package/_files/test-sea/packages/
  drwxrwxrwx  0 0      0           0 Nov 16 11:01 cappuccino-cappuccino-base-80ebdb7/tests/package/_files/test-sea/packages/test-package-1/
  -rwxrwxrwx  0 0      0           9 Nov 16 11:01 cappuccino-cappuccino-base-80ebdb7/tests/package/_files/test-sea/packages/test-package-1/lib
  -rwxrwxrwx  0 0      0         386 Nov 16 11:01 cappuccino-cappuccino-base-80ebdb7/tests/package/_files/test-sea/packages/test-package-1/package.json
  drwxrwxrwx  0 0      0           0 Nov 16 11:01 cappuccino-cappuccino-base-80ebdb7/tests/package/_files/test-sea/packages/test-package-2/
  -rwxrwxrwx  0 0      0           9 Nov 16 11:01 cappuccino-cappuccino-base-80ebdb7/tests/package/_files/test-sea/packages/test-package-2/lib

May I suggest that you use MinGW-compiled tools (unzip, wget etc.) and
try again, starting with fetching the zip archive?

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|

Re: unzip : segmentation violation

Earnie Boyd
In reply to this post by Vincent Richomme
On Fri, Mar 16, 2012 at 5:52 PM,  <[hidden email]> wrote:

>
> Don't think so because I also tried on another computer and I have
> exactly the same error.
> I am sure the zip is not corrupted because I tried on cygwin and it
> works fine, I also
> made a diff between the zip fecth with cygwin and the one with msys's
> wget and they are the same.
>
> $ wget --no-check-certificate -O "cappuccino.zip"
> "http://github.com/cappuccino/cappuccino-base/zipball/0.9.5"
>
> $ which unzip
> /bin/unzip.exe
>
> $ unzip -v
> UnZip 6.00 of 20 April 2009, by Cygwin. Original by Info-ZIP.
>

Same version I have.

> Latest sources and executables are at
> ftp://ftp.info-zip.org/pub/infozip/ ;
> see ftp://ftp.info-zip.org/pub/infozip/UnZip.html for other sites.
>
> Compiled with gcc 3.4.4 (msys special) for Unix (Cygwin) on Apr 18
> 2010.
>
> $ unzip cappuccino.zip
> ...
> symlink error: No such file or directory
>
> cappuccino-cappuccino-base-80ebdb7/tests/package/_files/test-sea/packages/test-package-1/lib
> -> ../../lib
>
> cappuccino-cappuccino-base-80ebdb7/tests/package/_files/test-sea/packages/test-package-2/lib
> -> ../../lib
>
> cappuccino-cappuccino-base-80ebdb7/tests/package/_files/test-sea/using/domain.com/path/to/catalog/package2/lib
> -> ../../../../../../lib
>
> cappuccino-cappuccino-base-80ebdb7/tests/package/_files/test-sea/using/domain.com/path/to/package1/lib
> -> ../../../../../lib
> error:  zipfile probably corrupt (segmentation violation)
>

Same results.

>
> How can I debug it ?
> Cannote believe I am the only one where it doesn't work...

The issue is that at the time MSYS was developed Windows didn't
support symlinks and they just barely do now.  Therefore, MSYS doesn't
support symlinks except to copy the files or directories that exist.
If the file or directory doesn't exist then you get an error because
there is nothing to copy.

The bsdtar that Eli has mentioned handles these symlink references so
that you don't crash and the whole archive minus the symlinks are
retrieved.  If the file or directories exist bsdtar may later handle
the symlink references with the copy, I'm not sure what it does.
Chuck may know?

So to alleviate your issue:

mingw-get install bsdtar
<file name="/mingw/bin/unzip">
#! /bin/sh

/mingw/bin/bsdtar -xf "$1"
</file>

--
Earnie
-- https://sites.google.com/site/earnieboyd

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|

Re: unzip : segmentation violation

Earnie Boyd
In reply to this post by Eli Zaretskii
On Sat, Mar 17, 2012 at 3:31 AM, Eli Zaretskii <[hidden email]> wrote:
>
> It sounds like your (Cygwin-compiled) unzip has some trouble with
> symlinks in the archive.  Which is mucho strange, because the archive

I think the --version info shows Cygwin regardless.  Probably an
oversight when the zip package was ported to MSYS.

> (at least the one I fetched with wget according to your instructions)
> doesn't include symlinks at all.  Specifically, the files you show

Yes it does.

> above are not symlinks, but rather ordinary files/directories.  This
> is part of a listing shown by MinGW-compiled bsdtar (which is quite
> able to show symlinks in an archive, even if not to unpack them):
>

The MinGW bsdtar handles the symlinks gracefully thanks to Chuck Wilson.

>
> May I suggest that you use MinGW-compiled tools (unzip, wget etc.) and
> try again, starting with fetching the zip archive?

The OP is, you assumed that because the --version info contained the
word Cygwin he wasn't.  I questioned that too at first until I looked
at the --version info in my own copy.

--
Earnie
-- https://sites.google.com/site/earnieboyd

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|

Re: unzip : segmentation violation

Eli Zaretskii
> Date: Sat, 17 Mar 2012 11:46:31 -0400
> From: Earnie Boyd <[hidden email]>
>
> On Sat, Mar 17, 2012 at 3:31 AM, Eli Zaretskii <[hidden email]> wrote:
> >
> > It sounds like your (Cygwin-compiled) unzip has some trouble with
> > symlinks in the archive.  Which is mucho strange, because the archive
>
> I think the --version info shows Cygwin regardless.  Probably an
> oversight when the zip package was ported to MSYS.
>
> > (at least the one I fetched with wget according to your instructions)
> > doesn't include symlinks at all.
>
> Yes it does.

Can you show me how you see that, and what I missed?  I see no
symlinks in the zip file, as I told.

> > above are not symlinks, but rather ordinary files/directories.  This
> > is part of a listing shown by MinGW-compiled bsdtar (which is quite
> > able to show symlinks in an archive, even if not to unpack them):
>
> The MinGW bsdtar handles the symlinks gracefully thanks to Chuck Wilson.

I doubt that.  I used bsdtar I compiled with MinGW myself from the
sources, and it only supports symlinks on Windows 7, while I'm on XP.
I definitely tested symlinks after building my bsdtar, and it
displayed error messages saying it is unable to create symlinks.

> > May I suggest that you use MinGW-compiled tools (unzip, wget etc.) and
> > try again, starting with fetching the zip archive?
>
> The OP is, you assumed that because the --version info contained the
> word Cygwin he wasn't.  I questioned that too at first until I looked
> at the --version info in my own copy.

Well, there's no such word in mine:

  D:\usr\eli>unzip
  UnZip 5.51 of 22 May 2004, by Info-ZIP.  Maintained by C. Spieler.  Send
  bug reports using http://www.info-zip.org/zip-bug.html; see README for details.


------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|

Re: unzip : segmentation violation

kwikius
In reply to this post by Vincent Richomme
Hi This issue still exists when using unzip on 64 bit Windows 7

My version of unzip says
UnZip 6.00 of 20 April 2009, by Cygwin. Original by Info-ZIP

I downloaded the latest version of MinGW and msys


One cause of The error message was apparently fixed here
https://bugzilla.redhat.com/show_bug.cgi?id=180078


https://bugzilla.redhat.com/attachment.cgi?id=124211&action=diff

regards
Andy
 










------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe