Summary: | [IVB]I-G-T prime test/module_reload fail with *ERROR* “Memory manager not clean. Delaying takedown” | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | DRI | Reporter: | Guang Yang <guang.a.yang> | ||||||||
Component: | DRM/Intel | Assignee: | Imre Deak <imre.deak> | ||||||||
Status: | CLOSED FIXED | QA Contact: | Intel GFX Bugs mailing list <intel-gfx-bugs> | ||||||||
Severity: | normal | ||||||||||
Priority: | medium | CC: | ben, bingx.a.yan, chris, daniel, jani.nikula, jbarnes, yangweix.shui | ||||||||
Version: | unspecified | ||||||||||
Hardware: | Other | ||||||||||
OS: | All | ||||||||||
Whiteboard: | |||||||||||
i915 platform: | i915 features: | ||||||||||
Bug Depends on: | 59229 | ||||||||||
Bug Blocks: | 63404 | ||||||||||
Attachments: |
|
The problem bisects to commit 2dad9d4d057a080a4ad59c705b3e388af6794576 Author: Dave Airlie <airlied@redhat.com> Date: Tue May 29 15:11:22 2012 +0100 i915: add stub dma-buf mmap callback. which just means the dma_buf_export() call in i915_gem_prime_export() no longer fails, and the dma-buf code is exercised. There is an object reference leak somewhere. Just the first parts of prime_self_import consisting of DRM_IOCTL_I915_GEM_CREATE, DRM_IOCTL_PRIME_HANDLE_TO_FD, RM_IOCTL_PRIME_FD_TO_HANDLE, and DRM_IOCTL_I915_GEM_MMAP_GTT is sufficient to reproduce. *** Bug 54996 has been marked as a duplicate of this bug. *** This issue also exist with Kernel: (drm-intel-testing)6760818aad5622d7f20d7f1c45d75a8165aeaf24 I tested. Can you please retest with https://patchwork.kernel.org/patch/1511931/ applied? If it doesn't apply any longer, I can rebase the patch. (In reply to comment #4) > Can you please retest with > > https://patchwork.kernel.org/patch/1511931/ > > applied? If it doesn't apply any longer, I can rebase the patch. I tried the patch earlier, and retested it on top of current dinq, resulting in: http://mid.gmane.org/874nmjh995.fsf@intel.com Then I realized my i-g-t was out of date, and after updating, some test oopsed with the patch, and without the patch all tests pass. Confused. Has something related changed in tests lately? Created attachment 71737 [details]
dmesg running igt on top of current dinq + the patch
Tail of the 'make test' where the gp fault happens.
[...]
PASS: gem_pread_after_blit
testing untiled->tiled
testing tiled->tiled
testing tiled->untiled
PASS: gem_set_tiling_vs_gtt
testing pwrite on tiled buffer
testing pwrite on untiled, but still fenced buffer
PASS: gem_set_tiling_vs_pwrite
PASS: gem_tiled_pread
gem_tiled_pread_pwrite: 100%
PASS: gem_tiled_pread_pwrite
(In reply to comment #4) > Can you please retest with > > https://patchwork.kernel.org/patch/1511931/ > > applied? If it doesn't apply any longer, I can rebase the patch. lscpi: ---------- 00:02.0 VGA compatible controller: Intel Corporation Ivy Bridge Graphics Controller (rev 09) On top of current dinq + the patch, after running case prime_self_import, console display: ------------------------------------- prime_self_import: prime_self_import.c:61: check_bo: Assertion `ptr1' failed. Aborted (core dumped) *** Bug 59229 has been marked as a duplicate of this bug. *** Can you please retest whether anything changes with latest -nightly: drm-fixes (_not_ drm-intel-fixes) contains a patch which might plug this leak: commit be8a42ae60addd8b6092535c11b42d099d6470ec Author: Seung-Woo Kim <sw0312.kim@samsung.com> Date: Thu Sep 27 15:30:06 2012 +0900 drm/prime: drop reference on imported dma-buf come from gem 1.After revert commit be8a42ae60addd8b6092535c11b42d099d6470ec,retest this. 2.The case prime_self_import was pass. 3.Running module_reload after prime_self_import will fail and dmesg shows: [drm:drm_mm_takedown] *ERROR* Memory manager not clean. Delaying takedown. This kind of phenomenon was reappeared. I attach the new_module_reload.dmesg. Created attachment 72975 [details]
new_moudle_reload.dmesg
Still have this issue? I think Imre is now banging his head against this ... (In reply to comment #13) > I think Imre is now banging his head against this ... If think commit be8a42ae60 fixed the issue in the bug description. comment #10 seems to support this and I can't reproduce that issue with current drm-intel-nightly either. Unfortunately commit be8a42ae60 also introduced two new regressions. The first is when i915_gem_prime_import() fails for a self imported object and we do an extranous dma_buf_put in drm_gem_prime_fd_to_handle(). The second is not taking any reference on dma_buf on the import path for self imported objects that leads to the 'prime_self_import: prime_self_import.c:61: check_bo: Assertion `ptr1' failed.' error. Dave Airlie is working on a final fix for the second regression. Until that's ready could people try the following two patches? They should fix both of the above issues: https://patchwork.kernel.org/patch/2414801/ > (In reply to comment #13) > > I think Imre is now banging his head against this ... > > If think commit be8a42ae60 fixed the issue in the bug description. comment > #10 seems to support this and I can't reproduce that issue with current > drm-intel-nightly either. > > Unfortunately commit be8a42ae60 also introduced two new regressions. The > first is when i915_gem_prime_import() fails for a self imported object and > we do an extranous dma_buf_put in drm_gem_prime_fd_to_handle(). The second > is not taking any reference on dma_buf on the import path for self imported > objects that leads to the 'prime_self_import: prime_self_import.c:61: > check_bo: Assertion `ptr1' failed.' error. > > Dave Airlie is working on a final fix for the second regression. Until > that's ready could people try the following two patches? They should fix > both of the above issues: > > https://patchwork.kernel.org/patch/2414801/ (In reply to comment #14) There's a bug blocked this bug, I have tried this patch, but prime_self_import failed. After the bug below fixed in nightly branch, I will retest it. --------------------- Bug 59229 - [Bisected]I-G-T/ prime_self_import fail (In reply to comment #15) > > (In reply to comment #13) > > > I think Imre is now banging his head against this ... > > > > If think commit be8a42ae60 fixed the issue in the bug description. comment > > #10 seems to support this and I can't reproduce that issue with current > > drm-intel-nightly either. > > > > Unfortunately commit be8a42ae60 also introduced two new regressions. The > > first is when i915_gem_prime_import() fails for a self imported object and > > we do an extranous dma_buf_put in drm_gem_prime_fd_to_handle(). The second > > is not taking any reference on dma_buf on the import path for self imported > > objects that leads to the 'prime_self_import: prime_self_import.c:61: > > check_bo: Assertion `ptr1' failed.' error. > > > > Dave Airlie is working on a final fix for the second regression. Until > > that's ready could people try the following two patches? They should fix > > both of the above issues: > > > > https://patchwork.kernel.org/patch/2414801/ > (In reply to comment #14) > > There's a bug blocked this bug, I have tried this patch, but > prime_self_import failed. After the bug below fixed in nightly branch, I > will retest it. Did you have both patches applied, that is also the following?: https://patchwork.kernel.org/patch/2414771/ The two patches should apply on nightly. It would be still useful to know if prime_self_import still fails. Note that the test was updated in igt yesterday. (In reply to comment #16) > (In reply to comment #15) > > > Dave Airlie is working on a final fix for the second regression. Until > > > that's ready could people try the following two patches? They should fix > > > both of the above issues: > > > > > > https://patchwork.kernel.org/patch/2414801/ > > (In reply to comment #14) > > > > There's a bug blocked this bug, I have tried this patch, but > > prime_self_import failed. After the bug below fixed in nightly branch, I > > will retest it. > > Did you have both patches applied, that is also the following?: > > https://patchwork.kernel.org/patch/2414771/ > > The two patches should apply on nightly. It would be still useful to know if > prime_self_import still fails. Note that the test was updated in igt > yesterday. Apply these two patches on latest nightly top, both of the cases work well now, so I think if patches updated to daniel's tree, this bug can be closed. (In reply to comment #17) > (In reply to comment #16) > > (In reply to comment #15) > > > > Dave Airlie is working on a final fix for the second regression. Until > > > > that's ready could people try the following two patches? They should fix > > > > both of the above issues: > > > > > > > > https://patchwork.kernel.org/patch/2414801/ > > > (In reply to comment #14) > > > > > > There's a bug blocked this bug, I have tried this patch, but > > > prime_self_import failed. After the bug below fixed in nightly branch, I > > > will retest it. > > > > Did you have both patches applied, that is also the following?: > > > > https://patchwork.kernel.org/patch/2414771/ > > > > The two patches should apply on nightly. It would be still useful to know if > > prime_self_import still fails. Note that the test was updated in igt > > yesterday. > > Apply these two patches on latest nightly top, both of the cases work well > now, > so I think if patches updated to daniel's tree, this bug can be closed. Ok, thanks. Setting bug #59229 as a dependency. Dave Airlie merged the prime refcount fixes into drm-next, which is now included in drm-intel-nightly. Note that dinq/drm-intel-fixes does not yet have the patches, since it's a drm upstream issue. (In reply to comment #19) > Dave Airlie merged the prime refcount fixes into drm-next, which is now > included in drm-intel-nightly. Note that dinq/drm-intel-fixes does not yet > have the patches, since it's a drm upstream issue. Thanks for your reminding, I verified it here. Closing old verified. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.
Created attachment 66166 [details] dmesg info after running module_reload System Environment: -------------------------- Platform: Ivybridge Kernel: (drm-intel-next-queued)7788a765205f63abcb8645c16c85a968bd578f4f Bug detailed description: ------------------------- On IVB platform, running module_reload after prime_self_import will fail and dmesg shows: [drm:drm_mm_takedown] *ERROR* Memory manager not clean. Delaying takedown I attach the dmesg.