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 [] malloc_usable_size+0x3f1
C [] malloc_set_state+0xe65
C [] cfree+0x89
C [] operator delete(void*)+0x21
C [] OpenHome::Srs<65536u>::~Srs()+0x3e
C [] OpenHome::Net::DviSessionUpnp::~DviSessionUpnp()+0x12c
C [] OpenHome::SocketTcpServer::~SocketTcpServer()+0x9a
C [] OpenHome::Net::DviServer::Server::~Server()+0x28
C [] OpenHome::Net::DviServer::SubnetListChanged()+0x1a6
C [] OpenHome::MemberTranslator<OpenHome::Net::DviServer, void (OpenHome::Net::DviServer::*)()>::Thunk(OpenHome::Functor const&)+0x1d
C [] OpenHome::NetworkAdapterList::DoRunCallbacks(std::map<unsigned int, OpenHome::Functor, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, OpenHome::Functor> > >&)+0x41
C [] OpenHome::NetworkAdapterList::RunCallbacks(std::map<unsigned int, OpenHome::Functor, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, OpenHome::Functor> > >&)+0x34
C [] OpenHome::NetworkAdapterList::NotifySubnetsChanged()+0x18
C [] OpenHome::NetworkAdapterChangeNotifier::UpdateSubnet::Update(OpenHome::INetworkA​dapterChangeNotifier&)+0x11
C [] OpenHome::NetworkAdapterChangeNotifier::Run()+0x6c
C [] OpenHome::Thread::EntryPoint(void*)+0x25
C [] threadEntrypoint+0x53
C [] __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: