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

Assertion failure in freelistref.d(175) #2681

Closed
voxluke opened this issue Aug 2, 2022 · 1 comment
Closed

Assertion failure in freelistref.d(175) #2681

voxluke opened this issue Aug 2, 2022 · 1 comment

Comments

@voxluke
Copy link

voxluke commented Aug 2, 2022

Hello, we created a chat engine built upon vibe. But sometimes, we got the following error:

core.exception.AssertError@/root/.dub/packages/vibe-core-1.22.4/vibe-core/source/vibe/internal/freelistref.d(175): Assertion failure
----------------
??:? _d_assertp [0x55682bf5f6cc]
/root/.dub/packages/vibe-core-1.22.4/vibe-core/source/vibe/internal/freelistref.d:175 const pure nothrow @nogc @safe void vibe.internal.freelistref.FreeListRef!(vibe.stream.counting.EndCallbackInputStream, true).FreeListRef.checkInvariants() [0x55682bcbf8ce]
/root/.dub/packages/vibe-core-1.22.4/vibe-core/source/vibe/internal/freelistref.d:149 nothrow @safe void vibe.internal.freelistref.FreeListRef!(vibe.stream.counting.EndCallbackInputStream, true).FreeListRef.clear() [0x55682bcbf7ef]
/root/.dub/packages/vibe-core-1.22.4/vibe-core/source/vibe/internal/freelistref.d:121 nothrow @safe void vibe.internal.freelistref.FreeListRef!(vibe.stream.counting.EndCallbackInputStream, true).FreeListRef.__dtor() [0x55682bcbf74c]
/root/.dub/packages/vibe-d-0.9.4/vibe-d/http/vibe/http/client.d:1080 @trusted void vibe.http.client.HTTPClientResponse.__fieldDtor() [0x55682bca26d3]
/root/.dub/packages/vibe-d-0.9.4/vibe-d/http/vibe/http/client.d:1080 @trusted void vibe.http.client.HTTPClientResponse.__aggrDtor() [0x55682bca2735]
??:? rt_finalize2 [0x55682bf6f1d2]
??:? rt_finalize [0x55682bf6f2e0]
/usr/include/dmd/druntime/import/object.d:3970 nothrow void object.destroy!(true, vibe.http.client.HTTPClientResponse).destroy(vibe.http.client.HTTPClientResponse) [0x55682bd4c0e5]
/usr/include/dmd/phobos/std/typecons.d:8076 nothrow void std.typecons.scoped!(vibe.http.client.HTTPClientResponse).Scoped.__dtor() [0x55682bcd7220]
/usr/include/dmd/phobos/std/typecons.d:8087 std.typecons.scoped!(vibe.http.client.HTTPClientResponse).Scoped std.typecons.scoped!(vibe.http.client.HTTPClientResponse).scoped!(vibe.http.client.HTTPClient, bool, bool, vibe.internal.utilallocator.RegionListAllocator!(shared(stdx.allocator.gc_allocator.GCAllocator), true).RegionListAllocator, std.datetime.systime.SysTime).scoped(vibe.http.client.HTTPClient, ref bool, ref bool, ref vibe.internal.utilallocator.RegionListAllocator!(shared(stdx.allocator.gc_allocator.GCAllocator), true).RegionListAllocator, ref std.datetime.systime.SysTime) [0x55682bcd7372]
/root/.dub/packages/vibe-d-0.9.4/vibe-d/http/vibe/http/client.d:554 @trusted void vibe.http.client.HTTPClient.request(scope void delegate(scope vibe.http.client.HTTPClientRequest), scope void delegate(scope vibe.http.client.HTTPClientResponse)) [0x55682bc9d902]
/root/.dub/packages/vibe-d-0.9.4/vibe-d/http/vibe/http/client.d:108 @safe void vibe.http.client.requestHTTP(vibe.inet.url.URL, void delegate(scope vibe.http.client.HTTPClientRequest), scope void delegate(scope vibe.http.client.HTTPClientResponse), const(vibe.http.client.HTTPClientSettings)) [0x55682bc9c62f]
/root/.dub/packages/vibe-d-0.9.4/vibe-d/http/vibe/http/client.d:98 @safe void vibe.http.client.requestHTTP(immutable(char)[], scope void delegate(scope vibe.http.client.HTTPClientRequest), scope void delegate(scope vibe.http.client.HTTPClientResponse), const(vibe.http.client.HTTPClientSettings)) [0x55682bc9c53b]
source/chat.d:168 void chat.ChatFunctions.makeNewComment(session.usersession.UserSession, immutable(char)[], immutable(char)[]) [0x55682bc9250c]
source/app.d:370 void app.handleWebSocketConnection(scope vibe.http.websockets.WebSocket) [0x55682bc5bd8f]
/root/.dub/packages/vibe-d-0.9.4/vibe-d/http/vibe/http/websockets.d:347 nothrow void vibe.http.websockets.handleWebSockets(void function(scope vibe.http.websockets.WebSocket)*).__dgliteral2!(vibe.http.websockets.WebSocket).__dgliteral2(scope vibe.http.websockets.WebSocket) [0x55682bd4873b]
/root/.dub/packages/vibe-d-0.9.4/vibe-d/http/vibe/http/websockets.d:312 nothrow @trusted void vibe.http.websockets.handleWebSockets(void delegate(scope vibe.http.websockets.WebSocket) nothrow).__dgliteral2!(vibe.http.websockets.WebSocket).__dgliteral2(scope vibe.http.websockets.WebSocket) [0x55682bdcd72c]
/root/.dub/packages/vibe-d-0.9.4/vibe-d/http/vibe/http/websockets.d:300 @safe void vibe.http.websockets.handleWebSockets(void delegate(scope vibe.http.websockets.WebSocket) nothrow @safe).callback(scope vibe.http.server.HTTPServerRequest, vibe.http.server.HTTPServerResponse).__lambda13!(vibe.core.stream.ConnectionStream).__lambda13(scope vibe.core.stream.ConnectionStream) [0x55682bdf6176]
/root/.dub/packages/vibe-d-0.9.4/vibe-d/http/vibe/http/server.d:1552 @trusted void vibe.http.server.HTTPServerResponse.switchProtocol(immutable(char)[], scope void delegate(scope vibe.core.stream.ConnectionStream) @safe).__lambda3() [0x55682bcbb54c]
/root/.dub/packages/vibe-d-0.9.4/vibe-d/http/vibe/http/server.d:1550 @safe void vibe.http.server.HTTPServerResponse.switchProtocol(immutable(char)[], scope void delegate(scope vibe.core.stream.ConnectionStream) @safe) [0x55682bcbb445]
/root/.dub/packages/vibe-d-0.9.4/vibe-d/http/vibe/http/websockets.d:297 @safe void vibe.http.websockets.handleWebSockets(void delegate(scope vibe.http.websockets.WebSocket) nothrow @safe).callback(scope vibe.http.server.HTTPServerRequest, vibe.http.server.HTTPServerResponse) [0x55682bdf609c]
/root/.dub/packages/vibe-d-0.9.4/vibe-d/http/vibe/http/router.d:218 @safe bool vibe.http.router.URLRouter.handleRequest(vibe.http.server.HTTPServerRequest, vibe.http.server.HTTPServerResponse).__lambda6!(ulong, immutable(char)[][]).__lambda6(ulong, scope immutable(char)[][]) [0x55682bcb0b2c]
/root/.dub/packages/vibe-d-0.9.4/vibe-d/http/vibe/http/router.d:734 const @safe bool vibe.http.router.MatchTree!(vibe.http.router.Route).MatchTree.doMatch(immutable(char)[], scope bool delegate(ulong, scope immutable(char)[][]) @safe) [0x55682bcb354a]
/root/.dub/packages/vibe-d-0.9.4/vibe-d/http/vibe/http/router.d:667 @safe bool vibe.http.router.MatchTree!(vibe.http.router.Route).MatchTree.match(immutable(char)[], scope bool delegate(ulong, scope immutable(char)[][]) @safe) [0x55682bcb2d6b]
/root/.dub/packages/vibe-d-0.9.4/vibe-d/http/vibe/http/router.d:211 @safe void vibe.http.router.URLRouter.handleRequest(vibe.http.server.HTTPServerRequest, vibe.http.server.HTTPServerResponse) [0x55682bcb079c]
/root/.dub/packages/vibe-d-0.9.4/vibe-d/http/vibe/http/server.d:2286 @safe bool vibe.http.server.handleRequest(vibe.internal.interfaceproxy.InterfaceProxy!(vibe.core.stream.Stream).InterfaceProxy, vibe.core.net.TCPConnection, vibe.http.server.HTTPServerContext, ref vibe.http.server.HTTPServerSettings, ref bool, scope stdx.allocator.IAllocator) [0x55682bd74a27]
/root/.dub/packages/vibe-d-0.9.4/vibe-d/http/vibe/http/server.d:253 @trusted void vibe.http.server.handleHTTPConnection(vibe.core.net.TCPConnection, vibe.http.server.HTTPServerContext).__lambda14() [0x55682bd72c9b]
/root/.dub/packages/vibe-d-0.9.4/vibe-d/http/vibe/http/server.d:245 @safe void vibe.http.server.handleHTTPConnection(vibe.core.net.TCPConnection, vibe.http.server.HTTPServerContext) [0x55682bd72898]
/root/.dub/packages/vibe-d-0.9.4/vibe-d/http/vibe/http/server.d:2043 nothrow @safe void vibe.http.server.listenHTTPPlain(vibe.http.server.HTTPServerSettings, void delegate(vibe.http.server.HTTPServerRequest, vibe.http.server.HTTPServerResponse) @safe).doListen(vibe.http.server.HTTPServerContext, bool, bool, bool).__lambda6(vibe.core.net.TCPConnection) [0x55682bcbe03e]
/root/.dub/packages/vibe-core-1.22.4/vibe-core/source/vibe/core/task.d:734 nothrow void vibe.core.task.TaskFuncInfo.set!(void delegate(vibe.core.net.TCPConnection) nothrow @safe, vibe.core.net.TCPConnection).set(ref void delegate(vibe.core.net.TCPConnection) nothrow @safe, ref vibe.core.net.TCPConnection).callDelegate(ref vibe.core.task.TaskFuncInfo) [0x55682bf035bc]
/root/.dub/packages/vibe-core-1.22.4/vibe-core/source/vibe/core/task.d:755 void vibe.core.task.TaskFuncInfo.call() [0x55682bed0fe1]
/root/.dub/packages/vibe-core-1.22.4/vibe-core/source/vibe/core/task.d:454 nothrow void vibe.core.task.TaskFiber.run() [0x55682bed01cb]

I tried to see the vibe source code, but as I see it is related to this: private size_t m_magic = 0x1EE75817; // workaround for compiler bug

Can somebody explain what is the problem and how can we eliminate this?

@Geod24 Geod24 pinned this issue Aug 3, 2022
@Geod24
Copy link
Contributor

Geod24 commented Aug 3, 2022

This is issue vibe-d/vibe-core#283
It's a DMD bug. The best way to work around it is to use -preview=dtorfields in your dflags.

@Geod24 Geod24 closed this as completed Aug 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants