Bug 117063 - [GTK] Weird behaviour and no clues to the user when the shared memory file can't be opened
Summary: [GTK] Weird behaviour and no clues to the user when the shared memory file ca...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-31 01:29 PDT by Enrique Ocaña
Modified: 2013-06-07 09:37 PDT (History)
5 users (show)

See Also:


Attachments
Patch (1.68 KB, patch)
2013-05-31 01:38 PDT, Enrique Ocaña
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Enrique Ocaña 2013-05-31 01:29:30 PDT
When running a non-debug build of Gtk MiniBrowser, I can only see a big grey rectangle in the place where the web content should be. If I press right click at some place in the grey area, I can see different context menus depending on the contents that should be there if the browser worked properly. No clue about what's causing the behaviour.

After some investigation, gathered some important facts:

- I was running MiniBrowser in a chroot environment
- That chroot environment didn't have /dev/shm or /run/shm mounted
- The actual problem was in this piece of code from SharedMemory::create(), in Source/WebKit2/Platform/unix/SharedMemoryUnix.cpp:

    fileDescriptor = shm_open(tempName.data(), O_CREAT | O_CLOEXEC | O_RDWR, S_IRUSR | S_IWUSR);
    ...
    if (fileDescriptor == -1) {
      return 0;
    }

The real issue is that the user using a normal build has no clue at all about what's causing the problem.
Comment 1 Enrique Ocaña 2013-05-31 01:38:25 PDT
Created attachment 203422 [details]
Patch
Comment 2 Carlos Garcia Campos 2013-05-31 01:53:25 PDT
Comment on attachment 203422 [details]
Patch

LGTM
Comment 3 WebKit Commit Bot 2013-06-07 09:37:33 PDT
Comment on attachment 203422 [details]
Patch

Clearing flags on attachment: 203422

Committed r151324: <http://trac.webkit.org/changeset/151324>
Comment 4 WebKit Commit Bot 2013-06-07 09:37:35 PDT
All reviewed patches have been landed.  Closing bug.