Closed robert-w-gries closed 5 years ago
i686
support has been dropped for now. Will re-open this later if it's still an issue.
Seeing this issue now but only when host system is Ubuntu 18.04.
Builds from Ubuntu 16 work as intended.
This issue applies to x86_64
as well.
Maybe this is a problem with fat pointers? See https://gitter.im/phil-opp/blog_os?at=5af41d69b84be71db9f72f46
Thanks for the hint Phil! Since my scheduler trait object experiment has some bugs, I reverted to using the global scheduler object in process return.
I added in the old behavior in a new branch, feature/sched_trait_object
, but I cannot reproduce this issue and test your suggested fix. I'm certain I'll run into this bug again so I'll leave the issue open for now.
Closing since it's not a pertinent issue. Will re-open if I run into it again.
Problem
We see an exception when trying to call
scheduler.kill()
inprocess_ret
oni686
.I tracked down the issue to an incorrect trait object value. The following
gdb
session shows that we get the proper pointer toSCHEDULER
(with some name mangling):scheduler_ptr
represents a raw pointer to a&DoesScheduling
trait object stored during process creation. We want to create aBox<&DoesScheduling>
from this raw pointer calledscheduler
.In
x86_64
,scheduler
is aBox<&DoesScheduling>
that points to our globalSCHEDULER
as expected. However, ini686
,scheduler
is aBox<&DoesScheduling>
that points to itself.i686
behaviorx86_64
behaviorWorkaround
The only workaround I've been able to find is removing the
let scheduler = Box::from_raw(scheduler_ptr);
line fori686
and replacing it with a hardcoded reference toSCHEDULER
: