Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8709415
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T04:21:31+00:00 2026-06-13T04:21:31+00:00

I am trying to hunt down a bug in my program. It produces [vaio:10404]

  • 0

I am trying to hunt down a bug in my program. It produces

[vaio:10404] Signal: Segmentation fault (11) 
[vaio:10404] Signal code: Address not mapped (1) 
[vaio:10404] Failing at address: 0x210000
[vaio:10405] [ 0] /lib/x86_64-linux-gnu/libpthread.so.0(+0xfcb0) [0x7fa7857ffcb0]
[vaio:10405] [ 1] /lib/x86_64-linux-gnu/libc.so.6(+0x14fe20) [0x7fa785580e20]
[vaio:10405] [ 2] /usr/lib/libcuda.so.1(+0x1b1f49) [0x7fa78676bf49]

0x210000 is an address living in GPU memory. I have no unified address space in place (due to card limitations: sm_12).

The problem occurs when running the program through mpiexec -n 2. That is, I start 2 CPU processes, both create their own context on the same (!) GPU (just 1 GPU installed). Like this:

cuInit(0);
cuDeviceGet(&cuDevice, 0); // get device number 0
cuCtxCreate(&cuContext, 0, cuDevice); // create context
cuMemAlloc( &mem , size );  // allocate memory pool (hundreds of MB)

(This is simplified here – all cuda calls are checked for error returns)

I am using this setup very successfully for quite some time now (multiple host processes sharing the same GPU). However, that was when using the CUDA runtime API. Now, I am switching to the driver API.

To hunt this down I dump out mem of the above code. Turns out that the memory address that is returned by cuMemAlloc is the same for both processes! This wonders me. Here the dump out:

process 0: allocate internal buffer: unaligned ptr = 0x210000  aligned ptr = 0x210000
process 1: allocate internal buffer: unaligned ptr = 0x210000  aligned ptr = 0x210000

Immediately I checked with my old code (runtime API) which never has such problems. Turns out it reports on both processes (sharing the same device) the same memory address as well. This has never drawn my attention before.

I find this hard to believe. Just to make this clear: Both processes request device memory with cudaMalloc (runtime API) and cuMalloc (driver API) (400MB on a big card), and both processes get the same address returned?
I am sure that not one process is advancing a lot and already freed the memory, so that the first process can reuse the same memory because the first process has already terminated. No, this memory is used as a memory pool to serves subsequent memory allocations and there are a lot of synchronization points in between. The pool is freed at program termination.

Anybody knows how the same pointer value (memory address) can be reported to both processes but on the GPU this refers to different memory? (It must since the calculations it carries out are correct. And that wouldn’t be the case if the memory pools overlapped). To my knowledge this is not possible. What am I missing?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T04:21:31+00:00Added an answer on June 13, 2026 at 4:21 am

    You are missing the concept of virtual addressing.

    Each CPU thread has its own CUcontext, and each CUcontext has its own GPU virtual address space. The addresses returned from the API are virtual, and host driver and/or device performs virtual address translation into absolute addresses in GPU memory. There is plenty of evidence that the GPU has a dedicated TLB onboard for precisely this purpose.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

New to rails, and I've just spent hours trying to hunt down a bug.
I've spent a decent amount of time trying to hunt down a simple way
I have a memory leak that I'm trying to hunt down in my mfc
I'm trying to hunt down why a POST request from a C# script isn't
I'm trying to hunt down memory leaks and have found one source. I am
I'm trying to hunt down the PopOut_Position function. I just installed VS 2010 and
We've been trying to hunt down some heap corruption issues in our multi-threaded C++
I'm trying to hunt down a memory leak in one of my iOS programs.
Trying to build out an exception if move.UserId does not equal currentUserId then Redirect
I am trying to run following program: package jndi; import java.util.Hashtable; import javax.naming.Context; import

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.