Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Crash in DviSessionUpnp::~DviSessionUpnp()
07-10-2012, 10:07 PM
Post: #1
Crash in DviSessionUpnp::~DviSessionUpnp()
A user has reported an ohNet crash shortly after rebooting his NAS. The NAS reboot starts MinimServer automatically, and MinimServer creates an ohNet device stack. Shortly after this, there's a crash in ohNet with the following stack trace:

Stack: [0xe0ab5000,0xe0b35000], sp=0xe0b34068, free space=508k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [libc.so.6+0x661a1] malloc_usable_size+0x3f1
C [libc.so.6+0x67b75] malloc_set_state+0xe65
C [libc.so.6+0x67de9] cfree+0x89
C [libstdc++.so.6+0xb7d81] operator delete(void*)+0x21
C [libohNet.so+0x5c70e] OpenHome::Srs<65536u>::~Srs()+0x3e
C [libohNet.so+0x5b8dc] OpenHome::Net::DviSessionUpnp::~DviSessionUpnp()+0x12c
C [libohNet.so+0xa216a] OpenHome::SocketTcpServer::~SocketTcpServer()+0x9a
C [libohNet.so+0x53a58] OpenHome::Net::DviServer::Server::~Server()+0x28
C [libohNet.so+0x541d6] OpenHome::Net::DviServer::SubnetListChanged()+0x1a6
C [libohNet.so+0x543fd] OpenHome::MemberTranslator<OpenHome::Net::DviServer, void (OpenHome::Net::DviServer::*)()>::Thunk(OpenHome::Functor const&)+0x1d
C [libohNet.so+0x9a711] OpenHome::NetworkAdapterList::DoRunCallbacks(std::map<unsigned int, OpenHome::Functor, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, OpenHome::Functor> > >&)+0x41
C [libohNet.so+0x9a784] OpenHome::NetworkAdapterList::RunCallbacks(std::map<unsigned int, OpenHome::Functor, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, OpenHome::Functor> > >&)+0x34
C [libohNet.so+0x9a898] OpenHome::NetworkAdapterList::NotifySubnetsChanged()+0x18
C [libohNet.so+0x99b31] OpenHome::NetworkAdapterChangeNotifier::UpdateSubnet::Update(OpenHome::INetworkA​dapterChangeNotifier&)+0x11
C [libohNet.so+0x9b20c] OpenHome::NetworkAdapterChangeNotifier::Run()+0x6c
C [libohNet.so+0xb5e05] OpenHome::Thread::EntryPoint(void*)+0x25
C [libohNet.so+0xc2ad3] threadEntrypoint+0x53
C [libpthread.so.0+0x4fba] __pthread_initialize_minimal+0xbba

The failure (highlighted in red) seems to be in the

delete iReadBuffer;

call on line 512 of DviServerUpnp.cpp. This was triggered higher up the stack by the

delete server;

call on line 98 of DviServer.cpp (highlighted in blue).

The NAS on which the failure occurred has a dual Ethernet socket that was configured in failover mode, which means the ports are bonded together by the NAS with a single externally visible MAC address. Both ports were connected to the same switch.

The crash doesn't occur on every reboot, but it happens reasonably often. I asked the user to see if he could reproduce it with only a single Ethernet port connected. This produced a different error:

ERROR: Recursive lock attempted on mutex DSUM from thread NACN
Assertion failed. OpenHome/Thread.cpp:89

with no accompanying stack trace. I'm creating a separate thread to discuss why this assertion failure doesn't produce a stack trace on a Linux NAS.
Find all posts by this user


Messages In This Thread
Crash in DviSessionUpnp::~DviSessionUpnp() - simoncn - 07-10-2012 10:07 PM

Forum Jump: