Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
* [ltt-dev] Assertion failure
@ 2010-11-30 19:15 Klein, Russell
  2010-11-30 19:15 ` Klein, Russell
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Klein, Russell @ 2010-11-30 19:15 UTC (permalink / raw)


I am trying to collect some user space traces using ust version 0.6, and
I am getting the following assertion failure after it runs for a while:

 

<app-name>:  buffers.h:525: ust_buffers_write: Assertion `buf_offset +
len < buf->chan->subbuf_cnt' failed.

Aborted

 

Any ideas on what might be the cause of this or how to avoid it?

 

Thanks, Russ Klein

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.casi.polymtl.ca/pipermail/lttng-dev/attachments/20101130/339e79b0/attachment-0003.htm>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [ltt-dev] Assertion failure
  2010-11-30 19:15 [ltt-dev] Assertion failure Klein, Russell
@ 2010-11-30 19:15 ` Klein, Russell
  2010-11-30 19:15 ` Klein, Russell
  2010-11-30 19:30 ` Mathieu Desnoyers
  2 siblings, 0 replies; 6+ messages in thread
From: Klein, Russell @ 2010-11-30 19:15 UTC (permalink / raw)


I am trying to collect some user space traces using ust version 0.6, and
I am getting the following assertion failure after it runs for a while:

 

<app-name>:  buffers.h:525: ust_buffers_write: Assertion `buf_offset +
len < buf->chan->subbuf_cnt' failed.

Aborted

 

Any ideas on what might be the cause of this or how to avoid it?

 

Thanks, Russ Klein

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.casi.polymtl.ca/pipermail/ltt-dev/attachments/20101130/339e79b0/attachment.htm>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [ltt-dev] Assertion failure
  2010-11-30 19:15 [ltt-dev] Assertion failure Klein, Russell
  2010-11-30 19:15 ` Klein, Russell
@ 2010-11-30 19:15 ` Klein, Russell
  2010-11-30 19:30 ` Mathieu Desnoyers
  2 siblings, 0 replies; 6+ messages in thread
From: Klein, Russell @ 2010-11-30 19:15 UTC (permalink / raw)


I am trying to collect some user space traces using ust version 0.6, and
I am getting the following assertion failure after it runs for a while:

 

<app-name>:  buffers.h:525: ust_buffers_write: Assertion `buf_offset +
len < buf->chan->subbuf_cnt' failed.

Aborted

 

Any ideas on what might be the cause of this or how to avoid it?

 

Thanks, Russ Klein

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.casi.polymtl.ca/pipermail/lttng-dev/attachments/20101130/339e79b0/attachment-0002.htm>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [ltt-dev] Assertion failure
  2010-11-30 19:15 [ltt-dev] Assertion failure Klein, Russell
  2010-11-30 19:15 ` Klein, Russell
  2010-11-30 19:15 ` Klein, Russell
@ 2010-11-30 19:30 ` Mathieu Desnoyers
  2010-11-30 19:33   ` Klein, Russell
  2 siblings, 1 reply; 6+ messages in thread
From: Mathieu Desnoyers @ 2010-11-30 19:30 UTC (permalink / raw)


* Klein, Russell (russell_klein at mentor.com) wrote:
> I am trying to collect some user space traces using ust version 0.6, and
> I am getting the following assertion failure after it runs for a while:
> 
>  
> 
> <app-name>:  buffers.h:525: ust_buffers_write: Assertion `buf_offset +
> len < buf->chan->subbuf_cnt' failed.

This rings a bell, and I think it has been fixed in UST versions after
0.6. Can you try to reproduce it with a newer UST release ?

Thanks,

Mathieu

> 
> Aborted
> 
>  
> 
> Any ideas on what might be the cause of this or how to avoid it?
> 
>  
> 
> Thanks, Russ Klein
> 

> _______________________________________________
> ltt-dev mailing list
> ltt-dev at lists.casi.polymtl.ca
> http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev


-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com




^ permalink raw reply	[flat|nested] 6+ messages in thread

* [ltt-dev] Assertion failure
  2010-11-30 19:30 ` Mathieu Desnoyers
@ 2010-11-30 19:33   ` Klein, Russell
  2010-11-30 20:25     ` Mathieu Desnoyers
  0 siblings, 1 reply; 6+ messages in thread
From: Klein, Russell @ 2010-11-30 19:33 UTC (permalink / raw)


Mathieu,

Unfortunately not, this is the highest revision which is supported by
the linux I am running.  I am willing to backport a fix if you can point
me in the general direction.

Thanks, Russ

-----Original Message-----
From: Mathieu Desnoyers [mailto:compudj@krystal.dyndns.org] 
Sent: Tuesday, November 30, 2010 11:31 AM
To: Klein, Russell
Cc: ltt-dev at lists.casi.polymtl.ca
Subject: Re: [ltt-dev] Assertion failure

* Klein, Russell (russell_klein at mentor.com) wrote:
> I am trying to collect some user space traces using ust version 0.6,
and
> I am getting the following assertion failure after it runs for a
while:
> 
>  
> 
> <app-name>:  buffers.h:525: ust_buffers_write: Assertion `buf_offset +
> len < buf->chan->subbuf_cnt' failed.

This rings a bell, and I think it has been fixed in UST versions after
0.6. Can you try to reproduce it with a newer UST release ?

Thanks,

Mathieu

> 
> Aborted
> 
>  
> 
> Any ideas on what might be the cause of this or how to avoid it?
> 
>  
> 
> Thanks, Russ Klein
> 

> _______________________________________________
> ltt-dev mailing list
> ltt-dev at lists.casi.polymtl.ca
> http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev


-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [ltt-dev] Assertion failure
  2010-11-30 19:33   ` Klein, Russell
@ 2010-11-30 20:25     ` Mathieu Desnoyers
  0 siblings, 0 replies; 6+ messages in thread
From: Mathieu Desnoyers @ 2010-11-30 20:25 UTC (permalink / raw)


* Klein, Russell (russell_klein at mentor.com) wrote:
> Mathieu,
> 
> Unfortunately not, this is the highest revision which is supported by
> the linux I am running.  I am willing to backport a fix if you can point
> me in the general direction.

See the following commit in the git tree:


commit 578e232ab4e234294d03fb7022863b45c801eaa1
Author: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
Date:   Tue Aug 17 18:23:21 2010 -0400

    UST strncpy assert fix
    
    fix off by one in strncpy and write asserts(). Shows only when the event
    reserved fits the exact end of buffer.
    
    Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>

diff --git a/libust/buffers.h b/libust/buffers.h
index 63449d6..9fedc48 100644
--- a/libust/buffers.h
+++ b/libust/buffers.h
@@ -522,7 +522,8 @@ static __inline__ int ust_buffers_write(struct ust_buffer *buf, size_t offset,
 	size_t buf_offset = BUFFER_OFFSET(offset, buf->chan);
 
 	assert(buf_offset < buf->chan->subbuf_size*buf->chan->subbuf_cnt);
-	assert(buf_offset + len < buf->chan->subbuf_size*buf->chan->subbuf_cnt);
+	assert(buf_offset + len
+	       <= buf->chan->subbuf_size*buf->chan->subbuf_cnt);
 
 	ust_buffers_do_copy(buf->buf_data + buf_offset, src, len);
 
@@ -590,7 +591,8 @@ int ust_buffers_strncpy(struct ust_buffer *buf, size_t offset, const void *src,
 	int terminated;
 
 	assert(buf_offset < buf->chan->subbuf_size*buf->chan->subbuf_cnt);
-	assert(buf_offset + len < buf->chan->subbuf_size*buf->chan->subbuf_cnt);
+	assert(buf_offset + len
+	       <= buf->chan->subbuf_size*buf->chan->subbuf_cnt);
 
 	copied = ust_buffers_do_strncpy(buf->buf_data + buf_offset,
 				        src, len, &terminated);

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-11-30 20:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-30 19:15 [ltt-dev] Assertion failure Klein, Russell
2010-11-30 19:15 ` Klein, Russell
2010-11-30 19:15 ` Klein, Russell
2010-11-30 19:30 ` Mathieu Desnoyers
2010-11-30 19:33   ` Klein, Russell
2010-11-30 20:25     ` Mathieu Desnoyers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox