[Bug 254995] pthread_cond_timedwait() returns EDEADLK

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Apr 12 06:58:19 UTC 2021


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=254995

            Bug ID: 254995
           Summary: pthread_cond_timedwait() returns EDEADLK
           Product: Base System
           Version: 12.1-RELEASE
          Hardware: i386
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: threads
          Assignee: threads at FreeBSD.org
          Reporter: nkoch at demig.de

In an embedded environment I sometimes (once per month) see
pthread_cond_timedwait() returning EDEADLK, which is not documented anywhere.
Most of the time I expect to see ETIMEDOUT.
As my program is forced to core dump when something unexpected happens I can
see that there is no 'obvious' program error.
I have the same program running under FreeBSD-10.3 and have never seen this
before.

>From core dump:

(gdb) x/20x cond_
0x6bacd80:      0x00000000      0x00000000      0x00000000      0x00000004
0x6bacd90:      0x00000000      0x00000000      0x00000000      0x00000000
0x6bacda0:      0x7665642f      0x6465642f      0x752f7665      0x34747261
0x6bacdb0:      0x006c7463      0x00000000      0x00000000      0x00000000
0x6bacdc0:      0x00000000      0x06bacdc0      0x00000000      0x00000000
(gdb) x/20x mutex_
0x6510c80:      0x000187f2      0x00000004      0x00000000      0x00000000
0x6510c90:      0x00000000      0x00000000      0x00000000      0x00000000
0x6510ca0:      0x00000001      0x00000000      0x00000000      0x00000000
0x6510cb0:      0x00000000      0x00000000      0x00000000      0x00000000
0x6510cc0:      0x00000000      0x00000000      0x00000000      0x00000000

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-threads mailing list