Skip to content
New issue

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

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

Already on GitHub? # to your account

Failed to verify module 'recode_simd' (bswap must be an even number of bytes) #166

Open
kimikage opened this issue May 26, 2024 · 5 comments
Labels
help wanted Extra attention is needed

Comments

@kimikage
Copy link
Contributor

The crash during testing of TiffImages.jl has been logged in the PkgEval reports for a while now.
https://s3.amazonaws.com/julialang-reports/nanosoldier/pkgeval/by_date/2024-05/22/TiffImages.primary.log

bswap must be an even number of bytes
  %350 = call <32 x i8> @llvm.bswap.v32i8(<32 x i8> %349), !dbg !300
Failed to verify module 'recode_simd', dumping entire module!

; ModuleID = 'recode_simd'
source_filename = "recode_simd"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128-ni:10:11:12:13"
target triple = "x86_64-unknown-linux-gnu"

cf. JuliaLang/julia#47372

Perhaps the situation where the crash occurs is an edge case.
However, I am reporting this just in case the next minor version release is scheduled in the near future. (cf. #159 (comment))

@tlnagy tlnagy added the help wanted Extra attention is needed label May 27, 2024
@kimikage
Copy link
Contributor Author

kimikage commented May 31, 2024

TiffImages v0.8.0: Pass
https://s3.amazonaws.com/julialang-reports/nanosoldier/pkgeval/by_date/2024-03/19/TiffImages.primary.log
TiffImages v0.9.0: Crash
https://s3.amazonaws.com/julialang-reports/nanosoldier/pkgeval/by_date/2024-03/21/TiffImages.primary.log

It may be related to the use of SIMD.jl and @generated.

Just in case, for reference, diff. in julia
JuliaLang/julia@2775c9a...8e8b533

@kimikage
Copy link
Contributor Author

@chrstphrbrns

  1. How much impact does the @generated have on performance?
  2. Can we turn those generated functions into optionally-generated functions? Regardless of crashes, it is good to have the fallback.
  3. Could we add a specialization for 8-bit types? Regardless of crashes, I believe it is beneficial both in compile-time and run-time.

@kimikage
Copy link
Contributor Author

I think we will be releasing TiffImages.jl v0.10.1 in the very near future.
That is a good (limited) opportunity to inject debugging code into the test script such as the following:

if get(ENV, "JULIA_PKGEVAL", "false") != "false"
    # debugging code
end

@tlnagy
Copy link
Owner

tlnagy commented Oct 10, 2024

Sorry for the delay, @kimikage, what debugging code should we inject to track this down?

@maleadt
Copy link

maleadt commented Jan 8, 2025

Reproducer:

import TiffImages, Downloads

_wrap(name) = "https://github.com/tlnagy/exampletiffs/blob/master/$name?raw=true"

using Downloads
get_example(x) = Downloads.download(_wrap(x))

filepath = get_example("capitol.tif")
img = TiffImages.load(filepath)

This requires a build of Julia with assertions enabled (FORCE_ASSERTIONS=1 and LLVM_ASSERTIONS=1 in Make.user).

In the mean time, I'm going to blacklist TiffImages.jl from being tested by PkgEval. Please ping me when this issue is resolved.

maleadt added a commit to JuliaCI/PkgEval.jl that referenced this issue Jan 8, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants