Segmentation fault when running headless under Apache+PHP

Bug #420636 reported by Søren Løvborg
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Inkscape
New
Undecided
Unassigned

Bug Description

I'm trying to automate convertion of SVG files to PNG files on a webserver. However, Inkscape 0.46 segfaults when started under Apache+PHP, possible because the "www-data" user doesn't have a home directory, or some similar restriction.

Reproduction:
- Untar the attached files into a web accessible directory
- Request error.php

(Note that the included SVG file is just a blank image created by Inkscape.)

The problem does not occur when I execute the same command line as the www-data user (using "su"), so the lack of shell may be a factor. This also made it difficult to obtain a GDB backtrace, but that was solved by piping commands to GDB.

And yes, I'm aware this is a somewhat obscure use case. :-)

Backtrace:

GNU gdb 6.8-debian
...
This GDB was configured as "x86_64-linux-gnu"...
(no debugging symbols found)
(gdb) Starting program: /usr/bin/inkscape --export-png delme.png delme.svg
(no debugging symbols found)
...
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
(no debugging symbols found)
...
(no debugging symbols found)
[New Thread 0x7f4bafd73790 (LWP 16557)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)

** (inkscape:16557): WARNING **: Cannot create directory /var/www/.inkscape.
Although Inkscape will run, it will use default settings,
and any changes made in preferences will not be saved.

(inkscape:16557): libgnomevfs-WARNING **: Unable to create ~/.gnome2 directory: Permission denied

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f4bafd73790 (LWP 16557)]
0x00007f4ba84cd6a2 in strcmp () from /lib/libc.so.6
(gdb) #0 0x00007f4ba84cd6a2 in strcmp () from /lib/libc.so.6
#1 0x00007f4bab61f2d9 in g_str_equal () from /usr/lib/libglib-2.0.so.0
#2 0x00007f4baad3f8de in gnome_vfs_get_home_dir ()
   from /usr/lib/libgnomevfs-2.so.0
#3 0x00007f4baad338ed in gnome_vfs_init () from /usr/lib/libgnomevfs-2.so.0
#4 0x00000000008d5f03 in ?? ()
#5 0x00000000004502e8 in ?? ()
#6 0x000000000044fb95 in ?? ()
#7 0x00007f4ba846b5a6 in __libc_start_main () from /lib/libc.so.6
#8 0x000000000044ecc9 in ?? ()
#9 0x00007fffb7da3ae8 in ?? ()
#10 0x000000000000001c in ?? ()
#11 0x0000000000000004 in ?? ()
#12 0x00007fffb7da3eef in ?? ()
#13 0x00007fffb7da3f01 in ?? ()
#14 0x00007fffb7da3f0e in ?? ()
#15 0x00007fffb7da3f18 in ?? ()
#16 0x0000000000000000 in ?? ()

Tags: crash
Revision history for this message
Søren Løvborg (kwi) wrote :
Revision history for this message
Clive Darra (osde8info) wrote :

also getting

(process:26878): libgnomevfs-WARNING **: Unable to create ~/.gnome2 directory: Permission denied
(process:26868): libgnomevfs-WARNING **: Unable to create ~/.gnome2 directory: Permission denied

when just running apache httpd & php (so may not be inkscape specific)

Revision history for this message
Clive Darra (osde8info) wrote :

ps these errors appeared in /var/log/httpd/error_log

tags: added: crash
Revision history for this message
su_v (suv-lp) wrote :

AFAICT a duplicate of earlier report
- Bug #376866 “crash when run non-interactively and .gnome2 directory unable to be created”
  <https://bugs.launchpad.net/inkscape/+bug/376866>
(script runs as the www-data user, and therefore cannot create new directories in /var/www)

Revision history for this message
su_v (suv-lp) wrote :

Linking as duplicate to bug #376866 - please add a comment here (bug #420636) and revert the duplicate status if you disagree.

Revision history for this message
Srinivas Gajavada (srinivasg) wrote :

When will this issue be fixed?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.