-
Notifications
You must be signed in to change notification settings - Fork 96
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
nvpipe_decode() segfaults #11
Comments
After further investigation the offending lines are decode.c (275-278): if(cuvidCreateVideoParser(&nvp->parser, &prs) != CUDA_SUCCESS) {
ERR(dec, "failed creating video parser.");
return NVPIPE_EDECODE;
} |
Please compile in debug mode and copy-paste the output of a "bt full" (from gdb) here. |
Thanks for the quick response, here it goes:
|
Looks like you're giving a device pointer to nvpipe_decode. Is that true? The API needs/accepts a host pointer. |
I have tried with both and it crashes in the same place. I have also been looking at the NvPipe code and it looks like it works with both: if(is_device_ptr(obuf)) {
dstbuf = (CUdeviceptr)obuf;
} There are several checks like that, so I assumed that it was capable of dealing with both. The included EGL example has the same problem in my system, so I assume it is not a problem with my code. I could paste the output of the trace with the host pointer, but it is exactly the same. It crashes for the |
Ahh. We need to update our doc comments, then :-). Will add that to my list, thanks. The most plausible explanation is that you are linking against one version of cuvid and loading another. 'ldd' would help debug that. A less plausible explanation is just some installation or setup problem with your cuvid setup. To test this, I would download the NVIDIA Video SDK and compile + run the samples, particularly the "decodeGL" one. If those fail then that rules out NVPipe. Looking more closely at the backtrace, there's a couple things that are of interest. One is that your nvp_cuvid_decode stack has a lot of variables ( |
The only available cuvid in my system is:
So I think this is not the issue.
NVIDIA Video SDK samples run properly, I don't have any crashes at all, even decoding 4K videos. So I think my Video SDK installation is OK.
I have just tried the suggested approach. Same segfault in the same place. BT:
|
Hrm, I am perplexed, then. |
Yes, of course. I have created a repo: https://github.com/omaralvarez/zero-latency It is compiled using cmake. Should be straight forward doing an out of source build. Sorry for the ugly code, coded the sample in a rush. If it works I can spruce it up so it can serve as a starting point for other projects. |
Thanks. It appears this repo still has OpenGL and sockets and the like. Is the simplified version perhaps in a branch/tag that you've not yet pushed? |
Done. OpenGL was just in the CMakeLists, I have now removed everything and also added a standalone example without OpenGL or sockets. Now it creates 3 executables, client, server and standalone. |
I think I have some new clues. CUDA 9.1 has no I may be able to help with this, if someone can confirm that my suspicions are correct. |
Someone else mentioned issues with the CUDA 9 series, so you're likely on to something. I haven't yet had time to investigate, unfortunately. Note that NVPipe's CMake has a variable for specifying an external video sdk "install". You'll want to specify that when trying with a new SDK. |
Got it, I will keep on trying to find out the root cause of the problem and report back if I do. |
I've just pushed a redesigned NvPipe which works with CUDA 9. |
I will test it out and let you know if everything went ok. Thanks! |
Everything is working now. Thanks! |
I have compiled NvPipe with the following setup:
I have been testing a small client-server example, in which the server renders something which it is then encoded and sent to the client for decoding.
Everything seems to be working properly on the encoding side, but when I try to decode the result:
nvp_err_t decodeStatus = nvpipe_decode(decoder, clientReceiveBuffer, numBytes, clientDeviceBuffer, width, height, NVPIPE_RGBA);
I get the following segfault:
Any advice on how to fix this?
The text was updated successfully, but these errors were encountered: