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

🐛 Bug Report — Noisy logging on client resets to DiskDirectory services #3207

Open
marcusdarmstrong opened this issue Dec 3, 2024 · 0 comments

Comments

@marcusdarmstrong
Copy link

With this script to trigger an immediate client connection reset pointed at a running workerd DiskDirectory service: (Technically in my setup we have a workerd service fronting that DiskDirectory to do content negotiation, but I don't think that matters here?)

const net = require('net');
const socket = new net.Socket();
socket.connect(8080, "127.0.0.1", () => {
    socket.write(
        'GET / HTTP/1.1\n' +
        'Host: localhost\n\n'
    );
    setTimeout(() => socket.resetAndDestroy(), 0);
});

We end up with the following logs on each run:

workerd/server/server.c++:3360: error: Uncaught exception: kj/async-io-unix.c++:290: disconnected: worker_do_not_log; Request failed due to internal error
stack: workerd@4005d83 workerd@568c67c workerd@2f8370c workerd@2fa137f workerd@2f8cb74 workerd@3ff6d8c workerd@2f8370c workerd@362248c workerd@34a135c workerd@2fa5b3f workerd@4007cfb workerd@4008d47 workerd@40096d3 workerd@3fd5470

Symbolized:

kj::(anonymous namespace)::HttpFixedLengthEntityWriter::pumpFrom(kj::AsyncInputStream&, unsigned long) (.resume)
http.c++:0:0
kj::(anonymous namespace)::AsyncPipe::BlockedPumpFrom::pumpTo(kj::AsyncOutputStream&, unsigned long)::'lambda'(unsigned long)::operator()(unsigned long) const
async-io.c++:0:0
kj::Promise<unsigned long>::ignoreResult()::'lambda'(unsigned long&&)::operator()(unsigned long&&) const
server.c++:0:0
workerd::server::Server::DiskDirectoryService::request(kj::HttpMethod, kj::StringPtr, kj::HttpHeaders const&, kj::AsyncInputStream&, kj::HttpService::Response&) (.resume)
server.c++:0:0
kj::_::IdentityFunc<void>::operator()() const
server.c++:0:0
kj::Promise<unsigned long> kj::(anonymous namespace)::HttpClientAdapter::DelayedEofInputStream::wrap<unsigned long>(unsigned long, kj::Promise<unsigned long>)::'lambda'(kj::Exception&&)::operator()(kj::Exception&&) const::'lambda'()::operator()()
http.c++:0:0
kj::Promise<unsigned long>::ignoreResult()::'lambda'(unsigned long&&)::operator()(unsigned long&&) const
server.c++:0:0
workerd::api::ServiceWorkerGlobalScope::request(kj::HttpMethod, kj::StringPtr, kj::HttpHeaders const&, kj::AsyncInputStream&, kj::HttpService::Response&, kj::Maybe<kj::StringPtr>, workerd::Worker::Lock&, kj::Maybe<workerd::api::ExportedHandler&>)::$_9::operator()(workerd::api::DeferredProxy<void>)::'lambda'()::operator()()
global-scope.c++:0:0
workerd::(anonymous namespace)::WorkerEntrypoint::request(kj::HttpMethod, kj::StringPtr, kj::HttpHeaders const&, kj::AsyncInputStream&, kj::HttpService::Response&)::$_5::operator()(kj::Exception&&)
worker-entrypoint.c++:0:0
workerd::server::Server::HttpListener::Connection::request(kj::HttpMethod, kj::StringPtr, kj::HttpHeaders const&, kj::AsyncInputStream&, kj::HttpService::Response&) (.resume)
server.c++:0:0
kj::HttpServer::Connection::onRequest(kj::HttpHeaders::Request&) (.resume)
http.c++:0:0
kj::HttpServer::Connection::onHeaders(kj::OneOf<kj::HttpHeaders::Request, kj::HttpHeaders::ConnectRequest, kj::HttpHeaders::ProtocolError>&&) (.resume)
http.c++:0:0
kj::HttpServer::Connection::loop() (.resume)
http.c++:0:0
kj::HttpServer::Connection::startLoopImpl()::'lambda'(kj::Exception&&)::operator()(kj::Exception&&) const
http.c++:0:0

This is particularly noisy/noticeable for me in the case when doing local development using the DiskDirectory service to serve locally-build JS/CSS assets—for which browsers will race the cache and drop unnecessary pending requests on cache hit.

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

1 participant