Hello again,

I've been able to compile AND run lrzip, compressing files successfully.

I've setup a github fork of the original project, as it gives me more
freedom to work. Available at https://github.com/caioycosta/lrzip-cygwin .
Future progress will be available from there.

The downside is that I did a workaround, not a real solution to the issue.
It seems the original developer had a misunderstanding on the locking
implementation. There are mutexes being locked in one thread and unlocked in
another, mutexes being locked twice by the same thread...

It will take some time to do the refactoring, so I just exchanged
pthread_create for direct function calls on problematic areas, effectively
disabling threading for the program. Not perfect, but usable.

If you like it you can grab the code and update the Cygwin-ports packages.

-----Mensagem original-----
De: Yaakov (Cygwin/X) [mailto:[email protected]] 
Enviada em: sexta-feira, 7 de março de 2014 13:50
Para: [email protected]
Assunto: Re: [Cygwin-ports-general] investigating lrzip pthread problem

On 2014-03-07 06:00, Caio Yuri da Silva Costa wrote:
> There is an old e-mail (May 2012), viewable on 
> sourceforge.net/p/cygwin-ports/mailman/message/29275412, about a 
> problem running lrzip on Cygwin. The only response says “will look 
> into it further”, and I could not find anything on the net. As I 
> really want to run lrzip on Cygwin, I decided to try my luck on this 
> issue. Got the latest version from lrzip’s git and built it, fired up 
> GDB and started looking for the error.
>
> This is my progress on the issue, so if anybody is interested and 
> wants to help, too:
>
> As it seems, in rzip.c, function hash_search, there is a mutex that is 
> locked on one thread and then unlocked in another. This is undefined 
> behavior. So what I found is that the error occurs because thread A 
> locks the mutex, thread B tries to unlock it and fails because it 
> belongs to A. In Linux this may be working but not in Windows.
>
> Out of time now, but I will try rewriting these locks soon.

Thanks for looking into this!  Please keep us posted on your progress.


Yaakov
Cygwin Ports


----------------------------------------------------------------------------
--
Subversion Kills Productivity. Get off Subversion & Make the Move to
Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and
the freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
_______________________________________________
Cygwin-ports-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cygwin-ports-general

------------------------------------------------------------------------------
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
_______________________________________________
Cygwin-ports-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cygwin-ports-general

Reply via email to