Deleted trace message still accessed in generated trace message write call
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Juniper Openstack | Status tracked in Trunk | |||||
R3.1 |
Won't Fix
|
High
|
Megh Bhatt | |||
Trunk |
Fix Committed
|
High
|
Megh Bhatt |
Bug Description
As seen in the following trace, after the raceBuffer<
We should write message to the buffer as the last operation and do not touch the message afterwards..
diff --git a/compiler/
index 2c656b5..6b526cb 100755
--- a/compiler/
+++ b/compiler/
@@ -4430,9 +4430,9 @@ void t_cpp_generator
";" << endl;
out << indent() << creator_name << "->set_
- out << indent() << "uint32_t seqnum = trace_buf-
out << indent() << creator_name << "->set_
out << indent() << "if ((IsLocalLoggin
+ out << indent() << "uint32_t seqnum = trace_buf-
indent_down();
out << indent() << "}" <<endl;
indent_down();
==26776== Invalid write of size 4
==26776== at 0x5B016C: set_seqnum (sandesh.h:491)
==26776== by 0x5B016C: RprReplicate:
==26776== by 0x614E03: RoutePathReplic
==26776== by 0xC9D959: operator() (function_
==26776== by 0xC9D959: RunNotify (db_table.cc:115)
==26776== by 0xC9D959: DBTableBase:
==26776== by 0xC9FF37: DBTablePartBase
==26776== by 0xC9BDAD: DBPartition:
==26776== by 0x6AD0DE: TaskImpl::execute() (task.cc:262)
==26776== by 0x670EB39: ??? (in /usr/lib/
==26776== by 0x670A815: ??? (in /usr/lib/
==26776== by 0x6709F4A: ??? (in /usr/lib/
==26776== by 0x67060FE: ??? (in /usr/lib/
==26776== by 0x67062F8: ??? (in /usr/lib/
==26776== by 0x64D8183: start_thread (pthread_
==26776== by 0x744437C: clone (clone.S:111)
==26776== Address 0x1d461b18 is 72 bytes inside a block of size 152 free'd
==26776== at 0x4C2C2BC: operator delete(void*) (in /usr/lib/
==26776== by 0x5CF3E9: RprReplicate:
==26776== by 0x574ADF: checked_
==26776== by 0x574ADF: delete_
==26776== by 0x574ADF: deallocate_
==26776== by 0x574ADF: deallocate_clone (reversible_
==26776== by 0x574ADF: operator(
==26776== by 0x574ADF: ~static_move_ptr (static_
==26776== by 0x574ADF: push_back (ptr_circular_
==26776== by 0x574ADF: TraceBuffer<
==26776== by 0x5B0164: RprReplicate:
==26776== by 0x614E03: RoutePathReplic
==26776== by 0xC9D959: operator() (function_
==26776== by 0xC9D959: RunNotify (db_table.cc:115)
==26776== by 0xC9D959: DBTableBase:
==26776== by 0xC9FF37: DBTablePartBase
==26776== by 0xC9BDAD: DBPartition:
==26776== by 0x6AD0DE: TaskImpl::execute() (task.cc:262)
==26776== by 0x670EB39: ??? (in /usr/lib/
==26776== by 0x670A815: ??? (in /usr/lib/
==26776== by 0x6709F4A: ??? (in /usr/lib/
==26776== by 0x67060FE: ??? (in /usr/lib/
==26776== by 0x67062F8: ??? (in /usr/lib/
==26776== by 0x64D8183: start_thread (pthread_
==26776== by 0x744437C: clone (clone.S:111)
==26776==
tags: | added: blocker llgr |
tags: | removed: blocker |
tags: | added: contrail-control |
Changed in juniperopenstack: | |
milestone: | none → r3.2.0.0-fcs |
importance: | Undecided → High |
tags: | added: analytics |
Review in progress for https:/ /review. opencontrail. org/22594
Submitter: Megh Bhatt (<email address hidden>)