grass
grass copied to clipboard
[Bug] G_percent is not safe to be called from parallel code
Valgrind with default options enabled complains on SIGPIPE for G_percent when called from multiple threads. Shortened output as it is the same for all modules, kept one report per module.
val249826.log-==249826== Command: v.surf.rst input=elev_points3d layer=1 nprocs=4 tension=40.0 segmax=40 npmin=100 zscale=1.0 cvdev=cvdev_threads -c --o val249826.log-==249826== Process terminating with default action of signal 13 (SIGPIPE) val249826.log-==249826== at 0x4BCB9EE: __syscall_cancel_arch (syscall_cancel.S:56) val249826.log-==249826== by 0x4BC0667: __internal_syscall_cancel (cancellation.c:49) val249826.log-==249826== by 0x4BC06AC: __syscall_cancel (cancellation.c:75) val249826.log-==249826== by 0x4C35935: write (write.c:26) val249826.log-==249826== by 0x4BBC5F4: _IO_file_write@@GLIBC_2.2.5 (fileops.c:1182) val249826.log-==249826== by 0x4BBA8D1: new_do_write (fileops.c:450) val249826.log-==249826== by 0x4BBC7F8: _IO_new_file_xsputn (fileops.c:1256) val249826.log-==249826== by 0x4BBC7F8: _IO_file_xsputn@@GLIBC_2.2.5 (fileops.c:1198) val249826.log-==249826== by 0x4B8B1D1: __printf_buffer_flush_to_file (printf_buffer_to_file.c:59) val249826.log-==249826== by 0x4B8B28F: __printf_buffer_to_file_done (printf_buffer_to_file.c:120) val249826.log-==249826== by 0x4B95E0C: __vfprintf_internal (vfprintf-internal.c:1560) val249826.log-==249826== by 0x4B89E25: fprintf (fprintf.c:32) val249826.log:==249826== by 0x499A32C: G_percent (percent.c:88)
val46931.log-==46931== Command: r.gwflow phead=phead status=status hc_x=hydcond hc_y=hydcond s=poros recharge=recharge top=top bottom=bottom type=unconfined dtime=864000000000 maxit=25 error=1e-06 solver=cholesky output=gwresult budget=water_budget -f
val47445.log-==47445== Command: r.horizon elevation=elevation direction=50 start=0.0 end=360.0 distance=1.0 format=plain nprocs=1 output=test_horizon_output_from_elevation file=-
val50157.log-==50157== Command: r.neighbors input=elevation selection=test_neighbors_selection size=3 method=minimum,perc90,average,m aximum,stddev weighting_function=none nprocs=4 memory=300 output=test_standard_options_selection_threaded_raster_minimum,test_standar d_options_selection_threaded_raster_perc90,test_standard_options_selection_threaded_raster_average,test_standard_options_selection_th readed_raster_maximum,test_standard_options_selection_threaded_raster_stddev
val53541.log-==53541== Command: r.texture input=lsat7_2002_80 nprocs=1 size=3 distance=1 method=sa output=sa
val54633.log-==54633== Command: r.viewshed input=elevation coordinates=634720,216180 observer_elevation=500000 target_elevation=0.0 max_distance=-1.0 refraction_coeff=0.14286 memory=500 output=test_viewshed_from_elevation