WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] Xentrace: Avoid Crash on Debug Build Xen

To: Mark Williamson <mark.williamson@xxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] Xentrace: Avoid Crash on Debug Build Xen
From: Yosuke Iwamatsu <y-iwamatsu@xxxxxxxxxxxxx>
Date: Tue, 09 Oct 2007 10:47:30 +0900
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 08 Oct 2007 18:46:05 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <200710051721.06604.mark.williamson@xxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <47059954.8010009@xxxxxxxxxxxxx> <200710051721.06604.mark.williamson@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.6 (Windows/20070728)
Mark Williamson wrote:
         }
         total_size += LOST_REC_SIZE;
     }
-
-    ASSERT(bytes_to_wrap == calc_bytes_to_wrap(buf));
if ( rec_size > bytes_to_wrap )
     {
@@ -484,8 +482,6 @@ void __trace_var(u32 event, int cycles, insert_lost_records(buf);
     }
- ASSERT(bytes_to_wrap == calc_bytes_to_wrap(buf));
-

Current xen-unstable (debug build) crashes when using xentrace command,
due to assertion failures. It seems assertion failures occur whenever
there exist lost records, and I don't see much reason to do this.
(Could anyone explain about these ASSERT lines ?)

These asserts appear to have originally been checking that bytes_to_wrap is being calculated correctly... It looks to me that the first assert isoutdated though, because it clearly will fail if a record is lost.

Perhaps the second one ought to succed though, since the value of buf->prod will have been appropriately updated by insert_lost_records()?

Indeed the second assert seems to always succeed.


Cheers,
Mark

The attached patch removes assertions to avoid system crashes,
and also fixes a mistake of an assignment statement.

Regards,
-------------------
Yosuke Iwamatsu
        NEC Corporation






_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>