Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash in FrameBufferAllocator #2

Closed
ghost opened this issue May 6, 2016 · 3 comments
Closed

Crash in FrameBufferAllocator #2

ghost opened this issue May 6, 2016 · 3 comments

Comments

@ghost
Copy link

ghost commented May 6, 2016

[----------] 2 tests from ReactiveSocketTest
[ RUN      ] ReactiveSocketTest.RequestChannel
WARNING: Logging before InitGoogleLogging() is written to STDERR
I0506 16:37:32.444069 2101399552 LoggingMixin.h:44] ExecutorMixin(0x101a490f0, 2): subscribe(0x7fff5fbfde88)
I0506 16:37:32.444655 2101399552 LoggingMixin.h:44] MemoryMixin(0x101a490f0, 2): subscribe(0x7fff5fbfde88)
I0506 16:37:32.444663 2101399552 LoggingMixin.h:44] ChannelRequester(0x101a490f0, 2): subscribe(0x7fff5fbfde88)
I0506 16:37:32.444669 2101399552 LoggingMixin.h:44] ProducerMixin(0x101a490f0, 2): subscribe(0x7fff5fbfde88)
I0506 16:37:32.444672 2101399552 LoggingMixin.h:44] ConsumerMixin(0x101a490f0, 2): subscribe(0x7fff5fbfde88)
I0506 16:37:32.444705 2101399552 LoggingMixin.h:65] ExecutorMixin(0x101a490f0, 2): onSubscribe(0x7fff5fbfdc28)
I0506 16:37:32.444713 2101399552 LoggingMixin.h:65] MemoryMixin(0x101a490f0, 2): onSubscribe(0x7fff5fbfdc28)
I0506 16:37:32.444718 2101399552 LoggingMixin.h:65] ChannelRequester(0x101a490f0, 2): onSubscribe(0x7fff5fbfdc28)
I0506 16:37:32.444725 2101399552 LoggingMixin.h:65] ProducerMixin(0x101a490f0, 2): onSubscribe(0x7fff5fbfdc28)
I0506 16:37:32.444736 2101399552 LoggingMixin.h:70] ExecutorMixin(0x101a490f0, 2): onNext(<3>)
I0506 16:37:32.444748 2101399552 LoggingMixin.h:70] MemoryMixin(0x101a490f0, 2): onNext(<3>)
I0506 16:37:32.444754 2101399552 LoggingMixin.h:70] ChannelRequester(0x101a490f0, 2): onNext(<3>)
Process 53184 stopped
* thread #1: tid = 0x1211f92, 0x0000000101a0d080, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=2, address=0x101a0d080)
    frame #0: 0x0000000101a0d080
->  0x101a0d080: rcrb   $0x19, (%rdx)
    0x101a0d083: addb   %al, (%rcx)
    0x101a0d085: addb   %al, (%rax)
    0x101a0d087: addb   %al, (%rax)
(lldb) bt
* thread #1: tid = 0x1211f92, 0x0000000101a0d080, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=2, address=0x101a0d080)
  * frame #0: 0x0000000101a0d080
    frame #1: 0x0000000100098c98 ReactiveSocketTest`lithium::reactivesocket::FrameBufferAllocator::allocate(unsigned long) + 56
    frame #2: 0x0000000100099970 ReactiveSocketTest`lithium::reactivesocket::Frame_REQUEST_CHANNEL::serializeOut() + 64
    frame #3: 0x000000010008fb3d ReactiveSocketTest`void lithium::reactivesocket::ConnectionAutomaton::onNextFrame<lithium::reactivesocket::Frame_REQUEST_CHANNEL>(lithium::reactivesocket::Frame_REQUEST_CHANNEL&) + 61
    frame #4: 0x000000010008650f ReactiveSocketTest`lithium::reactivesocket::ChannelRequesterBase::onNext(std::__1::unique_ptr<folly::IOBuf, std::__1::default_delete<folly::IOBuf> >) + 1071
    frame #5: 0x00000001000b580e ReactiveSocketTest`lithium::reactivesocket::LoggingMixin<lithium::reactivesocket::ChannelRequesterBase>::onNext(std::__1::unique_ptr<folly::IOBuf, std::__1::default_delete<folly::IOBuf> >) + 590
    frame #6: 0x00000001000b53bf ReactiveSocketTest`lithium::reactivesocket::MemoryMixin<lithium::reactivesocket::LoggingMixin<lithium::reactivesocket::ChannelRequesterBase> >::onNext(std::__1::unique_ptr<folly::IOBuf, std::__1::default_d
