Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#4532 closed defect (fixed)

Segfault with render_list

Reported by: Andy Allan Owned by: jburgess777@…
Priority: minor Milestone:
Component: mod_tile Version:
Keywords: Cc: Dirk Stoecker, sly

Description

There is a segfault when running the render_list program from mod_tile.

Command was ./render_list --num-threads=6 --socket=/var/run/renderd/renderd.sock --map=foo --all --min-zoom=7 --max-zoom=7 --min-x=59 --min-y=36 --max-x=64 --max-y=42

Last output is "Waiting for rendering threads to finish"

I suspect the bug was introduced in [28516] , since there's no segfault when I'm running r28499

Change History (6)

comment:1 Changed 7 years ago by Dirk Stoecker

As I don't use the renderd, but only mod_tile you need to help me fix it. Please compile the tool with debug information enabled (option -g) and do the same command in gdb - First call "gdb render_list" and then "run ...args...".

Result should be a much more specific error position which helps to find the issue. Please supply that information.

comment:2 Changed 7 years ago by sly

Cc: sly added

I might have the same issue.

Here is the result I have runing with gdb :

$ gdb /usr/local/bin/render_list GNU gdb (GDB) 7.0.1-debian Copyright (C) 2009 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /usr/local/bin/render_list...done. (gdb) run -a -Z2 -z0 -mhiking Starting program: /usr/local/bin/render_list -a -Z2 -z0 -mhiking [Thread debugging using libthread_db enabled] Rendering client Planet file updated at Fri Aug 24 17:26:58 2012 Starting 1 rendering threads [New Thread 0x7ffff75de700 (LWP 31286)] Rendering all tiles from zoom 0 to zoom 2 Rendering all tiles for zoom 0 from (0, 0) to (0, 0) Rendering all tiles for zoom 1 from (0, 0) to (1, 1) Rendering all tiles for zoom 2 from (0, 0) to (3, 3) Waiting for rendering threads to finish

Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7ffff75de700 (LWP 31286)] 0x00007ffff762df46 in _IO_vfscanf () from /lib/libc.so.6 (gdb)

comment:3 Changed 7 years ago by sly

whoops, with more readability

$ gdb /usr/local/bin/render_list 
GNU gdb (GDB) 7.0.1-debian
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/local/bin/render_list...done.
(gdb) run -a -Z2 -z0 -mhiking
Starting program: /usr/local/bin/render_list -a -Z2 -z0 -mhiking
[Thread debugging using libthread_db enabled]
Rendering client
Planet file updated at Fri Aug 24 17:26:58 2012
Starting 1 rendering threads
[New Thread 0x7ffff75de700 (LWP 31286)]
Rendering all tiles from zoom 0 to zoom 2
Rendering all tiles for zoom 0 from (0, 0) to (0, 0)
Rendering all tiles for zoom 1 from (0, 0) to (1, 1)
Rendering all tiles for zoom 2 from (0, 0) to (3, 3)
Waiting for rendering threads to finish

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff75de700 (LWP 31286)]
0x00007ffff762df46 in _IO_vfscanf () from /lib/libc.so.6
(gdb) 

comment:4 Changed 7 years ago by Dirk Stoecker

Thanks. Please enter "bt" at the end and give me the output. The carash happens in a scanf() system call.

comment:5 Changed 7 years ago by Dirk Stoecker

Resolution: fixed
Status: newclosed

Please try r28628. It hopefully solves that issue. One of the many printf calls I changed actually was a scanf call :-)

comment:6 Changed 7 years ago by sly

problem solved !

Thanks

Note: See TracTickets for help on using tickets.