[
https://issues.apache.org/jira/browse/MESOS-3748?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Joseph Wu updated MESOS-3748:
-----------------------------
Description:
If you pass a nonsense string for "master" into a framework using the HTTP
scheduler library, the framework segfaults.
For example, using the example frameworks:
{code:title=Scheduler Driver}
build/src/test-framework --master="asdf://127.0.0.1:5050"
{code}
Results in:
{code}
Failed to create a master detector for 'asdf://127.0.0.1:5050': Failed to parse
'asdf://127.0.0.1:5050'
{code}
{code:title=HTTP Scheduler Library}
export DEFAULT_PRINCIPAL=root
build/src/event-call-framework --master="asdf://127.0.0.1:5050"
{code}
Results in
{code}
I1015 16:18:45.432075 2062201600 scheduler.cpp:157] Version: 0.26.0
Segmentation fault: 11
{code}
{code:title=Stack Trace}
* thread #2: tid = 0x28b6bb, 0x0000000100ad03ca
libmesos-0.26.0.dylib`mesos::v1::scheduler::MesosProcess::initialize(this=0x00000001076031a0)
+ 42 at scheduler.cpp:213, stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
* frame #0: 0x0000000100ad03ca
libmesos-0.26.0.dylib`mesos::v1::scheduler::MesosProcess::initialize(this=0x00000001076031a0)
+ 42 at scheduler.cpp:213
frame #1: 0x0000000100ad05f2 libmesos-0.26.0.dylib`virtual thunk to
mesos::v1::scheduler::MesosProcess::initialize(this=0x00000001076031a0) + 34 at
scheduler.cpp:210
frame #2: 0x00000001022b60f3 libmesos-0.26.0.dylib`::resume() + 931 at
process.cpp:2449
frame #3: 0x00000001022c131c libmesos-0.26.0.dylib`::operator()() + 268 at
process.cpp:2174
frame #4: 0x00000001022c0fa2
libmesos-0.26.0.dylib`::__thread_proxy<std::__1::tuple<std::__1::__bind<(lambda
at ../../../3rdparty/libprocess/src/process.cpp:2158:35),
std::__1::reference_wrapper<const std::__1::atomic<bool> > > > >() [inlined]
__invoke<(lambda at ../../../3rdparty/libprocess/src/process.cpp:2158:35) &,
const std::__1::atomic<bool> &> + 27 at __functional_base:415
frame #5: 0x00000001022c0f87
libmesos-0.26.0.dylib`::__thread_proxy<std::__1::tuple<std::__1::__bind<(lambda
at ../../../3rdparty/libprocess/src/process.cpp:2158:35),
std::__1::reference_wrapper<const std::__1::atomic<bool> > > > >() [inlined]
__apply_functor<(lambda at
../../../3rdparty/libprocess/src/process.cpp:2158:35),
std::__1::tuple<std::__1::reference_wrapper<const std::__1::atomic<bool> > >,
0, std::__1::tuple<> > + 55 at functional:2060
frame #6: 0x00000001022c0f50
libmesos-0.26.0.dylib`::__thread_proxy<std::__1::tuple<std::__1::__bind<(lambda
at ../../../3rdparty/libprocess/src/process.cpp:2158:35),
std::__1::reference_wrapper<const std::__1::atomic<bool> > > > >() [inlined]
operator()<> + 41 at functional:2123
frame #7: 0x00000001022c0f27
libmesos-0.26.0.dylib`::__thread_proxy<std::__1::tuple<std::__1::__bind<(lambda
at ../../../3rdparty/libprocess/src/process.cpp:2158:35),
std::__1::reference_wrapper<const std::__1::atomic<bool> > > > >() [inlined]
__invoke<std::__1::__bind<(lambda at
../../../3rdparty/libprocess/src/process.cpp:2158:35),
std::__1::reference_wrapper<const std::__1::atomic<bool> > >> + 14 at
__functional_base:415
frame #8: 0x00000001022c0f19
libmesos-0.26.0.dylib`::__thread_proxy<std::__1::tuple<std::__1::__bind<(lambda
at ../../../3rdparty/libprocess/src/process.cpp:2158:35),
std::__1::reference_wrapper<const std::__1::atomic<bool> > > > >() [inlined]
__thread_execute<std::__1::__bind<(lambda at
../../../3rdparty/libprocess/src/process.cpp:2158:35),
std::__1::reference_wrapper<const std::__1::atomic<bool> > >> + 25 at thread:337
frame #9: 0x00000001022c0f00
libmesos-0.26.0.dylib`::__thread_proxy<std::__1::tuple<std::__1::__bind<(lambda
at ../../../3rdparty/libprocess/src/process.cpp:2158:35),
std::__1::reference_wrapper<const std::__1::atomic<bool> > > > >() + 368 at
thread:347
frame #10: 0x00007fff964c705a libsystem_pthread.dylib`_pthread_body + 131
frame #11: 0x00007fff964c6fd7 libsystem_pthread.dylib`_pthread_start + 176
frame #12: 0x00007fff964c43ed libsystem_pthread.dylib`thread_start + 13
{code}
was:
If you pass a nonsense string for "master" into a framework using the HTTP
scheduler library, the framework segfaults.
For example, using the example frameworks:
{code}
build/src/test-framework --master="asdf://127.0.0.1:5050"
{code}
Results in:
{code}
Failed to create a master detector for 'asdf://127.0.0.1:5050': Failed to parse
'asdf://127.0.0.1:5050'
{code}
Using the HTTP API:
{code}
export DEFAULT_PRINCIPAL=root
build/src/event-call-framework --master="asdf://127.0.0.1:5050"
{code}
Results in
{code}
I1015 16:18:45.432075 2062201600 scheduler.cpp:157] Version: 0.26.0
Segmentation fault: 11
{code}
> HTTP scheduler library does not gracefully parse invalid resource identifiers
> -----------------------------------------------------------------------------
>
> Key: MESOS-3748
> URL: https://issues.apache.org/jira/browse/MESOS-3748
> Project: Mesos
> Issue Type: Bug
> Components: framework, HTTP API
> Affects Versions: 0.25.0
> Reporter: Joseph Wu
> Assignee: Joseph Wu
> Labels: mesosphere
>
> If you pass a nonsense string for "master" into a framework using the HTTP
> scheduler library, the framework segfaults.
> For example, using the example frameworks:
> {code:title=Scheduler Driver}
> build/src/test-framework --master="asdf://127.0.0.1:5050"
> {code}
> Results in:
> {code}
> Failed to create a master detector for 'asdf://127.0.0.1:5050': Failed to
> parse 'asdf://127.0.0.1:5050'
> {code}
> {code:title=HTTP Scheduler Library}
> export DEFAULT_PRINCIPAL=root
> build/src/event-call-framework --master="asdf://127.0.0.1:5050"
> {code}
> Results in
> {code}
> I1015 16:18:45.432075 2062201600 scheduler.cpp:157] Version: 0.26.0
> Segmentation fault: 11
> {code}
> {code:title=Stack Trace}
> * thread #2: tid = 0x28b6bb, 0x0000000100ad03ca
> libmesos-0.26.0.dylib`mesos::v1::scheduler::MesosProcess::initialize(this=0x00000001076031a0)
> + 42 at scheduler.cpp:213, stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
> * frame #0: 0x0000000100ad03ca
> libmesos-0.26.0.dylib`mesos::v1::scheduler::MesosProcess::initialize(this=0x00000001076031a0)
> + 42 at scheduler.cpp:213
> frame #1: 0x0000000100ad05f2 libmesos-0.26.0.dylib`virtual thunk to
> mesos::v1::scheduler::MesosProcess::initialize(this=0x00000001076031a0) + 34
> at scheduler.cpp:210
> frame #2: 0x00000001022b60f3 libmesos-0.26.0.dylib`::resume() + 931 at
> process.cpp:2449
> frame #3: 0x00000001022c131c libmesos-0.26.0.dylib`::operator()() + 268
> at process.cpp:2174
> frame #4: 0x00000001022c0fa2
> libmesos-0.26.0.dylib`::__thread_proxy<std::__1::tuple<std::__1::__bind<(lambda
> at ../../../3rdparty/libprocess/src/process.cpp:2158:35),
> std::__1::reference_wrapper<const std::__1::atomic<bool> > > > >() [inlined]
> __invoke<(lambda at ../../../3rdparty/libprocess/src/process.cpp:2158:35) &,
> const std::__1::atomic<bool> &> + 27 at __functional_base:415
> frame #5: 0x00000001022c0f87
> libmesos-0.26.0.dylib`::__thread_proxy<std::__1::tuple<std::__1::__bind<(lambda
> at ../../../3rdparty/libprocess/src/process.cpp:2158:35),
> std::__1::reference_wrapper<const std::__1::atomic<bool> > > > >() [inlined]
> __apply_functor<(lambda at
> ../../../3rdparty/libprocess/src/process.cpp:2158:35),
> std::__1::tuple<std::__1::reference_wrapper<const std::__1::atomic<bool> > >,
> 0, std::__1::tuple<> > + 55 at functional:2060
> frame #6: 0x00000001022c0f50
> libmesos-0.26.0.dylib`::__thread_proxy<std::__1::tuple<std::__1::__bind<(lambda
> at ../../../3rdparty/libprocess/src/process.cpp:2158:35),
> std::__1::reference_wrapper<const std::__1::atomic<bool> > > > >() [inlined]
> operator()<> + 41 at functional:2123
> frame #7: 0x00000001022c0f27
> libmesos-0.26.0.dylib`::__thread_proxy<std::__1::tuple<std::__1::__bind<(lambda
> at ../../../3rdparty/libprocess/src/process.cpp:2158:35),
> std::__1::reference_wrapper<const std::__1::atomic<bool> > > > >() [inlined]
> __invoke<std::__1::__bind<(lambda at
> ../../../3rdparty/libprocess/src/process.cpp:2158:35),
> std::__1::reference_wrapper<const std::__1::atomic<bool> > >> + 14 at
> __functional_base:415
> frame #8: 0x00000001022c0f19
> libmesos-0.26.0.dylib`::__thread_proxy<std::__1::tuple<std::__1::__bind<(lambda
> at ../../../3rdparty/libprocess/src/process.cpp:2158:35),
> std::__1::reference_wrapper<const std::__1::atomic<bool> > > > >() [inlined]
> __thread_execute<std::__1::__bind<(lambda at
> ../../../3rdparty/libprocess/src/process.cpp:2158:35),
> std::__1::reference_wrapper<const std::__1::atomic<bool> > >> + 25 at
> thread:337
> frame #9: 0x00000001022c0f00
> libmesos-0.26.0.dylib`::__thread_proxy<std::__1::tuple<std::__1::__bind<(lambda
> at ../../../3rdparty/libprocess/src/process.cpp:2158:35),
> std::__1::reference_wrapper<const std::__1::atomic<bool> > > > >() + 368 at
> thread:347
> frame #10: 0x00007fff964c705a libsystem_pthread.dylib`_pthread_body + 131
> frame #11: 0x00007fff964c6fd7 libsystem_pthread.dylib`_pthread_start + 176
> frame #12: 0x00007fff964c43ed libsystem_pthread.dylib`thread_start + 13
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)