Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Ethereal-users: [Ethereal-users] capture_sync.c:625 assert failure in 0.10.11

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Andrew Esh <Andrew_Esh@xxxxxxxxxxx>
Date: Thu, 23 Jun 2005 18:02:07 -0500
Ethereal 0.10.11 was seriously not working for me.

After pressing the stop button on the capture dialog, ethereal was
segfaulting on Linux 2.6.11. The error indicated an assert failure on
line 625 of capture_sync.c, which is this code:

    g_assert_not_reached();

I changed it to this:

    fprintf(stderr, "ASSERT FAILURE: Indicator was: '%c' 0x%02X\n",
indicator, indicator);

 and got this:


ASSERT FAILURE: Indicator was: 'r' 0x72
ASSERT FAILURE: Indicator was: 'c' 0x63
ASSERT FAILURE: Indicator was: 'h' 0x68
ASSERT FAILURE: Indicator was: '/' 0x2F
ASSERT FAILURE: Indicator was: 'r' 0x72
ASSERT FAILURE: Indicator was: 's' 0x73
ASSERT FAILURE: Indicator was: 'd' 0x64
ASSERT FAILURE: Indicator was: '4' 0x34
ASSERT FAILURE: Indicator was: 'a' 0x61
ASSERT FAILURE: Indicator was: 'c' 0x63
ASSERT FAILURE: Indicator was: 'i' 0x69
ASSERT FAILURE: Indicator was: 't' 0x74
ASSERT FAILURE: Indicator was: ':' 0x3A
ASSERT FAILURE: Indicator was: ' ' 0x20
ASSERT FAILURE: Indicator was: 'a' 0x61
ASSERT FAILURE: Indicator was: 'e' 0x65
ASSERT FAILURE: Indicator was: 't' 0x74
ASSERT FAILURE: Indicator was: '-' 0x2D
ASSERT FAILURE: Indicator was: 'e' 0x65
ASSERT FAILURE: Indicator was: ' ' 0x20
ASSERT FAILURE: Indicator was: 'e' 0x65
ASSERT FAILURE: Indicator was: 'd' 0x64
ASSERT FAILURE: Indicator was: 'y' 0x79
ASSERT FAILURE: Indicator was: 'd' 0x64
ASSERT FAILURE: Indicator was: 'e' 0x65
ASSERT FAILURE: Indicator was: ' ' 0x20
ASSERT FAILURE: Indicator was: 'y' 0x79
ASSERT FAILURE: Indicator was: '
' 0x0A

Ethereal did not crash without the assert. I did two captures, and both
Stop button pushes gave the exact same output.

These are the characters which should be handled by that switch
statment:

/*
 * Indications sent out on the sync pipe.
 */
#define SP_FILE	        'F'	    /* the name of the recently opened file
*/
#define SP_ERROR_MSG    'E'     /* error message */
#define SP_PACKET_COUNT 'P'     /* count of packets captured since last
message */
#define SP_DROPS        'D'	    /* count of packets dropped in capture
*/

Except for quit, which does not reach this code:

#define SP_QUIT         'Q'     /* capture quit message (from parent to
child) */

Let me know if there is more I can do. I have this bug pretty solidly
reproducible.

BTW: I'm the same Andrew Esh listed in the AUTHORS file. You can update
my email address there, if you like.

-- 
Andrew C. Esh           mail:Andrew_Esh[at]adaptec.com
Adaptec, Inc.
2905 Northwest Blvd., Suite 20
Plymouth, MN 55441-2644 USA      763-551-6418 (direct)