Bug 38631 - libMonoPosixHelper on Windows
Summary: libMonoPosixHelper on Windows
Status: RESOLVED DUPLICATE of bug 32086
Alias: None
Product: Class Libraries
Classification: Mono
Component: System (show other bugs)
Version: master
Hardware: PC Windows
: --- normal
Target Milestone: Future Release
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-02-10 14:54 UTC by Jochen Kühner
Modified: 2017-10-13 14:23 UTC (History)
8 users (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments

Description Jochen Kühner 2016-02-10 14:54:55 UTC
I got the following Exception:

System.DllNotFoundException: /opt/mono/lib/libMonoPosixHelper.so
at (wrapper managed-to-native) System.IO.Compression.DeflateStreamNative:CreateZStream (System.IO.Compression.CompressionMode,bool,System.IO.Compression.DeflateStreamNative/UnmanagedReadOrWrite,intptr)
at System.IO.Compression.DeflateStreamNative.Create (System.IO.Stream compressedStream, CompressionMode mode, Boolean gzip) [0x00000] in :0 
at System.IO.Compression.DeflateStream..ctor (System.IO.Stream compressedStream, CompressionMode mode, Boolean leaveOpen, Boolean gzip) [0x00000] in :0 
at System.IO.Compression.DeflateStream..ctor (System.IO.Stream compressedStream, CompressionMode mode, Boolean leaveOpen) [0x00000] in :0 
at (wrapper remoting-invoke-with-check) System.IO.Compression.DeflateStream:.ctor (System.IO.Stream,System.IO.Compression.CompressionMode,bool)
at WebSocketSharp.Ext.decompress (System.IO.Stream stream) [0x00000] in :0 
at WebSocketSharp.Ext.decompressToArray (System.IO.Stream stream) [0x00000] in :0 
at WebSocketSharp.Ext.decompress (System.Byte[] data) [0x00000] in :0 
at WebSocketSharp.Ext.Decompress (System.Byte[] data, CompressionMethod method) [0x00000] in :0 
at WebSocketSharp.WebSocket.processDataFrame (WebSocketSharp.WebSocketFrame frame) [0x00000] in :0 
at WebSocketSharp.WebSocket.processReceivedFrame (WebSocketSharp.WebSocketFrame frame) [0x00000] in :0 
at WebSocketSharp.WebSocket+<>c__DisplayClass15.b__13 (WebSocketSharp.WebSocketFrame frame) [0x00000] in :0 
at WebSocketSharp.WebSocketFrame+<>c__DisplayClass7.b__6 (System.Byte[] header) [0x00000] in :0
at WebSocketSharp.Ext+<>c__DisplayClass6.b__5 (IAsyncResult ar) [0x00000] in :0 - System.DllNotFoundException: /opt/mono/lib/libMonoPosixHelper.so
at (wrapper managed-to-native) System.IO.Compression.DeflateStreamNative:CreateZStream (System.IO.Compression.CompressionMode,bool,System.IO.Compression.DeflateStreamNative/UnmanagedReadOrWrite,intptr)
at System.IO.Compression.DeflateStreamNative.Create (System.IO.Stream compressedStream, CompressionMode mode, Boolean gzip) [0x00000] in :0 
at System.IO.Compression.DeflateStream..ctor (System.IO.Stream compressedStream, CompressionMode mode, Boolean leaveOpen, Boolean gzip) [0x00000] in :0 
at System.IO.Compression.DeflateStream..ctor (System.IO.Stream compressedStream, CompressionMode mode, Boolean leaveOpen) [0x00000] in :0 
at (wrapper remoting-invoke-with-check) System.IO.Compression.DeflateStream:.ctor (System.IO.Stream,System.IO.Compression.CompressionMode,bool)
at WebSocketSharp.Ext.decompress (System.IO.Stream stream) [0x00000] in :0 
at WebSocketSharp.Ext.decompressToArray (System.IO.Stream stream) [0x00000] in :0 
at WebSocketSharp.Ext.decompress (System.Byte[] data) [0x00000] in :0 
at WebSocketSharp.Ext.Decompress (System.Byte[] data, CompressionMethod method) [0x00000] in :0 
at WebSocketSharp.WebSocket.processDataFrame (WebSocketSharp.WebSocketFrame frame) [0x00000] in :0 
at WebSocketSharp.WebSocket.processReceivedFrame (WebSocketSharp.WebSocketFrame frame) [0x00000] in :0 
at WebSocketSharp.WebSocket+<>c__DisplayClass15.b__13 (WebSocketSharp.WebSocketFrame frame) [0x00000] in :0 
at WebSocketSharp.WebSocketFrame+<>c__DisplayClass7.b__6 (System.Byte[] header) [0x00000] in :0
at WebSocketSharp.Ext+<>c__DisplayClass6.b__5 (IAsyncResult ar) [0x00000] in :0

but libMonoPosixHelper is at that directory!
Comment 1 Vlad Brezae 2016-02-23 17:17:22 UTC
This error indicates a problem with accessing the libMonoPosixHelper.so library (invalid permissions or corrupt library ?). Have you tried running it on a fresh installation ? I had no problem running the examples from the repo.

You can try using strace (strace mono-sgen arg1 ..) to see whether the open syscalls for the library are failing
Comment 2 João Matos 2016-02-24 14:15:03 UTC
You can get more information about the failure by using Mono environment variables for logging. 

http://www.mono-project.com/docs/advanced/runtime/logging-runtime-events/

In this case, you'd want to set MONO_LOG_LEVEL=debug and MONO_LOG_MASK=dll.
Comment 3 Robert Morley 2016-08-14 02:53:50 UTC
This is a very old bug for Mono on Windows that has yet to be fixed. See https://bugzilla.xamarin.com/show_bug.cgi?id=32086 for more details (which includes even older links dating back to 2013). The workaround is to remove the Accept-Encoding: Gzip, Deflate header.
Comment 4 Robert Morley 2016-08-14 05:01:24 UTC
A fix is suggested here: http://stackoverflow.com/a/32958861/502255
Comment 5 Rodrigo Kumpera 2017-10-11 17:34:27 UTC
Moving to BCL as this must be fixed there.
Comment 6 Marek Safar 2017-10-13 14:23:30 UTC

*** This bug has been marked as a duplicate of bug 32086 ***

Note You need to log in before you can comment on or make changes to this bug.