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

Random exception "object.Error@(0): Access Violation" #1608

Closed
aka-demik opened this Issue Nov 2, 2016 · 5 comments

Comments

Projects
None yet
2 participants
@aka-demik
Contributor

aka-demik commented Nov 2, 2016

One, a maximum of two times a day, I get an exception:

object.Error@(0): Access Violation
----------------
0x100FD0CA in vibecoredriverswin32Win32EventDriverwaitForEvents at C:\Users\Denis.Hlyakin\AppData\Roaming\dub\packages\vibe-d-0.7.30\vibe-d\source\vibe\core\drivers\win32.d(177)
0x100FCF19 in vibecoredriverswin32Win32EventDriverdoProcessEvents at C:\Users\Denis.Hlyakin\AppData\Roaming\dub\packages\vibe-d-0.7.30\vibe-d\source\vibe\core\drivers\win32.d(133)
0x100FCE6D in vibecoredriverswin32Win32EventDriverrunEventLoopOnce at C:\Users\Denis.Hlyakin\AppData\Roaming\dub\packages\vibe-d-0.7.30\vibe-d\source\vibe\core\drivers\win32.d(119)
0x100FCDE0 in vibecoredriverswin32Win32EventDriverrunEventLoop at C:\Users\Denis.Hlyakin\AppData\Roaming\dub\packages\vibe-d-0.7.30\vibe-d\source\vibe\core\drivers\win32.d(112)
0x100CB6D4 in vibecorecorerunEventLoop at C:\Users\Denis.Hlyakin\AppData\Roaming\dub\packages\vibe-d-0.7.30\vibe-d\source\vibe\core\core.d(203)
0x1000464E in MWI_StartListen at D:\Work\App\src\dll-web-interface\source\dll_functions.d(69)
0x005B0080 in WebIntfThread
0x005B03F7 in WebIntfThread
0x004523B9 in Classes
0x00407132 in System
0x775B62C4 in BaseThreadInitThunk
0x77A30719 in RtlSubscribeWnfStateChangeNotification
0x77A306E4 in RtlSubscribeWnfStateChangeNotification

This development computer, not production server. No load (only my Firefox). Vibe-d serves static files (html, css ...).

dub.sdl

...
dependency "vibe-d" version="~>0.7.30"
subConfiguration "vibe-d" "win32"
subConfiguration "vibe-d:core" "win32"
...

dub.selections.json

{
	"fileVersion": 1,
	"versions": {
		"diet-ng": "1.1.0",
		"libasync": "0.7.9",
		"libevent": "2.0.1+2.0.16",
		"memutils": "0.4.7",
		"openssl": "1.1.4+1.0.1g",
		"vibe-d": "0.7.30"
	}
} 
@s-ludwig

This comment has been minimized.

Show comment
Hide comment
@s-ludwig

s-ludwig Dec 18, 2016

Member

Does anything else besides static file serving happen in the process? The only possibility that I currently see for this to occur is if a Win32TCPConnection gets destroyed while a write is in progress. But the static file server doesn't destroy the connection and only writes in the same task that accepts and destroys the connection, so that the write should always be finished.

Member

s-ludwig commented Dec 18, 2016

Does anything else besides static file serving happen in the process? The only possibility that I currently see for this to occur is if a Win32TCPConnection gets destroyed while a write is in progress. But the static file server doesn't destroy the connection and only writes in the same task that accepts and destroys the connection, so that the write should always be finished.

@aka-demik

This comment has been minimized.

Show comment
Hide comment
@aka-demik

aka-demik Dec 19, 2016

Contributor

I created a simplified test case https://github.com/aka-demik/vibe-d-1608.

import vibe.http.fileserver;
import vibe.http.router;
import vibe.core.log;

shared static this()
{
	auto settings = new HTTPServerSettings;
	settings.port = 8084;
	settings.bindAddresses = ["::1", "127.0.0.1"];

	auto router = new URLRouter;
	router.get("*", serveStaticFiles("public"));
	listenHTTP(settings, router);

	logInfo("Please open http://127.0.0.1:8084/test.htm in your browser.");
}
name "vibe-test"
dependency "vibe-d" version="~>0.7.30"
subConfiguration "vibe-d" "win32"
subConfiguration "vibe-d:core" "win32"
versions "VibeDefaultMain"

steps to reproduce:

object.Error@(0): Access Violation
----------------
0x0048F916 in void vibe.core.drivers.win32.Win32EventDriver.waitForEvents(uint) at C:\Users\Denis.Hlyakin\AppData\Roaming\dub\packages\vibe-d-0.7.30\vibe-d\source\vibe\core\drivers\win32.d(177)
0x0048F765 in bool vibe.core.drivers.win32.Win32EventDriver.doProcessEvents(uint) at C:\Users\Denis.Hlyakin\AppData\Roaming\dub\packages\vibe-d-0.7.30\vibe-d\source\vibe\core\drivers\win32.d(133)
0x0048F6B9 in int vibe.core.drivers.win32.Win32EventDriver.runEventLoopOnce() at C:\Users\Denis.Hlyakin\AppData\Roaming\dub\packages\vibe-d-0.7.30\vibe-d\source\vibe\core\drivers\win32.d(119)
0x0048F62C in int vibe.core.drivers.win32.Win32EventDriver.runEventLoop() at C:\Users\Denis.Hlyakin\AppData\Roaming\dub\packages\vibe-d-0.7.30\vibe-d\source\vibe\core\drivers\win32.d(112)
0x00478804 in int vibe.core.core.runEventLoop()
0x004673BF in int vibe.core.core.runApplication(immutable(char)[][]*) at C:\Users\Denis.Hlyakin\AppData\Roaming\dub\packages\vibe-d-0.7.30\vibe-d\source\vibe\core\core.d(110)
0x0040B8AE in _Dmain at C:\Users\Denis.Hlyakin\AppData\Roaming\dub\packages\vibe-d-0.7.30\vibe-d\source\vibe\appmain.d(46)
0x00512A57 in D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv
0x00512A1B in void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).runAll()
0x0051291C in _d_run_main
0x0040B8C4 in main at e:\TEMP\vibe-test\source\app.d(7)
0x00564AAD in mainCRTStartup
0x75A562C4 in BaseThreadInitThunk
0x77A70FD9 in RtlSubscribeWnfStateChangeNotification
0x77A70FA4 in RtlSubscribeWnfStateChangeNotification
Program exited with code 1
Contributor

aka-demik commented Dec 19, 2016

I created a simplified test case https://github.com/aka-demik/vibe-d-1608.

import vibe.http.fileserver;
import vibe.http.router;
import vibe.core.log;

shared static this()
{
	auto settings = new HTTPServerSettings;
	settings.port = 8084;
	settings.bindAddresses = ["::1", "127.0.0.1"];

	auto router = new URLRouter;
	router.get("*", serveStaticFiles("public"));
	listenHTTP(settings, router);

	logInfo("Please open http://127.0.0.1:8084/test.htm in your browser.");
}
name "vibe-test"
dependency "vibe-d" version="~>0.7.30"
subConfiguration "vibe-d" "win32"
subConfiguration "vibe-d:core" "win32"
versions "VibeDefaultMain"

steps to reproduce:

object.Error@(0): Access Violation
----------------
0x0048F916 in void vibe.core.drivers.win32.Win32EventDriver.waitForEvents(uint) at C:\Users\Denis.Hlyakin\AppData\Roaming\dub\packages\vibe-d-0.7.30\vibe-d\source\vibe\core\drivers\win32.d(177)
0x0048F765 in bool vibe.core.drivers.win32.Win32EventDriver.doProcessEvents(uint) at C:\Users\Denis.Hlyakin\AppData\Roaming\dub\packages\vibe-d-0.7.30\vibe-d\source\vibe\core\drivers\win32.d(133)
0x0048F6B9 in int vibe.core.drivers.win32.Win32EventDriver.runEventLoopOnce() at C:\Users\Denis.Hlyakin\AppData\Roaming\dub\packages\vibe-d-0.7.30\vibe-d\source\vibe\core\drivers\win32.d(119)
0x0048F62C in int vibe.core.drivers.win32.Win32EventDriver.runEventLoop() at C:\Users\Denis.Hlyakin\AppData\Roaming\dub\packages\vibe-d-0.7.30\vibe-d\source\vibe\core\drivers\win32.d(112)
0x00478804 in int vibe.core.core.runEventLoop()
0x004673BF in int vibe.core.core.runApplication(immutable(char)[][]*) at C:\Users\Denis.Hlyakin\AppData\Roaming\dub\packages\vibe-d-0.7.30\vibe-d\source\vibe\core\core.d(110)
0x0040B8AE in _Dmain at C:\Users\Denis.Hlyakin\AppData\Roaming\dub\packages\vibe-d-0.7.30\vibe-d\source\vibe\appmain.d(46)
0x00512A57 in D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv
0x00512A1B in void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).runAll()
0x0051291C in _d_run_main
0x0040B8C4 in main at e:\TEMP\vibe-test\source\app.d(7)
0x00564AAD in mainCRTStartup
0x75A562C4 in BaseThreadInitThunk
0x77A70FD9 in RtlSubscribeWnfStateChangeNotification
0x77A70FA4 in RtlSubscribeWnfStateChangeNotification
Program exited with code 1
@aka-demik

This comment has been minimized.

Show comment
Hide comment
@aka-demik

aka-demik Dec 19, 2016

Contributor

The error does not occur if download only one file.
Throws only if downloaded html + css + js.

Contributor

aka-demik commented Dec 19, 2016

The error does not occur if download only one file.
Throws only if downloaded html + css + js.

@s-ludwig s-ludwig closed this in f9ba5af Dec 19, 2016

@s-ludwig

This comment has been minimized.

Show comment
Hide comment
@s-ludwig

s-ludwig Dec 19, 2016

Member

Okay, thanks! Found and fixed. The m_fileWriters hash map got modified while being iterated (would be nice to have an assertion that catches this kind of bug).

Member

s-ludwig commented Dec 19, 2016

Okay, thanks! Found and fixed. The m_fileWriters hash map got modified while being iterated (would be nice to have an assertion that catches this kind of bug).

@aka-demik

This comment has been minimized.

Show comment
Hide comment
@aka-demik

aka-demik Dec 19, 2016

Contributor

Thanks!

Contributor

aka-demik commented Dec 19, 2016

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment