Commit Graph

10 Commits

Author SHA1 Message Date
Lovell Fuller e0ecf61844
Ensure pthread_create suppression stack matches newer glibc (#3256) 2023-01-02 11:46:29 +00:00
John Cupitt 976db37f84
Revised threading system (#3105)
* reimplement threadpool

just a set of threads that get recycled

"ninja test" passes and dzsave seems to work, though pytest fails for
some reason

* clean up threading code a bit

move base stuff into thread.c, so we have a simple

	thread -> threadset -> threadpool

layering

* start trying to revert g_threadpool

based on the original commit

* working!

nice low systime again

still need to repply cnages to threadpool.c since 80e0cc3d1

* reapply fixes from master

so threadpool.c is now up to date

* rename VipsThread as VipsWorker

a bit less confusing

* use a semaphore to count workers in a pool

* tidy up

* formatting

* dynamic threadpool sizing

based on counting the number of blocked threads in each pool

it works, but the improvement is not great :(

* add "concurrency" metadata item

so operators can hint threadpool size (dzsave especially)

* don't use thinstrip for small images

* add RGB mode to openslide

since flatten was taking 20% of CPU time for dzsave

* fix up rgb mode

now actually works

* make the tile buffer per thread

in the new openslideload rgb mode

* fix dynamic pool downsize

* mild refactoring

* fix the buffer system

oops, turned it off by mistake

* all done!

* revise changelog

* Update libvips/iofuncs/threadset.c

Co-authored-by: Kleis Auke Wolthuizen <github@kleisauke.nl>

* Update libvips/iofuncs/threadset.c

Co-authored-by: Kleis Auke Wolthuizen <github@kleisauke.nl>

* LSan: add libMagickCore to suppression file

* Revert "Remove mutex lock for VipsThreadStartFn"

This reverts commit 41440491.

* add VIPS_MAX_THREADS

to set a hard limit on the threadset size

* Revert "Revert "Remove mutex lock for VipsThreadStartFn""

This reverts commit 77e8520966ba79194fff3b4e648bbd295cd5c260.

* remove sslock from sink.c

* move fixed threadpool build to init

not first use

* add some doc comments

* revert test suite threshold change

* add a test for MAX_THREADS

and move the test tmp/ area into the builddir

* limit VIPS_MAX_THREADS to sane values

* use tabs rather than spaces

Co-authored-by: Kleis Auke Wolthuizen <github@kleisauke.nl>
2022-10-26 15:25:19 +01:00
Kleis Auke Wolthuizen 468c13693b
CI: upgrade runner to Ubuntu 22.04 (#2850)
* CI: upgrade runner to Ubuntu 22.04

- Compile with GCC 11 and Clang 14.
- Remove redundant PPAs.
- Use system provided Meson.
- Update LeakSanitizer suppressions.

* CI: ensure `VIPS_BLOCK_UNTRUSTED` is tested

`magicksave` cannot be used for testing when building with
`-Dmodules=enabled` (default), since that would require the
loadable modules to be installed first.
2022-06-12 12:24:30 +01:00
Kleis Auke Wolthuizen 3da7caee6c
LSan improvements and fixes (#2672)
* LSan: remove GLib suppression

* LSan: disable the fast unwinder to get full stacktraces

* Move ASan/UBSan fuzzer options to CI configuration

* LSan: remove EOLed python2.7 suppression

* LSan: remove libstdc++ suppression

* LSan: add libx265 to suppression file

* Try to reproduce small memleak

* Try a possible patch

* Skip test if `im_benchmark` is not available

* CI: upgrade Clang version to 13

* CI: correct job names

* Meson: increase the timeout for tests

* README.md: correct Meson invocation
2022-02-19 15:13:42 +00:00
Kleis Auke Wolthuizen 8b01104c67 Add suppressions file for ThreadSanitizer 2021-05-03 13:21:45 +02:00
Kleis Auke Wolthuizen e29bf43ced Update LeakSanitizer suppressions 2021-02-08 21:12:33 +01:00
Kleis Auke Wolthuizen f2035797f9 Add bash to LSan suppression file 2020-07-14 19:09:30 +02:00
Kleis Auke Wolthuizen 5f7502ebf7 Upgrade Python and Clang to latest version on Travis
- Python 2.7 reached the end of its life on January 1st, 2020.
- The ASAN suppression parse errors seems to be fixed within Clang 10.
- Fix macOS build by updating the base 'osx_image' to 'xcode11'.
2020-04-22 09:39:23 +02:00
John Cupitt 7ef0ae826f try suppressing libexif ubsan again 2019-08-09 13:49:15 +01:00
John Cupitt cf94c2f71e more suppressions to a subdir
since we now have four of them
2019-08-09 11:43:13 +01:00