gnome-web-photo segfaults (segment fault)! OH NOES!

We capture images from beautiful web pages all over the world by exposing the gnome-web-photo package through a simple web service. After moving the service to a new server today gnome-web-photo suddenly started segfaulting (aka segment fault).

Running the application as the same user as the web server worked (after fixing the home directory so that gconf etc was able to create its files), but when running in the web server process itself things segfaulted.

The next attempt was to run both the working and non-working version through strace and see what the difference were, and apparently things segfaulted when the working process accessed <home directory>.mozilla/. This was the first access to anything inside the home directory of the user, which provided the solution:

When the process was running under the web server, the HOME environment variable was not set, but while running under the user from the shell (through su -), it was present. gnome-web-photo (or Firefox?) apparently does not feature any sort of fallback if the HOME environment variable is missing and segfaults instead.

Maybe that could be a patch for the weekend, but hey, the Olympic Games are on!

3 thoughts on “gnome-web-photo segfaults (segment fault)! OH NOES!”

  1. Hello,

    I have implemented this script:

    When I execute it in shell (/usr/bin/php script.php) it runs! But if I execute it with a browser I view this error: Cannot open display

    Can you help me?

  2. You’ll have to provide the display that gnome-web-photo should run on – this will refer to the current X11-compatible server running on the machine handling the request. This is usually xorg these days. Anyway, you can provide information about which display to use by appending –display to the command line: –display=:0.0.

    The X11-server will usually not allow connections from other users, but this depends on your configuration. You can use xhost to configure access to your X11-server.

Leave a Reply

Your email address will not be published. Required fields are marked *