Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Apache segfault when +MultiViews Option Directive set using <Location>

Abierto
#94 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
apache, cpp
Área
backend

Línea de trabajo

Reproduce el fallo comparando las configuraciones de y <Directory /var/www>, y empieza después por src/mod_tile.c alrededor de tile_handler_serve y la traza de pila de Apache mod_negotiation. Se considera hecho cuando servir el tile con Options +MultiViews en un bloque ya no provoca un fallo de segmentación de Apache.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

I tried setting up a tile server using mod_tile and ran into this issue in the process. It turns out that if in the Apache virtual host conf file you use a <Location> section for the Options +MultiViews directive:

<Location />
  Options +MultiViews
</Location>

...instead of a <Directory> section...

<Directory /var/www>
  Options +MultiViews
</Directory>

...you get a segfault when mod_tile attempts to serve the tile data. Renderd appears to have generated and rendered the tile correctly and wrote the metadata file to disk, and the Apache segfault appears somewhere between the file load and output to the client.

This is happening on the latest commit (774fc7a4470f655393ad6dd76c5c8bf3efe7923d), on an Ubuntu 14.04 box running Apache 2.4.7 and Mapnik v2.2.0.

Apache log when segfault happens (using <Location />):

[Fri Jan 16 11:27:55.051453 2015] [tile:debug] [pid 21410] ./src/mod_tile.c(1278): [client REDACTED:44475] tile_translate: uri(/osm_tiles/0/0/0.png)
[Fri Jan 16 11:27:55.051523 2015] [tile:debug] [pid 21410] ./src/mod_tile.c(1296): [client REDACTED:44475] tile_translate: testing baseuri(/osm_tiles/) name(default) extension(png)
[Fri Jan 16 11:27:55.051563 2015] [tile:debug] [pid 21410] ./src/mod_tile.c(1341): [client REDACTED:44475] tile_translate: request for default was 0 0 1
[Fri Jan 16 11:27:55.052017 2015] [tile:debug] [pid 21410] ./src/mod_tile.c(315): [client REDACTED:44475] get_storage_backend: Retrieving storage back end for tile layer 0 in pool 7fbbfdede028 and thread 140445397591936
[Fri Jan 16 11:27:55.052047 2015] [tile:debug] [pid 21410] ./src/mod_tile.c(328): [client REDACTED:44475] get_storage_backend: No storage backends for this lifecycle 7fbbfdede028, creating it in thread 140445397591936
[Fri Jan 16 11:27:55.052061 2015] [tile:debug] [pid 21410] ./src/mod_tile.c(344): [client REDACTED:44475] get_storage_backend: No storage backend in current lifecycle 7fbbfdede028 in thread 140445397591936 for current tile layer 0
[Fri Jan 16 11:27:55.052134 2015] [tile:debug] [pid 21410] ./src/mod_tile.c(1381): [client REDACTED:44475] tile_translate: op(tile_serve) xml(default) mime(image/png) z(0) x(0) y(0)
[Fri Jan 16 11:27:55.052145 2015] [tile:info] [pid 21410] [client REDACTED:44475] tile_storage_hook: handler(tile_serve), uri(/osm_tiles/0/0/0.png)
[Fri Jan 16 11:27:55.052229 2015] [tile:debug] [pid 21410] ./src/mod_tile.c(365): [client REDACTED:44475] tile_state: determined state of default 0 0 0 on store 7fbc00628790: Tile size: 8419, expired: 0 created: 1421366421
[Fri Jan 16 11:27:55.052322 2015] [authz_core:debug] [pid 21410] mod_authz_core.c(828): [client REDACTED:44475] AH01628: authorization result: granted (no directives)
[Fri Jan 16 11:27:56.010389 2015] [core:notice] [pid 21403] AH00051: child pid 21410 exit signal Segmentation fault (11), possible coredump in /etc/apache2

And when it doesn't (using <Directory /var/www>):

[Fri Jan 16 11:31:54.509126 2015] [tile:debug] [pid 21926] ./src/mod_tile.c(1278): [client REDACTED:38693] tile_translate: uri(/osm_tiles/0/0/0.png)
[Fri Jan 16 11:31:54.509198 2015] [tile:debug] [pid 21926] ./src/mod_tile.c(1296): [client REDACTED:38693] tile_translate: testing baseuri(/osm_tiles/) name(default) extension(png)
[Fri Jan 16 11:31:54.509238 2015] [tile:debug] [pid 21926] ./src/mod_tile.c(1341): [client REDACTED:38693] tile_translate: request for default was 0 0 1
[Fri Jan 16 11:31:54.509251 2015] [tile:debug] [pid 21926] ./src/mod_tile.c(315): [client REDACTED:38693] get_storage_backend: Retrieving storage back end for tile layer 0 in pool 7f2cabfa7028 and thread 139829842360192
[Fri Jan 16 11:31:54.509265 2015] [tile:debug] [pid 21926] ./src/mod_tile.c(328): [client REDACTED:38693] get_storage_backend: No storage backends for this lifecycle 7f2cabfa7028, creating it in thread 139829842360192
[Fri Jan 16 11:31:54.509275 2015] [tile:debug] [pid 21926] ./src/mod_tile.c(344): [client REDACTED:38693] get_storage_backend: No storage backend in current lifecycle 7f2cabfa7028 in thread 139829842360192 for current tile layer 0
[Fri Jan 16 11:31:54.509328 2015] [tile:debug] [pid 21926] ./src/mod_tile.c(1381): [client REDACTED:38693] tile_translate: op(tile_serve) xml(default) mime(image/png) z(0) x(0) y(0)
[Fri Jan 16 11:31:54.509342 2015] [tile:info] [pid 21926] [client REDACTED:38693] tile_storage_hook: handler(tile_serve), uri(/osm_tiles/0/0/0.png)
[Fri Jan 16 11:31:54.509423 2015] [tile:debug] [pid 21926] ./src/mod_tile.c(365): [client REDACTED:38693] tile_state: determined state of default 0 0 0 on store 7f2cad89c790: Tile size: 8419, expired: 0 created: 1421366421
[Fri Jan 16 11:31:54.509485 2015] [authz_core:debug] [pid 21926] mod_authz_core.c(828): [client REDACTED:38693] AH01628: authorization result: granted (no directives)
[Fri Jan 16 11:31:54.509613 2015] [tile:debug] [pid 21926] ./src/mod_tile.c(1183): [client REDACTED:38693] tile_handler_serve: xml(default) z(0) x(0) y(0)
[Fri Jan 16 11:31:54.510318 2015] [tile:debug] [pid 21926] ./src/mod_tile.c(1208): [client REDACTED:38693] Read tile of length 7887 from file:///var/lib/mod_tile/default/0/0/0/0/0/0.meta: 
[Fri Jan 16 11:31:54.510409 2015] [tile:debug] [pid 21926] ./src/mod_tile.c(365): [client REDACTED:38693] tile_state: determined state of default 0 0 0 on store 7f2cad89c790: Tile size: 8419, expired: 0 created: 1421366421
[Fri Jan 16 11:31:54.510425 2015] [tile:debug] [pid 21926] ./src/mod_tile.c(442): [client REDACTED:38693] expires(tile_serve), uri(/osm_tiles/0/0/0.png),, path_info((null))\n
[Fri Jan 16 11:31:54.510435 2015] [tile:debug] [pid 21926] ./src/mod_tile.c(485): [client REDACTED:38693] caching heuristics: zoom level based 518400; last modified 0\n
[Fri Jan 16 11:31:54.510443 2015] [tile:debug] [pid 21926] ./src/mod_tile.c(491): [client REDACTED:38693] Setting tiles maxAge to 524810\n

Here's a gdb stack trace of the crash:

#0  strrchr () at ../sysdeps/x86_64/strrchr.S:32
#1  0x000055555558dee9 in ap_make_dirstr_parent (p=0x7ffff7e26028, s=0x0) at util.c:641
#2  0x00007ffff4687633 in parse_accept_headers (r=r@entry=0x7ffff7e260a0) at mod_negotiation.c:578
#3  0x00007ffff468b183 in handle_multi (r=0x7ffff7e260a0) at mod_negotiation.c:3096
#4  0x00005555555a1140 in ap_run_type_checker (r=0x7ffff7e260a0) at request.c:84
#5  0x00005555555a3986 in ap_process_request_internal (r=r@entry=0x7ffff7e260a0) at request.c:305
#6  0x00005555555c0158 in ap_process_async_request (r=0x7ffff7e260a0) at http_request.c:315
#7  0x00005555555c0444 in ap_process_request (r=r@entry=0x7ffff7e260a0) at http_request.c:363
#8  0x00005555555bcf02 in ap_process_http_sync_connection (c=0x7ffff7e36290) at http_core.c:190
#9  ap_process_http_connection (c=0x7ffff7e36290) at http_core.c:231
#10 0x00005555555b3cc0 in ap_run_process_connection (c=0x7ffff7e36290) at connection.c:41
#11 0x00005555555b40a8 in ap_process_connection (c=c@entry=0x7ffff7e36290, csd=<optimized out>) at connection.c:202
#12 0x00007ffff4891767 in child_main (child_num_arg=child_num_arg@entry=0) at prefork.c:704
#13 0x00007ffff489196c in make_child (s=0x7ffff7fc2de0, slot=slot@entry=0) at prefork.c:746
#14 0x00007ffff48926b1 in prefork_run (_pconf=<optimized out>, plog=0x7ffff7fbe028, s=0x7ffff7fc2de0) at prefork.c:956
#15 0x000055555559169e in ap_run_mpm (pconf=0x7ffff7ff0028, plog=0x7ffff7fbe028, s=0x7ffff7fc2de0) at mpm_common.c:96
#16 0x000055555558ae36 in main (argc=2, argv=0x7fffffffe5f8) at main.c:777

When I took out the <Location> block in the Apache vhost config, the segfault stopped, and the tile images are served properly.

Lenguaje dominante
C++
Estrellas
318
Forks
199
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Aún no hemos revisado los archivos de configuración de este proyecto. Empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de openstreetmap/mod_tile

Todos los issues de openstreetmap/mod_tile

Issues similares

Más issues de C++

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.