Opened 3 years ago

Last modified 2 years ago

#17194 new bug

Webkit crash in unixShmLock for sqlite

Reported by: nephele Owned by: pulkomandy
Priority: normal Milestone: Unscheduled
Component: Kits/Web Kit Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

It seems webkit crashed while trying to lock memory to write to the icons database.

This happened after opening http://pulkomandy.tk/_/_Development/_Some%20random%20thoughts%20about%20XMPP%20spaces in WebPositive with it already running.

It did not happen on subsequent visits. hrev55274

As a bit of a related question, why are we keeping the icon database? are the icons displayed anywhere?

Attachments (7)

WebPositive-2822-debug-17-08-2021-16-43-51.report (28.5 KB ) - added by nephele 3 years ago.
HaikuLauncher-552825-debug-11-09-2021-21-34-12.report (34.0 KB ) - added by nephele 3 years ago.
HaikuLauncher-152618-debug-20-11-2021-20-27-42.report (29.7 KB ) - added by nephele 2 years ago.
HaikuLauncher crash
WebpageIcons.db (4.0 KB ) - added by nephele 2 years ago.
WebpageIcons.db-shm (32.0 KB ) - added by nephele 2 years ago.
WebpageIcons.db-wal (88.5 KB ) - added by nephele 2 years ago.
WebpageIcons.2.db (56.0 KB ) - added by nephele 2 years ago.
webKitBuild/Release/localStorage/

Download all attachments as: .zip

Change History (11)

comment:1 by pulkomandy, 3 years ago

In theory the icons are displayed in the navigation bar (the default globe icon should show only if the website has nothing else) and when you create bookmarks. Possibly also in browser tabs, I don't remember, but it would make sense to have it there. I think the icon database has been broken for a few years but no one ever reported an issue about it.

comment:2 by nephele, 3 years ago

I think the icon database has been broken for a few years but no one ever reported an issue about it.

I don't recall ever seeing the globe icon be something else... But then I also didn't know this was an intended feature. :)

comment:3 by nephele, 3 years ago

Debug report for "HaikuLauncher https://git.gryphno.de/nephele/haikuwebkit "
This is with sqlite compiled with "--enable-debug" though strangely the function contents isn't visible still... but there is a lot more "Bad Adress" in the report. :)

by nephele, 2 years ago

HaikuLauncher crash

by nephele, 2 years ago

Attachment: WebpageIcons.db added

by nephele, 2 years ago

Attachment: WebpageIcons.db-shm added

by nephele, 2 years ago

Attachment: WebpageIcons.db-wal added

by nephele, 2 years ago

Attachment: WebpageIcons.2.db added

webKitBuild/Release/localStorage/

comment:4 by pulkomandy, 2 years ago

I have reproduced it without involving the icon database. Now just visiting github.com crashes for me, in the html5 localstorage support (which also uses sqlite).

It seems pDbFd->pShm is NULL and sqlite dereferences it in unixShmLock.

This pointer should have been initialized by unixOpenSharedMemory called by unixShmMap. It should contain things related to the db-shm file which allows multiple processes/threads to coordinate access to the database.

I don't know why the pointer is NULL. Now I'm trying to build WebKit with some debug logs enabled to see if that helps investigating (there are a lot of logs in the SQLite code but they are disabled by default).

Note: See TracTickets for help on using tickets.