- getting comp.lang.c++ in eternal-september.org news server - 2 Updates
- removing element from deque from different threads results in segmentation fault - 11 Updates
- Please do not reply to Hodgin's C++ posts... - 6 Updates
- How to simply not see certain postings, with Thunderbird - 2 Updates
- Colour emojis implemented in neoGFX - 1 Update
- Here is how to understand C++ compilers - 1 Update
- Read again about C++ - 1 Update
- C++ compilers today follow a weak memory model - 1 Update
kushal bhattacharya <bhattacharya.kushal4@gmail.com>: Mar 18 02:52AM -0700 Hi, How do i get this group into the newsserver.PLease show me some sample example about this |
jt@toerring.de (Jens Thoms Toerring): Mar 18 03:19PM > How do i get this group into the newsserver.PLease show me some sample > example about this They (eternal september( already distribute comp.lang.c++. All you need to do is to make your newsreader show it to you - it probably is set up not to show it at the moment like hundreds of other newsgroups that are available but which you're rather likely not interested in. Perhaps your newsreader has some option to show all avaialble groups and then allows you to "subscribe" to some of them. -- \ Jens Thoms Toerring ___ jt@toerring.de \__________________________ http://toerring.de |
"Chris M. Thomasson" <invalid@invalid.invalid>: Mar 17 06:59PM -0700 On 3/17/2017 3:13 AM, kushal bhattacharya wrote: > To be more clear i am doing his operation from differen threads and thus the deque is accessible to all the threads running simultaneously How are you synchronizing access to the deque? |
kushal bhattacharya <bhattacharya.kushal4@gmail.com>: Mar 17 09:53PM -0700 Hi, Actually the code has several files . If you want i can mail you all the files. I can't really figure out which part exactly is the suspicious one. I am synchronsing access using condtion variables notifying waiting thread when any modification is done on the deque and on the waiting thread i use that same condition variable with lock on it. |
kushal bhattacharya <bhattacharya.kushal4@gmail.com>: Mar 17 10:03PM -0700 Hi, Could you guys help me how do i detect the problematic area and post here? |
kushal bhattacharya <bhattacharya.kushal4@gmail.com>: Mar 17 10:53PM -0700 When i try to remove a non existent element does it also cause undefined behaviour? |
"Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com>: Mar 18 06:59AM +0100 On 18-Mar-17 6:03 AM, kushal bhattacharya wrote: > Hi, Could you guys help me how do i detect the problematic area and > post here? Well, you have a bug somewhere, apparently (but that's only your impression) connected to removal of items from a deque by multiple threads. To fix a problem it's important to be able to reproduce it consistently, but thread synchronization problems are notoriously difficult to reproduce. So I suggest that you /isolate/ the deque. Place it as a private member of a class. Define access methods that always lock it via mutex. If the problem persists, then /if/ it's connected to the deque it's probably because some thread retains a reference to something in the deque. This is more difficult to hunt down, but the solution then is probably a bit of indirection, to deal with the real shared ownership (contradicting the assumption of central ownership in the deque). One approach then is to not let your wrapper hand out raw references or pointers to data in the deque. Hand out shared_ptr's. And you can do the same with the items as with the deque: isolate them, by placing them in thread safe wrappers. You can also attack this from the opposite end. Namely, try to build up a simplest possible example that exhibits the ungood behavior. In the end, when no reasonable approach has worked, if that should happen, then just find some totally different way of doing whatever it is that needs to be done. Cheers & hth., - Alf |
kushal bhattacharya <bhattacharya.kushal4@gmail.com>: Mar 17 11:24PM -0700 Hi Alf, I am globally accessing the deque in different classes instances so thats why i have kept it globally.Is it a wise choice or do I have to wrap it within some class? |
Ian Collins <ian-news@hotmail.com>: Mar 18 07:33PM +1300 On 03/18/17 07:24 PM, kushal bhattacharya wrote: > Hi Alf, I am globally accessing the deque in different classes > instances so thats why i have kept it globally.Is it a wise choice or > do I have to wrap it within some class? Please try and reply (with context) to the message you are responding to rather than keep replying to yourself! That will make it easier for people to help you.. -- Ian |
kushal bhattacharya <bhattacharya.kushal4@gmail.com>: Mar 18 12:50AM -0700 I apologise if i have been wrong actually i was trying to be more clear .Actually now i am getting seg fault in my manipulation of deque |
Christian Gollwitzer <auriocus@gmx.de>: Mar 18 09:00AM +0100 Am 18.03.17 um 06:59 schrieb Alf P. Steinbach: > impression) connected to removal of items from a deque by multiple threads. > To fix a problem it's important to be able to reproduce it consistently, > but thread synchronization problems are notoriously difficult to reproduce. Fortunately, there are tools which can help. If you can run your program on Linux, you can use Valgrind to check it for memory errors and Helgrind to find synchronization errors. These are two of the best debugging tools I've ever used. Christian |
Paavo Helde <myfirstname@osa.pri.ee>: Mar 18 10:47AM +0200 On 18.03.2017 7:03, kushal bhattacharya wrote: > Hi, > Could you guys help me how do i detect the problematic area and post here? Multithreading bugs are difficult to debug. One simple approach is to inspect the code carefully to verify that the multithread locking code is correct. This is very simple: do a text search over all your files for the name of the global deque. Go through the *ALL* locations where the deque is accessed and verify that there is the proper lock variable defined in an enclosing scope (and that it is not a declaration of a function, that it is locking the same global mutex, etc.) And please learn to reply in the correct subthread and to quote the relevant context! Using a proper newsreader like Thunderbird instead of Google Groups might be of some help. |
Jerry Stuckle <jstucklex@attglobal.net>: Mar 18 10:31AM -0400 On 3/18/2017 3:50 AM, kushal bhattacharya wrote: > I apologise if i have been wrong actually i was trying to be more clear .Actually now i am getting seg fault in my manipulation of deque You can't just lock the deque during the removal process. Removing an element can cause any pointer or iterator in other threads to become invalid. This will cause undefined results (including potential segfaults). -- ================== Remove the "x" from my email address Jerry Stuckle jstucklex@attglobal.net ================== |
"Öö Tiib" <ootiib@hot.ee>: Mar 17 04:31PM -0700 On Friday, 17 March 2017 20:32:40 UTC+2, David Brown wrote: > On 17/03/17 18:24, Mr Flibble wrote: > I think most people > find Rick's religious posts annoying, but not offensive. About as non-offensive as would be shitting into well from what other people drink. |
kushal bhattacharya <bhattacharya.kushal4@gmail.com>: Mar 17 09:56PM -0700 Thanks a lot David. I think I have thunderbird installed in my ubuntu os. I will try to google it and try to setup now. |
wij@totalbb.net.tw: Mar 18 05:30AM -0700 On Friday, March 17, 2017 at 9:33:39 PM UTC+8, Rick C. Hodgin wrote: > God's judgment remains upon you. > Thank you, > Rick C. Hodgin Well said. I do believe you have your reason to preach, can't help thinking what kind of sin really down there in your soul (hope not offensive, i have no religion). |
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Mar 18 06:14AM -0700 > ...can't help thinking > what kind of sin really down there in your soul... I am like everyone else. I have sinned in my life. Some big sins. Some little sins. But before a "Holy, Holy, Holy" God, they are all equal. To God, sin is sin and is unacceptable in a universe created in truth, founded on truth, and enduring in truth. To such a creation, falseness is a cancer that only destroys: http://biblehub.com/james/2-10.htm 10 For whosoever shall keep the whole law, and yet offend in one point, he is guilty of all. We are all guilty before God. It's why I point you all to Jesus. He has the authority and desire to forgive your sin and give you eternal life. He doesn't want to judge anyone. But, because of our sin, if we do not accept His free offer of forgiveness and salvation, He will. I need Jesus. I am no different than anyone else. I have Jesus now in my life, and I know the freedom He affords from sin, and a re- polarization of my internal driving forces so that I no longer want to sin. He did that for me. I did not achieve something on my own. I came to Him acknowledging that I was a sinner, repenting of my sin, not wanting it, and He made it possible for me to stop sinning. Of course I still stumble from time to time. I make mistakes. I'm in no way perfect. I am a flawed person in this body, but my spirit seeks God rightly and I desire to be more than my flaws, and He makes it possible for me. It's not me doing on my own. It's Him in my life making it possible. He can do the same for each of you. He wants to do the same for each of you. I point you to Him so you can come to Him and ask forgiveness for your sin and be saved as well. He will work on straightening out your life the same as He did my life. And, in the process, you too will encounter an unending slew of people who come at you saying in vulgarity and profanity that those things you do leading them to life and life eternal are the equivalent of defalcating in public water sources. What kind of twisted thinking is that, that the one pointing people to forgiveness, life, and life eternal, is the same as doing some heinous act? It is only the one who has not yet heard the call of Christ in their heart, for when they do they too will see the error of their ways, and their attack on men and women like me who have done nothing more than lead them to Jesus Christ so they too could be saved. ----- I have sin. I need a savior. Jesus is my savior. And now I have eternal life. He will do the same for you ... if you ask Him. Thank you, Rick C. Hodgin |
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Mar 18 06:26AM -0700 On Saturday, March 18, 2017 at 9:14:33 AM UTC-4, Rick C. Hodgin wrote: > your life the same as He did my life. And, in the process, you too > will encounter an unending slew of people who come at you saying in > vulgarity and profanity that those things you do leading them to life Should be "defecating." I clicked on the wrong spell-checker word as I didn't know how to spell "deficating" (in my thinking). :-) I didn't even know defalcating was a word. It means embezzlement of public funds apparently. > ----- > I have sin. I need a savior. Jesus is my savior. And now I have > eternal life. He will do the same for you ... if you ask Him. It's not offensive to teach people about Jesus. It's what He calls us to do. It is offensive to not receive it. It's not offensive to me, but it is offense of one's self, and to the God who paid the price to make a way for you to be set free. It is offensive to that offering of unparalleled love and compassion for you in your life. This is not like forgiveness of a monetary debt. This is eternal life in the form God originally created you to be, and intended for you to be, before sin entered into the world and created this fallen world of death, disease, war and loss that we see. It's not supposed to be like this, and Jesus is the path back to what it's supposed to be like: What will Heaven be like? http://biblehub.com/kjv/revelation/22.htm 1 And he shewed me a pure river of water of life, clear as crystal, proceeding out of the throne of God and of the Lamb. 2 In the midst of the street of it, and on either side of the river, was there the tree of life, which bare twelve manner of fruits, and yielded her fruit every month: and the leaves of the tree were for the healing of the nations. 3 And there shall be no more curse: but the throne of God and of the Lamb shall be in it; and his servants shall serve him: 4 And they shall see his face; and his name shall be in their foreheads. 5 And there shall be no night there; and they need no candle, neither light of the sun; for the Lord God giveth them light: and they shall reign for ever and ever. Nobody knows the explicit details. But Jesus Himself described it as paradise: http://biblehub.com/luke/23-43.htm 43 And Jesus said unto him, Verily I say unto thee, To day shalt thou be with me in paradise. To put it in modern terms: It's better than the Nexus from Star Trek. And it's available to everybody. Nobody has to perish. Everyone can be saved. What Jesus did at the cross was sufficient to save ALL people WORLDWIDE. It is only us (we ourselves by our choice) who will reject Him. He calls out to all people to come to Him and be saved, to be a part of His eternal Kingdom. Thank you, Rick C. Hodgin |
bitrex <bitrex@de.lete.earthlink.net>: Mar 18 10:11AM -0400 On 03/18/2017 09:14 AM, Rick C. Hodgin wrote: > seeks God rightly and I desire to be more than my flaws, and He makes > it possible for me. It's not me doing on my own. It's Him in my > life making it possible. The difficulty with "Honor thy father and mother" is that unfortunately, not all parents actually love their children (at least not in the way "normal" people would conceptualize it.) Sadly, some seem to have been born without the equipment to do so, and yet they often have children regardless. For example: <https://en.wikipedia.org/wiki/Cluster_B_personality_disorders> Even psychopaths have children from time to time. In what way should a child "honor" a psychopath? |
fir <profesor.fir@gmail.com>: Mar 18 03:53AM -0700 W dniu sobota, 18 marca 2017 00:26:23 UTC+1 użytkownik Öö Tiib napisał: > missing for me. Why does Rick C. Hodgin shit into drinking well? > Why does Amine Moulay Ramdane? It is proof that here exists no God. > It can't be that some God made such pointless, annoying people. it is becouse they are abusers and idiots (being idiots they not take intellectual points and being abusers they need force-based treatment ) -- the fault is also on google side speaking on google groups as they are known to not answering on abuse raports (this is all ofc not about censorship and cutting down variety of attitudes and opinions but on massive bulk spam (all ramine, hodgin, elmo and yet czang are spammers/ idiot-abusers) |
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Mar 18 05:07AM -0700 Why don't you understand why I post about Jesus? It's because you are not being saved: http://biblehub.com/1_corinthians/1-18.htm 18 For the preaching of the cross is to them that perish foolishness; but unto us which are saved it is the power of God. I guide you to Jesus because I care about you. I want you to be forgiven for your sin and be saved. I want you to be alive in Heaven with God in His Kingdom of paradise. I want the absolute best for your future. Thank you, Rick C. Hodgin |
Gareth Owen <gwowen@gmail.com>: Mar 18 06:02AM > Colour emojis implemented in "neoGFX" my C++ GUI/game library: > http://neogfx.org/temp/emoji.png Looks very nice. |
Ramine <toto@toto.net>: Mar 17 07:56PM -0400 Hello, Here is how to understand C++ compilers.. I have written this, read it carefully: ==== C++ compilers today follow a weak memory model and this is error prone when you want to reason about sequential consistency when doing parallel programming. But Delphi and FreePascal compilers don't reorder loads and stores, so it is less error prone than C++ on a strong memory model of x86 architecture and on strong memory model of ARM architecture. This is why i am using Delphi and Freepascal Dynamic Link Libraries from C++ compilers. === Now you have understood the philosophy of C and C++ compilers, it's that they give much more priviledge to speed than to security, they look like assembler compilers in this regard, this is why they follow a weak memory model that is more error prone than Delphi and FreePascal compilers. Thank you, Amine Moulay Ramdane. |
Ramine <toto@toto.net>: Mar 17 07:37PM -0400 Hello, C++ compilers today follow a weak memory model and this is error prone when you want to reason about sequential consistency when doing parallel programming. But Delphi and FreePascal compilers don't reorder loads and stores, so it is less error prone than C++ on a strong memory model of x86 architecture and on strong memory model of ARM architecture. This is why i am using Delphi and Freepascal Dynamic Link Libraries from C++ compilers. Thank you, Amine Moulay Ramdane. |
Ramine <toto@toto.net>: Mar 17 07:34PM -0400 Hello, C++ compilers today follow a weak memory model and this is error prone when you want to reason about sequential consistency when doing parallel programming. But Delphi and FreePascal compilers don't reorder loads and stores, so it os less error prone than C++ on a strong memory model of x86 architecture and on strong memory model of ARM architecture. This is why i am using Delphi and Freepascal Dynamic Link Libraries from C++ compilers. Thank you, Amine Moulay Ramdane. |
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page. To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com. |
No comments:
Post a Comment