dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla-daemon@freedesktop.org
To: dri-devel@lists.freedesktop.org
Subject: [Bug 99488] [r600g]ImageMagick issues in Gaussian Blur kernel
Date: Sun, 26 Feb 2017 17:24:18 +0000	[thread overview]
Message-ID: <bug-99488-502-gguPXMMzLH@http.bugs.freedesktop.org/> (raw)
In-Reply-To: <bug-99488-502@http.bugs.freedesktop.org/>


[-- Attachment #1.1: Type: text/plain, Size: 8970 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=99488

nixscripter@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[r600g]OpenCL driver causes |[r600g]ImageMagick issues
                   |ImageMagick to hang on JPEG |in Gaussian Blur kernel
                   |input in Gaussian Blur      |
                   |kernel                      |

--- Comment #13 from nixscripter@gmail.com ---
I have updated the bug's title to expand the scope in order to continue work on
the assert.

With my debug build and that patch, I can now run the ImageMagick self-tests
and easily replicate the assert. Here is the easiest way:

1. Before you configure ImageMagick set the CFLAGS environment variable to "-O
-ggdb".
2. Build ImageMagick with "make".
3. Run "make check" to build all the self-tests (it's not done by default).
4. From the top level of the source tree, run "bash
test/tests/validate-formats-memory.tap".

This is the output you will see:

[... snip ...]
  test 856: XWD/Undefined/TrueColor/12-bits... pass
  test 857: XWD/Undefined/TrueColor/16-bits... pass
lt-validate:
/home/admin/Software/r600/llvm-svn/src/llvm/include/llvm/MC/MCRegisterInfo.h:64:
unsigned int llvm::MCRegisterClass::getRegister(unsigned int) const: Assertion
`i < getNumRegs() && "Register number out of range!"' failed.
  test 858: YUV/Undefined/TrueColor/8-bits

That last test is where the issue is.

Here is the backtrace (now that I have debug symbols for everything):

(gdb) bt
#0  0x00000381c351c04f in raise () from /usr/lib/libc.so.6
#1  0x00000381c351d47a in abort () from /usr/lib/libc.so.6
#2  0x00000381c3514ea7 in __assert_fail_base () from /usr/lib/libc.so.6
#3  0x00000381c3514f52 in __assert_fail () from /usr/lib/libc.so.6
#4  0x00000381ac85cd47 in llvm::MCRegisterClass::getRegister (
    i=<optimized out>, this=<optimized out>)
    at
/home/admin/Software/r600/llvm-svn/src/llvm/include/llvm/MC/MCRegisterInfo.h:64
#5  llvm::TargetRegisterClass::getRegister (this=<optimized out>, 
    i=<optimized out>)
    at
/home/admin/Software/r600/llvm-svn/src/llvm/include/llvm/Target/TargetRegisterInfo.h:81
#6  0x00000381adc07b0c in llvm::TargetRegisterClass::getRegister (
    this=<optimized out>, i=<optimized out>)
    at
/home/admin/Software/r600/llvm-svn/src/llvm/include/llvm/MC/MCRegisterInfo.h:64
#7  llvm::R600InstrInfo::buildIndirectRead (this=this@entry=0x1a29020, 
    MBB=0x1aae9a0, I=I@entry=..., ValueReg=1611, Address=<optimized out>, 
    OffsetReg=OffsetReg@entry=1621, AddrChan=2)
    at
/home/admin/Software/r600/llvm-svn/src/llvm/lib/Target/AMDGPU/R600InstrInfo.cpp:1156
#8  0x00000381adc07f6a in llvm::R600InstrInfo::expandPostRAPseudo (
    this=0x1a29020, MI=...)
    at
/home/admin/Software/r600/llvm-svn/src/llvm/lib/Target/AMDGPU/R600InstrInfo.cpp:1070 
#9  0x00000381acb1bc7b in (anonymous
namespace)::ExpandPostRA::runOnMachineFunction (this=0xcc6b10, MF=...)          
    at
/home/admin/Software/r600/llvm-svn/src/llvm/lib/CodeGen/ExpandPostRAPseudos.cpp:200 
#10 0x00000381acc03ea4 in llvm::MachineFunctionPass::runOnFunction (            
    this=0xcc6b10, F=...)                                                       
    at
/home/admin/Software/r600/llvm-svn/src/llvm/lib/CodeGen/MachineFunctionPass.cpp:62 
#11 0x00000381aca54caf in llvm::FPPassManager::runOnFunction (this=0xbfd9d0,    
    F=...)                                                                      
    at
/home/admin/Software/r600/llvm-svn/src/llvm/lib/IR/LegacyPassManager.cpp:1513   
#12 0x00000381aca54d5c in llvm::FPPassManager::runOnModule (this=0xbfd9d0,      
    M=...)                                                                      
    at
/home/admin/Software/r600/llvm-svn/src/llvm/lib/IR/LegacyPassManager.cpp:1534   
#13 0x00000381aca55930 in (anonymous namespace)::MPPassManager::runOnModule (   
    M=..., this=<optimized out>)                                                
    at
/home/admin/Software/r600/llvm-svn/src/llvm/lib/IR/LegacyPassManager.cpp:1590   
#14 llvm::legacy::PassManagerImpl::run (this=0x1b04d20, M=...)                  
    at
/home/admin/Software/r600/llvm-svn/src/llvm/lib/IR/LegacyPassManager.cpp:1693
#15 0x00000381afb7e4ec in (anonymous namespace)::emit_code(llvm::Module&,
clover::llvm::target const&, llvm::TargetMachine::CodeGenFileType,
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>
>&) ()
   from /usr/lib/libMesaOpenCL.so.1
#16 0x00000381afb7eb50 in clover::llvm::build_module_native(llvm::Module&,
clover::llvm::target const&, clang::CompilerInstance const&,
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>
>&) ()
   from /usr/lib/libMesaOpenCL.so.1
#17 0x00000381afb7ad5d in
clover::llvm::link_program(std::vector<clover::module,
std::allocator<clover::module> > const&, pipe_shader_ir,
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >
const&, std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&, std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> >&) ()
   from /usr/lib/libMesaOpenCL.so.1
#18 0x00000381afb6b9a1 in
clover::program::link(clover::ref_vector<clover::device> const&,
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >
const&, clover::ref_vector<clover::program> const&) ()
   from /usr/lib/libMesaOpenCL.so.1
#19 0x00000381afb494ec in clBuildProgram () from /usr/lib/libMesaOpenCL.so.1
#20 0x00000381b15bb50b in clBuildProgram () from /usr/lib/libOpenCL.so
#21 0x00000381c4213f12 in CompileOpenCLKernel (exception=0xac7490, 
    signature=<optimized out>, 
    options=0x3d8f0b54500 "-cl-single-precision-constant -cl-mad-enable
-DMAGICKCORE_HDRI_SUPPORT=1 -DCLQuantum=float -DCLSignedQuantum=float
-DCLPixelType=float4 -DQuantumRange=65535.000000f -DQuantumScale=0.000015
-DCharQuant"..., 
    kernel=<optimized out>, device=0xac5760) at MagickCore/opencl.c:1361
#22 HasOpenCLDevices (clEnv=clEnv@entry=0xac4d50, 
    exception=exception@entry=0xac7490) at MagickCore/opencl.c:2104
#23 0x00000381c4215327 in InitializeOpenCL (clEnv=clEnv@entry=0xac4d50, 
    exception=exception@entry=0xac7490) at MagickCore/opencl.c:2321
#24 0x00000381c411c19b in getOpenCLEnvironment (
    exception=exception@entry=0xac7490) at MagickCore/accelerate.c:223
#25 0x00000381c411d729 in AccelerateBlurImage (image=image@entry=0xb250d0, 
    radius=radius@entry=10, sigma=sigma@entry=3.5, 
    exception=exception@entry=0xac7490) at MagickCore/accelerate.c:773
#26 0x00000381c41afa48 in BlurImage (image=image@entry=0xb250d0, 
    radius=radius@entry=10, sigma=sigma@entry=3.5, 
    exception=exception@entry=0xac7490) at MagickCore/effect.c:789
#27 0x00000381c421392c in RunOpenCLBenchmark (is_cpu=is_cpu@entry=MagickFalse)
    at MagickCore/opencl.c:1048
#28 0x00000381c4215aa3 in RunDeviceBenckmark (device=0xac5760, 
    testEnv=0xac4d50, clEnv=0xa729d0) at MagickCore/opencl.c:1088
#29 BenchmarkOpenCLDevices (clEnv=0xa729d0) at MagickCore/opencl.c:1177
#30 AutoSelectOpenCLDevices (clEnv=0xa729d0) at MagickCore/opencl.c:975
#31 InitializeOpenCL (clEnv=clEnv@entry=0xa729d0, 
    exception=exception@entry=0x98b990) at MagickCore/opencl.c:2328
#32 0x00000381c411c19b in getOpenCLEnvironment (
    exception=exception@entry=0x98b990) at MagickCore/accelerate.c:223
#33 0x00000381c4124a45 in AccelerateResizeImage (image=image@entry=0xa72c50, 
    resizedColumns=resizedColumns@entry=70, resizedRows=resizedRows@entry=46, 
    resizeFilter=resizeFilter@entry=0xa71bf0, 
    exception=exception@entry=0x98b990) at MagickCore/accelerate.c:4430
#34 0x00000381c4274c9f in ResizeImage (image=image@entry=0xa72c50, 
    columns=columns@entry=70, rows=rows@entry=46, 
    filter=filter@entry=TriangleFilter, exception=exception@entry=0x98b990)
    at MagickCore/resize.c:2877
#35 0x00000381b17d11f4 in WriteYUVImage (image_info=0xa67840, image=0xa72c50, 
    exception=0x98b990) at coders/yuv.c:649
#36 0x00000381c416bcb2 in WriteImage (image_info=image_info@entry=0x98ca10, 
    image=image@entry=0xa72c50, exception=exception@entry=0x98b990)
    at MagickCore/constitute.c:1114
#37 0x00000000004021bb in ValidateImageFormatsInMemory (
    image_info=image_info@entry=0x98ca10, 
    reference_filename=reference_filename@entry=0x3d8f0b5abb0
"/tmp/magick-308288PpulFoRmPFl", 
    output_filename=output_filename@entry=0x3d8f0b5bbb0
"/tmp/magick-30828ayJzZh43jT2f", fail=fail@entry=0x3d8f0b5aba8,
exception=exception@entry=0x98b990)
    at tests/validate.c:1623
#38 0x000000000040548a in main (argc=<optimized out>, argv=<optimized out>)
    at tests/validate.c:2629

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 10734 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2017-02-26 17:24 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-22  7:23 [Bug 99488] [r600g]OpenCL driver causes process to hang in ImageMagick's Gaussian Blur kernel bugzilla-daemon
2017-01-26 19:44 ` bugzilla-daemon
2017-02-03  2:02 ` bugzilla-daemon
2017-02-03  2:48 ` bugzilla-daemon
2017-02-03  2:52 ` [Bug 99488] [r600g]OpenCL driver causes ImageMagick to hang on JPEG input in " bugzilla-daemon
2017-02-03  3:39 ` bugzilla-daemon
2017-02-03  9:01 ` bugzilla-daemon
2017-02-04 22:47 ` bugzilla-daemon
2017-02-05 16:37 ` bugzilla-daemon
2017-02-05 21:57 ` bugzilla-daemon
2017-02-21 23:20 ` bugzilla-daemon
2017-02-24  3:09 ` bugzilla-daemon
2017-02-26  4:46 ` bugzilla-daemon
2017-02-26  4:47 ` bugzilla-daemon
2017-02-26  6:38 ` bugzilla-daemon
2017-02-26 17:24 ` bugzilla-daemon [this message]
2017-02-26 17:26 ` [Bug 99488] [r600g]ImageMagick issues " bugzilla-daemon
2017-02-26 17:36 ` bugzilla-daemon
2017-05-07  0:39 ` bugzilla-daemon
2017-05-24  5:12 ` bugzilla-daemon
2017-05-30  6:38 ` bugzilla-daemon
2017-06-05  1:38 ` bugzilla-daemon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-99488-502-gguPXMMzLH@http.bugs.freedesktop.org/ \
    --to=bugzilla-daemon@freedesktop.org \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox