Summary
srfi-18: (mutex-unlock) Internal scheduler error
Metadata
- Id: eae48cca6ff685e9af10d401d27043f098e58ef0
- Trac id: 1564
- Type: defect
- Reporter: megane
- Owner:
- Cc:
- Status: new
- Component: extensions
- Estimated difficulty:
- Resolution:
- Priority: major
- Milestone: 6.0.0
- Version: 5.0.0
- Changetime: 2023-11-06 22:11:53 UTC
- Created: 2018-11-30 10:26:07 UTC
- Keywords: scheduler threads
Description
(import srfi-18)
(import (chicken random))
(define m (make-mutex))
(define (rt) (/ (pseudo-random-integer 100) 1000))
(define (y)
(let lp4 ()
(unless (= 0 (pseudo-random-integer 10))
(print (current-thread) " " "yield")
(thread-yield!)
(lp4))))
(thread-start!
(make-thread (lambda ()
(let lp ()
(print (current-thread) " " "lock")
(mutex-lock! m (rt))
(print (current-thread) " " "unlock")
(mutex-unlock! m)
(y)
(lp)))))
(let lp2 ()
(print (current-thread) " " "lock")
(mutex-lock! m (rt))
(print (current-thread) " " "sleep")
(thread-sleep! (rt))
(print (current-thread) " " "unlock")
(mutex-unlock! m)
(lp2))
Warning (#<thread: thread1>): in thread: (mutex-unlock) Internal scheduler error: unknown thread state
#<thread: primordial>
ready
Call history:
t.scm:7: chicken.random#pseudo-random-integer
t.scm:7: scheme#/
t.scm:19: srfi-18#mutex-lock!
t.scm:20: srfi-18#current-thread
t.scm:20: chicken.base#print
t.scm:21: srfi-18#mutex-unlock! <--
#
Changes and comments
[2019-04-07 12:23:24 UTC] sjamaan changed milestone from 5.1 to 5.2
[2019-04-07 12:23:24 UTC] sjamaan wrote:
Getting ready for 5.1, moving tickets which won't make it in to 5.2.
[2019-08-25 17:37:28 UTC] felix changed milestone from 5.2 to 5.3
[2019-12-13 12:16:41 UTC] megane wrote:
Jörg Wittenberger posted patches here: https://lists.nongnu.org/archive/html/chicken-hackers/2018-12/msg00037.html
I've been using the C4 versions since 2019-02-15 without problems.
[2021-04-12 13:50:19 UTC] sjamaan changed milestone from 5.3 to 5.4
[2021-04-12 13:50:19 UTC] sjamaan wrote:
Who knows, maybe the scheduler overhaul will make this ticket obsolete. I sure hope so...