SerenityOS / ladybird

The Ladybird web browser

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Assertion error in ConnectionBase::read_as_much_as_possible_from_socket_without_blocking

lokedhs opened this issue · comments

When attempting to load a web application, I'm getting an assertion error in the above mentioned function and the browser exits:

The problem can be reproduced by loading the following URL: https://kapdemo.dhsdevelopments.com/clientweb2/

ResourceLoader: Finished load of: "https://kapdemo.dhsdevelopments.com/clientweb2/compute-queue-worker.js", Duration: 14ms
WebContent: /home/elias/src/ladybird/Build/serenity/AK/TypeCasts.h:42: AK::Detail::CopyConst<InputType, OutputType>& AK::verify_cast(InputType&) [with OutputType = Web::HTML::Window; InputType = JS::Object; Detail::CopyConst<InputType, OutputType> = Web::HTML::Window]: Assertion `is<OutputType>(input)' failed.
ConnectionBase::read_as_much_as_possible_from_socket_without_blocking: recv: Connection reset by peer (errno=104)
ConnectionBase::read_as_much_as_possible_from_socket_without_blocking: recv: Connection reset by peer (errno=104)
ladybird: /home/elias/src/ladybird/Build/serenity/Userland/Libraries/LibIPC/Connection.cpp:170: AK::ErrorOr<AK::Vector<unsigned char> > IPC::ConnectionBase::read_as_much_as_possible_from_socket_without_blocking(): Assertion `false' failed.
Subprocess aborted
FAILED: CMakeFiles/run /home/elias/src/ladybird/Build/CMakeFiles/run 
cd /home/elias/src/ladybird/Build && /usr/bin/cmake -E env SERENITY_SOURCE_DIR=/home/elias/src/ladybird/Build/serenity /home/elias/src/ladybird/Build/ladybird

The assertion appears to be the call to VERIFY_NOT_REACHED() that is called if there is an error, and the following expression is not true: error.is_syscall() && error.code() == EAGAIN

Same error here! hope it gets fixed soon

I get the same assertion on Arch Linux, when building ladybird from the latest commit and just running it:

execvp: No such file or directory
VERIFICATION FAILED: false
/build/ladybird/src/ladybird/WebContentView.cpp:615
ConnectionBase::read_as_much_as_possible_from_socket_without_blocking: recv: Connection reset by peer (errno=104)
ConnectionBase::read_as_much_as_possible_from_socket_without_blocking: recv: Connection reset by peer (errno=104)
VERIFICATION FAILED: false
/build/ladybird/src/ladybird/build/serenity/Userland/Libraries/LibIPC/Connection.cpp:170
/usr/bin/ladybird: line 2: 68828 Illegal instruction     (core dumped) SERENITY_SOURCE_DIR=/usr/share/serenity /usr/share/serenity/Base/bin/ladybird

The Connection reset by peer (errno=104) error:

  • Did not appear in commit b881209 (from 2022-11-16).
  • But it does appear in commit 328af1b (from 2022-11-19).

This will be fixed by SerenityOS/serenity#16166. The crash was caused by the IPC layer not correctly handling the death of the WebContent process in some cases. As such, even after the fix lands, the affected website won't load, but at least the WebContent crash won't bring down the whole browser GUI.