Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support opaque images with background chunks #54

Merged
merged 1 commit into from
Feb 5, 2022

Conversation

Drvi
Copy link
Member

@Drvi Drvi commented Feb 4, 2022

By mistake, I assumed that opaque PNG image cannot have a background chunk, but they can (to provide suggestion for their surroundings), this lead to a bug where we'd add some padding for alpha values even in case there were none.

I believe this fixes #53.

cc: @t-bltg @IanButterworth

@t-bltg
Copy link
Contributor

t-bltg commented Feb 4, 2022

Thanks for providing a hotfix that quickly 💯.
It fixes #53 on my side. I'm running Plots tests suite now to see if this fixes JuliaPlots/Plots.jl#4091.

@t-bltg
Copy link
Contributor

t-bltg commented Feb 4, 2022

Test seems to fail with a different message though:

Failing on this image: https://github.com/JuliaPlots/PlotReferenceImages.jl/blob/master/Plots/gr/1.22.3/ref1.png

julia: malloc.c:3839: _int_malloc: Assertion `chunk_main_arena (bck->bk)' failed.

signal (6): Aborted

Odd, because this works: PNGFiles.load(Downloads.download("https://github.com/JuliaPlots/PlotReferenceImages.jl/raw/master/Plots/gr/1.22.3/ref1.png")).

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2022

Benchmark result

Judge result

Benchmark Report for /home/runner/work/PNGFiles.jl/PNGFiles.jl

Job Properties

  • Time of benchmarks:
    • Target: 4 Feb 2022 - 19:41
    • Baseline: 4 Feb 2022 - 19:50
  • Package commits:
    • Target: 55218a
    • Baseline: 63701b
  • Julia commits:
    • Target: ac5cc9
    • Baseline: ac5cc9
  • Julia command flags:
    • Target: None
    • Baseline: None
  • Environment variables:
    • Target: None
    • Baseline: None

Results

A ratio greater than 1.0 denotes a possible regression (marked with ❌), while a ratio less
than 1.0 denotes a possible improvement (marked with ✅). Only significant results - results
that indicate possible regressions or improvements - are shown below (thus, an empty table means that all
benchmark results remained invariant between builds).

ID time ratio memory ratio

Benchmark Group List

Here's a list of all the benchmark groups executed by this job:

  • ["synth_imgs", "ARGB32"]
  • ["synth_imgs", "Bool_0"]
  • ["synth_imgs", "Bool_1"]
  • ["synth_imgs", "Bool_2"]
  • ["synth_imgs", "Bool_3"]
  • ["synth_imgs", "Bool_4"]
  • ["synth_imgs", "Float64_0"]
  • ["synth_imgs", "Float64_1"]
  • ["synth_imgs", "Float64_2"]
  • ["synth_imgs", "Float64_3"]
  • ["synth_imgs", "Float64_4"]
  • ["synth_imgs", "Gray"]
  • ["synth_imgs", "Gray-Float64"]
  • ["synth_imgs", "Gray-N0f16"]
  • ["synth_imgs", "Gray-N0f8"]
  • ["synth_imgs", "GrayA"]
  • ["synth_imgs", "GrayA-Float64"]
  • ["synth_imgs", "GrayA-N0f16"]
  • ["synth_imgs", "GrayA-N0f8"]
  • ["synth_imgs", "N0f16_0"]
  • ["synth_imgs", "N0f16_1"]
  • ["synth_imgs", "N0f16_2"]
  • ["synth_imgs", "N0f16_3"]
  • ["synth_imgs", "N0f16_4"]
  • ["synth_imgs", "N0f8_0"]
  • ["synth_imgs", "N0f8_1"]
  • ["synth_imgs", "N0f8_2"]
  • ["synth_imgs", "N0f8_3"]
  • ["synth_imgs", "N0f8_4"]
  • ["synth_imgs", "RGB"]
  • ["synth_imgs", "RGB-Float64"]
  • ["synth_imgs", "RGB-N0f16"]
  • ["synth_imgs", "RGB-N0f8"]
  • ["synth_imgs", "RGBA"]
  • ["synth_imgs", "RGBA-Float64"]
  • ["synth_imgs", "RGBA-N0f16"]
  • ["synth_imgs", "RGBA-N0f8"]
  • ["synth_imgs", "UInt16_0"]
  • ["synth_imgs", "UInt16_1"]
  • ["synth_imgs", "UInt16_2"]
  • ["synth_imgs", "UInt16_3"]
  • ["synth_imgs", "UInt16_4"]
  • ["synth_imgs", "UInt8_0"]
  • ["synth_imgs", "UInt8_1"]
  • ["synth_imgs", "UInt8_2"]
  • ["synth_imgs", "UInt8_3"]
  • ["synth_imgs", "UInt8_4"]

Julia versioninfo

Target

Julia Version 1.7.1
Commit ac5cc99908 (2021-12-22 19:35 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
      Ubuntu 20.04.3 LTS
  uname: Linux 5.11.0-1028-azure #31~20.04.2-Ubuntu SMP Tue Jan 18 08:46:15 UTC 2022 x86_64 x86_64
  CPU: Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz: 
              speed         user         nice          sys         idle          irq
       #1  2593 MHz       3518 s          1 s        268 s       3383 s          0 s
       #2  2593 MHz       3315 s          1 s        276 s       3602 s          0 s
       
  Memory: 6.7845458984375 GB (3428.11328125 MB free)
  Uptime: 725.66 sec
  Load Avg:  1.07  0.98  0.61
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, skylake-avx512)

Baseline

Julia Version 1.7.1
Commit ac5cc99908 (2021-12-22 19:35 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
      Ubuntu 20.04.3 LTS
  uname: Linux 5.11.0-1028-azure #31~20.04.2-Ubuntu SMP Tue Jan 18 08:46:15 UTC 2022 x86_64 x86_64
  CPU: Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz: 
              speed         user         nice          sys         idle          irq
       #1  2593 MHz       3607 s          1 s        280 s       9001 s          0 s
       #2  2593 MHz       8688 s          1 s        579 s       3677 s          0 s
       
  Memory: 6.7845458984375 GB (3292.375 MB free)
  Uptime: 1300.83 sec
  Load Avg:  1.04  1.01  0.82
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, skylake-avx512)

Target result

Benchmark Report for /home/runner/work/PNGFiles.jl/PNGFiles.jl

Job Properties

  • Time of benchmark: 4 Feb 2022 - 19:41
  • Package commit: 55218a
  • Julia commit: ac5cc9
  • Julia command flags: None
  • Environment variables: None

Results

Below is a table of this job's results, obtained by running the benchmarks.
The values listed in the ID column have the structure [parent_group, child_group, ..., key], and can be used to
index into the BaseBenchmarks suite to retrieve the corresponding benchmarks.
The percentages accompanying time and memory values in the below table are noise tolerances. The "true"
time/memory value for a given benchmark is expected to fall within this percentage of the reported value.
An empty cell means that the value was zero.

ID time GC time memory allocations
["synth_imgs", "ARGB32", "load"] 426.909 μs (5%) 256.64 KiB (1%) 17
["synth_imgs", "ARGB32", "save"] 2.261 ms (5%) 256.16 KiB (1%) 5
["synth_imgs", "Bool_0", "load"] 455.809 μs (5%) 65.39 KiB (1%) 17
["synth_imgs", "Bool_0", "save"] 556.312 μs (5%) 64.94 KiB (1%) 6
["synth_imgs", "Bool_1", "load"] 456.806 μs (5%) 65.39 KiB (1%) 17
["synth_imgs", "Bool_1", "save"] 557.707 μs (5%) 65.11 KiB (1%) 11
["synth_imgs", "Bool_2", "load"] 722.018 μs (5%) 129.14 KiB (1%) 17
["synth_imgs", "Bool_2", "save"] 1.254 ms (5%) 192.53 KiB (1%) 10
["synth_imgs", "Bool_3", "load"] 856.018 μs (5%) 192.89 KiB (1%) 17
["synth_imgs", "Bool_3", "save"] 1.865 ms (5%) 288.16 KiB (1%) 10
["synth_imgs", "Bool_4", "load"] 1.030 ms (5%) 256.64 KiB (1%) 17
["synth_imgs", "Bool_4", "save"] 2.424 ms (5%) 383.78 KiB (1%) 10
["synth_imgs", "Float64_0", "load"] 215.704 μs (5%) 65.39 KiB (1%) 17
["synth_imgs", "Float64_0", "save"] 610.413 μs (5%) 64.91 KiB (1%) 5
["synth_imgs", "Float64_1", "load"] 215.705 μs (5%) 65.39 KiB (1%) 17
["synth_imgs", "Float64_1", "save"] 623.113 μs (5%) 65.11 KiB (1%) 11
["synth_imgs", "Float64_2", "load"] 357.208 μs (5%) 129.14 KiB (1%) 17
["synth_imgs", "Float64_2", "save"] 1.297 ms (5%) 192.53 KiB (1%) 10
["synth_imgs", "Float64_3", "load"] 376.508 μs (5%) 192.89 KiB (1%) 17
["synth_imgs", "Float64_3", "save"] 1.928 ms (5%) 288.16 KiB (1%) 10
["synth_imgs", "Float64_4", "load"] 429.209 μs (5%) 256.64 KiB (1%) 17
["synth_imgs", "Float64_4", "save"] 2.493 ms (5%) 383.78 KiB (1%) 10
["synth_imgs", "Gray", "load"] 214.901 μs (5%) 65.39 KiB (1%) 17
["synth_imgs", "Gray", "save"] 617.503 μs (5%) 64.91 KiB (1%) 5
["synth_imgs", "Gray-Float64", "load"] 214.905 μs (5%) 65.39 KiB (1%) 17
["synth_imgs", "Gray-Float64", "save"] 616.712 μs (5%) 64.91 KiB (1%) 5
["synth_imgs", "Gray-N0f16", "load"] 362.407 μs (5%) 129.14 KiB (1%) 17
["synth_imgs", "Gray-N0f16", "save"] 1.147 ms (5%) 64.86 KiB (1%) 3
["synth_imgs", "Gray-N0f8", "load"] 213.904 μs (5%) 65.39 KiB (1%) 17
["synth_imgs", "Gray-N0f8", "save"] 565.412 μs (5%) 32.98 KiB (1%) 3
["synth_imgs", "GrayA", "load"] 358.707 μs (5%) 129.14 KiB (1%) 17
["synth_imgs", "GrayA", "save"] 1.239 ms (5%) 128.66 KiB (1%) 5
["synth_imgs", "GrayA-Float64", "load"] 357.307 μs (5%) 129.14 KiB (1%) 17
["synth_imgs", "GrayA-Float64", "save"] 1.239 ms (5%) 128.66 KiB (1%) 5
["synth_imgs", "GrayA-N0f16", "load"] 434.309 μs (5%) 256.64 KiB (1%) 17
["synth_imgs", "GrayA-N0f16", "save"] 2.227 ms (5%) 128.61 KiB (1%) 3
["synth_imgs", "GrayA-N0f8", "load"] 352.907 μs (5%) 129.14 KiB (1%) 17
["synth_imgs", "GrayA-N0f8", "save"] 1.141 ms (5%) 64.86 KiB (1%) 3
["synth_imgs", "N0f16_0", "load"] 363.208 μs (5%) 129.14 KiB (1%) 17
["synth_imgs", "N0f16_0", "save"] 1.187 ms (5%) 128.69 KiB (1%) 6
["synth_imgs", "N0f16_1", "load"] 362.805 μs (5%) 129.14 KiB (1%) 17
["synth_imgs", "N0f16_1", "save"] 1.191 ms (5%) 128.86 KiB (1%) 11
["synth_imgs", "N0f16_2", "load"] 440.108 μs (5%) 256.64 KiB (1%) 17
["synth_imgs", "N0f16_2", "save"] 2.318 ms (5%) 383.78 KiB (1%) 10
["synth_imgs", "N0f16_3", "load"] 989.320 μs (5%) 384.14 KiB (1%) 17
["synth_imgs", "N0f16_3", "save"] 3.539 ms (5%) 575.03 KiB (1%) 10
["synth_imgs", "N0f16_4", "load"] 1.305 ms (5%) 511.64 KiB (1%) 17
["synth_imgs", "N0f16_4", "save"] 4.738 ms (5%) 766.25 KiB (1%) 9
["synth_imgs", "N0f8_0", "load"] 213.604 μs (5%) 65.39 KiB (1%) 17
["synth_imgs", "N0f8_0", "save"] 585.512 μs (5%) 64.91 KiB (1%) 5
["synth_imgs", "N0f8_1", "load"] 213.804 μs (5%) 65.39 KiB (1%) 17
["synth_imgs", "N0f8_1", "save"] 575.011 μs (5%) 65.11 KiB (1%) 11
["synth_imgs", "N0f8_2", "load"] 353.005 μs (5%) 129.14 KiB (1%) 17
["synth_imgs", "N0f8_2", "save"] 1.201 ms (5%) 192.53 KiB (1%) 10
["synth_imgs", "N0f8_3", "load"] 373.907 μs (5%) 192.89 KiB (1%) 17
["synth_imgs", "N0f8_3", "save"] 1.800 ms (5%) 288.16 KiB (1%) 10
["synth_imgs", "N0f8_4", "load"] 425.606 μs (5%) 256.64 KiB (1%) 17
["synth_imgs", "N0f8_4", "save"] 2.309 ms (5%) 383.78 KiB (1%) 10
["synth_imgs", "RGB", "load"] 377.407 μs (5%) 192.89 KiB (1%) 17
["synth_imgs", "RGB", "save"] 1.866 ms (5%) 192.41 KiB (1%) 5
["synth_imgs", "RGB-Float64", "load"] 376.608 μs (5%) 192.89 KiB (1%) 17
["synth_imgs", "RGB-Float64", "save"] 1.874 ms (5%) 192.41 KiB (1%) 5
["synth_imgs", "RGB-N0f16", "load"] 990.520 μs (5%) 384.14 KiB (1%) 17
["synth_imgs", "RGB-N0f16", "save"] 3.406 ms (5%) 192.36 KiB (1%) 3
["synth_imgs", "RGB-N0f8", "load"] 373.007 μs (5%) 192.89 KiB (1%) 17
["synth_imgs", "RGB-N0f8", "save"] 1.714 ms (5%) 96.73 KiB (1%) 3
["synth_imgs", "RGBA", "load"] 426.009 μs (5%) 256.64 KiB (1%) 17
["synth_imgs", "RGBA", "save"] 2.411 ms (5%) 256.16 KiB (1%) 5
["synth_imgs", "RGBA-Float64", "load"] 429.708 μs (5%) 256.64 KiB (1%) 17
["synth_imgs", "RGBA-Float64", "save"] 2.414 ms (5%) 256.16 KiB (1%) 5
["synth_imgs", "RGBA-N0f16", "load"] 1.297 ms (5%) 511.64 KiB (1%) 17
["synth_imgs", "RGBA-N0f16", "save"] 4.571 ms (5%) 256.14 KiB (1%) 4
["synth_imgs", "RGBA-N0f8", "load"] 426.708 μs (5%) 256.64 KiB (1%) 17
["synth_imgs", "RGBA-N0f8", "save"] 2.213 ms (5%) 128.61 KiB (1%) 3
["synth_imgs", "UInt16_0", "load"] 360.606 μs (5%) 129.14 KiB (1%) 17
["synth_imgs", "UInt16_0", "save"] 1.158 ms (5%) 64.86 KiB (1%) 3
["synth_imgs", "UInt16_1", "load"] 362.808 μs (5%) 129.14 KiB (1%) 17
["synth_imgs", "UInt16_1", "save"] 1.159 ms (5%) 65.22 KiB (1%) 14
["synth_imgs", "UInt16_2", "load"] 436.309 μs (5%) 256.64 KiB (1%) 17
["synth_imgs", "UInt16_2", "save"] 2.283 ms (5%) 256.22 KiB (1%) 8
["synth_imgs", "UInt16_3", "load"] 991.720 μs (5%) 384.14 KiB (1%) 17
["synth_imgs", "UInt16_3", "save"] 3.497 ms (5%) 383.72 KiB (1%) 8
["synth_imgs", "UInt16_4", "load"] 1.301 ms (5%) 511.64 KiB (1%) 17
["synth_imgs", "UInt16_4", "save"] 4.698 ms (5%) 511.19 KiB (1%) 7
["synth_imgs", "UInt8_0", "load"] 214.304 μs (5%) 65.39 KiB (1%) 17
["synth_imgs", "UInt8_0", "save"] 558.111 μs (5%) 33.02 KiB (1%) 4
["synth_imgs", "UInt8_1", "load"] 213.105 μs (5%) 65.39 KiB (1%) 17
["synth_imgs", "UInt8_1", "save"] 573.812 μs (5%) 33.34 KiB (1%) 14
["synth_imgs", "UInt8_2", "load"] 353.407 μs (5%) 129.14 KiB (1%) 17
["synth_imgs", "UInt8_2", "save"] 1.168 ms (5%) 128.72 KiB (1%) 8
["synth_imgs", "UInt8_3", "load"] 375.508 μs (5%) 192.89 KiB (1%) 17
["synth_imgs", "UInt8_3", "save"] 1.744 ms (5%) 192.47 KiB (1%) 8
["synth_imgs", "UInt8_4", "load"] 423.609 μs (5%) 256.64 KiB (1%) 17
["synth_imgs", "UInt8_4", "save"] 2.248 ms (5%) 256.22 KiB (1%) 8

Benchmark Group List

Here's a list of all the benchmark groups executed by this job:

  • ["synth_imgs", "ARGB32"]
  • ["synth_imgs", "Bool_0"]
  • ["synth_imgs", "Bool_1"]
  • ["synth_imgs", "Bool_2"]
  • ["synth_imgs", "Bool_3"]
  • ["synth_imgs", "Bool_4"]
  • ["synth_imgs", "Float64_0"]
  • ["synth_imgs", "Float64_1"]
  • ["synth_imgs", "Float64_2"]
  • ["synth_imgs", "Float64_3"]
  • ["synth_imgs", "Float64_4"]
  • ["synth_imgs", "Gray"]
  • ["synth_imgs", "Gray-Float64"]
  • ["synth_imgs", "Gray-N0f16"]
  • ["synth_imgs", "Gray-N0f8"]
  • ["synth_imgs", "GrayA"]
  • ["synth_imgs", "GrayA-Float64"]
  • ["synth_imgs", "GrayA-N0f16"]
  • ["synth_imgs", "GrayA-N0f8"]
  • ["synth_imgs", "N0f16_0"]
  • ["synth_imgs", "N0f16_1"]
  • ["synth_imgs", "N0f16_2"]
  • ["synth_imgs", "N0f16_3"]
  • ["synth_imgs", "N0f16_4"]
  • ["synth_imgs", "N0f8_0"]
  • ["synth_imgs", "N0f8_1"]
  • ["synth_imgs", "N0f8_2"]
  • ["synth_imgs", "N0f8_3"]
  • ["synth_imgs", "N0f8_4"]
  • ["synth_imgs", "RGB"]
  • ["synth_imgs", "RGB-Float64"]
  • ["synth_imgs", "RGB-N0f16"]
  • ["synth_imgs", "RGB-N0f8"]
  • ["synth_imgs", "RGBA"]
  • ["synth_imgs", "RGBA-Float64"]
  • ["synth_imgs", "RGBA-N0f16"]
  • ["synth_imgs", "RGBA-N0f8"]
  • ["synth_imgs", "UInt16_0"]
  • ["synth_imgs", "UInt16_1"]
  • ["synth_imgs", "UInt16_2"]
  • ["synth_imgs", "UInt16_3"]
  • ["synth_imgs", "UInt16_4"]
  • ["synth_imgs", "UInt8_0"]
  • ["synth_imgs", "UInt8_1"]
  • ["synth_imgs", "UInt8_2"]
  • ["synth_imgs", "UInt8_3"]
  • ["synth_imgs", "UInt8_4"]

Julia versioninfo

Julia Version 1.7.1
Commit ac5cc99908 (2021-12-22 19:35 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
      Ubuntu 20.04.3 LTS
  uname: Linux 5.11.0-1028-azure #31~20.04.2-Ubuntu SMP Tue Jan 18 08:46:15 UTC 2022 x86_64 x86_64
  CPU: Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz: 
              speed         user         nice          sys         idle          irq
       #1  2593 MHz       3518 s          1 s        268 s       3383 s          0 s
       #2  2593 MHz       3315 s          1 s        276 s       3602 s          0 s
       
  Memory: 6.7845458984375 GB (3428.11328125 MB free)
  Uptime: 725.66 sec
  Load Avg:  1.07  0.98  0.61
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, skylake-avx512)

Baseline result

Benchmark Report for /home/runner/work/PNGFiles.jl/PNGFiles.jl

Job Properties

  • Time of benchmark: 4 Feb 2022 - 19:50
  • Package commit: 63701b
  • Julia commit: ac5cc9
  • Julia command flags: None
  • Environment variables: None

Results

Below is a table of this job's results, obtained by running the benchmarks.
The values listed in the ID column have the structure [parent_group, child_group, ..., key], and can be used to
index into the BaseBenchmarks suite to retrieve the corresponding benchmarks.
The percentages accompanying time and memory values in the below table are noise tolerances. The "true"
time/memory value for a given benchmark is expected to fall within this percentage of the reported value.
An empty cell means that the value was zero.

ID time GC time memory allocations
["synth_imgs", "ARGB32", "load"] 414.708 μs (5%) 256.61 KiB (1%) 15
["synth_imgs", "ARGB32", "save"] 2.302 ms (5%) 256.16 KiB (1%) 5
["synth_imgs", "Bool_0", "load"] 446.310 μs (5%) 65.36 KiB (1%) 15
["synth_imgs", "Bool_0", "save"] 553.711 μs (5%) 64.94 KiB (1%) 6
["synth_imgs", "Bool_1", "load"] 447.409 μs (5%) 65.36 KiB (1%) 15
["synth_imgs", "Bool_1", "save"] 558.312 μs (5%) 65.11 KiB (1%) 11
["synth_imgs", "Bool_2", "load"] 715.515 μs (5%) 129.11 KiB (1%) 15
["synth_imgs", "Bool_2", "save"] 1.245 ms (5%) 192.53 KiB (1%) 10
["synth_imgs", "Bool_3", "load"] 860.618 μs (5%) 192.86 KiB (1%) 15
["synth_imgs", "Bool_3", "save"] 1.863 ms (5%) 288.16 KiB (1%) 10
["synth_imgs", "Bool_4", "load"] 1.023 ms (5%) 256.61 KiB (1%) 15
["synth_imgs", "Bool_4", "save"] 2.413 ms (5%) 383.78 KiB (1%) 10
["synth_imgs", "Float64_0", "load"] 207.504 μs (5%) 65.36 KiB (1%) 15
["synth_imgs", "Float64_0", "save"] 638.314 μs (5%) 64.91 KiB (1%) 5
["synth_imgs", "Float64_1", "load"] 207.804 μs (5%) 65.36 KiB (1%) 15
["synth_imgs", "Float64_1", "save"] 612.012 μs (5%) 65.11 KiB (1%) 11
["synth_imgs", "Float64_2", "load"] 350.407 μs (5%) 129.11 KiB (1%) 15
["synth_imgs", "Float64_2", "save"] 1.272 ms (5%) 192.53 KiB (1%) 10
["synth_imgs", "Float64_3", "load"] 384.308 μs (5%) 192.86 KiB (1%) 15
["synth_imgs", "Float64_3", "save"] 1.896 ms (5%) 288.16 KiB (1%) 10
["synth_imgs", "Float64_4", "load"] 415.909 μs (5%) 256.61 KiB (1%) 15
["synth_imgs", "Float64_4", "save"] 2.446 ms (5%) 383.78 KiB (1%) 10
["synth_imgs", "Gray", "load"] 207.804 μs (5%) 65.36 KiB (1%) 15
["synth_imgs", "Gray", "save"] 612.413 μs (5%) 64.91 KiB (1%) 5
["synth_imgs", "Gray-Float64", "load"] 206.404 μs (5%) 65.36 KiB (1%) 15
["synth_imgs", "Gray-Float64", "save"] 610.212 μs (5%) 64.91 KiB (1%) 5
["synth_imgs", "Gray-N0f16", "load"] 354.107 μs (5%) 129.11 KiB (1%) 15
["synth_imgs", "Gray-N0f16", "save"] 1.145 ms (5%) 64.86 KiB (1%) 3
["synth_imgs", "Gray-N0f8", "load"] 204.904 μs (5%) 65.36 KiB (1%) 15
["synth_imgs", "Gray-N0f8", "save"] 560.712 μs (5%) 32.98 KiB (1%) 3
["synth_imgs", "GrayA", "load"] 348.308 μs (5%) 129.11 KiB (1%) 15
["synth_imgs", "GrayA", "save"] 1.245 ms (5%) 128.66 KiB (1%) 5
["synth_imgs", "GrayA-Float64", "load"] 348.307 μs (5%) 129.11 KiB (1%) 15
["synth_imgs", "GrayA-Float64", "save"] 1.243 ms (5%) 128.66 KiB (1%) 5
["synth_imgs", "GrayA-N0f16", "load"] 439.309 μs (5%) 256.61 KiB (1%) 15
["synth_imgs", "GrayA-N0f16", "save"] 2.240 ms (5%) 128.61 KiB (1%) 3
["synth_imgs", "GrayA-N0f8", "load"] 344.407 μs (5%) 129.11 KiB (1%) 15
["synth_imgs", "GrayA-N0f8", "save"] 1.136 ms (5%) 64.86 KiB (1%) 3
["synth_imgs", "N0f16_0", "load"] 352.608 μs (5%) 129.11 KiB (1%) 15
["synth_imgs", "N0f16_0", "save"] 1.187 ms (5%) 128.69 KiB (1%) 6
["synth_imgs", "N0f16_1", "load"] 354.607 μs (5%) 129.11 KiB (1%) 15
["synth_imgs", "N0f16_1", "save"] 1.196 ms (5%) 128.86 KiB (1%) 11
["synth_imgs", "N0f16_2", "load"] 441.809 μs (5%) 256.61 KiB (1%) 15
["synth_imgs", "N0f16_2", "save"] 2.334 ms (5%) 383.78 KiB (1%) 10
["synth_imgs", "N0f16_3", "load"] 985.720 μs (5%) 384.11 KiB (1%) 15
["synth_imgs", "N0f16_3", "save"] 3.550 ms (5%) 575.03 KiB (1%) 10
["synth_imgs", "N0f16_4", "load"] 1.305 ms (5%) 511.61 KiB (1%) 15
["synth_imgs", "N0f16_4", "save"] 4.766 ms (5%) 766.25 KiB (1%) 9
["synth_imgs", "N0f8_0", "load"] 205.004 μs (5%) 65.36 KiB (1%) 15
["synth_imgs", "N0f8_0", "save"] 579.212 μs (5%) 64.91 KiB (1%) 5
["synth_imgs", "N0f8_1", "load"] 205.504 μs (5%) 65.36 KiB (1%) 15
["synth_imgs", "N0f8_1", "save"] 586.112 μs (5%) 65.11 KiB (1%) 11
["synth_imgs", "N0f8_2", "load"] 346.407 μs (5%) 129.11 KiB (1%) 15
["synth_imgs", "N0f8_2", "save"] 1.211 ms (5%) 192.53 KiB (1%) 10
["synth_imgs", "N0f8_3", "load"] 377.708 μs (5%) 192.86 KiB (1%) 15
["synth_imgs", "N0f8_3", "save"] 1.815 ms (5%) 288.16 KiB (1%) 10
["synth_imgs", "N0f8_4", "load"] 412.308 μs (5%) 256.61 KiB (1%) 15
["synth_imgs", "N0f8_4", "save"] 2.342 ms (5%) 383.78 KiB (1%) 10
["synth_imgs", "RGB", "load"] 382.107 μs (5%) 192.86 KiB (1%) 15
["synth_imgs", "RGB", "save"] 1.863 ms (5%) 192.41 KiB (1%) 5
["synth_imgs", "RGB-Float64", "load"] 381.907 μs (5%) 192.86 KiB (1%) 15
["synth_imgs", "RGB-Float64", "save"] 1.860 ms (5%) 192.41 KiB (1%) 5
["synth_imgs", "RGB-N0f16", "load"] 987.820 μs (5%) 384.11 KiB (1%) 15
["synth_imgs", "RGB-N0f16", "save"] 3.412 ms (5%) 192.36 KiB (1%) 3
["synth_imgs", "RGB-N0f8", "load"] 376.808 μs (5%) 192.86 KiB (1%) 15
["synth_imgs", "RGB-N0f8", "save"] 1.715 ms (5%) 96.73 KiB (1%) 3
["synth_imgs", "RGBA", "load"] 416.108 μs (5%) 256.61 KiB (1%) 15
["synth_imgs", "RGBA", "save"] 2.415 ms (5%) 256.16 KiB (1%) 5
["synth_imgs", "RGBA-Float64", "load"] 419.208 μs (5%) 256.61 KiB (1%) 15
["synth_imgs", "RGBA-Float64", "save"] 2.415 ms (5%) 256.16 KiB (1%) 5
["synth_imgs", "RGBA-N0f16", "load"] 1.301 ms (5%) 511.61 KiB (1%) 15
["synth_imgs", "RGBA-N0f16", "save"] 4.576 ms (5%) 256.14 KiB (1%) 4
["synth_imgs", "RGBA-N0f8", "load"] 415.408 μs (5%) 256.61 KiB (1%) 15
["synth_imgs", "RGBA-N0f8", "save"] 2.213 ms (5%) 128.61 KiB (1%) 3
["synth_imgs", "UInt16_0", "load"] 353.807 μs (5%) 129.11 KiB (1%) 15
["synth_imgs", "UInt16_0", "save"] 1.157 ms (5%) 64.86 KiB (1%) 3
["synth_imgs", "UInt16_1", "load"] 354.507 μs (5%) 129.11 KiB (1%) 15
["synth_imgs", "UInt16_1", "save"] 1.182 ms (5%) 65.22 KiB (1%) 14
["synth_imgs", "UInt16_2", "load"] 441.709 μs (5%) 256.61 KiB (1%) 15
["synth_imgs", "UInt16_2", "save"] 2.293 ms (5%) 256.22 KiB (1%) 8
["synth_imgs", "UInt16_3", "load"] 992.521 μs (5%) 384.11 KiB (1%) 15
["synth_imgs", "UInt16_3", "save"] 3.501 ms (5%) 383.72 KiB (1%) 8
["synth_imgs", "UInt16_4", "load"] 1.301 ms (5%) 511.61 KiB (1%) 15
["synth_imgs", "UInt16_4", "save"] 4.702 ms (5%) 511.19 KiB (1%) 7
["synth_imgs", "UInt8_0", "load"] 205.404 μs (5%) 65.36 KiB (1%) 15
["synth_imgs", "UInt8_0", "save"] 567.612 μs (5%) 33.02 KiB (1%) 4
["synth_imgs", "UInt8_1", "load"] 204.404 μs (5%) 65.36 KiB (1%) 15
["synth_imgs", "UInt8_1", "save"] 576.012 μs (5%) 33.34 KiB (1%) 14
["synth_imgs", "UInt8_2", "load"] 345.108 μs (5%) 129.11 KiB (1%) 15
["synth_imgs", "UInt8_2", "save"] 1.160 ms (5%) 128.72 KiB (1%) 8
["synth_imgs", "UInt8_3", "load"] 376.407 μs (5%) 192.86 KiB (1%) 15
["synth_imgs", "UInt8_3", "save"] 1.743 ms (5%) 192.47 KiB (1%) 8
["synth_imgs", "UInt8_4", "load"] 418.209 μs (5%) 256.61 KiB (1%) 15
["synth_imgs", "UInt8_4", "save"] 2.250 ms (5%) 256.22 KiB (1%) 8

Benchmark Group List

Here's a list of all the benchmark groups executed by this job:

  • ["synth_imgs", "ARGB32"]
  • ["synth_imgs", "Bool_0"]
  • ["synth_imgs", "Bool_1"]
  • ["synth_imgs", "Bool_2"]
  • ["synth_imgs", "Bool_3"]
  • ["synth_imgs", "Bool_4"]
  • ["synth_imgs", "Float64_0"]
  • ["synth_imgs", "Float64_1"]
  • ["synth_imgs", "Float64_2"]
  • ["synth_imgs", "Float64_3"]
  • ["synth_imgs", "Float64_4"]
  • ["synth_imgs", "Gray"]
  • ["synth_imgs", "Gray-Float64"]
  • ["synth_imgs", "Gray-N0f16"]
  • ["synth_imgs", "Gray-N0f8"]
  • ["synth_imgs", "GrayA"]
  • ["synth_imgs", "GrayA-Float64"]
  • ["synth_imgs", "GrayA-N0f16"]
  • ["synth_imgs", "GrayA-N0f8"]
  • ["synth_imgs", "N0f16_0"]
  • ["synth_imgs", "N0f16_1"]
  • ["synth_imgs", "N0f16_2"]
  • ["synth_imgs", "N0f16_3"]
  • ["synth_imgs", "N0f16_4"]
  • ["synth_imgs", "N0f8_0"]
  • ["synth_imgs", "N0f8_1"]
  • ["synth_imgs", "N0f8_2"]
  • ["synth_imgs", "N0f8_3"]
  • ["synth_imgs", "N0f8_4"]
  • ["synth_imgs", "RGB"]
  • ["synth_imgs", "RGB-Float64"]
  • ["synth_imgs", "RGB-N0f16"]
  • ["synth_imgs", "RGB-N0f8"]
  • ["synth_imgs", "RGBA"]
  • ["synth_imgs", "RGBA-Float64"]
  • ["synth_imgs", "RGBA-N0f16"]
  • ["synth_imgs", "RGBA-N0f8"]
  • ["synth_imgs", "UInt16_0"]
  • ["synth_imgs", "UInt16_1"]
  • ["synth_imgs", "UInt16_2"]
  • ["synth_imgs", "UInt16_3"]
  • ["synth_imgs", "UInt16_4"]
  • ["synth_imgs", "UInt8_0"]
  • ["synth_imgs", "UInt8_1"]
  • ["synth_imgs", "UInt8_2"]
  • ["synth_imgs", "UInt8_3"]
  • ["synth_imgs", "UInt8_4"]

Julia versioninfo

Julia Version 1.7.1
Commit ac5cc99908 (2021-12-22 19:35 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
      Ubuntu 20.04.3 LTS
  uname: Linux 5.11.0-1028-azure #31~20.04.2-Ubuntu SMP Tue Jan 18 08:46:15 UTC 2022 x86_64 x86_64
  CPU: Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz: 
              speed         user         nice          sys         idle          irq
       #1  2593 MHz       3607 s          1 s        280 s       9001 s          0 s
       #2  2593 MHz       8688 s          1 s        579 s       3677 s          0 s
       
  Memory: 6.7845458984375 GB (3292.375 MB free)
  Uptime: 1300.83 sec
  Load Avg:  1.04  1.01  0.82
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, skylake-avx512)

Runtime information

Runtime Info
BLAS #threads 2
BLAS.vendor() openblas64
Sys.CPU_THREADS 2

lscpu output:

Architecture:                    x86_64
CPU op-mode(s):                  32-bit, 64-bit
Byte Order:                      Little Endian
Address sizes:                   46 bits physical, 48 bits virtual
CPU(s):                          2
On-line CPU(s) list:             0,1
Thread(s) per core:              1
Core(s) per socket:              2
Socket(s):                       1
NUMA node(s):                    1
Vendor ID:                       GenuineIntel
CPU family:                      6
Model:                           85
Model name:                      Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz
Stepping:                        7
CPU MHz:                         2593.904
BogoMIPS:                        5187.80
Hypervisor vendor:               Microsoft
Virtualization type:             full
L1d cache:                       64 KiB
L1i cache:                       64 KiB
L2 cache:                        2 MiB
L3 cache:                        35.8 MiB
NUMA node0 CPU(s):               0,1
Vulnerability Itlb multihit:     KVM: Mitigation: VMX unsupported
Vulnerability L1tf:              Mitigation; PTE Inversion
Vulnerability Mds:               Mitigation; Clear CPU buffers; SMT Host state unknown
Vulnerability Meltdown:          Mitigation; PTI
Vulnerability Spec store bypass: Vulnerable
Vulnerability Spectre v1:        Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:        Mitigation; Full generic retpoline, STIBP disabled, RSB filling
Vulnerability Srbds:             Not affected
Vulnerability Tsx async abort:   Mitigation; Clear CPU buffers; SMT Host state unknown
Flags:                           fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology cpuid pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single pti fsgsbase bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx avx512f avx512dq rdseed adx smap clflushopt avx512cd avx512bw avx512vl xsaveopt xsavec xsaves md_clear
Cpu Property Value
Brand Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz
Vendor :Intel
Architecture :Skylake
Model Family: 0x06, Model: 0x55, Stepping: 0x07, Type: 0x00
Cores 2 physical cores, 2 logical cores (on executing CPU)
No Hyperthreading hardware capability detected
Clock Frequencies Not supported by CPU
Data Cache Level 1:3 : (32, 1024, 36608) kbytes
64 byte cache line size
Address Size 48 bits virtual, 46 bits physical
SIMD 512 bit = 64 byte max. SIMD vector size
Time Stamp Counter TSC is accessible via rdtsc
TSC increased at every clock cycle (non-invariant TSC)
Perf. Monitoring Performance Monitoring Counters (PMC) are not supported
Hypervisor Yes, Microsoft

@Drvi
Copy link
Member Author

Drvi commented Feb 4, 2022

Thanks! Will continue investigation tomorrow

@IanButterworth
Copy link
Member

I thought rolling back PNGFiles didn't fix the segfaults?

Maybe I'm missing something

@t-bltg
Copy link
Contributor

t-bltg commented Feb 4, 2022

I thought rolling back PNGFiles didn't fix the segfaults?

I checked out 0.3.10 a few hours ago and it was failing as well. But I'm in doubt now :/

Correction of #54 (comment):
I've tested more carefully Plots.jl (I think the test weren't picking my patched version (dev) of PNGFiles).
All tests are now passing locally without trouble 🎉 .

@Drvi
Copy link
Member Author

Drvi commented Feb 5, 2022

Since this seems to break a lot of things and this fix helps, I'm going to merge this today.

Not sure how others feel about the warning message when reading an opaque image with a background chunk. My thinking was that if someone is interested in knowing the suggested background color, the warning would at least tell them what it is. But I think in the future we want to provide some utility functions to query this kind of metadata from images and make them separate from loading.

@t-bltg
Copy link
Contributor

t-bltg commented Feb 5, 2022

I thought rolling back PNGFiles didn't fix the segfaults?

An update to this: using PNGFiles@0.3.12 and running Plots test suite does not segault locally (not tested in CI though).

Since this seems to break a lot of things and this fix helps, I'm going to merge this today.

👍 since it affects not only Plots.jl.

@Drvi
Copy link
Member Author

Drvi commented Feb 5, 2022

@IanButterworth I think I must've made a mistake while evaluating the older version of PNGFiles with Plots. Sorry for the noise everyone.

@t-bltg
Copy link
Contributor

t-bltg commented Feb 5, 2022

Just thinking out loud here, maybe we can improve testing by loading / saving back a bunch of png files from a database, so that regressions like these can be caught in CI.

I just came across http://www.schaik.com/pngsuite/ with a relatively small db (http://www.schaik.com/pngsuite/PngSuite-2017jul19.tgz) 66kB, which should be relatively easy to integrate in the CI actions. They even provide corrupted .png files for graceful exit testing (ans thus less likely to segfault in c libs). I interpret the LICENSE as being very permissive.

@Drvi
Copy link
Member Author

Drvi commented Feb 5, 2022

We already use pngsuite for testing, but I guess our tests are not as extensive as they should...

@Drvi Drvi merged commit 74a8cee into master Feb 5, 2022
background_color = process_background(png_ptr, info_ptr, _adjust_background_bitdepth(background, bit_depth))
is_transparent || @warn("Background color for non-transparent image: $(background_color)")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the user need to be warned about this? If not, perhaps make it a debug?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just saw your message above. Yeah, I don't think this needs to be generate log noise. Being a debug would at least make it accessible until we expose an api for it

@t-bltg
Copy link
Contributor

t-bltg commented Feb 6, 2022

We already use pngsuite for testing, but I guess our tests are not as extensive as they should

Damn, I should have read the tests first, before speaking 😅. OK, I think I'm going to try to enhance those.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Segfaults
3 participants