NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/52347: ww mutex class mismatch



The following reply was made to PR kern/52347; it has been noted by GNATS.

From: Martin Husemann <martin%duskware.de@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: kern/52347: ww mutex class mismatch
Date: Thu, 6 Jul 2017 10:06:27 +0200

 Taylor asked me to run a lockdebug kernel and indeed that fires ~immediately.
 No crash dump, so manual transcripton:
 
 LOCKDEBUG: Wait/wound mutex error: linux_wm_mutex_unlock,826: not locked
 ..
 linux_wm_mutex_unlock() at netbsd:linux_wm_mutex_unlock+0x64
 ttm_eu_fence_buffer_objects() at netbsd:radeon_cs_parser_fini+0x1d5
 radeon_cs_ioctl() at netbsd:radeon_cs_ioctl+0x6d2
 drm_ioctl() at netbsd:drm_ioctl+0x11e
 sys_ioctl() at netbsd:sys_ioctl+0x101
 
 and the source lines:
 
 (gdb) list *(radeon_cs_parser_fini+0x1d5)
 0xffffffff809887af is in radeon_cs_parser_fini (../../../../external/bsd/drm2/dist/drm/radeon/radeon_cs.c:411).
 406             } else if (backoff) {
 407                     ttm_eu_backoff_reservation(&parser->ticket,
 408                                                &parser->validated);
 409             }
 410
 411             if (parser->relocs != NULL) {
 412                     for (i = 0; i < parser->nrelocs; i++) {
 413                             if (parser->relocs[i].gobj)
 414                                     drm_gem_object_unreference_unlocked(parser->relocs[i].gobj);
 415                     }
 (gdb) list *(radeon_cs_ioctl+0x6d2)      
 0xffffffff80989345 is in radeon_cs_ioctl (../../../../external/bsd/drm2/include/linux/rwsem.h:84).
 79
 80      static inline void
 81      up_read(struct rw_semaphore *rwsem)
 82      {
 83
 84              rw_exit(&rwsem->rws_lock);
 85      }
 86
 87      static inline void
 88      up_write(struct rw_semaphore *rwsem)
 (gdb) list *(drm_ioctl+0x11e)      
 0xffffffff806d8a03 is in drm_ioctl (../../../../external/bsd/drm2/drm/drm_drv.c:676).
 671
 672             if (!ISSET(ioctl->flags, DRM_UNLOCKED))
 673                     mutex_lock(&drm_global_mutex);
 674
 675             /* XXX errno Linux->NetBSD */
 676             error = -(*ioctl->func)(dev, data, file);
 677
 678             if (!ISSET(ioctl->flags, DRM_UNLOCKED))
 679                     mutex_unlock(&drm_global_mutex);
 680
 
 
 Martin
 


Home | Main Index | Thread Index | Old Index