elete<folly::IOBuf> >) + 303
    frame #7: 0x00000001000b504e ReactiveSocketTest`lithium::reactivesocket::LoggingMixin<lithium::reactivesocket::MemoryMixin<lithium::reactivesocket::LoggingMixin<lithium::reactivesocket::ChannelRequesterBase> > >::onNext(std::__1::uniq
ue_ptr<folly::IOBuf, std::__1::default_delete<folly::IOBuf> >) + 590
    frame #8: 0x00000001000b4c19 ReactiveSocketTest`lithium::reactivesocket::ExecutorMixin<lithium::reactivesocket::LoggingMixin<lithium::reactivesocket::MemoryMixin<lithium::reactivesocket::LoggingMixin<lithium::reactivesocket::ChannelRe
questerBase> > > >::onNext(std::__1::unique_ptr<folly::IOBuf, std::__1::default_delete<folly::IOBuf> >)::'lambda'()::operator()() + 345
    frame #9: 0x00000001000b4aad ReactiveSocketTest`void std::__1::__invoke_void_return_wrapper<void>::__call<lithium::reactivesocket::ExecutorMixin<lithium::reactivesocket::LoggingMixin<lithium::reactivesocket::MemoryMixin<lithium::react
ivesocket::LoggingMixin<lithium::reactivesocket::ChannelRequesterBase> > > >::onNext(std::__1::unique_ptr<folly::IOBuf, std::__1::default_delete<folly::IOBuf> >)::'lambda'()&>(lithium::reactivesocket::ExecutorMixin<lithium::reactivesocket
::LoggingMixin<lithium::reactivesocket::MemoryMixin<lithium::reactivesocket::LoggingMixin<lithium::reactivesocket::ChannelRequesterBase> > > >::onNext(std::__1::unique_ptr<folly::IOBuf, std::__1::default_delete<folly::IOBuf> >)::'lambda'(
)&&&) + 45
    frame #10: 0x00000001000b48f9 ReactiveSocketTest`std::__1::__function::__func<lithium::reactivesocket::ExecutorMixin<lithium::reactivesocket::LoggingMixin<lithium::reactivesocket::MemoryMixin<lithium::reactivesocket::LoggingMixin<lith
ium::reactivesocket::ChannelRequesterBase> > > >::onNext(std::__1::unique_ptr<folly::IOBuf, std::__1::default_delete<folly::IOBuf> >)::'lambda'(), std::__1::allocator<lithium::reactivesocket::ExecutorMixin<lithium::reactivesocket::Logging
Mixin<lithium::reactivesocket::MemoryMixin<lithium::reactivesocket::LoggingMixin<lithium::reactivesocket::ChannelRequesterBase> > > >::onNext(std::__1::unique_ptr<folly::IOBuf, std::__1::default_delete<folly::IOBuf> >)::'lambda'()>, void
()>::operator()() + 41
    frame #11: 0x0000000100332761 libfolly.48.dylib`folly::QueuedImmediateExecutor::addStatic(std::__1::function<void ()>) + 233
    frame #12: 0x00000001000b1f88 ReactiveSocketTest`void lithium::reactivesocket::ExecutorMixin<lithium::reactivesocket::LoggingMixin<lithium::reactivesocket::MemoryMixin<lithium::reactivesocket::LoggingMixin<lithium::reactivesocket::Cha
nnelRequesterBase> > > >::runInExecutor<lithium::reactivesocket::ExecutorMixin<lithium::reactivesocket::LoggingMixin<lithium::reactivesocket::MemoryMixin<lithium::reactivesocket::LoggingMixin<lithium::reactivesocket::ChannelRequesterBase>
 > > >::onNext(std::__1::unique_ptr<folly::IOBuf, std::__1::default_delete<folly::IOBuf> >)::'lambda'()>(lithium::reactivesocket::ExecutorMixin<lithium::reactivesocket::LoggingMixin<lithium::reactivesocket::MemoryMixin<lithium::reactiveso
cket::LoggingMixin<lithium::reactivesocket::ChannelRequesterBase> > > >::onNext(std::__1::unique_ptr<folly::IOBuf, std::__1::default_delete<folly::IOBuf> >)::'lambda'()&&) + 696
    frame #13: 0x00000001000b1c42 ReactiveSocketTest`lithium::reactivesocket::ExecutorMixin<lithium::reactivesocket::LoggingMixin<lithium::reactivesocket::MemoryMixin<lithium::reactivesocket::LoggingMixin<lithium::reactivesocket::ChannelR
equesterBase> > > >::onNext(std::__1::unique_ptr<folly::IOBuf, std::__1::default_delete<folly::IOBuf> >) + 82
    frame #14: 0x00000001000b19ce ReactiveSocketTest`lithium::reactivesocket::LoggingMixin<lithium::reactivesocket::ExecutorMixin<lithium::reactivesocket::LoggingMixin<lithium::reactivesocket::MemoryMixin<lithium::reactivesocket::LoggingM
ixin<lithium::reactivesocket::ChannelRequesterBase> > > > >::onNext(std::__1::unique_ptr<folly::IOBuf, std::__1::default_delete<folly::IOBuf> >) + 590
    frame #15: 0x00000001000ada8f ReactiveSocketTest`lithium::reactivesocket::SinkIfMixin<lithium::reactivesocket::StreamIfMixin<lithium::reactivesocket::LoggingMixin<lithium::reactivesocket::ExecutorMixin<lithium::reactivesocket::Logging
Mixin<lithium::reactivesocket::MemoryMixin<lithium::reactivesocket::LoggingMixin<lithium::reactivesocket::ChannelRequesterBase> > > > > > >::onNext(std::__1::unique_ptr<folly::IOBuf, std::__1::default_delete<folly::IOBuf> >) + 303
    frame #16: 0x0000000100072ea4 ReactiveSocketTest`ReactiveSocketTest_RequestChannel_Test::TestBody()::$_1::operator()(unsigned long) const + 132
    frame #17: 0x0000000100072e17 ReactiveSocketTest`void testing::internal::InvokeHelper<void, std::__1::tuple<unsigned long> >::Invoke<ReactiveSocketTest_RequestChannel_Test::TestBody()::$_1>(ReactiveSocketTest_RequestChannel_Test::Test
Body()::$_1, std::__1::tuple<unsigned long> const&) + 55
    frame #18: 0x0000000100072dd4 ReactiveSocketTest`void testing::internal::InvokeAction<ReactiveSocketTest_RequestChannel_Test::TestBody()::$_1>::Perform<void, std::__1::tuple<unsigned long> >(std::__1::tuple<unsigned long> const&) + 52
    frame #19: 0x0000000100072d6c ReactiveSocketTest`testing::PolymorphicAction<testing::internal::InvokeAction<ReactiveSocketTest_RequestChannel_Test::TestBody()::$_1> >::MonomorphicImpl<void (unsigned long)>::Perform(std::__1::tuple<uns
igned long> const&) + 44
    frame #20: 0x0000000100011b21 ReactiveSocketTest`testing::Action<void (unsigned long)>::Perform(std::__1::tuple<unsigned long> const&) const + 257
    frame #21: 0x0000000100011db9 ReactiveSocketTest`testing::internal::ActionResultHolder<void>* testing::internal::ActionResultHolder<void>::PerformAction<void (unsigned long)>(testing::Action<void (unsigned long)> const&, testing::inte
