[ENet-discuss] freeing bug causing crash in enet_protocol_remove_sent_reliable_command

David Frampton davidframpton at majicjungle.com
Mon Jun 10 22:28:28 PDT 2013


This is the report, the line numbers don't seem to quite match up with reality. 

Looking at it again, I guess you're right, the fix doesn't fix anything, as it's not trying to free a nil pointer.

Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000

Application Specific Information:
*** error for object 0x7f9ba3021b10: pointer being freed was not allocated
 

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        	0x00007fff8f00239a __semwait_signal_nocancel + 10
1   libsystem_c.dylib             	0x00007fff8de84e1b nanosleep$NOCANCEL + 138
2   libsystem_c.dylib             	0x00007fff8dee89a8 usleep$NOCANCEL + 54
3   libsystem_c.dylib             	0x00007fff8ded4dfa abort + 187
4   libsystem_c.dylib             	0x00007fff8dea89b9 free + 392
5   com.majicjungle.BlockheadsServer	0x000000010c529f38 enet_peer_reset_outgoing_commands (peer.c:252)
6   com.majicjungle.BlockheadsServer	0x000000010c529e7b enet_peer_reset_queues (peer.c:318)
7   com.majicjungle.BlockheadsServer	0x000000010c52b065 enet_protocol_send_outgoing_commands (protocol.c:1433)
8   com.majicjungle.BlockheadsServer	0x000000010c52b528 enet_host_service (protocol.c:1825)



On 11/06/2013, at 2:25 PM, ketmar <ketmar at ketmar.no-ip.org> wrote:

> On Tue, 11 Jun 2013 13:18:38 +1200
> David Frampton <davidframpton at majicjungle.com> wrote:
> 
>> I'm seeing a crash on an enet server very occasionally when clients
>> are disconnected. I think it's triggered at enet_free
>> (outgoingCommand); from within enet_peer_reset_outgoing_commands
>> (ENetList * queue). It appears that there isn't always a valid
>> outgoingCommand to free.
> do you have debugger logs (say, for example, output of 'bt' gdb
> command) or small sample to show the problem?
> 
>> I googled the problem and saw someone else
>> had the same issue and offered a fix here:
>> http://cubeengine.com/forum.php4?action=display_thread&thread_id=1890&start=891
> it's not a fix, it's a failure of analysis tool.
> _______________________________________________
> ENet-discuss mailing list
> ENet-discuss at cubik.org
> http://lists.cubik.org/mailman/listinfo/enet-discuss

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cubik.org/pipermail/enet-discuss/attachments/20130611/9cb22adc/attachment.html>


More information about the ENet-discuss mailing list