On 7/10/26 13:25, Kirill A. Korinsky wrote:
> On Fri, 10 Jul 2026 10:37:45 +0200,
> Fabien Romano <[email protected]> wrote:
>>
>>
>> An AI found the crash is related to a web serial.
>>
>> I have no idea why it randomly fails on my side.
>> But yes, after trying a few times, I also get the crash.
>>
>> Crash:
>> rm -rf /tmp/chrome-vinted-serial && \
>> /usr/local/bin/chrome \
>> --user-data-dir=/tmp/chrome-vinted-serial \
>> --no-first-run \
>> https://www.vinted.com/
>>
>> No crash:
>> rm -rf /tmp/chrome-vinted-noserial && \
>> /usr/local/bin/chrome \
>> --user-data-dir=/tmp/chrome-vinted-noserial \
>> --no-first-run \
>> --disable-blink-features=Serial \
>> --disable-features=WebSerialAPI \
>> https://www.vinted.com/
>>
>> From my first test, --disable-blink-features=Serial is enough.
>>
>> Please test those flags and confirm it fixes your issue.
>>
>> I also get this crash while looking for WASM stuff online.
>> https://patrickelectric.work/mavlink2rest-wasm/
>>
>> This one crashes all the time as it explicitly tests the serial.
>>
>> rm -rf /tmp/chrome-serial && \
>> /usr/local/bin/chrome \
>> --user-data-dir=/tmp/chrome-serial \
>> --no-first-run \
>> https://patrickelectric.work/mavlink2rest-wasm/
>>
>> Also, I do not understand why, but --js-flags=--jitless prevents the crash.
>> I guess this is specific to this test.
>>
>> The below diff isn't enough, but it show where to look.
>> Next we have to handle the failure and return / close properly.
>> Otherwise tests fail on a timeout, which sounds not correct.
>>
>> Except if someone wants to implement serial ...
>>
>> --
>> Fabien Romano
>>
>> QOL. Do not crash, fail silently.
>> XXX notyet
>>
>> Index: services/device/device_service.cc
>> --- services/device/device_service.cc.orig
>> +++ services/device/device_service.cc
>> @@ -310,7 +310,8 @@ void DeviceService::BindSerialPortManager(
>> serial_port_manager_.AsyncCall(&SerialPortManagerImpl::Bind, FROM_HERE)
>> .WithArgs(std::move(receiver));
>> #else // defined(IS_SERIAL_ENABLED_PLATFORM)
>> - NOTREACHED() << "Serial devices not supported on this platform.";
>> + // Serial is unsupported on this platform. Let the receiver close so the
>> + // renderer observes a disconnect and requestPort() fails gracefully.
>> #endif // defined(IS_SERIAL_ENABLED_PLATFORM)
>> }
>>
>>
>
> Am I reading it right: a some random website tries to use Web Serial API and
> because it is not implemented, it literally crashed the web browser?
Yes, exactly.
https://chromium.googlesource.com/chromium/src/+/HEAD/styleguide/c++/checks.md
CHECK(), DCHECK() and NOTREACHED() are all used to ensure that invariants hold.
They document (and verify) programmer expectations that either some statement
always holds true at the point of (D)CHECKing or that a piece of code is
unreachable (for NOTREACHED). CHECK failures and reachable NOTREACHEDs result in
an application crash (generating a crash report).
I don't remember when they switched NOTREACHED() to be fatal (recently, I
think).
If you try to use BindSerialPortManager on OpenBSD, you crash.
>
> Anyway, I had added robert@ in case if he missed it.
>