After following Ubuntu tile server setup instructions I encounter the following segmentation fault any time Apache2 is started. I've attempted re-installing mod_tile from SVN but still hit this crash.

user@host:~$ sudo /etc/init.d/apache2 start
 * Starting web server apache2                                                                                                                                                                                                                                                                                                [Fri Jan 11 13:25:59 2013] [notice] Committing tile config default
[Fri Jan 11 13:25:59 2013] [notice] Loading tile config default at /osm/ for zooms 0 - 18 from tile directory /var/lib/mod_tile with extension .png and mime type image/png
*** glibc detected *** /usr/sbin/apache2: double free or corruption (fasttop): 0x00007fa6fc5859f0 ***
======= Backtrace: =========
======= Memory map: ========
.... omitted ....

So I grabbed a core dump and did some mucking around in gdb at frame 4 we see load_tile_config() get called then everything falls to pieces. Appears to be a double free in mod_tile.c in load_tile_config(), a quick look through the function didn't turn up anything that should cause the crash but I don't know this code base so maybe I missed something :/

#0  0x00007f5e09a65425 in __GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1  0x00007f5e09a68b8b in __GI_abort () at abort.c:91
#2  0x00007f5e09aa339e in __libc_message (do_abort=2, fmt=0x7f5e09bad028 "*** glibc detected *** %s: %s: 0x%s ***\n") at ../sysdeps/unix/sysv/linux/libc_fatal.c:201
#3  0x00007f5e09aadb96 in malloc_printerr (action=3, str=0x7f5e09bad218 "double free or corruption (fasttop)", ptr=<optimized out>) at malloc.c:5007
#4  0x00007f5e06afba00 in load_tile_config () from /usr/lib/apache2/modules/
#5  0x00007f5e0a90a7d1 in invoke_cmd (cmd=0x7f5e06cff9c0 <tile_cmds>, parms=parms@entry=0x7fffa0cb77e0, mconfig=0x0, args=0x7f5e06a7c369 "") at config.c:791
#6  0x00007f5e0a90c807 in ap_walk_config_sub (section_vector=0x7f5e0a82fea8, parms=0x7fffa0cb77e0, current=0x7f5e06a7c318) at config.c:1164
#7  ap_walk_config (current=0x7f5e06a7c318, parms=parms@entry=0x7fffa0cb77e0, section_vector=0x7f5e0a82fea8) at config.c:1197
#8  0x00007f5e0a90420a in virtualhost_section (cmd=0x7fffa0cb77e0, dummy=<optimized out>, arg=<optimized out>) at core.c:2234
#9  0x00007f5e0a90a7ee in invoke_cmd (cmd=0x7f5e0ab365d0 <core_cmds+80>, parms=parms@entry=0x7fffa0cb77e0, mconfig=0x7f5e0a87e318, args=0x7f5e06a7c0d8 "*:80>") at config.c:758
#10 0x00007f5e0a90c807 in ap_walk_config_sub (section_vector=0x7f5e0a87dee0, parms=0x7fffa0cb77e0, current=0x7f5e06a7c098) at config.c:1164
#11 ap_walk_config (current=0x7f5e06a7c098, parms=parms@entry=0x7fffa0cb77e0, section_vector=0x7f5e0a87dee0) at config.c:1197
#12 0x00007f5e0a90d722 in ap_process_config_tree (s=s@entry=0x7f5e0a8b5578, conftree=<optimized out>, p=0x7f5e0a8bc028, ptemp=<optimized out>) at config.c:1792
#13 0x00007f5e0a8f5f5d in main (argc=3, argv=0x7fffa0cb7a38) at main.c:647

Any help/advice?

Config files




asked 11 Jan '13, 21:33

7bitbyte's gravatar image

accept rate: 0%

edited 11 Jan '13, 22:45

What version of Unbuntu is this with?

(11 Jan '13, 21:51) SomeoneElse ♦

Ubuntu 12.10 quantal running on a 64bit machine

(11 Jan '13, 22:05) 7bitbyte

I was hitting this on 12.04, preformed the update to 12.10 and still hit so I started digging deeper.

(11 Jan '13, 22:07) 7bitbyte

Although I haven't tested the 12.10 version yet, so it is possible that there is a general bug, I rather suspect there is something in the config that upsets it (of cause that is also a bug, but perhaps easier to work around). Could you post the site config and the renderd config?

(11 Jan '13, 22:27) apmon

Good point, updated post to include links to config files

(11 Jan '13, 22:46) 7bitbyte

I can avoid the crash now by removing the ATTRIBUTION and DESCRIPTION tags from /etc/renderd.conf but there is definitely a bug in mod_tile

(11 Jan '13, 23:02) 7bitbyte

hey, i have the same error.

i didnt tested it yet, but have a look at the end of the method load_tile_config()

if (description) free(description);

if (attribution) free(description);

if (hostnames) free(description);

that looks wrong :)

edit: that fixed it for me

if (description) free(description);

if (attribution) free(attribution);

if (hostnames) free(hostnames);

(11 Jan '13, 23:20) fabianpr

doh, yep that should be the issue.

(11 Jan '13, 23:41) 7bitbyte

Ah, yes, that is indeed wrong. I'll commit a fix for that soon. I wonder if I committed the wrong version, as I noticed that error before committing and thought I had already fixed it. Oh well... Thanks for the report.

(12 Jan '13, 00:47) apmon

I fixed those double frees in SVN revision 29190 now. Hopefully that will solve the issue. Could you please confirm this? I will also upload a fixed package soon.

(12 Jan '13, 16:11) apmon
showing 5 of 10 show 5 more comments
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 11 Jan '13, 21:33

question was seen: 2,296 times

last updated: 12 Jan '13, 16:11

powered by OSQA