rnal::Function<void (unsigned long)>::ArgumentTuple const&) + 25
    frame #22: 0x0000000100010b7c ReactiveSocketTest`testing::internal::FunctionMockerBase<void (unsigned long)>::UntypedPerformAction(void const*, void const*) const + 60
    frame #23: 0x0000000100152d83 ReactiveSocketTest`testing::internal::UntypedFunctionMockerBase::UntypedInvokeWith(void const*) + 7315
    frame #24: 0x0000000100016ba9 ReactiveSocketTest`testing::internal::FunctionMockerBase<void (unsigned long)>::InvokeWith(std::__1::tuple<unsigned long> const&) + 25
    frame #25: 0x0000000100016b85 ReactiveSocketTest`testing::internal::FunctionMocker<void (unsigned long)>::Invoke(unsigned long) + 197
    frame #26: 0x0000000100022565 ReactiveSocketTest`lithium::reactivestreams::UnmanagedMockSubscription::request_(unsigned long) + 69
    frame #27: 0x0000000100006f2d ReactiveSocketTest`lithium::reactivestreams::UnmanagedMockSubscription::request(unsigned long) + 29
    frame #28: 0x00000001000860bb ReactiveSocketTest`lithium::reactivesocket::ChannelRequesterBase::onSubscribe(lithium::reactivestreams::Subscription&) + 251
    frame #29: 0x00000001000b1754 ReactiveSocketTest`lithium::reactivesocket::LoggingMixin<lithium::reactivesocket::ChannelRequesterBase>::onSubscribe(lithium::reactivestreams::Subscription&) + 196
    frame #30: 0x00000001000b1688 ReactiveSocketTest`lithium::reactivesocket::MemoryMixin<lithium::reactivesocket::LoggingMixin<lithium::reactivesocket::ChannelRequesterBase> >::onSubscribe(lithium::reactivestreams::Subscription&) + 56
    frame #31: 0x00000001000b1624 ReactiveSocketTest`lithium::reactivesocket::LoggingMixin<lithium::reactivesocket::MemoryMixin<lithium::reactivesocket::LoggingMixin<lithium::reactivesocket::ChannelRequesterBase> > >::onSubscribe(lithium:
:reactivestreams::Subscription&) + 196
    frame #32: 0x00000001000b1558 ReactiveSocketTest`lithium::reactivesocket::ExecutorMixin<lithium::reactivesocket::LoggingMixin<lithium::reactivesocket::MemoryMixin<lithium::reactivesocket::LoggingMixin<lithium::reactivesocket::ChannelR
equesterBase> > > >::onSubscribe(lithium::reactivestreams::Subscription&) + 40
    frame #33: 0x00000001000b1504 ReactiveSocketTest`lithium::reactivesocket::LoggingMixin<lithium::reactivesocket::ExecutorMixin<lithium::reactivesocket::LoggingMixin<lithium::reactivesocket::MemoryMixin<lithium::reactivesocket::LoggingM
ixin<lithium::reactivesocket::ChannelRequesterBase> > > > >::onSubscribe(lithium::reactivestreams::Subscription&) + 196
    frame #34: 0x00000001000ad958 ReactiveSocketTest`lithium::reactivesocket::SinkIfMixin<lithium::reactivesocket::StreamIfMixin<lithium::reactivesocket::LoggingMixin<lithium::reactivesocket::ExecutorMixin<lithium::reactivesocket::Logging
Mixin<lithium::reactivesocket::MemoryMixin<lithium::reactivesocket::LoggingMixin<lithium::reactivesocket::ChannelRequesterBase> > > > > > >::onSubscribe(lithium::reactivestreams::Subscription&) + 40
    frame #35: 0x000000010006d24e ReactiveSocketTest`ReactiveSocketTest_RequestChannel_Test::TestBody() + 8222
    frame #36: 0x0000000100144baa ReactiveSocketTest`testing::Test* testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::TestFactoryBase, testing::Test*>(testing::internal::TestFactoryBase*, testing::Test* (testing
::internal::TestFactoryBase::*)(), char const*) + 122
    frame #37: 0x000000010012ebb7 ReactiveSocketTest`void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) + 119
    frame #38: 0x00000001000fd2a5 ReactiveSocketTest`testing::Test::Run() + 197
    frame #39: 0x00000001000fe978 ReactiveSocketTest`testing::TestInfo::Run() + 216
    frame #40: 0x00000001000ff607 ReactiveSocketTest`testing::TestCase::Run() + 231
    frame #41: 0x000000010010df0c ReactiveSocketTest`testing::internal::UnitTestImpl::RunAllTests() + 908
    frame #42: 0x0000000100145aea ReactiveSocketTest`bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char
 const*) + 122
    frame #43: 0x0000000100130ba7 ReactiveSocketTest`bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char co
nst*) + 119
    frame #44: 0x000000010010db28 ReactiveSocketTest`testing::UnitTest::Run() + 408
    frame #45: 0x0000000100165421 ReactiveSocketTest`RUN_ALL_TESTS() + 17
    frame #46: 0x0000000100165405 ReactiveSocketTest`main + 69
    frame #47: 0x00007fff923295ad libdyld.dylib`start + 1
@ghost ghost self-assigned this May 12, 2016
@ghost
Copy link
Author

ghost commented May 12, 2016

Surprisingly, it's FrameBufferAllocatorTest, that's leaving Singleton in an invalid state... The next test in the same run crashes miserably with bus error.

@lehecka
Copy link
Contributor

lehecka commented May 12, 2016

I was able to figure this problem out in fbsource, but it looks like it happens again with the GH folly. I suggest that we disable the test for now and also disable the singleton and open an issue for that. I can separately work on this later on. This should unblock us in getting the code to compile.

@ghost
Copy link
Author

ghost commented May 12, 2016

Misuse of make_mock in frame serialisation tests. Details can be found on the PR.

benjchristensen pushed a commit that referenced this issue May 17, 2017
It has never worked for the yarpl tests, so I'm confused as to why it was
enabled.  Here's what I get 100% of the time when running yarpl/yarpl-tests:

$ ./yarpl/yarpl-tests
[==========] Running 51 tests from 7 test cases.
[----------] Global test environment set-up.
[----------] 17 tests from Observable
[ RUN      ] Observable.SingleOnNext
[       OK ] Observable.SingleOnNext (98 ms)
[ RUN      ] Observable.MultiOnNext
[       OK ] Observable.MultiOnNext (0 ms)
[ RUN      ] Observable.OnError
[       OK ] Observable.OnError (0 ms)
ASAN:DEADLYSIGNAL
=================================================================
==69355==ERROR: AddressSanitizer: SEGV on unknown address 0x61100007f740 (pc 0x000100b2c207 bp 0x7fff5f4fe260 sp 0x7fff5f4fe230 T0)
    #0 0x100b2c206 in testing::TestCase::GetMutableTestInfo(int) (yarpl-tests:x86_64+0x10042b206)
    #1 0x100b2c57e in testing::TestCase::Run() (yarpl-tests:x86_64+0x10042b57e)
    #2 0x100b3ab5b in testing::internal::UnitTestImpl::RunAllTests() (yarpl-tests:x86_64+0x100439b5b)
    #3 0x100b6a5f9 in bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) (yarpl-tests:x86_64+0x1004695f9)
    #4 0x100b3a566 in bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) (yarpl-tests:x86_64+0x100439566)
    #5 0x100b3a417 in testing::UnitTest::Run() (yarpl-tests:x86_64+0x100439417)
    #6 0x10070344e in RUN_ALL_TESTS() (yarpl-tests:x86_64+0x10000244e)
    #7 0x10070321f in main (yarpl-tests:x86_64+0x10000221f)
    #8 0x7fffc67b8234 in start (libdyld.dylib:x86_64+0x5234)

==69355==Register values:
rax = 0x00006110000098c0  rbx = 0x00007fff5f4fe840  rcx = 0x000000000000ebd0  rdx = 0x000000000000ebd0
rdi = 0x000061200000b000  rsi = 0x0000000000000012  rbp = 0x00007fff5f4fe260  rsp = 0x00007fff5f4fe230
 r8 = 0x0000000000000000   r9 = 0x000000010298b760  r10 = 0x0000000000000000  r11 = 0x0000000000012068
r12 = 0x0000000000000000  r13 = 0x0000000000000000  r14 = 0x0000000000000000  r15 = 0x0000000000000000
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (yarpl-tests:x86_64+0x10042b206) in testing::TestCase::GetMutableTestInfo(int)
==69355==ABORTING
[1]    69355 abort      ./yarpl/yarpl-tests
facebook-github-bot pushed a commit that referenced this issue Apr 10, 2019
…t (attempt #2)

Summary:
The file descriptor API here needs to go away, so switch this API to NetworkSocket

It is expected that this commit will cause a number of Open Source projects to temporarily show up as broken. This is due to the fact that not all projects get synced to Github at the exact same time, so the builds may temporarily be fetching an older version of it's dependencies than it needs to :) It should fix itself quickly.

Reviewed By: yfeldblum

Differential Revision: D14673328

fbshipit-source-id: c5842fa5dc383d50043e0d8228e35d03b10a1c6b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant