Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
mesa
mesa
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 2,373
    • Issues 2,373
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 663
    • Merge Requests 663
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Mesa
  • mesamesa
  • Issues
  • #564

Closed
Open
Opened Sep 18, 2019 by Bugzilla Migration User@bugzilla-migration

[clover/caicos] OpenCL atomic_cmpxchg() segmentation fault

Submitted by Vedran Miletić

Assigned to Default DRI bug account

Link to original bug (#93370)

Description

Created attachment 120495 Program that segfaults

I'm using mesa 8b52fa71 and llvm svn revision 255468.

The code that segfaults is attached. Debugging with gdb gives:

Starting program: /home/vedranm/atomic [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [New Thread 0x7ffff034b700 (LWP 20619)] [New Thread 0x7fffef912700 (LWP 20620)] [New Thread 0x7fffef111700 (LWP 20621)] [Thread 0x7fffef111700 (LWP 20621) exited] [Thread 0x7fffef912700 (LWP 20620) exited]

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff0a4480d in radeon_lookup_buffer (csc=csc@entry=0x7ffff7f31028, bo=bo@entry=0xf103c0) at radeon_drm_cs.c:230
230         if (i == -1 || csc->relocs_bo[i].bo == bo)
(gdb) backtrace
#0  0x00007ffff0a4480d in radeon_lookup_buffer (csc=csc@entry=0x7ffff7f31028, bo=bo@entry=0xf103c0) at radeon_drm_cs.c:230
#1  0x00007ffff0a44931 in radeon_add_buffer (added_domains=<synthetic pointer>, priority=29, domains=<optimized out>, usage=<optimized out>, bo=0xf103c0, cs=0x7ffff7f31010) at radeon_drm_cs.c:269
#2  radeon_drm_cs_add_buffer (rcs=0x7ffff7f31010, buf=0xf103c0, usage=<optimized out>, domains=<optimized out>, priority=RADEON_PRIO_VERTEX_BUFFER) at radeon_drm_cs.c:333
#3  0x00007ffff0a65a79 in radeon_add_to_buffer_list (rctx=0x65c260, ring=0x65c580, rbo=<optimized out>, rbo=<optimized out>, priority=RADEON_PRIO_VERTEX_BUFFER, usage=RADEON_USAGE_READ)
    at ../../../../src/gallium/drivers/radeon/r600_cs.h:53
#4  evergreen_emit_vertex_buffers (rctx=0x65c260, state=0x65ef00, resource_offset=816, pkt_flags=<optimized out>) at evergreen_state.c:1917
#5  0x00007ffff0a62467 in r600_emit_atom (atom=0x65ef00, rctx=0x65c260) at r600_pipe.h:578
#6  compute_emit_cs (grid_layout=0xf26950, block_layout=0xf26c10, ctx=0x65c260) at evergreen_compute.c:489
#7  evergreen_launch_grid (ctx_=0x65c260, block_layout=0xf26c10, grid_layout=grid_layout@entry=0xf26950, pc=pc@entry=0, input=input@entry=0xe68850) at evergreen_compute.c:631
#8  0x00007ffff58167ac in clover::kernel::launch (this=0xf24790, q=..., grid_offset=..., grid_size=std::vector of length 1, capacity 1 = {...}, block_size=std::vector of length 1, capacity 1 = {...})
    at core/kernel.cpp:81
#9  0x00007ffff5811626 in std::function<void (clover::event&)>::operator()(clover::event&) const (__args#0=..., this=0xf26820) at /usr/include/c++/5/functional:2271
#10 clover::event::trigger (this=this@entry=0xf267e0) at core/event.cpp:55
#11 0x00007ffff58124f8 in clover::hard_event::hard_event(clover::command_queue&, unsigned int, clover::ref_vector<clover::event> const&, std::function<void (clover::event&)>) (this=0xf267e0, q=..., 
    command=<optimized out>, deps=..., action=...) at core/event.cpp:126
#12 0x00007ffff57f8ae8 in clover::create<clover::hard_event, clover::command_queue&, int, clover::ref_vector<clover::event>&, clEnqueueNDRangeKernel(cl_command_queue, cl_kernel, cl_uint, const size_t*, const size_t*, const size_t*, cl_uint, _cl_event* const*, _cl_event**)::<lambda(clover::event&)> > () at ./util/pointer.hpp:230
#13 clEnqueueNDRangeKernel (d_q=0x63d328, d_kern=0xf24798, dims=<optimized out>, d_grid_offset=<optimized out>, d_grid_size=<optimized out>, d_block_size=0x7fffffffc430, num_deps=0, d_deps=0x0, rd_ev=0x0)
    at api/kernel.cpp:293
#14 0x00000000004014a8 in main ()
(gdb)

Attachment 120495, "Program that segfaults":
atomic.c

Version: git

Blocking

  • Bug 99553
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: mesa/mesa#564