Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot update modules #56

Closed
simendsjo opened this issue May 31, 2012 · 16 comments

Comments

Projects
None yet
2 participants
@simendsjo
Copy link
Contributor

commented May 31, 2012

./vibe
[7F6ECE470F00:00000000 INF] Updating application in '/home/simendsjo/code/tmp/vibetest2'
[7F6ECE470F00:00000000 ERR] Trying to get package metadata failed, exception: core.exception.AssertError@std.zlib(528): Assertion failure
----------------
/tmp/.rdmd-1000/tmp/vpm.d.76976170AC35F5295A68BD603250DC1D(_d_assertm+0x2a) [0x56dc62]
/tmp/.rdmd-1000/tmp/vpm.d.76976170AC35F5295A68BD603250DC1D() [0x59a291]
/tmp/.rdmd-1000/tmp/vpm.d.76976170AC35F5295A68BD603250DC1D(void[] std.zlib.UnCompress.flush().void __require()+0x26) [0x59b0de]
/tmp/.rdmd-1000/tmp/vpm.d.76976170AC35F5295A68BD603250DC1D(void[] std.zlib.UnCompress.flush()+0x16) [0x59aec6]
/tmp/.rdmd-1000/tmp/vpm.d.76976170AC35F5295A68BD603250DC1D(void vibe.stream.zlib.ZlibInputStream.readChunk()+0x133) [0x508dff]
/tmp/.rdmd-1000/tmp/vpm.d.76976170AC35F5295A68BD603250DC1D(void vibe.stream.zlib.ZlibInputStream.read(ubyte[])+0x14d) [0x508cc1]
/tmp/.rdmd-1000/tmp/vpm.d.76976170AC35F5295A68BD603250DC1D(ubyte[] vibe.stream.stream.readAll(vibe.stream.stream.InputStream, ulong)+0x110) [0x54ebb4]
/tmp/.rdmd-1000/tmp/vpm.d.76976170AC35F5295A68BD603250DC1D(vibe.data.json.Json vibe.vpm.registry.RegistryPS.metadata(const(immutable(char)[]))+0x278) [0x506598]
/tmp/.rdmd-1000/tmp/vpm.d.76976170AC35F5295A68BD603250DC1D(vibe.data.json.Json vibe.vpm.registry.RegistryPS.bestPackage(const(immutable(char)[]), const(vibe.vpm.dependency.Dependency))+0x27) [0x506727]
/tmp/.rdmd-1000/tmp/vpm.d.76976170AC35F5295A68BD603250DC1D(vibe.data.json.Json vibe.vpm.registry.RegistryPS.packageJson(const(immutable(char)[]), const(vibe.vpm.dependency.Dependency))+0x62) [0x506306]
/tmp/.rdmd-1000/tmp/vpm.d.76976170AC35F5295A68BD603250DC1D(_D4vibe3vpm3vpm11Application7actionsMxFC4vibe3vpm15packagesupplier15PackageSupplieriZAS4vibe3vpm3vpm6Action17__foreachbody3053MFKAyaKS4vibe3vpm10dependency19RequestedDependencyZi+0x108) [0x544964]
/tmp/.rdmd-1000/tmp/vpm.d.76976170AC35F5295A68BD603250DC1D(_aaApply2+0x62) [0x56cdde]
/tmp/.rdmd-1000/tmp/vpm.d.76976170AC35F5295A68BD603250DC1D(const(vibe.vpm.vpm.Action[] function(vibe.vpm.packagesupplier.PackageSupplier, int)) vibe.vpm.vpm.Application.actions+0x1ba) [0x544526]
/tmp/.rdmd-1000/tmp/vpm.d.76976170AC35F5295A68BD603250DC1D(bool vibe.vpm.vpm.Vpm.update(int)+0x63) [0x54662b]
/tmp/.rdmd-1000/tmp/vpm.d.76976170AC35F5295A68BD603250DC1D(_Dmain+0x471) [0x4e69dd]
/tmp/.rdmd-1000/tmp/vpm.d.76976170AC35F5295A68BD603250DC1D(extern (C) int rt.dmain2.main(int, char**).void runMain()+0x17) [0x56e50f]
/tmp/.rdmd-1000/tmp/vpm.d.76976170AC35F5295A68BD603250DC1D(extern (C) int rt.dmain2.main(int, char**).void tryExec(scope void delegate())+0x23) [0x56de8f]
/tmp/.rdmd-1000/tmp/vpm.d.76976170AC35F5295A68BD603250DC1D(extern (C) int rt.dmain2.main(int, char**).void runAll()+0x3d) [0x56e55d]
/tmp/.rdmd-1000/tmp/vpm.d.76976170AC35F5295A68BD603250DC1D(extern (C) int rt.dmain2.main(int, char**).void tryExec(scope void delegate())+0x23) [0x56de8f]
/tmp/.rdmd-1000/tmp/vpm.d.76976170AC35F5295A68BD603250DC1D(main+0xd3) [0x56de27]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed) [0x7f6ecd2c130d]
[7F6ECE470F00:00000000 WRN] Could not resolve dependencies
[7F6ECE470F00:00000000 ERR] The dependency graph could not be filled.
[7F6ECE470F00:00000000 INF] The following changes could be performed:
[7F6ECE470F00:00000000 INF] Failure: mysql-native, version >=0.0.1

@s-ludwig

This comment has been minimized.

Copy link
Member

commented May 31, 2012

The libevent thread functions were responsible for this.. a quick fix is committed with a proper fix hopefully coming.

@simendsjo

This comment has been minimized.

Copy link
Contributor Author

commented May 31, 2012

The quick fix (what fix?) didn't work

@s-ludwig

This comment has been minimized.

Copy link
Member

commented May 31, 2012

In 100d838 the thread setup calls are commented out and that fixed it on windows for me. Im now doing the setup with manual callbacks but this is not yet finished, I'll test in a few minutes.

@simendsjo

This comment has been minimized.

Copy link
Contributor Author

commented May 31, 2012

I have that patch, but the error is not fixed. I'm on linux though..

@s-ludwig

This comment has been minimized.

Copy link
Member

commented May 31, 2012

7abc1af fixed it for me now, also on Linux.

@simendsjo

This comment has been minimized.

Copy link
Contributor Author

commented May 31, 2012

Strange... I get the same error even with this patch

@simendsjo

This comment has been minimized.

Copy link
Contributor Author

commented May 31, 2012

Here's the debug log:

[7F89F85B7F00:00000000 dbg] Using vpm registry url 'http://registry.vibed.org/'
[7F89F85B7F00:00000000 dbg] opened file /home/simendsjo/code/tmp/vibetest2/package.json with 140 bytes as 8
[7F89F85B7F00:00000000 dbg] opened file /home/simendsjo/code/tmp/vibetest2/modules/mysqln-native/package.json with 378 bytes as 9
[7F89F85B7F00:00000000 dbg] vpm initialized
[7F89F85B7F00:00000000 INF] Connect to 'registry.vibed.org'
[7F89F85B7F00:00000000 dbg] Socket event on fd 8: 128
[7F89F85B7F00:00000000 ERR] Trying to get package metadata failed, exception: core.exception.AssertError@std.zlib(528): Assertion failure
----------------
/tmp/.rdmd-1000/tmp/vpm.d.76976170AC35F5295A68BD603250DC1D(_d_assertm+0x2a) [0x570472]
/tmp/.rdmd-1000/tmp/vpm.d.76976170AC35F5295A68BD603250DC1D() [0x59cb21]
/tmp/.rdmd-1000/tmp/vpm.d.76976170AC35F5295A68BD603250DC1D(void[] std.zlib.UnCompress.flush().void __require()+0x26) [0x59d96e]
/tmp/.rdmd-1000/tmp/vpm.d.76976170AC35F5295A68BD603250DC1D(void[] std.zlib.UnCompress.flush()+0x16) [0x59d756]
/tmp/.rdmd-1000/tmp/vpm.d.76976170AC35F5295A68BD603250DC1D(void vibe.stream.zlib.ZlibInputStream.readChunk()+0x133) [0x50a4bb]
/tmp/.rdmd-1000/tmp/vpm.d.76976170AC35F5295A68BD603250DC1D(void vibe.stream.zlib.ZlibInputStream.read(ubyte[])+0x14d) [0x50a37d]
/tmp/.rdmd-1000/tmp/vpm.d.76976170AC35F5295A68BD603250DC1D(ubyte[] vibe.stream.stream.readAll(vibe.stream.stream.InputStream, ulong)+0x110) [0x550784]
/tmp/.rdmd-1000/tmp/vpm.d.76976170AC35F5295A68BD603250DC1D(vibe.data.json.Json vibe.vpm.registry.RegistryPS.metadata(const(immutable(char)[]))+0x278) [0x507c54]
/tmp/.rdmd-1000/tmp/vpm.d.76976170AC35F5295A68BD603250DC1D(vibe.data.json.Json vibe.vpm.registry.RegistryPS.bestPackage(const(immutable(char)[]), const(vibe.vpm.dependency.Dependency))+0x27) [0x507de3]
/tmp/.rdmd-1000/tmp/vpm.d.76976170AC35F5295A68BD603250DC1D(vibe.data.json.Json vibe.vpm.registry.RegistryPS.packageJson(const(immutable(char)[]), const(vibe.vpm.dependency.Dependency))+0x62) [0x5079c2]
/tmp/.rdmd-1000/tmp/vpm.d.76976170AC35F5295A68BD603250DC1D(_D4vibe3vpm3vpm11Application7actionsMxFC4vibe3vpm15packagesupplier15PackageSupplieriZAS4vibe3vpm3vpm6Action17__foreachbody3054MFKAyaKS4vibe3vpm10dependency19RequestedDependencyZi+0x108) [0x546534]
/tmp/.rdmd-1000/tmp/vpm.d.76976170AC35F5295A68BD603250DC1D(_aaApply2+0x62) [0x56f5ee]
/tmp/.rdmd-1000/tmp/vpm.d.76976170AC35F5295A68BD603250DC1D(const(vibe.vpm.vpm.Action[] function(vibe.vpm.packagesupplier.PackageSupplier, int)) vibe.vpm.vpm.Application.actions+0x1ba) [0x5460f6]
/tmp/.rdmd-1000/tmp/vpm.d.76976170AC35F5295A68BD603250DC1D(bool vibe.vpm.vpm.Vpm.update(int)+0x63) [0x5481fb]
/tmp/.rdmd-1000/tmp/vpm.d.76976170AC35F5295A68BD603250DC1D(_Dmain+0x471) [0x4e807d]
/tmp/.rdmd-1000/tmp/vpm.d.76976170AC35F5295A68BD603250DC1D(extern (C) int rt.dmain2.main(int, char**).void runMain()+0x17) [0x570d1f]
/tmp/.rdmd-1000/tmp/vpm.d.76976170AC35F5295A68BD603250DC1D(extern (C) int rt.dmain2.main(int, char**).void tryExec(scope void delegate())+0x23) [0x57069f]
/tmp/.rdmd-1000/tmp/vpm.d.76976170AC35F5295A68BD603250DC1D(extern (C) int rt.dmain2.main(int, char**).void runAll()+0x3d) [0x570d6d]
/tmp/.rdmd-1000/tmp/vpm.d.76976170AC35F5295A68BD603250DC1D(extern (C) int rt.dmain2.main(int, char**).void tryExec(scope void delegate())+0x23) [0x57069f]
/tmp/.rdmd-1000/tmp/vpm.d.76976170AC35F5295A68BD603250DC1D(main+0xd3) [0x570637]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed) [0x7f89f760a30d]
@s-ludwig

This comment has been minimized.

Copy link
Member

commented May 31, 2012

Hmm.. I tested on another Linux machine (this time 64-bit) and it works there, too. Whats also strange is that in my case it was an error in libevent and in your log it seems to be in the std.zlib code somewhere. Have you tried to delete the modules and temp folders in your app directory? Maybe there are some left-overs, although these should get deleted.

@simendsjo

This comment has been minimized.

Copy link
Contributor Author

commented May 31, 2012

I deleted the modules folder (didn't have a temp), but I get the same error on both dmd 2.059 and 2.060.

@s-ludwig

This comment has been minimized.

Copy link
Member

commented May 31, 2012

Interesting.. there should always be a temp folder after a module has been downloaded.

Another try would be to comment out the "req.headers["Accept-Encoding"] = "gzip, deflate";" in core/http/client.d:148

But I wonder why those libevent changes should have anything to do with the zlib stuff...

@s-ludwig

This comment has been minimized.

Copy link
Member

commented Jun 4, 2012

Any news on this?

@simendsjo

This comment has been minimized.

Copy link
Contributor Author

commented Jun 4, 2012

Sorry, haven't had the time to test. I think the issue was still there yesterday. I'll see if I can test it tonight.

@simendsjo

This comment has been minimized.

Copy link
Contributor Author

commented Jun 4, 2012

Works if I uncomment the line

@s-ludwig

This comment has been minimized.

Copy link
Member

commented Jun 5, 2012

In 8ec7ddc / 8a04baa I've added some stricter error checking and also avoid that UnCompress.flush() is called twice. This could very well fix the issue. It's still strange that you may also not call flush() if the last uncompress() call returned some data. I will look into the zlib documentation later to be sure about this.

@s-ludwig

This comment has been minimized.

Copy link
Member

commented Jul 12, 2012

Did you have the chance to try again without the uncommented line? The zlib wrapper in Phobos unfortunately hides some important return codes but I think the current version should be ok.

@simendsjo simendsjo closed this Jul 25, 2012

@simendsjo

This comment has been minimized.

Copy link
Contributor Author

commented Jul 25, 2012

It has probably been working for a while :)

@s-ludwig s-ludwig referenced this issue Oct 8, 2012

Closed

Website down #9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.