<div dir="ltr">This seems to imply a thread resource contention of some sort...  but I'm hoping there is a resolution to this? <div><br></div><div>And what is causing the issue?  That would be the question.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 11, 2017 at 12:05 AM, John Baugh <span dir="ltr"><<a href="mailto:jpbaugh@umich.edu" target="_blank">jpbaugh@umich.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Ashlesh, Spyridon, and ndnSIM friends,<br><br></div>As requested, the gdb output:<br><br>jpbaugh@Janeway:~/ndnSIM/my-<wbr>simulations$ gdb --args ./build/jpb-pop1<br>GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.04) 7.11.1<br>Copyright (C) 2016 Free Software Foundation, Inc.<br>License GPLv3+: GNU GPL version 3 or later <<a href="http://gnu.org/licenses/gpl.html" target="_blank">http://gnu.org/licenses/gpl.<wbr>html</a>><br>This is free software: you are free to change and redistribute it.<br>There is NO WARRANTY, to the extent permitted by law.  Type "show copying"<br>and "show warranty" for details.<br>This GDB was configured as "x86_64-linux-gnu".<br>Type "show configuration" for configuration details.<br>For bug reporting instructions, please see:<br><<a href="http://www.gnu.org/software/gdb/bugs/" target="_blank">http://www.gnu.org/software/<wbr>gdb/bugs/</a>>.<br>Find the GDB manual and other documentation resources online at:<br><<a href="http://www.gnu.org/software/gdb/documentation/" target="_blank">http://www.gnu.org/software/<wbr>gdb/documentation/</a>>.<br>For help, type "help".<br>Type "apropos word" to search for commands related to "word"...<br>Reading symbols from ./build/jpb-pop1...done.<br>(gdb) run<br>Starting program: /home/jpbaugh/ndnSIM/my-<wbr>simulations/build/jpb-pop1 <br>[Thread debugging using libthread_db enabled]<br>Using host libthread_db library "/lib/x86_64-linux-gnu/<wbr>libthread_db.so.1".<br>Inside ctor for PStrat<br>Inside ctor for PStrat<br>Inside ctor for PStrat<br>Inside ctor for PStrat<br>In jpb-pop1 main: 0x7fffffffd6a0<br>About to get forwarder<br>Just got forwarder.  About to get strategy choice<br>Just got strategy choice, about to get effectiveStrategy<br>Just got effective strategy, about to set popularity manager for it.<br>About to set Popularity Manager inside PStrat<br>Before assignment line<br><br><b>Program received signal SIGSEGV, Segmentation fault.<br>std::_Sp_counted_base<(__gnu_<wbr>cxx::_Lock_policy)2>::_M_<wbr>release (this=0x2710)<br>    at /usr/include/c++/5/bits/<wbr>shared_ptr_base.h:147<br>147        if (__gnu_cxx::__exchange_and_<wbr>add_dispatch(&_M_use_count, -1) == 1)<br>(gdb) </b><br><br><br><br><br></div>Thanks,<br><br></div>John<br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 10, 2017 at 8:53 PM, Spyridon (Spyros) Mastorakis <span dir="ltr"><<a href="mailto:mastorakis@cs.ucla.edu" target="_blank">mastorakis@cs.ucla.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hi John,<div><br></div><div>as Ashlesh mentioned, please post a gdb backtrace, so that we can take a look.</div><div><br></div><div>Thanks,</div><div><br><div>
<div><div><div><span style="float:none;display:inline!important">Spyridon (Spyros) Mastorakis</span><br><span style="float:none;display:inline!important">Personal Website: </span><a href="http://cs.ucla.edu/~mastorakis/" target="_blank">http://cs.ucla.edu/~m<wbr>astorakis/</a><br><span style="float:none;display:inline!important">Internet Research Laboratory</span><br><span style="float:none;display:inline!important">Computer Science Department</span><br><span style="float:none;display:inline!important">UCLA</span></div><div><br></div></div></div></div><div><div class="m_-5450563725815257563h5"><div><blockquote type="cite"><div>On Apr 10, 2017, at 1:20 PM, Ashlesh Gawande (agawande) <<a href="mailto:agawande@memphis.edu" target="_blank">agawande@memphis.edu</a>> wrote:</div><br class="m_-5450563725815257563m_4018368460607547747Apple-interchange-newline"><div><div id="m_-5450563725815257563m_4018368460607547747divtagdefaultwrapper" dir="ltr" style="font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:12pt;font-family:Calibri,Arial,Helvetica,sans-serif"><div style="margin-top:0px;margin-bottom:0px">Perhaps you can post the gdb backtrace so that other people can take a look.</div><div style="margin-top:0px;margin-bottom:0px"><br></div><div style="margin-top:0px;margin-bottom:0px">Ashlesh</div></div><hr style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;display:inline-block;width:776.15625px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important"></span><div id="m_-5450563725815257563m_4018368460607547747divRplyFwdMsg" dir="ltr" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><font style="font-size:11pt" face="Calibri, sans-serif"><b>From:</b><span class="m_-5450563725815257563m_4018368460607547747Apple-converted-space"> </span>ndnSIM <<a href="mailto:ndnsim-bounces@lists.cs.ucla.edu" target="_blank">ndnsim-bounces@lists.cs.ucla.<wbr>edu</a>> on behalf of John Baugh <<a href="mailto:jpbaugh@umich.edu" target="_blank">jpbaugh@umich.edu</a>><br><b>Sent:</b><span class="m_-5450563725815257563m_4018368460607547747Apple-converted-space"> </span>Monday, April 10, 2017 2:55:10 PM<br><b>To:</b><span class="m_-5450563725815257563m_4018368460607547747Apple-converted-space"> </span>ndnsim<br><b>Subject:</b><span class="m_-5450563725815257563m_4018368460607547747Apple-converted-space"> </span>Re: [ndnSIM] SIGSEGV when simply assigning one smart pointer to another?</font><div> </div></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div dir="auto">I think maybe I'm mailing the list when no one is awake :)<div dir="auto"><br></div><div dir="auto">If anyone has any ideas, I'd be very interested in hearing them.  This is a true Heisenbug</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Apr 9, 2017 11:36 PM, "John Baugh" <<a href="mailto:jpbaugh@umich.edu" target="_blank">jpbaugh@umich.edu</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><span style="font-family:sans-serif;font-size:13.696px">Greetings all,</span><div dir="auto" style="font-family:sans-serif;font-size:13.696px"><br></div><div dir="auto" style="font-family:sans-serif;font-size:13.696px">I posted this question before but received no responses, so I figured I'd give it another shot.</div><div dir="auto" style="font-family:sans-serif;font-size:13.696px"><br></div><div dir="auto" style="font-family:sans-serif;font-size:13.696px">I've updated my Github repository with the updated code:</div><div dir="auto" style="font-family:sans-serif;font-size:13.696px"><span style="color:rgb(88,96,105);font-family:-apple-system,blinkmacsystemfont,'segoe ui',helvetica,arial,sans-serif,'apple color emoji','segoe ui emoji','segoe ui symbol';font-size:18px">profjpbaugh</span><span style="color:rgb(88,96,105);font-family:-apple-system,blinkmacsystemfont,'segoe ui',helvetica,arial,sans-serif,'apple color emoji','segoe ui emoji','segoe ui symbol';font-size:18px;margin:0px 0.25em">/</span><span style="color:rgb(88,96,105);font-family:-apple-system,blinkmacsystemfont,'segoe ui',helvetica,arial,sans-serif,'apple color emoji','segoe ui emoji','segoe ui symbol';font-size:18px;font-weight:600"><span class="m_-5450563725815257563m_4018368460607547747m_1575936426141092427gmail-il">ndnSIM</span>-strategy1</span></div><div dir="auto" style="font-family:sans-serif;font-size:13.696px"><span style="color:rgb(88,96,105);font-family:-apple-system,blinkmacsystemfont,'segoe ui',helvetica,arial,sans-serif,'apple color emoji','segoe ui emoji','segoe ui symbol';font-size:18px;font-weight:600"><br></span></div><div dir="auto" style="font-family:sans-serif;font-size:13.696px">The scenario in question is <b>jpb-pop1</b>.  The offending code seems to be when I pass my PopularityManager object to a set method, and then do the actual assignment.  I created the PopularityManager as an adapter object (and go-between) between the PStrat (strategy) and the PopularityPolicy (policy).  <br></div><div dir="auto" style="font-family:sans-serif;font-size:13.696px"><br></div><div dir="auto" style="font-family:sans-serif;font-size:13.696px">In order to establish my definition of "popularity", I require the interest information (which PStrat has), and to control caching / replacement ultimately (which is in PopularityPolicy), I need this information about interests.</div><div dir="auto" style="font-family:sans-serif;font-size:13.696px"><br></div><div dir="auto" style="font-family:sans-serif;font-size:13.696px">I am able to print (using cout) just before the assignment occurs, but it seems the segfault happens right then.</div><div dir="auto" style="font-family:sans-serif;font-size:13.696px"><br></div><div dir="auto" style="font-family:sans-serif;font-size:13.696px">I used GDB and it does indeed say there's a SIGSEGV, but I cannot for the life of me figure out why this is happening.  It happens if I try to set the data member (popularityManager) to anything.</div><div dir="auto" style="font-family:sans-serif;font-size:13.696px"><br></div><div dir="auto" style="font-family:sans-serif;font-size:13.696px">So I don't think it's the parameter (or argument) being passed in. </div><div dir="auto" style="font-family:sans-serif;font-size:13.696px"><br></div><div dir="auto" style="font-family:sans-serif;font-size:13.696px">Any assistance would be appreciated.  This may be some peculiar smart pointer issue, but I'm not sure.</div><div dir="auto" style="font-family:sans-serif;font-size:13.696px"><br></div><div dir="auto" style="font-family:sans-serif;font-size:13.696px"><br></div><div dir="auto" style="font-family:sans-serif;font-size:13.696px">Thanks,</div><div dir="auto" style="font-family:sans-serif;font-size:13.696px"><br></div><div dir="auto" style="font-family:sans-serif;font-size:13.696px">John</div></div></blockquote></div></div></div><br></div></blockquote></div><br></div></div></div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>